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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_cui.hxx"
26
27 // include ---------------------------------------------------------------
28 #include <vcl/wrkwin.hxx>
29 #include <vcl/morebtn.hxx>
30 #include <vcl/msgbox.hxx>
31 #include <svl/slstitm.hxx>
32 #include <svl/itemiter.hxx>
33 #include <svl/style.hxx>
34 #include <unotools/searchopt.hxx>
35 #include <sfx2/dispatch.hxx>
36 #include <sfx2/objsh.hxx>
37 #include <sfx2/module.hxx>
38 #include <sfx2/viewsh.hxx>
39 #include <sfx2/basedlgs.hxx>
40 #include <svl/cjkoptions.hxx>
41 #include <com/sun/star/i18n/TransliterationModules.hpp>
42
43 #define _CUI_SRCHDLG_CXX
44 #include "cuisrchdlg.hxx"
45
46 #include <cuires.hrc>
47
48 #define ITEMID_SETITEM 0
49
50 #include <svl/srchitem.hxx>
51 #include <svx/pageitem.hxx>
52 #include <dialmgr.hxx>
53 #include <svx/dlgutil.hxx>
54 #include <optjsearch.hxx>
55 #include <editeng/brshitem.hxx>
56 #include "backgrnd.hxx"
57
58
59 // class SvxJSearchOptionsDialog -----------------------------------------
60
SvxJSearchOptionsDialog(Window * pParent,const SfxItemSet & rOptionsSet,sal_Int32 nInitialFlags)61 SvxJSearchOptionsDialog::SvxJSearchOptionsDialog(
62 Window *pParent,
63 const SfxItemSet& rOptionsSet, sal_Int32 nInitialFlags ) :
64 SfxSingleTabDialog ( pParent, rOptionsSet, RID_SVXPAGE_JSEARCH_OPTIONS ),
65 nInitialTlFlags( nInitialFlags )
66 {
67 pPage = (SvxJSearchOptionsPage *)
68 SvxJSearchOptionsPage::Create( this, rOptionsSet );
69 SetTabPage( pPage ); //! implicitly calls pPage->Reset(...)!
70 pPage->EnableSaveOptions( sal_False );
71 }
72
73
~SvxJSearchOptionsDialog()74 SvxJSearchOptionsDialog::~SvxJSearchOptionsDialog()
75 {
76 // pPage will be implicitly destroyed by the
77 // SfxSingleTabDialog destructor
78 }
79
80
Activate()81 void SvxJSearchOptionsDialog::Activate()
82 {
83 pPage->SetTransliterationFlags( nInitialTlFlags );
84 }
85
86
GetTransliterationFlags() const87 sal_Int32 SvxJSearchOptionsDialog::GetTransliterationFlags() const
88 {
89 return pPage->GetTransliterationFlags();
90 }
91