The URL, the description, the arguments, the result information, and the related information (which can be gotten from the command execution) of the UNO dispatch command, '.uno:ExecuteSearch', are described.
Topics
About: UNO (Universal Network Objects)
About: LibreOffice
About: Apache OpenOffice
The table of contents of this article
Starting Context
- The reader has knowledge of what 'UNO dispatch command' is and how to call one (if the URL and the arguments of the command are clear).
Target Context
- The reader will know the specifications of the UNO dispatch command.
Orientation
There are some articles that explain how to execute any UNO dispatch commands and get the whole available information from the execution, in Java, in C++, in C#, in Python, and in LibreOffice or Apache OpenOffice Basic.
There are the list for the application foundations, the list for Writer, and the list for Calc of the UNO dispatch commands listed so far in this series.
Main Body
1: The Specifications
URL: .uno:ExecuteSearch
Description: This command searches the current spread sheet or the spread sheets document for the specified string or with the specified regular expression or the specified glob expression or for the specified cell style. The search can be done for the next occurrence or for all the occurrences. Some criteria like case sensitivity, similarity degree, etc. can be specified. The found strings can be optionally replaced with the specified replacing string; the style of the found cells by cell style search can be optionally replaced with the specified replacing style.
Arguments (the types are UNO datum types):
Name | Type | Value |
---|---|---|
SearchItem.StyleFamily | short | Seems not be used |
SearchItem.CellType | short | The contents against which the search is performed: 0 -> formulas and non-formula cell values, 1 -> cell values, 2 -> comments |
SearchItem.RowDirection | boolean | The search direction: true -> row-wise, false -> column-wise; not valid when the search is a cell style search |
SearchItem.AllTables | boolean | Whether all the spread sheets are searched or not: true -> all the spread sheets are searched, false -> only the current spread sheet is searched |
SearchItem.SearchFiltered | boolean | Whether also the filtered-out cells are searched or not: true -> searched, false -> not searched |
SearchItem.Backward | boolean | Whether the search is performed backward: true -> performed backward, false -> performed forward |
SearchItem.Pattern | boolean | Whether the search is a cell style search or not: true -> a cell style search, false -> a strings search |
SearchItem.Content | boolean | Seems not be used |
SearchItem.AsianOptions | boolean | Whether the search is performed for 'sounds-like' strings in Japanese or not: true -> performed for 'sounds-like' strings, false -> not performed for 'sounds-like' strings |
SearchItem.AlgorithmType | short | Deprecated; use SearchItem.AlgorithmType2 instead |
SearchItem.SearchFlags | long | The sum of these flags: 16 -> search for only cells whose entire contents match the search expression, 2048 -> search only the selected cells, 4096 -> seems not be used, 65536 -> for similarity search (Weighted Levenshtein Distance search), relax the similarity criteria ("the search is also successful if the combined pool for insertions and deletions is below a doubled calculated limit and replacements are treated differently; additionally, swapped characters are counted as one replacement" according to the reference document, whatever that means), 1048576 -> for glob search, search for only cells whose entire contents match the search expression; refer to this for more information, especially about '65536'. |
SearchItem.SearchString | string | The search expression (plain string, regular expression, glob expression, or cell style name) |
SearchItem.ReplaceString | string | The replace expression (replacing string or replacing cell style name) |
SearchItem.Locale | com.sun.star.lang.Locale | The locale used in case insensitive search (refer to this) |
SearchItem.ChangedChars | long | The allowed number of changed characters for being judged to be similar |
SearchItem.DeletedChars | long | The allowed number of deleted characters for being judged to be similar |
SearchItem.InsertedChars | long | The allowed number of inserted characters for being judged to be similar |
SearchItem.TransliterateFlags | long | The sum of language-specific flags: 256 -> ignore the cases, 1024 -> ignore the character widths, 1073741824 -> ignore diacritics, etc. (too many to be cited here: refer to this and this for more). |
SearchItem.Command | short | The execution type: 0 -> find the next occurrence, 1 -> find all the occurrences, 2 -> replace the next occurrence, 3 -> replace all the occurrences |
SearchItem.SearchStartPointX | long | The find-next-occurence search starting position X coordinate in twips (the value '0' together with 'SearchItem.SearchStartPointY' '0' means that no starting position is specified, meaning that the search is performed from the current cell) |
SearchItem.SearchStartPointY | long | The find-next-occurence search starting position Y coordinate in twips (the value '0' together with 'SearchItem.SearchStartPointX' '0' means that no starting position is specified, meaning that the search is performed from the current cell) |
SearchItem.SearchFormatted | boolean | Whether the after-formatted strings (for example, a thousands delimited number string) are searched or not: true -> the after-formatted strings are searched, false -> the raw cell values are searched |
SearchItem.AlgorithmType2 | short | The strings search algorithm: 1 -> plain text search, 2 -> regular expression search, 3 -> similarity search, 4 -> glob expression search |
Quiet | boolean | Seems not be used |
The related information (the value of com.sun.star.frame.FeatureStateEvent.State) (the types are UNO datum types):
Nothing.
The result information (the value of com.sun.star.frame.DispatchResultEvent.Result) (the type is a UNO datum type):
If | Type | Value |
---|---|---|
something is found | boolean | true |
otherwise | N/A | null |
<The previous article in this series | The table of contents of this series | The next article in this series>