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: cption.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 ************************************************************************/
33 #include <svx/stddlg.hxx>
35 #ifndef _FIXED_HXX //autogen
36 #include <vcl/fixed.hxx>
39 #ifndef _LSTBOX_HXX //autogen
40 #include <vcl/lstbox.hxx>
43 #ifndef _EDIT_HXX //autogen
44 #include <vcl/edit.hxx>
47 #ifndef _GROUP_HXX //autogen
48 #include <vcl/group.hxx>
51 #ifndef _BUTTON_HXX //autogen
52 #include <vcl/button.hxx>
54 #include <actctrl.hxx>
57 #include <com/sun/star/container/XEnumerationAccess.hpp>
58 #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
59 #include <com/sun/star/container/XNameAccess.hpp>
60 #include <com/sun/star/container/XContentEnumerationAccess.hpp>
61 #include <com/sun/star/container/XEnumeration.hpp>
62 #include <com/sun/star/container/XElementAccess.hpp>
63 #include <com/sun/star/container/XIndexAccess.hpp>
64 #include <com/sun/star/container/XNamed.hpp>
70 #include "optload.hxx"
74 class SwCaptionDialog
: public SvxStandardDialog
76 class CategoryBox
: public ComboBox
79 CategoryBox( Window
* pParent
, const ResId
& rResId
)
80 : ComboBox( pParent
, rResId
)
83 virtual long PreNotify( NotifyEvent
& rNEvt
);
88 FixedLine aSettingsFL
;
89 FixedText aCategoryText
;
90 CategoryBox aCategoryBox
;
91 FixedText aFormatText
;
93 //#i61007# order of captions
94 FixedText aNumberingSeparatorFT
;
95 Edit aNumberingSeparatorED
;
101 CancelButton aCancelButton
;
102 HelpButton aHelpButton
;
103 PushButton aAutoCaptionButton
;
104 PushButton aOptionButton
;
108 SwCaptionPreview aPrevWin
;
110 SwView
&rView
; //Suchen per aktive ::com::sun::star::sdbcx::View vermeiden.
111 SwFldMgr
*pMgr
; //Ptr um das include zu sparen
114 String sCharacterStyle
;
116 bool bCopyAttributes
;
117 bool bOrderNumberingFirst
; //#i61007# order of captions
119 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> xNameAccess
;
120 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNamed
> xNamed
;
122 DECL_LINK( SelectHdl
, ListBox
* );
123 DECL_LINK( ModifyHdl
, Edit
* );
124 DECL_LINK( OptionHdl
, Button
* );
125 DECL_LINK( CaptionHdl
, PushButton
*);
127 virtual void Apply();
130 void CheckButtonWidth();
131 void ApplyCaptionOrder(); //#i61007# order of captions
134 SwCaptionDialog( Window
*pParent
, SwView
&rV
);