public class OWriterDoc.TextSearch extends OPropObj
| Modifier and Type | Class and Description |
|---|---|
class |
OWriterDoc.TextSearch.Result
A text search result.
|
| Constructor and Description |
|---|
TextSearch()
Constructs a text search with default parameters:
|
| Modifier and Type | Method and Description |
|---|---|
void |
matchCase(boolean match)
Sets whether to match case.
|
void |
matchParaStyle(boolean match)
Sets whether the search pattern is a paragraph style name to match rather than text.
|
void |
matchWordsOnly(boolean wordsOnly)
Sets whether only complete words are matched.
|
java.util.Collection<OWriterDoc.TextSearch.Result> |
perform(java.lang.String pattern)
Performs a search.
|
void |
useRegex(boolean use)
Sets whether the search pattern should be interpreted as a regular expression.
|
com.sun.star.util.XSearchDescriptor |
xGetXSearchDesc()
Gets the XSearchDescriptor object for the document.
|
logProps, xGetPropSetpublic TextSearch()
throws com.sun.star.uno.Exception
- forward search for text not styles - regular expression pattern - for text, match complete words only - case sensitive
com.sun.star.uno.Exceptionpublic void useRegex(boolean use)
throws com.sun.star.uno.Exception
use - whether a regular expressioncom.sun.star.uno.Exceptionpublic void matchWordsOnly(boolean wordsOnly)
throws com.sun.star.uno.Exception
wordsOnly - whether complete words onlycom.sun.star.uno.Exceptionpublic void matchCase(boolean match)
throws com.sun.star.uno.Exception
match - whether to match casecom.sun.star.uno.Exceptionpublic void matchParaStyle(boolean match)
throws com.sun.star.uno.Exception
match - whether to match style namecom.sun.star.uno.Exceptionpublic java.util.Collection<OWriterDoc.TextSearch.Result> perform(java.lang.String pattern) throws com.sun.star.uno.Exception
pattern - the search patterncom.sun.star.uno.Exceptionpublic com.sun.star.util.XSearchDescriptor xGetXSearchDesc()