Bump version to 6.4-15
[LibreOffice.git] / include / svx / fmsrccfg.hxx
blobea8e80fe780a9bf51a0bef3ce8609965b9d6396f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SVX_FMSRCCFG_HXX
21 #define INCLUDED_SVX_FMSRCCFG_HXX
23 #include <unotools/configvaluecontainer.hxx>
24 #include <com/sun/star/uno/Sequence.hxx>
25 #include <svx/svxdllapi.h>
27 enum class TransliterationFlags;
29 #define MATCHING_ANYWHERE 0
30 #define MATCHING_BEGINNING 1
31 #define MATCHING_END 2
32 #define MATCHING_WHOLETEXT 3
34 // this constants should NOT be just changed, since the SearchDialog performs no conversion of the settings of
35 // its ListBox, but instead just passes them along to the appropriate methods of SearchEngine
36 // (so if you change the constants or the order of the listbox entries in the dialog, then the other has
37 // to be adapted)
40 namespace svxform
44 // = struct FmSearchParams - parameters of a search
47 struct SVX_DLLPUBLIC FmSearchParams
49 protected:
50 TransliterationFlags
51 nTransliterationFlags;
52 // they're way too sensitive for direct access...
54 public:
55 // no bit fields at all (want to pass the addresses to the OConfigurationValueContainer)
56 css::uno::Sequence< OUString >
57 aHistory;
58 OUString sSingleSearchField;
60 sal_Int16 nSearchForType;
61 sal_Int16 nPosition;
62 sal_Int16 nLevOther;
63 sal_Int16 nLevShorter;
64 sal_Int16 nLevLonger;
65 bool bLevRelaxed;
67 bool bAllFields;
68 bool bUseFormatter;
69 bool bBackwards;
70 bool bWildcard;
71 bool bRegular;
72 bool bApproxSearch;
73 // the last three are mutually exclusive
75 bool bSoundsLikeCJK;
78 FmSearchParams();
80 bool isIgnoreWidthCJK( ) const;
82 TransliterationFlags
83 getTransliterationFlags( ) const { return nTransliterationFlags; }
84 void setTransliterationFlags( TransliterationFlags _nFlags ) { nTransliterationFlags = _nFlags; }
86 bool isCaseSensitive( ) const;
87 void setCaseSensitive( bool _bCase );
91 // = class FmSearchConfigItem - a ConfigItem, that remembers search parameters
94 class SAL_WARN_UNUSED SVX_DLLPUBLIC FmSearchConfigItem
95 :protected FmSearchParams
96 ,public ::utl::OConfigurationValueContainer
97 // order matters!
99 private:
100 ::osl::Mutex m_aMutex;
102 // wrapper properties:
103 // some of the members of FmSearchParams are must be translated to be stored in the configuration
104 OUString m_sSearchForType;
105 OUString m_sSearchPosition;
107 bool m_bIsMatchCase;
108 bool m_bIsMatchFullHalfWidthForms;
109 bool m_bIsMatchHiraganaKatakana;
110 bool m_bIsMatchContractions;
111 bool m_bIsMatchMinusDashCho_on;
112 bool m_bIsMatchRepeatCharMarks;
113 bool m_bIsMatchVariantFormKanji;
114 bool m_bIsMatchOldKanaForms;
115 bool m_bIsMatch_DiZi_DuZu;
116 bool m_bIsMatch_BaVa_HaFa;
117 bool m_bIsMatch_TsiThiChi_DhiZi;
118 bool m_bIsMatch_HyuIyu_ByuVyu;
119 bool m_bIsMatch_SeShe_ZeJe;
120 bool m_bIsMatch_IaIya;
121 bool m_bIsMatch_KiKu;
122 bool m_bIsIgnorePunctuation;
123 bool m_bIsIgnoreWhitespace;
124 bool m_bIsIgnoreProlongedSoundMark;
125 bool m_bIsIgnoreMiddleDot;
127 public:
128 FmSearchConfigItem();
129 ~FmSearchConfigItem();
131 const FmSearchParams& getParams( ) const;
132 void setParams( const FmSearchParams& _rParams );
134 private:
135 SVX_DLLPRIVATE void implTranslateFromConfig( );
136 SVX_DLLPRIVATE void implTranslateToConfig( );
143 #endif // INCLUDED_SVX_FMSRCCFG_HXX
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */