LibreOffice Module svl (master) 1
srchitem.cxx
Go to the documentation of this file.
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#include <sal/config.h>
21
22#include <sal/log.hxx>
23#include <svl/srchitem.hxx>
24#include <sal/macros.h>
25#include <osl/diagnose.h>
26
29#include <com/sun/star/beans/PropertyValue.hpp>
30#include <com/sun/star/lang/Locale.hpp>
31#include <svl/memberid.h>
33
34#include <unordered_set>
35
36using namespace utl;
37using namespace com::sun::star;
38using namespace com::sun::star::beans;
39using namespace com::sun::star::uno;
40using namespace com::sun::star::util;
41
42constexpr OUStringLiteral CFG_ROOT_NODE = u"Office.Common/SearchOptions";
43
44#define SRCH_PARAMS 13
45constexpr OUStringLiteral SRCH_PARA_OPTIONS = u"Options";
46constexpr OUStringLiteral SRCH_PARA_FAMILY = u"Family";
47constexpr OUStringLiteral SRCH_PARA_COMMAND = u"Command";
48constexpr OUStringLiteral SRCH_PARA_CELLTYPE = u"CellType";
49constexpr OUStringLiteral SRCH_PARA_APPFLAG = u"AppFlag";
50constexpr OUStringLiteral SRCH_PARA_ROWDIR = u"RowDirection";
51constexpr OUStringLiteral SRCH_PARA_ALLTABLES = u"AllTables";
52constexpr OUStringLiteral SRCH_PARA_SEARCHFILTERED = u"SearchFiltered";
53constexpr OUStringLiteral SRCH_PARA_SEARCHFORMATTED = u"SearchFormatted";
54constexpr OUStringLiteral SRCH_PARA_BACKWARD = u"Backward";
55constexpr OUStringLiteral SRCH_PARA_PATTERN = u"Pattern";
56constexpr OUStringLiteral SRCH_PARA_CONTENT = u"Content";
57constexpr OUStringLiteral SRCH_PARA_ASIANOPT = u"AsianOptions";
58
60
61
63{
64 // names of transliteration relevant properties
65 static const char* aTranslitNames[] =
66 {
67 "IsMatchCase", // 0
68 "Japanese/IsMatchFullHalfWidthForms", // 1
69 "Japanese/IsMatchHiraganaKatakana", // 2
70 "Japanese/IsMatchContractions", // 3
71 "Japanese/IsMatchMinusDashCho-on", // 4
72 "Japanese/IsMatchRepeatCharMarks", // 5
73 "Japanese/IsMatchVariantFormKanji", // 6
74 "Japanese/IsMatchOldKanaForms", // 7
75 "Japanese/IsMatch_DiZi_DuZu", // 8
76 "Japanese/IsMatch_BaVa_HaFa", // 9
77 "Japanese/IsMatch_TsiThiChi_DhiZi", // 10
78 "Japanese/IsMatch_HyuIyu_ByuVyu", // 11
79 "Japanese/IsMatch_SeShe_ZeJe", // 12
80 "Japanese/IsMatch_IaIya", // 13
81 "Japanese/IsMatch_KiKu", // 14
82 "Japanese/IsIgnorePunctuation", // 15
83 "Japanese/IsIgnoreWhitespace", // 16
84 "Japanese/IsIgnoreProlongedSoundMark", // 17
85 "Japanese/IsIgnoreMiddleDot", // 18
86 "IsIgnoreDiacritics_CTL", // 19
87 "IsIgnoreKashida_CTL" // 20
88 };
89
90 const int nCount = SAL_N_ELEMENTS( aTranslitNames );
92 OUString* pNames = aNames.getArray();
93 for (sal_Int32 i = 0; i < nCount; ++i)
94 pNames[i] = OUString::createFromAscii( aTranslitNames[i] );
95
96 return aNames;
97}
98
99
100SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) :
101
102 SfxPoolItem( nId ),
104
105 m_aSearchOpt ( SearchFlags::LEV_RELAXED,
106 OUString(),
107 OUString(),
108 lang::Locale(),
109 2, 2, 2,
111 SearchAlgorithms2::ABSOLUTE, '\\' ),
112 m_eFamily ( SfxStyleFamily::Para ),
113 m_nCommand ( SvxSearchCmd::FIND ),
114 m_nCellType ( SvxSearchCellType::FORMULA ),
115 m_nAppFlag ( SvxSearchApp::WRITER ),
116 m_bRowDirection ( true ),
117 m_bAllTables ( false ),
118 m_bSearchFiltered ( false ),
119 m_bSearchFormatted( false ),
120 m_bNotes ( false),
121 m_bBackward ( false ),
122 m_bPattern ( false ),
123 m_bContent ( false ),
124 m_bAsianOptions ( false ),
125 m_nStartPointX(0),
126 m_nStartPointY(0)
127{
129
130 SvtSearchOptions aOpt;
131
132 m_bBackward = aOpt.IsBackwards();
134 m_bNotes = aOpt.IsNotes();
135
136 if (aOpt.IsUseWildcard())
137 {
138 m_aSearchOpt.AlgorithmType2 = SearchAlgorithms2::WILDCARD;
139 }
140 if (aOpt.IsUseRegularExpression())
141 {
142 m_aSearchOpt.AlgorithmType2 = SearchAlgorithms2::REGEXP;
143 }
144 if (aOpt.IsSimilaritySearch())
145 {
146 m_aSearchOpt.AlgorithmType2 = SearchAlgorithms2::APPROXIMATE;
147 }
148 if (aOpt.IsWholeWordsOnly())
149 m_aSearchOpt.searchFlag |= SearchFlags::NORM_WORD_ONLY;
150
152
153 if (!aOpt.IsMatchCase())
154 rFlags |= TransliterationFlags::IGNORE_CASE;
155 if ( aOpt.IsMatchFullHalfWidthForms())
156 rFlags |= TransliterationFlags::IGNORE_WIDTH;
157 if ( aOpt.IsIgnoreDiacritics_CTL())
158 rFlags |= TransliterationFlags::IGNORE_DIACRITICS_CTL ;
159 if ( aOpt.IsIgnoreKashida_CTL())
160 rFlags |= TransliterationFlags::IGNORE_KASHIDA_CTL ;
161 if ( !m_bAsianOptions )
162 return;
163
164 if ( aOpt.IsMatchHiraganaKatakana())
165 rFlags |= TransliterationFlags::IGNORE_KANA;
166 if ( aOpt.IsMatchContractions())
167 rFlags |= TransliterationFlags::ignoreSize_ja_JP;
168 if ( aOpt.IsMatchMinusDashChoon())
169 rFlags |= TransliterationFlags::ignoreMinusSign_ja_JP;
170 if ( aOpt.IsMatchRepeatCharMarks())
171 rFlags |= TransliterationFlags::ignoreIterationMark_ja_JP;
172 if ( aOpt.IsMatchVariantFormKanji())
173 rFlags |= TransliterationFlags::ignoreTraditionalKanji_ja_JP;
174 if ( aOpt.IsMatchOldKanaForms())
175 rFlags |= TransliterationFlags::ignoreTraditionalKana_ja_JP;
176 if ( aOpt.IsMatchDiziDuzu())
177 rFlags |= TransliterationFlags::ignoreZiZu_ja_JP;
178 if ( aOpt.IsMatchBavaHafa())
179 rFlags |= TransliterationFlags::ignoreBaFa_ja_JP;
180 if ( aOpt.IsMatchTsithichiDhizi())
181 rFlags |= TransliterationFlags::ignoreTiJi_ja_JP;
182 if ( aOpt.IsMatchHyuiyuByuvyu())
183 rFlags |= TransliterationFlags::ignoreHyuByu_ja_JP;
184 if ( aOpt.IsMatchSesheZeje())
185 rFlags |= TransliterationFlags::ignoreSeZe_ja_JP;
186 if ( aOpt.IsMatchIaiya())
187 rFlags |= TransliterationFlags::ignoreIandEfollowedByYa_ja_JP;
188 if ( aOpt.IsMatchKiku())
189 rFlags |= TransliterationFlags::ignoreKiKuFollowedBySa_ja_JP;
190 if ( aOpt.IsIgnorePunctuation())
191 rFlags |= TransliterationFlags::ignoreSeparator_ja_JP;
192 if ( aOpt.IsIgnoreWhitespace())
193 rFlags |= TransliterationFlags::ignoreSpace_ja_JP;
194 if ( aOpt.IsIgnoreProlongedSoundMark())
195 rFlags |= TransliterationFlags::ignoreProlongedSoundMark_ja_JP;
196 if ( aOpt.IsIgnoreMiddleDot())
197 rFlags |= TransliterationFlags::ignoreMiddleDot_ja_JP;
198}
199
200
202
203 SfxPoolItem ( rItem ),
205
206 m_aSearchOpt ( rItem.m_aSearchOpt ),
207 m_eFamily ( rItem.m_eFamily ),
208 m_nCommand ( rItem.m_nCommand ),
209 m_nCellType ( rItem.m_nCellType ),
210 m_nAppFlag ( rItem.m_nAppFlag ),
211 m_bRowDirection ( rItem.m_bRowDirection ),
212 m_bAllTables ( rItem.m_bAllTables ),
213 m_bSearchFiltered ( rItem.m_bSearchFiltered ),
214 m_bSearchFormatted ( rItem.m_bSearchFormatted ),
215 m_bNotes ( rItem.m_bNotes),
216 m_bBackward ( rItem.m_bBackward ),
217 m_bPattern ( rItem.m_bPattern ),
218 m_bContent ( rItem.m_bContent ),
219 m_bAsianOptions ( rItem.m_bAsianOptions ),
220 m_nStartPointX(rItem.m_nStartPointX),
221 m_nStartPointY(rItem.m_nStartPointY)
222{
224}
225
227{
228}
229
231{
232 return new SvxSearchItem(*this);
233}
234
237 const i18nutil::SearchOptions2& rItem2)
238{
239 return rItem1.searchFlag == rItem2.searchFlag &&
240 rItem1.searchString == rItem2.searchString &&
241 //rItem1.replaceString == rItem2.replaceString &&
242 //rItem1.Locale == rItem2.Locale &&
243 rItem1.changedChars == rItem2.changedChars &&
244 rItem1.deletedChars == rItem2.deletedChars &&
245 rItem1.insertedChars == rItem2.insertedChars &&
246 rItem1.transliterateFlags == rItem2.transliterateFlags &&
247 rItem1.AlgorithmType2 == rItem2.AlgorithmType2 &&
249}
250
251
252bool SvxSearchItem::operator==( const SfxPoolItem& rItem ) const
253{
254 assert(SfxPoolItem::operator==(rItem));
255 const SvxSearchItem &rSItem = static_cast<const SvxSearchItem &>(rItem);
256 return equalsIgnoring(rSItem, /*bIgnoreReplace=*/false, /*bIgnoreCommand=*/false);
257}
258
259bool SvxSearchItem::equalsIgnoring(const SvxSearchItem& rSItem, bool bIgnoreReplace,
260 bool bIgnoreCommand) const
261{
262 if (!bIgnoreReplace && m_aSearchOpt.replaceString != rSItem.m_aSearchOpt.replaceString)
263 return false;
264 if (!bIgnoreCommand && m_nCommand != rSItem.m_nCommand)
265 return false;
266
267 return ( m_bBackward == rSItem.m_bBackward ) &&
268 ( m_bPattern == rSItem.m_bPattern ) &&
269 ( m_bContent == rSItem.m_bContent ) &&
270 ( m_eFamily == rSItem.m_eFamily ) &&
271 ( m_bRowDirection == rSItem.m_bRowDirection ) &&
272 ( m_bAllTables == rSItem.m_bAllTables ) &&
273 ( m_bSearchFiltered == rSItem.m_bSearchFiltered ) &&
275 ( m_nCellType == rSItem.m_nCellType ) &&
276 ( m_nAppFlag == rSItem.m_nAppFlag ) &&
277 ( m_bAsianOptions == rSItem.m_bAsianOptions ) &&
279 ( m_bNotes == rSItem.m_bNotes );
280}
281
282
284(
286 MapUnit ,
287 MapUnit ,
288 OUString& ,
289 const IntlWrapper&
290) const
291{
292 return false;
293}
294
296{
297 // applies transliteration changes in the configuration database
298 // to the current SvxSearchItem
300}
301
303{
304}
305
307{
308 if (bVal)
309 m_aSearchOpt.transliterateFlags |= TransliterationFlags::IGNORE_WIDTH;
310 else
312}
313
314
316{
317 if (bVal)
318 m_aSearchOpt.searchFlag |= SearchFlags::NORM_WORD_ONLY;
319 else
320 m_aSearchOpt.searchFlag &= ~SearchFlags::NORM_WORD_ONLY;
321}
322
323
324void SvxSearchItem::SetExact( bool bVal )
325{
326 if (!bVal)
327 m_aSearchOpt.transliterateFlags |= TransliterationFlags::IGNORE_CASE;
328 else
330}
331
332
334{
335 if (bVal)
336 {
337 m_aSearchOpt.searchFlag |= (SearchFlags::REG_NOT_BEGINOFLINE |
338 SearchFlags::REG_NOT_ENDOFLINE);
339 }
340 else
341 {
342 m_aSearchOpt.searchFlag &= ~(SearchFlags::REG_NOT_BEGINOFLINE |
343 SearchFlags::REG_NOT_ENDOFLINE);
344 }
345}
346
347
349{
350 if ( bVal )
351 {
352 m_aSearchOpt.AlgorithmType2 = SearchAlgorithms2::REGEXP;
353 }
354 else if ( SearchAlgorithms2::REGEXP == m_aSearchOpt.AlgorithmType2 )
355 {
356 m_aSearchOpt.AlgorithmType2 = SearchAlgorithms2::ABSOLUTE;
357 }
358}
359
360
362{
363 if ( bVal )
364 {
365 m_aSearchOpt.AlgorithmType2 = SearchAlgorithms2::WILDCARD;
366 }
367 else if ( SearchAlgorithms2::REGEXP == m_aSearchOpt.AlgorithmType2 )
368 {
369 m_aSearchOpt.AlgorithmType2 = SearchAlgorithms2::ABSOLUTE;
370 }
371}
372
373
375{
376 if (bVal)
377 m_aSearchOpt.searchFlag |= SearchFlags::LEV_RELAXED;
378 else
379 m_aSearchOpt.searchFlag &= ~SearchFlags::LEV_RELAXED;
380}
381
382
384{
385 if ( bVal )
386 {
387 m_aSearchOpt.AlgorithmType2 = SearchAlgorithms2::APPROXIMATE;
388 }
389 else if ( SearchAlgorithms2::APPROXIMATE == m_aSearchOpt.AlgorithmType2 )
390 {
391 m_aSearchOpt.AlgorithmType2 = SearchAlgorithms2::ABSOLUTE;
392 }
393}
394
395
397{
399}
400
401bool SvxSearchItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) const
402{
403 nMemberId &= ~CONVERT_TWIPS;
404 switch ( nMemberId )
405 {
406 case 0 :
407 {
413 static_cast<sal_uInt16>(m_nCommand)),
415 static_cast<sal_uInt16>(m_nCellType)),
417 static_cast<sal_uInt16>(m_nAppFlag)),
426 };
427 assert(aSeq.getLength() == SRCH_PARAMS);
428 rVal <<= aSeq;
429 }
430 break;
432 rVal <<= static_cast<sal_Int16>(m_nCommand); break;
434 rVal <<= static_cast<sal_Int16>(m_eFamily); break;
436 rVal <<= static_cast<sal_Int32>(m_nCellType); break;
438 rVal <<= m_bRowDirection; break;
440 rVal <<= m_bAllTables; break;
442 rVal <<= m_bSearchFiltered; break;
444 rVal <<= m_bSearchFormatted; break;
446 rVal <<= m_bBackward; break;
448 rVal <<= m_bPattern; break;
450 rVal <<= m_bContent; break;
452 rVal <<= m_bAsianOptions; break;
454 rVal <<= static_cast<sal_Int16>(i18nutil::downgradeSearchAlgorithms2(m_aSearchOpt.AlgorithmType2)); break;
456 rVal <<= m_aSearchOpt.AlgorithmType2; break;
457 case MID_SEARCH_FLAGS:
458 rVal <<= m_aSearchOpt.searchFlag; break;
460 rVal <<= m_aSearchOpt.searchString; break;
462 rVal <<= m_aSearchOpt.replaceString; break;
464 rVal <<= m_aSearchOpt.changedChars; break;
466 rVal <<= m_aSearchOpt.deletedChars; break;
468 rVal <<= m_aSearchOpt.insertedChars; break;
470 rVal <<= static_cast<sal_Int32>(m_aSearchOpt.transliterateFlags); break;
472 {
473 LanguageType nLocale;
474 if (!m_aSearchOpt.Locale.Language.isEmpty() || !m_aSearchOpt.Locale.Country.isEmpty() )
476 else
477 nLocale = LANGUAGE_NONE;
478 rVal <<= static_cast<sal_Int16>(static_cast<sal_uInt16>(nLocale));
479 break;
480 }
481
482 default:
483 SAL_WARN( "svl.items", "SvxSearchItem::QueryValue(): Unknown MemberId" );
484 return false;
485 }
486
487 return true;
488}
489
490
491bool SvxSearchItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId )
492{
493 nMemberId &= ~CONVERT_TWIPS;
494 auto ExtractNumericAny = [](const css::uno::Any& a, auto& target)
495 {
496 sal_Int32 nInt;
497 if (!(a >>= nInt))
498 return false;
499 target = static_cast<std::remove_reference_t<decltype(target)>>(nInt);
500 return true;
501 };
502 switch ( nMemberId )
503 {
504 case 0 :
505 {
507 if (!(rVal >>= aSeq) || aSeq.getLength() != SRCH_PARAMS)
508 break;
509 std::unordered_set<OUString> aConvertedParams;
510 for (const auto& rProp : aSeq)
511 {
512 if (rProp.Name == SRCH_PARA_OPTIONS)
513 {
514 if (css::util::SearchOptions2 nTmpSearchOpt2; rProp.Value >>= nTmpSearchOpt2)
515 {
516 m_aSearchOpt = nTmpSearchOpt2;
517 aConvertedParams.insert(rProp.Name);
518 }
519 }
520 else if (rProp.Name == SRCH_PARA_FAMILY)
521 {
523 aConvertedParams.insert(rProp.Name);
524 }
525 else if (rProp.Name == SRCH_PARA_COMMAND)
526 {
528 aConvertedParams.insert(rProp.Name);
529 }
530 else if (rProp.Name == SRCH_PARA_CELLTYPE)
531 {
533 aConvertedParams.insert(rProp.Name);
534 }
535 else if (rProp.Name == SRCH_PARA_APPFLAG)
536 {
537 if (ExtractNumericAny(rProp.Value, m_nAppFlag))
538 aConvertedParams.insert(rProp.Name);
539 }
540 else if (rProp.Name == SRCH_PARA_ROWDIR)
541 {
543 aConvertedParams.insert(rProp.Name);
544 }
545 else if (rProp.Name == SRCH_PARA_ALLTABLES)
546 {
548 aConvertedParams.insert(rProp.Name);
549 }
550 else if (rProp.Name == SRCH_PARA_SEARCHFILTERED)
551 {
553 aConvertedParams.insert(rProp.Name);
554 }
555 else if (rProp.Name == SRCH_PARA_SEARCHFORMATTED)
556 {
558 aConvertedParams.insert(rProp.Name);
559 }
560 else if (rProp.Name == SRCH_PARA_BACKWARD)
561 {
563 aConvertedParams.insert(rProp.Name);
564 }
565 else if (rProp.Name == SRCH_PARA_PATTERN)
566 {
568 aConvertedParams.insert(rProp.Name);
569 }
570 else if (rProp.Name == SRCH_PARA_CONTENT)
571 {
573 aConvertedParams.insert(rProp.Name);
574 }
575 else if (rProp.Name == SRCH_PARA_ASIANOPT)
576 {
578 aConvertedParams.insert(rProp.Name);
579 }
580 }
581 return aConvertedParams.size() == SRCH_PARAMS;
582 }
584 return ExtractNumericAny(rVal, m_nCommand);
586 return ExtractNumericAny(rVal, m_eFamily);
588 return ExtractNumericAny(rVal, m_nCellType);
590 return (rVal >>= m_bRowDirection);
592 return (rVal >>= m_bAllTables);
594 return (rVal >>= m_bSearchFiltered);
596 return (rVal >>= m_bSearchFormatted);
598 return (rVal >>= m_bBackward);
600 return (rVal >>= m_bPattern);
602 return (rVal >>= m_bContent);
604 return (rVal >>= m_bAsianOptions);
606 if (SearchAlgorithms eVal; ExtractNumericAny(rVal, eVal))
607 {
609 return true;
610 }
611 break;
613 return (rVal >>= m_aSearchOpt.AlgorithmType2);
614 case MID_SEARCH_FLAGS:
615 return (rVal >>= m_aSearchOpt.searchFlag);
617 return (rVal >>= m_aSearchOpt.searchString);
619 return (rVal >>= m_aSearchOpt.replaceString);
621 return (rVal >>= m_aSearchOpt.changedChars);
623 return (rVal >>= m_aSearchOpt.deletedChars);
625 return (rVal >>= m_aSearchOpt.insertedChars);
627 return ExtractNumericAny(rVal, m_aSearchOpt.transliterateFlags);
629 if (LanguageType aVal; ExtractNumericAny(rVal, aVal))
630 {
631 m_aSearchOpt.Locale = (aVal == LANGUAGE_NONE) ? css::lang::Locale()
633 return true;
634 }
635 break;
637 return (rVal >>= m_nStartPointX);
639 return (rVal >>= m_nStartPointY);
640 default:
641 OSL_FAIL( "Unknown MemberId" );
642 }
643
644 return false;
645}
646
648{
649 return m_nStartPointX;
650}
651
653{
654 return m_nStartPointY;
655}
656
658{
659 return m_nStartPointX > 0 || m_nStartPointY > 0;
660}
661
662/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const short FIND
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
static LanguageType convertToLanguageType(const css::lang::Locale &rLocale, bool bResolveSystem=true)
Base class for providers of defaults of SfxPoolItems.
Definition: itempool.hxx:51
bool IsMatchBavaHafa() const
bool IsMatchTsithichiDhizi() const
bool IsMatchVariantFormKanji() const
bool IsMatchIaiya() const
bool IsMatchDiziDuzu() const
bool IsMatchKiku() const
bool IsMatchCase() const
bool IsMatchHiraganaKatakana() const
bool IsMatchFullHalfWidthForms() const
bool IsIgnoreMiddleDot() const
bool IsWholeWordsOnly() const
bool IsUseRegularExpression() const
bool IsIgnoreKashida_CTL() const
bool IsMatchOldKanaForms() const
bool IsSimilaritySearch() const
bool IsMatchContractions() const
bool IsIgnorePunctuation() const
bool IsUseWildcard() const
bool IsIgnoreProlongedSoundMark() const
bool IsMatchRepeatCharMarks() const
bool IsIgnoreDiacritics_CTL() const
bool IsIgnoreWhitespace() const
bool IsMatchHyuiyuByuvyu() const
bool IsBackwards() const
bool IsMatchMinusDashChoon() const
bool IsNotes() const
bool IsMatchSesheZeje() const
bool IsUseAsianOptions() const
bool HasStartPoint() const
Either x or y start point is set.
Definition: srchitem.cxx:657
SvxSearchCmd m_nCommand
Definition: srchitem.hxx:68
SvxSearchItem(const sal_uInt16 nId)
Definition: srchitem.cxx:100
static SfxPoolItem * CreateDefault()
Definition: srchitem.cxx:59
void SetLevenshtein(bool bVal)
Definition: srchitem.cxx:383
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
This virtual method allows to get a textual representation of the value for the SfxPoolItem subclasse...
Definition: srchitem.cxx:284
virtual ~SvxSearchItem() override
Definition: srchitem.cxx:226
virtual bool operator==(const SfxPoolItem &) const override
Definition: srchitem.cxx:252
void SetSelection(bool bNewSelection)
Definition: srchitem.cxx:333
i18nutil::SearchOptions2 m_aSearchOpt
Definition: srchitem.hxx:64
void SetLEVRelaxed(bool bSet)
Definition: srchitem.cxx:374
sal_Int32 m_nStartPointX
Definition: srchitem.hxx:87
bool equalsIgnoring(const SvxSearchItem &rSItem, bool bIgnoreReplace, bool bIgnoreCommand) const
Definition: srchitem.cxx:259
void SetExact(bool bNewExact)
Definition: srchitem.cxx:324
sal_Int32 m_nStartPointY
Definition: srchitem.hxx:88
void SetTransliterationFlags(TransliterationFlags nFlags)
Definition: srchitem.cxx:396
virtual SvxSearchItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: srchitem.cxx:230
void SetMatchFullHalfWidthForms(bool bVal)
Definition: srchitem.cxx:306
void SetRegExp(bool bVal)
Definition: srchitem.cxx:348
bool m_bPattern
Definition: srchitem.hxx:82
bool m_bContent
Definition: srchitem.hxx:83
bool m_bSearchFiltered
Definition: srchitem.hxx:75
bool m_bSearchFormatted
Definition: srchitem.hxx:76
void SetWordOnly(bool bNewWordOnly)
Definition: srchitem.cxx:315
bool m_bBackward
Definition: srchitem.hxx:81
bool m_bRowDirection
Definition: srchitem.hxx:73
bool m_bAsianOptions
Definition: srchitem.hxx:84
virtual void ImplCommit() override
Definition: srchitem.cxx:302
SvxSearchApp m_nAppFlag
Definition: srchitem.hxx:72
bool m_bAllTables
Definition: srchitem.hxx:74
sal_Int32 GetStartPointX() const
Definition: srchitem.cxx:647
SfxStyleFamily m_eFamily
Definition: srchitem.hxx:66
TransliterationFlags GetTransliterationFlags() const
Definition: srchitem.hxx:300
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Definition: srchitem.cxx:401
SvxSearchCellType m_nCellType
Definition: srchitem.hxx:71
virtual void Notify(const css::uno::Sequence< OUString > &rPropertyNames) override
Definition: srchitem.cxx:295
void SetWildcard(bool bVal)
Definition: srchitem.cxx:361
sal_Int32 GetStartPointY() const
Definition: srchitem.cxx:652
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
Definition: srchitem.cxx:491
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
int nCount
float u
WRITER
uno_Any a
#define LANGUAGE_NONE
Sequence< sal_Int8 > aSeq
#define SAL_WARN(area, stream)
#define SAL_N_ELEMENTS(arr)
MapUnit
#define MID_SEARCH_REPLACESTRING
Definition: memberid.h:53
#define MID_SEARCH_CHANGEDCHARS
Definition: memberid.h:55
#define MID_SEARCH_ASIANOPTIONS
Definition: memberid.h:49
#define MID_SEARCH_COMMAND
Definition: memberid.h:59
#define MID_SEARCH_FLAGS
Definition: memberid.h:51
#define MID_SEARCH_ALGORITHMTYPE2
Definition: memberid.h:63
#define MID_SEARCH_DELETEDCHARS
Definition: memberid.h:56
#define MID_SEARCH_TRANSLITERATEFLAGS
Definition: memberid.h:58
#define MID_SEARCH_PATTERN
Definition: memberid.h:47
#define MID_SEARCH_ROWDIRECTION
Definition: memberid.h:43
#define MID_SEARCH_STARTPOINTY
Definition: memberid.h:61
#define MID_SEARCH_SEARCHSTRING
Definition: memberid.h:52
#define MID_SEARCH_CELLTYPE
Definition: memberid.h:42
#define MID_SEARCH_CONTENT
Definition: memberid.h:48
#define MID_SEARCH_INSERTEDCHARS
Definition: memberid.h:57
#define MID_SEARCH_ALGORITHMTYPE
Definition: memberid.h:50
#define MID_SEARCH_SEARCHFILTERED
Definition: memberid.h:45
#define MID_SEARCH_SEARCHFORMATTED
Definition: memberid.h:62
#define MID_SEARCH_STARTPOINTX
Definition: memberid.h:60
#define MID_SEARCH_STYLEFAMILY
Definition: memberid.h:41
#define MID_SEARCH_BACKWARD
Definition: memberid.h:46
#define MID_SEARCH_ALLTABLES
Definition: memberid.h:44
#define MID_SEARCH_LOCALE
Definition: memberid.h:54
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
FORMULA
int i
constexpr css::util::SearchAlgorithms downgradeSearchAlgorithms2(sal_Int16 searchAlgorithms2)
constexpr sal_Int16 upgradeSearchAlgorithms(css::util::SearchAlgorithms searchAlgorithms)
sal_Int16 nId
SfxItemPresentation
Definition: poolitem.hxx:72
static bool equalsWithoutLocaleOrReplace(const i18nutil::SearchOptions2 &rItem1, const i18nutil::SearchOptions2 &rItem2)
used below
Definition: srchitem.cxx:236
constexpr OUStringLiteral SRCH_PARA_ALLTABLES
Definition: srchitem.cxx:51
constexpr OUStringLiteral SRCH_PARA_OPTIONS
Definition: srchitem.cxx:45
constexpr OUStringLiteral CFG_ROOT_NODE
Definition: srchitem.cxx:42
constexpr OUStringLiteral SRCH_PARA_CONTENT
Definition: srchitem.cxx:56
static Sequence< OUString > lcl_GetNotifyNames()
Definition: srchitem.cxx:62
constexpr OUStringLiteral SRCH_PARA_PATTERN
Definition: srchitem.cxx:55
constexpr OUStringLiteral SRCH_PARA_FAMILY
Definition: srchitem.cxx:46
constexpr OUStringLiteral SRCH_PARA_COMMAND
Definition: srchitem.cxx:47
constexpr OUStringLiteral SRCH_PARA_APPFLAG
Definition: srchitem.cxx:49
constexpr OUStringLiteral SRCH_PARA_ROWDIR
Definition: srchitem.cxx:50
constexpr OUStringLiteral SRCH_PARA_BACKWARD
Definition: srchitem.cxx:54
constexpr OUStringLiteral SRCH_PARA_SEARCHFILTERED
Definition: srchitem.cxx:52
constexpr OUStringLiteral SRCH_PARA_ASIANOPT
Definition: srchitem.cxx:57
#define SRCH_PARAMS
Definition: srchitem.cxx:44
constexpr OUStringLiteral SRCH_PARA_SEARCHFORMATTED
Definition: srchitem.cxx:53
constexpr OUStringLiteral SRCH_PARA_CELLTYPE
Definition: srchitem.cxx:48
SvxSearchCellType
Definition: srchitem.hxx:45
SvxSearchApp
Definition: srchitem.hxx:52
SvxSearchCmd
Definition: srchitem.hxx:36
css::util::SearchOptions2 toUnoSearchOptions2() const
TransliterationFlags transliterateFlags
css::lang::Locale Locale
sal_Int32 WildcardEscapeCharacter
SfxStyleFamily
Definition: style.hxx:42
TransliterationFlags
unsigned char sal_uInt8