xref: /aoo42x/main/sw/source/ui/index/idxmrk.cxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_sw.hxx"
30 
31 
32 #include <hintids.hxx>
33 #ifndef _HELPID_H
34 #include <helpid.h>
35 #endif
36 #define _SVSTDARR_STRINGSSORT
37 #include <svl/svstdarr.hxx>
38 #include <comphelper/processfactory.hxx>
39 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
40 #include <com/sun/star/beans/PropertyValue.hpp>
41 #include <com/sun/star/beans/XPropertySet.hpp>
42 #include <com/sun/star/util/SearchOptions.hpp>
43 #include <com/sun/star/util/SearchFlags.hpp>
44 #include <com/sun/star/i18n/TransliterationModules.hpp>
45 #include <svl/stritem.hxx>
46 #ifndef _MSGBOX_HXX //autogen
47 #include <vcl/msgbox.hxx>
48 #endif
49 #include <sfx2/dispatch.hxx>
50 #include <svl/eitem.hxx>
51 #include <svtools/txtcmp.hxx>
52 #include <editeng/scripttypeitem.hxx>
53 #include <svl/itemset.hxx>
54 #include <editeng/langitem.hxx>
55 #include <swtypes.hxx>
56 #include <idxmrk.hxx>
57 #include <txttxmrk.hxx>
58 #include <wrtsh.hxx>
59 #ifndef _VIEW_HXX
60 #include <view.hxx>
61 #endif
62 #include <multmrk.hxx>
63 #include <swundo.hxx>               	// fuer Undo-Ids
64 #ifndef _CMDID_H
65 #include <cmdid.h>
66 #endif
67 #ifndef _INDEX_HRC
68 #include <index.hrc>
69 #endif
70 #ifndef _IDXMRK_HRC
71 #include <idxmrk.hrc>
72 #endif
73 #include <swmodule.hxx>
74 #include <fldmgr.hxx>
75 #include <fldbas.hxx>
76 #include <utlui.hrc>
77 #include <swcont.hxx>
78 #include <svl/cjkoptions.hxx>
79 #include <ndtxt.hxx>
80 #include <breakit.hxx>
81 
82 
83 /* -----------------07.09.99 08:15-------------------
84 
85  --------------------------------------------------*/
86 SFX_IMPL_CHILDWINDOW(SwInsertIdxMarkWrapper, FN_INSERT_IDX_ENTRY_DLG)
87 
88 SwInsertIdxMarkWrapper::SwInsertIdxMarkWrapper(	Window *pParentWindow,
89 							sal_uInt16 nId,
90 							SfxBindings* pBindings,
91 							SfxChildWinInfo* pInfo ) :
92 		SfxChildWindow(pParentWindow, nId)
93 {
94     SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
95     DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
96     pAbstDlg = pFact->CreateIndexMarkFloatDlg( DLG_INSIDXMARK , pBindings, this, pParentWindow, pInfo );
97     DBG_ASSERT(pAbstDlg, "Dialogdiet fail!");
98     pWindow = pAbstDlg->GetWindow();
99 	pWindow->Show();	// at this point,because before pSh has to be initialized in ReInitDlg()
100 						// -> Show() will invoke StateChanged() and save pos
101 	eChildAlignment = SFX_ALIGN_NOALIGNMENT;
102 }
103 /* -----------------07.09.99 09:14-------------------
104 
105  --------------------------------------------------*/
106 SfxChildWinInfo SwInsertIdxMarkWrapper::GetInfo() const
107 {
108 	SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
109 
110 	return aInfo;
111 }
112 
113 void	SwInsertIdxMarkWrapper::ReInitDlg(SwWrtShell& rWrtShell)
114 {
115     pAbstDlg->ReInitDlg(rWrtShell);
116 }
117 
118 
119 /* -----------------07.09.99 08:15-------------------
120 
121  --------------------------------------------------*/
122 SFX_IMPL_CHILDWINDOW(SwInsertAuthMarkWrapper, FN_INSERT_AUTH_ENTRY_DLG)
123 
124 SwInsertAuthMarkWrapper::SwInsertAuthMarkWrapper(	Window *pParentWindow,
125 							sal_uInt16 nId,
126 							SfxBindings* pBindings,
127 							SfxChildWinInfo* pInfo ) :
128 		SfxChildWindow(pParentWindow, nId)
129 {
130     SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
131     DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
132     pAbstDlg = pFact->CreateAuthMarkFloatDlg( DLG_INSAUTHMARK, pBindings, this, pParentWindow, pInfo );
133     DBG_ASSERT(pAbstDlg, "Dialogdiet fail!");
134     pWindow = pAbstDlg->GetWindow();
135 
136 	eChildAlignment = SFX_ALIGN_NOALIGNMENT;
137 }
138 /* -----------------07.09.99 09:14-------------------
139 
140  --------------------------------------------------*/
141 SfxChildWinInfo SwInsertAuthMarkWrapper::GetInfo() const
142 {
143 	SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
144 	return aInfo;
145 }
146 /* -----------------19.10.99 11:16-------------------
147 
148  --------------------------------------------------*/
149 void	SwInsertAuthMarkWrapper::ReInitDlg(SwWrtShell& rWrtShell)
150 {
151     pAbstDlg->ReInitDlg(rWrtShell);
152 }
153 
154