1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
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
46 // = struct FmSearchParams - parameters of a search
49 struct SVX_DLLPUBLIC FmSearchParams
52 sal_Int32 nTransliterationFlags
;
53 // they're way too sensitive for direct access ....
56 // no bit fields at all (want to pass the addresses to the OConfigurationValueContainer)
57 css::uno::Sequence
< OUString
>
59 OUString sSingleSearchField
;
61 sal_Int16 nSearchForType
;
64 sal_Int16 nLevShorter
;
74 // the last three are mutually exclusive
81 bool isIgnoreWidthCJK( ) const;
83 sal_Int32
getTransliterationFlags( ) const { return nTransliterationFlags
; }
84 void setTransliterationFlags( sal_Int32 _nFlags
) { nTransliterationFlags
= _nFlags
; }
86 bool isCaseSensitive( ) const;
87 void setCaseSensitive( bool _bCase
);
91 // = class FmSearchConfigItem - a ConfigItem, that remembers search parameters
94 class SVX_DLLPUBLIC SAL_WARN_UNUSED FmSearchConfigItem
95 :protected FmSearchParams
96 ,public ::utl::OConfigurationValueContainer
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
;
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
;
128 FmSearchConfigItem();
129 ~FmSearchConfigItem();
131 const FmSearchParams
& getParams( ) const;
132 void setParams( const FmSearchParams
& _rParams
);
135 SVX_DLLPRIVATE
void implTranslateFromConfig( );
136 SVX_DLLPRIVATE
void implTranslateToConfig( );
145 #endif // INCLUDED_SVX_FMSRCCFG_HXX
147 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */