The attached file performs an attribute search test with a starbasic macro that uses the createSearchDescriptor method.
The attribute is CharBottomBorder modified by the application of character styles xIniz (creates a top border but not a bottom border) and xFine (creates a bottom border but not a top border)
For this the searches assume the property searchStyle true, otherwise the search would not recognize anything.
The button on the left performs a search on the attribute setting the ValueSearch property false
Only the texts associated with an attribute change are correctly recognized, regardless of the format (value) applied.
The function AFTER selecting the recognized text saves the content of the CharBottomBorder property, a UNOstruct new com.sun.star.table.BorderLine2, and uses it as the format for the second search (button on the right) which sets ValueSearch to true on the contrary
In this case, for the recognition, the modification of the attribute is not enough: this must assume a precise format, and to be sure to define it correctly I obtain it directly from the text recognized in the first search (ValueSearch = false)
It should recognize two paragraph texts, but it recognizes nothing
Why? Are attributes consisting of a struct not recognized?
With other attribute searches (e.g. CharColor, CharFontName, CharBackColor, etc) I have no problem
Libreoffice 220.127.116.11 ubuntu 16.04
askSearchAttribute.odt (20.9 KB)