I finished the macro before few minutes, but I used own new algorithm and I write the documentation. There are some unexpected insidiousnesses in LibreOffice, so I also add the descriptions of ones to documentation. But unfortunately I have backache, so I need more days to finish it.