1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2/* 3 * This file is part of the LibreOffice project. 4 * 5 * This Source Code Form is subject to the terms of the Mozilla Public 6 * License, v. 2.0. If a copy of the MPL was not distributed with this 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 8 * 9 * This file incorporates work covered by the following license notice: 10 * 11 * Licensed to the Apache Software Foundation (ASF) under one or more 12 * contributor license agreements. See the NOTICE file distributed 13 * with this work for additional information regarding copyright 14 * ownership. The ASF licenses this file to you under the Apache 15 * License, Version 2.0 (the "License"); you may not use this file 16 * except in compliance with the License. You may obtain a copy of 17 * the License at http://www.apache.org/licenses/LICENSE-2.0 . 18 */ 19 20#ifndef __com_sun_star_util_SearchFlags_idl__ 21#define __com_sun_star_util_SearchFlags_idl__ 22 23 24 25module com { module sun { module star { module util { 26 27 28/// Flags for search methods 29published constants SearchFlags 30{ 31 /** 32 @deprecated The constant ALL_IGNORE_CASE is never supported - use 33 com::sun::star::i18n::TransliterationModules::IGNORE_CASE 34 with 35 SearchOptions::transliterateFlags() 36 instead. 37 38 @see com::sun::star::i18n::TransliterationModules 39 */ 40 const long ALL_IGNORE_CASE = 0x00000001; 41 42 /** Flag for normal (Boyer-Moore) search / Search for word only. */ 43 const long NORM_WORD_ONLY = 0x00000010; 44 45 /** Flag for "regular expression" search / Interpret as extended 46 regular expression. 47 48 @deprecated The flag is currently not supported by OOo. 49 */ 50 const long REG_EXTENDED = 0x00000100; 51 52 /** Flag for "regular expression" search / No register information 53 or backreferences, i.e., avoid sub expressions. Return only 54 true/false if matched or not. 55 56 @deprecated The flag is currently not supported by OOo. 57 */ 58 const long REG_NOSUB = 0x00000200; 59 60 /** Flag for "regular expression" search / Special new line 61 treatment. 62 63 @deprecated The flag is currently not supported by OOo. 64 65 <p> A NEWLINE character in string will not be matched by a 66 period outside bracket expression or by any form of a non 67 matching list. </p> 68 69 <p> A circumflex (^) in pattern when used to specify expression 70 anchoring will match the zero length string immediately after a 71 newline in string, regardless of the setting of 72 REG_NOT_BEGINOFLINE. </p> 73 74 <p> A dollar-sign ($) in pattern when used to specify expression 75 anchoring, will match zero-length string immediately before a 76 new line in string, regardless of the setting of 77 REG_NOT_ENDOFLINE. </p> 78 */ 79 const long REG_NEWLINE = 0x00000400; 80 81 /** The first character in the string is not the beginning of the 82 line therefore ^ will not match with first character of the 83 string. 84 */ 85 const long REG_NOT_BEGINOFLINE = 0x00000800; 86 87 /** The last character in the string is not the end of the line 88 therefore $ will not match with last character of the string. 89 */ 90 const long REG_NOT_ENDOFLINE = 0x00001000; 91 92 /** Flag for "Weighted Levenshtein Distance" search / Relaxed 93 checking of limit, split weigh pools. 94 95 <p> If not specified (<b>strict</b>), the search is successful if 96 the WLD is within a calculated limit where each insertion, 97 deletion and replacement adds a weight to a common pool of 98 weights. This is the mathematically correct WLD. </p> 99 100 <p> From a user's point of view the strict WLD is an 101 exclusive-OR of the arguments given, for example if allowed 102 insertions=2 and allowed replacements=2, the search fails if 2 103 characters had been inserted and an additional operation would 104 be needed to match. Depending on the weights it may also fail if 105 1 character was inserted and 1 character replaced and an 106 additional operation would be needed to match. The strict 107 algorithm may match less than expected from a first glance of 108 the specified arguments, but does not return false positives. </p> 109 110 <p> If specified (<b>relaxed</b>), the search is also successful 111 if the combined pool for insertions and deletions is below a 112 doubled calculated limit and replacements are treated 113 differently. Additionally, swapped characters are counted as one 114 replacement. </p> 115 116 <p> From a user's point of view the relaxed WLD is an 117 inclusive-OR of the arguments given, for example if allowed 118 insertions=2 and allowed replacements=2, the search succeeds if 119 2 characters had been inserted and an additional replacement is 120 needed to match. The relaxed algorithm may return false 121 positives, but meets user expectation better. </p> 122 */ 123 const long LEV_RELAXED = 0x00010000; 124 125 /** Flag for wildcards search if entire selection must match the 126 pattern. 127 128 <p> If com::sun::star::util::SearchOptions2::AlgorithmType2 is 129 com::sun::star::util::SearchAlgorithms2::WILDCARD specifies 130 whether a wildcard pattern must match the entire selected range 131 of the string from start position to end position or a substring 132 match is allowed. </p> 133 134 <p> If set, the entire selection must match. If not set, a 135 substring match is allowed. </p> 136 137 @since LibreOffice 5.2 138 */ 139 const long WILD_MATCH_SELECTION = 0x00100000; 140}; 141 142}; }; }; }; 143 144#endif 145 146/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 147