From 1f3357013ba1f319a3bcddf4c9a658c46e8c0390 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 23 Feb 2016 23:18:47 +0100 Subject: SearchFlags::WILD_MATCH_SELECTION, SearchOptions2::WildcardEscapeCharacter At least '\' (search in Word) and '~' (search in Excel) should be supported as escape character. Being able to restrict a match to entire selection instead of substring speeds up the Calc match whole cell scenario. Change-Id: Ice242b9cd59009f172b724e03c2cc08feda4cd3c --- offapi/com/sun/star/util/SearchFlags.idl | 14 ++++++++++++++ offapi/com/sun/star/util/SearchOptions2.idl | 14 ++++++++++++++ 2 files changed, 28 insertions(+) (limited to 'offapi/com') diff --git a/offapi/com/sun/star/util/SearchFlags.idl b/offapi/com/sun/star/util/SearchFlags.idl index f0c03e277a21..964f836962c1 100644 --- a/offapi/com/sun/star/util/SearchFlags.idl +++ b/offapi/com/sun/star/util/SearchFlags.idl @@ -121,6 +121,20 @@ published constants SearchFlags positives, but meets user expectation better.

*/ const long LEV_RELAXED = 0x00010000; + + /** Flag for wildcards search if entire selection must match the + pattern. + +

If com::sun::star::util::SearchOptions2::AlgorithmType2 is + com::sun::star::util::SearchAlgorithms2::WILDCARD specifies + whether a wildcard pattern must match the entire selected range + of the string from start position to end position or a substring + match is allowed.

+ +

If set, the entire selection must match. If not set, a + substring match is allowed.

+ */ + const long WILD_MATCH_SELECTION = 0x00100000; }; }; }; }; }; diff --git a/offapi/com/sun/star/util/SearchOptions2.idl b/offapi/com/sun/star/util/SearchOptions2.idl index a7f16e59b109..5dcd47e9fa41 100644 --- a/offapi/com/sun/star/util/SearchOptions2.idl +++ b/offapi/com/sun/star/util/SearchOptions2.idl @@ -29,6 +29,20 @@ published struct SearchOptions2 : com::sun::star::util::SearchOptions { SearchAlgorithms SearchOptions::algorithmType enum field. */ short AlgorithmType2; + + /** The escape character to be used with a + com::sun::star::util::SearchAlgorithms2::WILDCARD search. + +

A Unicode character, if not 0 escapes the special meaning of + a question mark, asterisk or escape character that follows + immediately after the escape character. If 0 defines no escape + character is used.

+ +

Common values are '\' (U+005C REVERSE SOLIDUS) aka backslash + in text processing context, or '~' (U+007E TILDE) in spreadsheet + processing context.

+ */ + long WildcardEscapeCharacter; }; }; }; }; }; -- cgit v1.2.3