xref: /aoo42x/main/cui/source/options/optjsearch.cxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_cui.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include <tools/shl.hxx>
32*cdf0e10cSrcweir #include <unotools/searchopt.hxx>
33*cdf0e10cSrcweir #include <com/sun/star/i18n/TransliterationModules.hpp>
34*cdf0e10cSrcweir #include <cuires.hrc>
35*cdf0e10cSrcweir #include <dialmgr.hxx>
36*cdf0e10cSrcweir #include <optjsearch.hxx>
37*cdf0e10cSrcweir #include "optjsearch.hrc"
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir using namespace com::sun::star::i18n;
40*cdf0e10cSrcweir 
41*cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir SvxJSearchOptionsPage::SvxJSearchOptionsPage( Window* pParent, const SfxItemSet& rSet ) :
44*cdf0e10cSrcweir 	SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_JSEARCH_OPTIONS ), rSet ),
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir 	aTreatAsEqual				( this, CUI_RES( FL_TREAT_AS_EQUAL ) ),
47*cdf0e10cSrcweir 	aMatchCase					( this, CUI_RES( CB_MATCH_CASE ) ),
48*cdf0e10cSrcweir 	aMatchFullHalfWidth			( this, CUI_RES( CB_MATCH_FULL_HALF_WIDTH ) ),
49*cdf0e10cSrcweir 	aMatchHiraganaKatakana		( this, CUI_RES( CB_MATCH_HIRAGANA_KATAKANA ) ),
50*cdf0e10cSrcweir 	aMatchContractions			( this, CUI_RES( CB_MATCH_CONTRACTIONS ) ),
51*cdf0e10cSrcweir 	aMatchMinusDashChoon		( this, CUI_RES( CB_MATCH_MINUS_DASH_CHOON ) ),
52*cdf0e10cSrcweir 	aMatchRepeatCharMarks		( this, CUI_RES( CB_MATCH_REPEAT_CHAR_MARKS ) ),
53*cdf0e10cSrcweir 	aMatchVariantFormKanji		( this, CUI_RES( CB_MATCH_VARIANT_FORM_KANJI ) ),
54*cdf0e10cSrcweir 	aMatchOldKanaForms			( this, CUI_RES( CB_MATCH_OLD_KANA_FORMS ) ),
55*cdf0e10cSrcweir 	aMatchDiziDuzu				( this, CUI_RES( CB_MATCH_DIZI_DUZU ) ),
56*cdf0e10cSrcweir 	aMatchBavaHafa				( this, CUI_RES( CB_MATCH_BAVA_HAFA ) ),
57*cdf0e10cSrcweir 	aMatchTsithichiDhizi		( this, CUI_RES( CB_MATCH_TSITHICHI_DHIZI ) ),
58*cdf0e10cSrcweir 	aMatchHyuiyuByuvyu			( this, CUI_RES( CB_MATCH_HYUFYU_BYUVYU ) ),
59*cdf0e10cSrcweir 	aMatchSesheZeje				( this, CUI_RES( CB_MATCH_SESHE_ZEJE ) ),
60*cdf0e10cSrcweir 	aMatchIaiya					( this, CUI_RES( CB_MATCH_IAIYA ) ),
61*cdf0e10cSrcweir 	aMatchKiku					( this, CUI_RES( CB_MATCH_KIKU ) ),
62*cdf0e10cSrcweir     aMatchProlongedSoundMark    ( this, CUI_RES( CB_MATCH_PROLONGED_SOUNDMARK ) ),
63*cdf0e10cSrcweir     aIgnore                     ( this, CUI_RES( FL_IGNORE ) ),
64*cdf0e10cSrcweir 	aIgnorePunctuation			( this, CUI_RES( CB_IGNORE_PUNCTUATION ) ),
65*cdf0e10cSrcweir 	aIgnoreWhitespace			( this, CUI_RES( CB_IGNORE_WHITESPACES ) ),
66*cdf0e10cSrcweir     aIgnoreMiddleDot            ( this, CUI_RES( CB_IGNORE_MIDDLE_DOT ) )
67*cdf0e10cSrcweir {
68*cdf0e10cSrcweir 	FreeResource();
69*cdf0e10cSrcweir 	bSaveOptions = sal_True;
70*cdf0e10cSrcweir 	nTransliterationFlags = 0x00000000;
71*cdf0e10cSrcweir }
72*cdf0e10cSrcweir 
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir SvxJSearchOptionsPage::~SvxJSearchOptionsPage()
75*cdf0e10cSrcweir {
76*cdf0e10cSrcweir }
77*cdf0e10cSrcweir 
78*cdf0e10cSrcweir 
79*cdf0e10cSrcweir SfxTabPage*  SvxJSearchOptionsPage::Create( Window* pParent, const SfxItemSet& rSet )
80*cdf0e10cSrcweir {
81*cdf0e10cSrcweir 	return new SvxJSearchOptionsPage( pParent, rSet );
82*cdf0e10cSrcweir }
83*cdf0e10cSrcweir 
84*cdf0e10cSrcweir 
85*cdf0e10cSrcweir void SvxJSearchOptionsPage::SetTransliterationFlags( sal_Int32 nSettings )
86*cdf0e10cSrcweir {
87*cdf0e10cSrcweir 	sal_Bool  bVal = 0 != (nSettings & TransliterationModules_IGNORE_CASE);
88*cdf0e10cSrcweir     aMatchCase               .Check( bVal );    //! treat as equal uppercase/lowercase
89*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_IGNORE_WIDTH);
90*cdf0e10cSrcweir     aMatchFullHalfWidth      .Check( bVal );
91*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_IGNORE_KANA);
92*cdf0e10cSrcweir     aMatchHiraganaKatakana   .Check( bVal );
93*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreSize_ja_JP);
94*cdf0e10cSrcweir     aMatchContractions       .Check( bVal );
95*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreMinusSign_ja_JP);
96*cdf0e10cSrcweir     aMatchMinusDashChoon     .Check( bVal );
97*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreIterationMark_ja_JP);
98*cdf0e10cSrcweir     aMatchRepeatCharMarks    .Check( bVal );
99*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreTraditionalKanji_ja_JP);
100*cdf0e10cSrcweir     aMatchVariantFormKanji   .Check( bVal );
101*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreTraditionalKana_ja_JP);
102*cdf0e10cSrcweir     aMatchOldKanaForms       .Check( bVal );
103*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreZiZu_ja_JP);
104*cdf0e10cSrcweir     aMatchDiziDuzu           .Check( bVal );
105*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreBaFa_ja_JP);
106*cdf0e10cSrcweir     aMatchBavaHafa           .Check( bVal );
107*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreTiJi_ja_JP);
108*cdf0e10cSrcweir     aMatchTsithichiDhizi     .Check( bVal );
109*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreHyuByu_ja_JP);
110*cdf0e10cSrcweir     aMatchHyuiyuByuvyu       .Check( bVal );
111*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreSeZe_ja_JP);
112*cdf0e10cSrcweir     aMatchSesheZeje          .Check( bVal );
113*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreIandEfollowedByYa_ja_JP);
114*cdf0e10cSrcweir     aMatchIaiya              .Check( bVal );
115*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreKiKuFollowedBySa_ja_JP);
116*cdf0e10cSrcweir     aMatchKiku               .Check( bVal );
117*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreSeparator_ja_JP);
118*cdf0e10cSrcweir 	aIgnorePunctuation		 .Check( bVal );
119*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreSpace_ja_JP);
120*cdf0e10cSrcweir 	aIgnoreWhitespace		 .Check( bVal );
121*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreProlongedSoundMark_ja_JP);
122*cdf0e10cSrcweir     aMatchProlongedSoundMark.Check( bVal );
123*cdf0e10cSrcweir 	bVal = 0 != (nSettings & TransliterationModules_ignoreMiddleDot_ja_JP);
124*cdf0e10cSrcweir 	aIgnoreMiddleDot		 .Check( bVal );
125*cdf0e10cSrcweir 
126*cdf0e10cSrcweir 	nTransliterationFlags = nSettings;
127*cdf0e10cSrcweir }
128*cdf0e10cSrcweir 
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir sal_Int32 SvxJSearchOptionsPage::GetTransliterationFlags_Impl()
131*cdf0e10cSrcweir {
132*cdf0e10cSrcweir 	sal_Int32 nTmp = 0;
133*cdf0e10cSrcweir     if (aMatchCase.IsChecked()) //! treat as equal uppercase/lowercase
134*cdf0e10cSrcweir 		nTmp |= TransliterationModules_IGNORE_CASE;
135*cdf0e10cSrcweir     if (aMatchFullHalfWidth.IsChecked())
136*cdf0e10cSrcweir 		nTmp |= TransliterationModules_IGNORE_WIDTH;
137*cdf0e10cSrcweir     if (aMatchHiraganaKatakana.IsChecked())
138*cdf0e10cSrcweir 		nTmp |= TransliterationModules_IGNORE_KANA;
139*cdf0e10cSrcweir     if (aMatchContractions.IsChecked())
140*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreSize_ja_JP;
141*cdf0e10cSrcweir     if (aMatchMinusDashChoon.IsChecked())
142*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreMinusSign_ja_JP;
143*cdf0e10cSrcweir     if (aMatchRepeatCharMarks.IsChecked())
144*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreIterationMark_ja_JP;
145*cdf0e10cSrcweir     if (aMatchVariantFormKanji.IsChecked())
146*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreTraditionalKanji_ja_JP;
147*cdf0e10cSrcweir     if (aMatchOldKanaForms.IsChecked())
148*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreTraditionalKana_ja_JP;
149*cdf0e10cSrcweir     if (aMatchDiziDuzu.IsChecked())
150*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreZiZu_ja_JP;
151*cdf0e10cSrcweir     if (aMatchBavaHafa.IsChecked())
152*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreBaFa_ja_JP;
153*cdf0e10cSrcweir     if (aMatchTsithichiDhizi.IsChecked())
154*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreTiJi_ja_JP;
155*cdf0e10cSrcweir     if (aMatchHyuiyuByuvyu.IsChecked())
156*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreHyuByu_ja_JP;
157*cdf0e10cSrcweir     if (aMatchSesheZeje.IsChecked())
158*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreSeZe_ja_JP;
159*cdf0e10cSrcweir     if (aMatchIaiya.IsChecked())
160*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreIandEfollowedByYa_ja_JP;
161*cdf0e10cSrcweir     if (aMatchKiku.IsChecked())
162*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreKiKuFollowedBySa_ja_JP;
163*cdf0e10cSrcweir     if (aIgnorePunctuation.IsChecked())
164*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreSeparator_ja_JP;
165*cdf0e10cSrcweir     if (aIgnoreWhitespace.IsChecked())
166*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreSpace_ja_JP;
167*cdf0e10cSrcweir     if (aMatchProlongedSoundMark.IsChecked())
168*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreProlongedSoundMark_ja_JP;
169*cdf0e10cSrcweir     if (aIgnoreMiddleDot.IsChecked())
170*cdf0e10cSrcweir 		nTmp |= TransliterationModules_ignoreMiddleDot_ja_JP;
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir 	nTransliterationFlags = nTmp;
173*cdf0e10cSrcweir 	return nTransliterationFlags;
174*cdf0e10cSrcweir }
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir 
177*cdf0e10cSrcweir void SvxJSearchOptionsPage::Reset( const SfxItemSet& )
178*cdf0e10cSrcweir {
179*cdf0e10cSrcweir 	SvtSearchOptions aOpt;
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir 	// read settings from configuration
182*cdf0e10cSrcweir     aMatchCase               .Check(!aOpt.IsMatchCase() );  //! treat as equal uppercase/lowercase
183*cdf0e10cSrcweir 	aMatchFullHalfWidth		 .Check( aOpt.IsMatchFullHalfWidthForms() );
184*cdf0e10cSrcweir 	aMatchHiraganaKatakana	 .Check( aOpt.IsMatchHiraganaKatakana() );
185*cdf0e10cSrcweir 	aMatchContractions		 .Check( aOpt.IsMatchContractions() );
186*cdf0e10cSrcweir 	aMatchMinusDashChoon	 .Check( aOpt.IsMatchMinusDashChoon() );
187*cdf0e10cSrcweir 	aMatchRepeatCharMarks	 .Check( aOpt.IsMatchRepeatCharMarks() );
188*cdf0e10cSrcweir 	aMatchVariantFormKanji	 .Check( aOpt.IsMatchVariantFormKanji() );
189*cdf0e10cSrcweir 	aMatchOldKanaForms		 .Check( aOpt.IsMatchOldKanaForms() );
190*cdf0e10cSrcweir 	aMatchDiziDuzu			 .Check( aOpt.IsMatchDiziDuzu() );
191*cdf0e10cSrcweir 	aMatchBavaHafa			 .Check( aOpt.IsMatchBavaHafa() );
192*cdf0e10cSrcweir 	aMatchTsithichiDhizi	 .Check( aOpt.IsMatchTsithichiDhizi() );
193*cdf0e10cSrcweir 	aMatchHyuiyuByuvyu		 .Check( aOpt.IsMatchHyuiyuByuvyu() );
194*cdf0e10cSrcweir 	aMatchSesheZeje			 .Check( aOpt.IsMatchSesheZeje() );
195*cdf0e10cSrcweir 	aMatchIaiya				 .Check( aOpt.IsMatchIaiya() );
196*cdf0e10cSrcweir 	aMatchKiku				 .Check( aOpt.IsMatchKiku() );
197*cdf0e10cSrcweir 	aIgnorePunctuation		 .Check( aOpt.IsIgnorePunctuation() );
198*cdf0e10cSrcweir 	aIgnoreWhitespace		 .Check( aOpt.IsIgnoreWhitespace() );
199*cdf0e10cSrcweir     aMatchProlongedSoundMark .Check( aOpt.IsIgnoreProlongedSoundMark() );
200*cdf0e10cSrcweir 	aIgnoreMiddleDot		 .Check( aOpt.IsIgnoreMiddleDot() );
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir 	nTransliterationFlags = GetTransliterationFlags_Impl();
203*cdf0e10cSrcweir 	DBG_ASSERT( nTransliterationFlags == aOpt.GetTransliterationFlags(),
204*cdf0e10cSrcweir 			"Transliteration settings different" );
205*cdf0e10cSrcweir 
206*cdf0e10cSrcweir 	aMatchCase				 .SaveValue();
207*cdf0e10cSrcweir 	aMatchFullHalfWidth		 .SaveValue();
208*cdf0e10cSrcweir 	aMatchHiraganaKatakana	 .SaveValue();
209*cdf0e10cSrcweir 	aMatchContractions		 .SaveValue();
210*cdf0e10cSrcweir 	aMatchMinusDashChoon	 .SaveValue();
211*cdf0e10cSrcweir 	aMatchRepeatCharMarks	 .SaveValue();
212*cdf0e10cSrcweir 	aMatchVariantFormKanji	 .SaveValue();
213*cdf0e10cSrcweir 	aMatchOldKanaForms		 .SaveValue();
214*cdf0e10cSrcweir 	aMatchDiziDuzu			 .SaveValue();
215*cdf0e10cSrcweir 	aMatchBavaHafa			 .SaveValue();
216*cdf0e10cSrcweir 	aMatchTsithichiDhizi	 .SaveValue();
217*cdf0e10cSrcweir 	aMatchHyuiyuByuvyu		 .SaveValue();
218*cdf0e10cSrcweir 	aMatchSesheZeje			 .SaveValue();
219*cdf0e10cSrcweir 	aMatchIaiya				 .SaveValue();
220*cdf0e10cSrcweir 	aMatchKiku				 .SaveValue();
221*cdf0e10cSrcweir 	aIgnorePunctuation		 .SaveValue();
222*cdf0e10cSrcweir 	aIgnoreWhitespace		 .SaveValue();
223*cdf0e10cSrcweir     aMatchProlongedSoundMark .SaveValue();
224*cdf0e10cSrcweir 	aIgnoreMiddleDot		 .SaveValue();
225*cdf0e10cSrcweir }
226*cdf0e10cSrcweir 
227*cdf0e10cSrcweir 
228*cdf0e10cSrcweir sal_Bool SvxJSearchOptionsPage::FillItemSet( SfxItemSet& )
229*cdf0e10cSrcweir {
230*cdf0e10cSrcweir 	sal_Bool bModified = sal_False;
231*cdf0e10cSrcweir 
232*cdf0e10cSrcweir     sal_Int32 nOldVal = nTransliterationFlags;
233*cdf0e10cSrcweir 	nTransliterationFlags = GetTransliterationFlags_Impl();
234*cdf0e10cSrcweir     bModified = nOldVal != nTransliterationFlags;
235*cdf0e10cSrcweir 
236*cdf0e10cSrcweir 	if (!IsSaveOptions())
237*cdf0e10cSrcweir 		return bModified;
238*cdf0e10cSrcweir 
239*cdf0e10cSrcweir     bModified = sal_False;
240*cdf0e10cSrcweir 	SvtSearchOptions aOpt;
241*cdf0e10cSrcweir 	sal_Bool bNewVal, bChanged;
242*cdf0e10cSrcweir 
243*cdf0e10cSrcweir     bNewVal  = aMatchCase.IsChecked();  //! treat as equal uppercase/lowercase
244*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchCase.GetSavedValue();
245*cdf0e10cSrcweir 	if (bChanged)
246*cdf0e10cSrcweir 	{
247*cdf0e10cSrcweir         aOpt.SetMatchCase(!bNewVal );
248*cdf0e10cSrcweir 		bModified = sal_True;
249*cdf0e10cSrcweir 	}
250*cdf0e10cSrcweir 	bNewVal  = aMatchFullHalfWidth.IsChecked();
251*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchFullHalfWidth.GetSavedValue();
252*cdf0e10cSrcweir 	if (bChanged)
253*cdf0e10cSrcweir 	{
254*cdf0e10cSrcweir 		aOpt.SetMatchFullHalfWidthForms( bNewVal );
255*cdf0e10cSrcweir 		bModified = sal_True;
256*cdf0e10cSrcweir 	}
257*cdf0e10cSrcweir 	bNewVal  = aMatchHiraganaKatakana.IsChecked();
258*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchHiraganaKatakana.GetSavedValue();
259*cdf0e10cSrcweir 	if (bChanged)
260*cdf0e10cSrcweir 	{
261*cdf0e10cSrcweir 		aOpt.SetMatchHiraganaKatakana( bNewVal );
262*cdf0e10cSrcweir 		bModified = sal_True;
263*cdf0e10cSrcweir 	}
264*cdf0e10cSrcweir 	bNewVal  = aMatchContractions.IsChecked();
265*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchContractions.GetSavedValue();
266*cdf0e10cSrcweir 	if (bChanged)
267*cdf0e10cSrcweir 	{
268*cdf0e10cSrcweir 		aOpt.SetMatchContractions( bNewVal );
269*cdf0e10cSrcweir 		bModified = sal_True;
270*cdf0e10cSrcweir 	}
271*cdf0e10cSrcweir 	bNewVal  = aMatchMinusDashChoon.IsChecked();
272*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchMinusDashChoon.GetSavedValue();
273*cdf0e10cSrcweir 	if (bChanged)
274*cdf0e10cSrcweir 	{
275*cdf0e10cSrcweir 		aOpt.SetMatchMinusDashChoon( bNewVal );
276*cdf0e10cSrcweir 		bModified = sal_True;
277*cdf0e10cSrcweir 	}
278*cdf0e10cSrcweir 	bNewVal  = aMatchRepeatCharMarks.IsChecked();
279*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchRepeatCharMarks.GetSavedValue();
280*cdf0e10cSrcweir 	if (bChanged)
281*cdf0e10cSrcweir 	{
282*cdf0e10cSrcweir 		aOpt.SetMatchRepeatCharMarks( bNewVal );
283*cdf0e10cSrcweir 		bModified = sal_True;
284*cdf0e10cSrcweir 	}
285*cdf0e10cSrcweir 	bNewVal  = aMatchVariantFormKanji.IsChecked();
286*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchVariantFormKanji.GetSavedValue();
287*cdf0e10cSrcweir 	if (bChanged)
288*cdf0e10cSrcweir 	{
289*cdf0e10cSrcweir 		aOpt.SetMatchVariantFormKanji( bNewVal );
290*cdf0e10cSrcweir 		bModified = sal_True;
291*cdf0e10cSrcweir 	}
292*cdf0e10cSrcweir 	bNewVal  = aMatchOldKanaForms.IsChecked();
293*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchOldKanaForms.GetSavedValue();
294*cdf0e10cSrcweir 	if (bChanged)
295*cdf0e10cSrcweir 	{
296*cdf0e10cSrcweir 		aOpt.SetMatchOldKanaForms( bNewVal );
297*cdf0e10cSrcweir 		bModified = sal_True;
298*cdf0e10cSrcweir 	}
299*cdf0e10cSrcweir 	bNewVal  = aMatchDiziDuzu.IsChecked();
300*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchDiziDuzu.GetSavedValue();
301*cdf0e10cSrcweir 	if (bChanged)
302*cdf0e10cSrcweir 	{
303*cdf0e10cSrcweir 		aOpt.SetMatchDiziDuzu( bNewVal );
304*cdf0e10cSrcweir 		bModified = sal_True;
305*cdf0e10cSrcweir 	}
306*cdf0e10cSrcweir 	bNewVal  = aMatchBavaHafa.IsChecked();
307*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchBavaHafa.GetSavedValue();
308*cdf0e10cSrcweir 	if (bChanged)
309*cdf0e10cSrcweir 	{
310*cdf0e10cSrcweir 		aOpt.SetMatchBavaHafa( bNewVal );
311*cdf0e10cSrcweir 		bModified = sal_True;
312*cdf0e10cSrcweir 	}
313*cdf0e10cSrcweir 	bNewVal  = aMatchTsithichiDhizi.IsChecked();
314*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchTsithichiDhizi.GetSavedValue();
315*cdf0e10cSrcweir 	if (bChanged)
316*cdf0e10cSrcweir 	{
317*cdf0e10cSrcweir 		aOpt.SetMatchTsithichiDhizi( bNewVal );
318*cdf0e10cSrcweir 		bModified = sal_True;
319*cdf0e10cSrcweir 	}
320*cdf0e10cSrcweir 	bNewVal  = aMatchHyuiyuByuvyu.IsChecked();
321*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchHyuiyuByuvyu.GetSavedValue();
322*cdf0e10cSrcweir 	if (bChanged)
323*cdf0e10cSrcweir 	{
324*cdf0e10cSrcweir 		aOpt.SetMatchHyuiyuByuvyu( bNewVal );
325*cdf0e10cSrcweir 		bModified = sal_True;
326*cdf0e10cSrcweir 	}
327*cdf0e10cSrcweir 	bNewVal  = aMatchSesheZeje.IsChecked();
328*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchSesheZeje.GetSavedValue();
329*cdf0e10cSrcweir 	if (bChanged)
330*cdf0e10cSrcweir 	{
331*cdf0e10cSrcweir 		aOpt.SetMatchSesheZeje( bNewVal );
332*cdf0e10cSrcweir 		bModified = sal_True;
333*cdf0e10cSrcweir 	}
334*cdf0e10cSrcweir 	bNewVal  = aMatchIaiya.IsChecked();
335*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchIaiya.GetSavedValue();
336*cdf0e10cSrcweir 	if (bChanged)
337*cdf0e10cSrcweir 	{
338*cdf0e10cSrcweir 		aOpt.SetMatchIaiya( bNewVal );
339*cdf0e10cSrcweir 		bModified = sal_True;
340*cdf0e10cSrcweir 	}
341*cdf0e10cSrcweir 	bNewVal  = aMatchKiku.IsChecked();
342*cdf0e10cSrcweir 	bChanged = bNewVal != aMatchKiku.GetSavedValue();
343*cdf0e10cSrcweir 	if (bChanged)
344*cdf0e10cSrcweir 	{
345*cdf0e10cSrcweir 		aOpt.SetMatchKiku( bNewVal );
346*cdf0e10cSrcweir 		bModified = sal_True;
347*cdf0e10cSrcweir 	}
348*cdf0e10cSrcweir 	bNewVal  = aIgnorePunctuation.IsChecked();
349*cdf0e10cSrcweir 	bChanged = bNewVal != aIgnorePunctuation.GetSavedValue();
350*cdf0e10cSrcweir 	if (bChanged)
351*cdf0e10cSrcweir 	{
352*cdf0e10cSrcweir 		aOpt.SetIgnorePunctuation( bNewVal );
353*cdf0e10cSrcweir 		bModified = sal_True;
354*cdf0e10cSrcweir 	}
355*cdf0e10cSrcweir 	bNewVal  = aIgnoreWhitespace.IsChecked();
356*cdf0e10cSrcweir 	bChanged = bNewVal != aIgnoreWhitespace.GetSavedValue();
357*cdf0e10cSrcweir 	if (bChanged)
358*cdf0e10cSrcweir 	{
359*cdf0e10cSrcweir 		aOpt.SetIgnoreWhitespace( bNewVal );
360*cdf0e10cSrcweir 		bModified = sal_True;
361*cdf0e10cSrcweir 	}
362*cdf0e10cSrcweir     bNewVal  = aMatchProlongedSoundMark.IsChecked();
363*cdf0e10cSrcweir     bChanged = bNewVal != aMatchProlongedSoundMark.GetSavedValue();
364*cdf0e10cSrcweir 	if (bChanged)
365*cdf0e10cSrcweir 	{
366*cdf0e10cSrcweir         aOpt.SetIgnoreProlongedSoundMark( bNewVal );
367*cdf0e10cSrcweir 		bModified = sal_True;
368*cdf0e10cSrcweir 	}
369*cdf0e10cSrcweir 	bNewVal  = aIgnoreMiddleDot.IsChecked();
370*cdf0e10cSrcweir 	bChanged = bNewVal != aIgnoreMiddleDot.GetSavedValue();
371*cdf0e10cSrcweir 	if (bChanged)
372*cdf0e10cSrcweir 	{
373*cdf0e10cSrcweir 		aOpt.SetIgnoreMiddleDot( bNewVal );
374*cdf0e10cSrcweir 		bModified = sal_True;
375*cdf0e10cSrcweir 	}
376*cdf0e10cSrcweir 
377*cdf0e10cSrcweir 	return bModified;
378*cdf0e10cSrcweir }
379*cdf0e10cSrcweir 
380*cdf0e10cSrcweir 
381*cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////
382*cdf0e10cSrcweir 
383