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