xref: /aoo4110/main/sw/source/ui/index/idxmrk.cxx (revision b1cdbd2c)
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_sw.hxx"
26 
27 
28 #include <hintids.hxx>
29 #ifndef _HELPID_H
30 #include <helpid.h>
31 #endif
32 #define _SVSTDARR_STRINGSSORT
33 #include <svl/svstdarr.hxx>
34 #include <comphelper/processfactory.hxx>
35 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
36 #include <com/sun/star/beans/PropertyValue.hpp>
37 #include <com/sun/star/beans/XPropertySet.hpp>
38 #include <com/sun/star/util/SearchOptions.hpp>
39 #include <com/sun/star/util/SearchFlags.hpp>
40 #include <com/sun/star/i18n/TransliterationModules.hpp>
41 #include <svl/stritem.hxx>
42 #ifndef _MSGBOX_HXX //autogen
43 #include <vcl/msgbox.hxx>
44 #endif
45 #include <sfx2/dispatch.hxx>
46 #include <svl/eitem.hxx>
47 #include <svtools/txtcmp.hxx>
48 #include <editeng/scripttypeitem.hxx>
49 #include <svl/itemset.hxx>
50 #include <editeng/langitem.hxx>
51 #include <swtypes.hxx>
52 #include <idxmrk.hxx>
53 #include <txttxmrk.hxx>
54 #include <wrtsh.hxx>
55 #ifndef _VIEW_HXX
56 #include <view.hxx>
57 #endif
58 #include <multmrk.hxx>
59 #include <swundo.hxx>               	// fuer Undo-Ids
60 #ifndef _CMDID_H
61 #include <cmdid.h>
62 #endif
63 #ifndef _INDEX_HRC
64 #include <index.hrc>
65 #endif
66 #ifndef _IDXMRK_HRC
67 #include <idxmrk.hrc>
68 #endif
69 #include <swmodule.hxx>
70 #include <fldmgr.hxx>
71 #include <fldbas.hxx>
72 #include <utlui.hrc>
73 #include <swcont.hxx>
74 #include <svl/cjkoptions.hxx>
75 #include <ndtxt.hxx>
76 #include <breakit.hxx>
77 
78 
79 /* -----------------07.09.99 08:15-------------------
80 
81  --------------------------------------------------*/
SFX_IMPL_CHILDWINDOW(SwInsertIdxMarkWrapper,FN_INSERT_IDX_ENTRY_DLG)82 SFX_IMPL_CHILDWINDOW(SwInsertIdxMarkWrapper, FN_INSERT_IDX_ENTRY_DLG)
83 
84 SwInsertIdxMarkWrapper::SwInsertIdxMarkWrapper(	Window *pParentWindow,
85 							sal_uInt16 nId,
86 							SfxBindings* pBindings,
87 							SfxChildWinInfo* pInfo ) :
88 		SfxChildWindow(pParentWindow, nId)
89 {
90     SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
91     DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
92     pAbstDlg = pFact->CreateIndexMarkFloatDlg( DLG_INSIDXMARK , pBindings, this, pParentWindow, pInfo );
93     DBG_ASSERT(pAbstDlg, "Dialogdiet fail!");
94     pWindow = pAbstDlg->GetWindow();
95 	pWindow->Show();	// at this point,because before pSh has to be initialized in ReInitDlg()
96 						// -> Show() will invoke StateChanged() and save pos
97 	eChildAlignment = SFX_ALIGN_NOALIGNMENT;
98 }
99 /* -----------------07.09.99 09:14-------------------
100 
101  --------------------------------------------------*/
GetInfo() const102 SfxChildWinInfo SwInsertIdxMarkWrapper::GetInfo() const
103 {
104 	SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
105 
106 	return aInfo;
107 }
108 
ReInitDlg(SwWrtShell & rWrtShell)109 void	SwInsertIdxMarkWrapper::ReInitDlg(SwWrtShell& rWrtShell)
110 {
111     pAbstDlg->ReInitDlg(rWrtShell);
112 }
113 
114 
115 /* -----------------07.09.99 08:15-------------------
116 
117  --------------------------------------------------*/
SFX_IMPL_CHILDWINDOW(SwInsertAuthMarkWrapper,FN_INSERT_AUTH_ENTRY_DLG)118 SFX_IMPL_CHILDWINDOW(SwInsertAuthMarkWrapper, FN_INSERT_AUTH_ENTRY_DLG)
119 
120 SwInsertAuthMarkWrapper::SwInsertAuthMarkWrapper(	Window *pParentWindow,
121 							sal_uInt16 nId,
122 							SfxBindings* pBindings,
123 							SfxChildWinInfo* pInfo ) :
124 		SfxChildWindow(pParentWindow, nId)
125 {
126     SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
127     DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
128     pAbstDlg = pFact->CreateAuthMarkFloatDlg( DLG_INSAUTHMARK, pBindings, this, pParentWindow, pInfo );
129     DBG_ASSERT(pAbstDlg, "Dialogdiet fail!");
130     pWindow = pAbstDlg->GetWindow();
131 
132 	eChildAlignment = SFX_ALIGN_NOALIGNMENT;
133 }
134 /* -----------------07.09.99 09:14-------------------
135 
136  --------------------------------------------------*/
GetInfo() const137 SfxChildWinInfo SwInsertAuthMarkWrapper::GetInfo() const
138 {
139 	SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
140 	return aInfo;
141 }
142 /* -----------------19.10.99 11:16-------------------
143 
144  --------------------------------------------------*/
ReInitDlg(SwWrtShell & rWrtShell)145 void	SwInsertAuthMarkWrapper::ReInitDlg(SwWrtShell& rWrtShell)
146 {
147     pAbstDlg->ReInitDlg(rWrtShell);
148 }
149 
150