update dev300-m58
[ooovba.git] / sw / source / ui / inc / swuiidxmrk.hxx
blob4ed098cc7ac7f1437c702a991d810d89d1166615
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: swuiidxmrk.hxx,v $
10 * $Revision: 1.5 $
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 ************************************************************************/
30 #ifndef _SWUI_IDXMRK_HXX
31 #define _SWUI_IDXMRK_HXX
33 #include <com/sun/star/container/XNameAccess.hpp>
34 #include <sfx2/basedlgs.hxx>
36 #ifndef _FIXED_HXX //autogen
37 #include <vcl/fixed.hxx>
38 #endif
39 #include <vcl/lstbox.hxx>
40 #ifndef _COMBOBOX_HXX //autogen
41 #include <vcl/combobox.hxx>
42 #endif
43 #include <svx/stddlg.hxx>
45 #ifndef _FIELD_HXX //autogen
46 #include <vcl/field.hxx>
47 #endif
49 #ifndef _GROUP_HXX //autogen
50 #include <vcl/group.hxx>
51 #endif
53 #ifndef _BUTTON_HXX //autogen
54 #include <vcl/button.hxx>
55 #endif
57 #ifndef _IMAGEBTN_HXX //autogen
58 #include <vcl/imagebtn.hxx>
59 #endif
60 #include <sfx2/childwin.hxx>
61 #include "toxe.hxx"
62 #include <svtools/stdctrl.hxx>
63 #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
65 class SwWrtShell;
66 class SwTOXMgr;
67 class SwTOXMark;
68 /*--------------------------------------------------------------------
69 Beschreibung: Markierung fuer Verzeichniseintrag einfuegen
70 --------------------------------------------------------------------*/
71 class SwIndexMarkFloatDlg;
72 class SwIndexMarkModalDlg;
73 class SwIndexMarkDlg : public Window
75 friend class SwIndexMarkFloatDlg;
76 friend class SwIndexMarkModalDlg;
77 FixedText aTypeFT;
78 ListBox aTypeDCB;
79 ImageButton aNewBT;
81 FixedText aEntryFT;
82 Edit aEntryED;
83 FixedText aPhoneticFT0;
84 Edit aPhoneticED0;
86 FixedText aKeyFT;
87 ComboBox aKeyDCB;
88 FixedText aPhoneticFT1;
89 Edit aPhoneticED1;
91 FixedText aKey2FT;
92 ComboBox aKey2DCB;
93 FixedText aPhoneticFT2;
94 Edit aPhoneticED2;
96 FixedText aLevelFT;
97 NumericField aLevelED;
98 CheckBox aMainEntryCB;
99 CheckBox aApplyToAllCB;
100 CheckBox aSearchCaseSensitiveCB;
101 CheckBox aSearchCaseWordOnlyCB;
103 FixedLine aIndexFL;
105 OKButton aOKBT;
106 CancelButton aCancelBT;
107 HelpButton aHelpBT;
108 PushButton aDelBT;
109 //PushButton aNewBT;
111 ImageButton aPrevSameBT;
112 ImageButton aNextSameBT;
113 ImageButton aPrevBT;
114 ImageButton aNextBT;
116 String aOrgStr;
117 sal_Int32 nOptionsId;
118 sal_Bool bDel;
119 sal_Bool bNewMark;
120 sal_Bool bSelected;
122 BOOL bPhoneticED0_ChangedByUser;
123 BOOL bPhoneticED1_ChangedByUser;
124 BOOL bPhoneticED2_ChangedByUser;
125 LanguageType nLangForPhoneticReading; //Language of current text used for phonetic reading proposal
126 BOOL bIsPhoneticReadingEnabled; //this value states wether phopentic reading is enabled in principle dependend of global cjk settings and language of current entry
127 com::sun::star::uno::Reference< com::sun::star::i18n::XExtendedIndexEntrySupplier >
128 xExtendedIndexEntrySupplier;
130 SwTOXMgr* pTOXMgr;
131 SwWrtShell* pSh;
133 void Apply();
134 void InitControls();
135 void InsertMark();
136 void UpdateMark();
138 DECL_LINK( InsertHdl, Button * );
139 DECL_LINK( CloseHdl, Button * );
140 DECL_LINK( DelHdl, Button * );
141 DECL_LINK( NextHdl, Button * );
142 DECL_LINK( NextSameHdl, Button * );
143 DECL_LINK( PrevHdl, Button * );
144 DECL_LINK( PrevSameHdl, Button * );
145 DECL_LINK( ModifyHdl, ListBox* pBox = 0 );
146 DECL_LINK( KeyDCBModifyHdl, ComboBox * );
147 DECL_LINK( NewUserIdxHdl, Button*);
148 DECL_LINK( SearchTypeHdl, CheckBox*);
149 DECL_LINK( PhoneticEDModifyHdl, Edit * );
151 //this method updates the values from 'nLangForPhoneticReading' and 'bIsPhoneticReadingEnabled'
152 //it needs to be called ones if this dialog is opened to create a new entry (in InitControls),
153 //or otherwise it has to be called for each changed TOXMark (in UpdateDialog)
154 void UpdateLanguageDependenciesForPhoneticReading();
155 String GetDefaultPhoneticReading( const String& rText );
157 void UpdateKeyBoxes();
159 void UpdateDialog();
160 void InsertUpdate();
162 virtual void Activate();
164 public:
166 SwIndexMarkDlg( Window *pParent,
167 sal_Bool bNewDlg,
168 const ResId& rResId,
169 sal_Int32 _nOptionsId,
170 SwWrtShell& rWrtShell );
173 ~SwIndexMarkDlg();
175 void ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark = 0);
176 sal_Bool IsTOXType(const String& rName)
177 {return LISTBOX_ENTRY_NOTFOUND != aTypeDCB.GetEntryPos(rName);}
179 /* -----------------06.10.99 10:11-------------------
181 --------------------------------------------------*/
182 class SwIndexMarkFloatDlg : public SfxModelessDialog
184 SwIndexMarkDlg aDlg;
185 virtual void Activate();
186 public:
187 SwIndexMarkFloatDlg( SfxBindings* pBindings,
188 SfxChildWindow* pChild,
189 Window *pParent,
190 SfxChildWinInfo* pInfo,
191 sal_Bool bNew=sal_True);
192 void ReInitDlg(SwWrtShell& rWrtShell);
194 /* -----------------06.10.99 10:33-------------------
196 --------------------------------------------------*/
197 class SwIndexMarkModalDlg : public SvxStandardDialog
199 SwIndexMarkDlg aDlg;
200 public:
201 SwIndexMarkModalDlg(Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark);
203 virtual void Apply();
204 void ReInitDlg(SwWrtShell& rWrtShell);
207 /* -----------------15.09.99 08:39-------------------
209 --------------------------------------------------*/
210 class SwAuthMarkModalDlg;
211 class SwAuthMarkDlg : public Window
213 static sal_Bool bIsFromComponent;
215 friend class SwAuthMarkModalDlg;
216 friend class SwAuthMarkFloatDlg;
218 RadioButton aFromComponentRB;
219 RadioButton aFromDocContentRB;
220 FixedText aAuthorFT;
221 FixedInfo aAuthorFI;
222 FixedText aTitleFT;
223 FixedInfo aTitleFI;
224 FixedText aEntryFT;
225 Edit aEntryED;
226 ListBox aEntryLB;
228 FixedLine aEntryFL;
230 OKButton aOKBT;
231 CancelButton aCancelBT;
232 HelpButton aHelpBT;
233 PushButton aCreateEntryPB;
234 PushButton aEditEntryPB;
236 String sChangeST;
237 sal_Bool bNewEntry;
238 sal_Bool bBibAccessInitialized;
240 SwWrtShell* pSh;
242 String m_sColumnTitles[AUTH_FIELD_END];
243 String m_sFields[AUTH_FIELD_END];
245 String m_sCreatedEntry[AUTH_FIELD_END];
247 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xBibAccess;
249 DECL_LINK(InsertHdl, PushButton*);
250 DECL_LINK(CloseHdl, PushButton*);
251 DECL_LINK(CreateEntryHdl, PushButton*);
252 DECL_LINK(CompEntryHdl, ListBox*);
253 DECL_LINK(ChangeSourceHdl, RadioButton*);
254 DECL_LINK(IsEntryAllowedHdl, Edit*);
255 DECL_LINK(EditModifyHdl, Edit*);
257 void InitControls();
258 virtual void Activate();
259 public:
261 SwAuthMarkDlg( Window *pParent,
262 const ResId& rResId,
263 sal_Bool bNew=sal_True);
264 ~SwAuthMarkDlg();
266 void ReInitDlg(SwWrtShell& rWrtShell);
268 /* -----------------06.10.99 10:11-------------------
270 --------------------------------------------------*/
271 class SwAuthMarkFloatDlg : public SfxModelessDialog
273 SwAuthMarkDlg aDlg;
274 virtual void Activate();
275 public:
276 SwAuthMarkFloatDlg( SfxBindings* pBindings,
277 SfxChildWindow* pChild,
278 Window *pParent,
279 SfxChildWinInfo* pInfo,
280 sal_Bool bNew=sal_True);
281 void ReInitDlg(SwWrtShell& rWrtShell);
283 /* -----------------06.10.99 10:33-------------------
285 --------------------------------------------------*/
286 class SwAuthMarkModalDlg : public SvxStandardDialog
288 SwAuthMarkDlg aDlg;
289 public:
290 SwAuthMarkModalDlg(Window *pParent, SwWrtShell& rSh);
292 virtual void Apply();
293 void ReInitDlg(SwWrtShell& rWrtShell);
297 #endif // _SWUI_IDXMRK_HXX