xref: /trunk/main/unotools/inc/unotools/searchopt.hxx (revision bae3752e)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SVT_SEARCHOPT_HXX_
25 #define _SVT_SEARCHOPT_HXX_
26 
27 #include "unotools/unotoolsdllapi.h"
28 #include "tools/solar.h"
29 
30 class SvtSearchOptions_Impl;
31 
32 class UNOTOOLS_DLLPUBLIC SvtSearchOptions
33 {
34 	SvtSearchOptions_Impl	*pImpl;
35 
36 	// disallow copy-constructor and assignment-operator for now
37 	SvtSearchOptions( const SvtSearchOptions & );
38 	SvtSearchOptions & operator = ( const SvtSearchOptions & );
39 
40 protected:
41 
42 public:
43 	SvtSearchOptions();
44 	~SvtSearchOptions();
45 
46 	sal_Int32	GetTransliterationFlags() const;
47 
48 	//
49 	// General Options
50 	//
51 
52 	sal_Bool	IsWholeWordsOnly() const;
53 	sal_Bool	IsBackwards() const;
54 	sal_Bool	IsUseRegularExpression() const;
55 	sal_Bool	IsSearchForStyles() const;
56 	sal_Bool	IsSimilaritySearch() const;
57 	sal_Bool	IsUseAsianOptions() const;
58 	sal_Bool	IsMatchCase() const;			// also Japanese search option
59 	sal_Bool	IsNotes() const;
60 
61 	void	SetWholeWordsOnly( sal_Bool bVal );
62 	void	SetBackwards( sal_Bool bVal );
63 	void	SetUseRegularExpression( sal_Bool bVal );
64 	void	SetSearchForStyles( sal_Bool bVal );
65 	void	SetSimilaritySearch( sal_Bool bVal );
66 	void	SetUseAsianOptions( sal_Bool bVal );
67 	void	SetMatchCase( sal_Bool bVal );		// also Japanese search option
68 	void 	SetNotes( sal_Bool bVal);
69 
70 	//
71 	// Japanese search options
72 	//
73 
74 	sal_Bool	IsMatchFullHalfWidthForms() const;
75 	sal_Bool	IsMatchHiraganaKatakana() const;
76 	sal_Bool	IsMatchContractions() const;
77 	sal_Bool	IsMatchMinusDashChoon() const;
78 	sal_Bool	IsMatchRepeatCharMarks() const;
79 	sal_Bool	IsMatchVariantFormKanji() const;
80 	sal_Bool	IsMatchOldKanaForms() const;
81 	sal_Bool	IsMatchDiziDuzu() const;
82 	sal_Bool	IsMatchBavaHafa() const;
83 	sal_Bool	IsMatchTsithichiDhizi() const;
84 	sal_Bool	IsMatchHyuiyuByuvyu() const;
85 	sal_Bool	IsMatchSesheZeje() const;
86 	sal_Bool	IsMatchIaiya() const;
87 	sal_Bool	IsMatchKiku() const;
88 	sal_Bool	IsIgnorePunctuation() const;
89 	sal_Bool	IsIgnoreWhitespace() const;
90 	sal_Bool	IsIgnoreProlongedSoundMark() const;
91 	sal_Bool	IsIgnoreMiddleDot() const;
92 
93 	void	SetMatchFullHalfWidthForms( sal_Bool bVal );
94 	void	SetMatchHiraganaKatakana( sal_Bool bVal );
95 	void	SetMatchContractions( sal_Bool bVal );
96 	void	SetMatchMinusDashChoon( sal_Bool bVal );
97 	void	SetMatchRepeatCharMarks( sal_Bool bVal );
98 	void	SetMatchVariantFormKanji( sal_Bool bVal );
99 	void	SetMatchOldKanaForms( sal_Bool bVal );
100 	void	SetMatchDiziDuzu( sal_Bool bVal );
101 	void	SetMatchBavaHafa( sal_Bool bVal );
102 	void	SetMatchTsithichiDhizi( sal_Bool bVal );
103 	void	SetMatchHyuiyuByuvyu( sal_Bool bVal );
104 	void	SetMatchSesheZeje( sal_Bool bVal );
105 	void	SetMatchIaiya( sal_Bool bVal );
106 	void	SetMatchKiku( sal_Bool bVal );
107 	void	SetIgnorePunctuation( sal_Bool bVal );
108 	void	SetIgnoreWhitespace( sal_Bool bVal );
109 	void	SetIgnoreProlongedSoundMark( sal_Bool bVal );
110 	void	SetIgnoreMiddleDot( sal_Bool bVal );
111 };
112 
113 
114 #endif
115 
116