1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: swuiidxmrk.hxx,v $
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>
39 #include <vcl/lstbox.hxx>
40 #ifndef _COMBOBOX_HXX //autogen
41 #include <vcl/combobox.hxx>
43 #include <svx/stddlg.hxx>
45 #ifndef _FIELD_HXX //autogen
46 #include <vcl/field.hxx>
49 #ifndef _GROUP_HXX //autogen
50 #include <vcl/group.hxx>
53 #ifndef _BUTTON_HXX //autogen
54 #include <vcl/button.hxx>
57 #ifndef _IMAGEBTN_HXX //autogen
58 #include <vcl/imagebtn.hxx>
60 #include <sfx2/childwin.hxx>
62 #include <svtools/stdctrl.hxx>
63 #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
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
;
83 FixedText aPhoneticFT0
;
88 FixedText aPhoneticFT1
;
93 FixedText aPhoneticFT2
;
97 NumericField aLevelED
;
98 CheckBox aMainEntryCB
;
99 CheckBox aApplyToAllCB
;
100 CheckBox aSearchCaseSensitiveCB
;
101 CheckBox aSearchCaseWordOnlyCB
;
106 CancelButton aCancelBT
;
111 ImageButton aPrevSameBT
;
112 ImageButton aNextSameBT
;
117 sal_Int32 nOptionsId
;
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
;
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();
162 virtual void Activate();
166 SwIndexMarkDlg( Window
*pParent
,
169 sal_Int32 _nOptionsId
,
170 SwWrtShell
& rWrtShell
);
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
185 virtual void Activate();
187 SwIndexMarkFloatDlg( SfxBindings
* pBindings
,
188 SfxChildWindow
* pChild
,
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
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
;
231 CancelButton aCancelBT
;
233 PushButton aCreateEntryPB
;
234 PushButton aEditEntryPB
;
238 sal_Bool bBibAccessInitialized
;
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
*);
258 virtual void Activate();
261 SwAuthMarkDlg( Window
*pParent
,
263 sal_Bool bNew
=sal_True
);
266 void ReInitDlg(SwWrtShell
& rWrtShell
);
268 /* -----------------06.10.99 10:11-------------------
270 --------------------------------------------------*/
271 class SwAuthMarkFloatDlg
: public SfxModelessDialog
274 virtual void Activate();
276 SwAuthMarkFloatDlg( SfxBindings
* pBindings
,
277 SfxChildWindow
* pChild
,
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
290 SwAuthMarkModalDlg(Window
*pParent
, SwWrtShell
& rSh
);
292 virtual void Apply();
293 void ReInitDlg(SwWrtShell
& rWrtShell
);
297 #endif // _SWUI_IDXMRK_HXX