xref: /AOO41X/main/sw/source/ui/inc/cption.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _CPTION_HXX
28*cdf0e10cSrcweir #define _CPTION_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include <svx/stddlg.hxx>
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen
33*cdf0e10cSrcweir #include <vcl/fixed.hxx>
34*cdf0e10cSrcweir #endif
35*cdf0e10cSrcweir 
36*cdf0e10cSrcweir #ifndef _LSTBOX_HXX //autogen
37*cdf0e10cSrcweir #include <vcl/lstbox.hxx>
38*cdf0e10cSrcweir #endif
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir #ifndef _EDIT_HXX //autogen
41*cdf0e10cSrcweir #include <vcl/edit.hxx>
42*cdf0e10cSrcweir #endif
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir #ifndef _GROUP_HXX //autogen
45*cdf0e10cSrcweir #include <vcl/group.hxx>
46*cdf0e10cSrcweir #endif
47*cdf0e10cSrcweir 
48*cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen
49*cdf0e10cSrcweir #include <vcl/button.hxx>
50*cdf0e10cSrcweir #endif
51*cdf0e10cSrcweir #include <actctrl.hxx>
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir 
54*cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp>
55*cdf0e10cSrcweir #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
56*cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp>
57*cdf0e10cSrcweir #include <com/sun/star/container/XContentEnumerationAccess.hpp>
58*cdf0e10cSrcweir #include <com/sun/star/container/XEnumeration.hpp>
59*cdf0e10cSrcweir #include <com/sun/star/container/XElementAccess.hpp>
60*cdf0e10cSrcweir #include <com/sun/star/container/XIndexAccess.hpp>
61*cdf0e10cSrcweir #include <com/sun/star/container/XNamed.hpp>
62*cdf0e10cSrcweir 
63*cdf0e10cSrcweir class SwFldMgr;
64*cdf0e10cSrcweir class SwView;
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir #include <wrtsh.hxx>
67*cdf0e10cSrcweir #include "optload.hxx"
68*cdf0e10cSrcweir #include "swlbox.hxx"
69*cdf0e10cSrcweir 
70*cdf0e10cSrcweir 
71*cdf0e10cSrcweir class SwCaptionDialog : public SvxStandardDialog
72*cdf0e10cSrcweir {
73*cdf0e10cSrcweir 	class CategoryBox : public ComboBox
74*cdf0e10cSrcweir 	{
75*cdf0e10cSrcweir 	public:
76*cdf0e10cSrcweir 		CategoryBox( Window* pParent, const ResId& rResId )
77*cdf0e10cSrcweir 			: ComboBox( pParent, rResId )
78*cdf0e10cSrcweir 		{}
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir 		virtual long 	PreNotify( NotifyEvent& rNEvt );
81*cdf0e10cSrcweir 	};
82*cdf0e10cSrcweir 
83*cdf0e10cSrcweir 	FixedText	 aTextText;
84*cdf0e10cSrcweir 	Edit		 aTextEdit;
85*cdf0e10cSrcweir     FixedLine    aSettingsFL;
86*cdf0e10cSrcweir 	FixedText	 aCategoryText;
87*cdf0e10cSrcweir     CategoryBox	 aCategoryBox;
88*cdf0e10cSrcweir 	FixedText	 aFormatText;
89*cdf0e10cSrcweir 	ListBox 	 aFormatBox;
90*cdf0e10cSrcweir     //#i61007# order of captions
91*cdf0e10cSrcweir     FixedText    aNumberingSeparatorFT;
92*cdf0e10cSrcweir     Edit         aNumberingSeparatorED;
93*cdf0e10cSrcweir 	FixedText    aSepText;
94*cdf0e10cSrcweir 	Edit         aSepEdit;
95*cdf0e10cSrcweir 	FixedText	 aPosText;
96*cdf0e10cSrcweir 	ListBox 	 aPosBox;
97*cdf0e10cSrcweir 	OKButton	 aOKButton;
98*cdf0e10cSrcweir 	CancelButton aCancelButton;
99*cdf0e10cSrcweir 	HelpButton 	 aHelpButton;
100*cdf0e10cSrcweir 	PushButton   aAutoCaptionButton;
101*cdf0e10cSrcweir 	PushButton	 aOptionButton;
102*cdf0e10cSrcweir 
103*cdf0e10cSrcweir     String       sNone;
104*cdf0e10cSrcweir 
105*cdf0e10cSrcweir     SwCaptionPreview    aPrevWin;
106*cdf0e10cSrcweir 
107*cdf0e10cSrcweir     SwView       &rView; //Suchen per aktive ::com::sun::star::sdbcx::View vermeiden.
108*cdf0e10cSrcweir     SwFldMgr     *pMgr;      //Ptr um das include zu sparen
109*cdf0e10cSrcweir     SelectionType eType;
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir     String       sCharacterStyle;
112*cdf0e10cSrcweir     String       sObjectName;
113*cdf0e10cSrcweir 	bool		 bCopyAttributes;
114*cdf0e10cSrcweir     bool        bOrderNumberingFirst; //#i61007# order of captions
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > 	xNameAccess;
117*cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed >  		xNamed;
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir 	DECL_LINK( SelectHdl, ListBox * );
120*cdf0e10cSrcweir 	DECL_LINK( ModifyHdl, Edit * );
121*cdf0e10cSrcweir 	DECL_LINK( OptionHdl, Button * );
122*cdf0e10cSrcweir     DECL_LINK( CaptionHdl, PushButton*);
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir 	virtual void Apply();
125*cdf0e10cSrcweir 
126*cdf0e10cSrcweir     void    DrawSample();
127*cdf0e10cSrcweir     void    CheckButtonWidth();
128*cdf0e10cSrcweir     void    ApplyCaptionOrder(); //#i61007# order of captions
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir public:
131*cdf0e10cSrcweir 	 SwCaptionDialog( Window *pParent, SwView &rV );
132*cdf0e10cSrcweir 	~SwCaptionDialog();
133*cdf0e10cSrcweir };
134*cdf0e10cSrcweir 
135*cdf0e10cSrcweir #endif
136*cdf0e10cSrcweir 
137*cdf0e10cSrcweir 
138