xref: /trunk/main/sw/source/ui/inc/cption.hxx (revision 1d2dbeb0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _CPTION_HXX
24 #define _CPTION_HXX
25 
26 #include <svx/stddlg.hxx>
27 
28 #ifndef _FIXED_HXX //autogen
29 #include <vcl/fixed.hxx>
30 #endif
31 
32 #ifndef _LSTBOX_HXX //autogen
33 #include <vcl/lstbox.hxx>
34 #endif
35 
36 #ifndef _EDIT_HXX //autogen
37 #include <vcl/edit.hxx>
38 #endif
39 
40 #ifndef _GROUP_HXX //autogen
41 #include <vcl/group.hxx>
42 #endif
43 
44 #ifndef _BUTTON_HXX //autogen
45 #include <vcl/button.hxx>
46 #endif
47 #include <actctrl.hxx>
48 
49 
50 #include <com/sun/star/container/XEnumerationAccess.hpp>
51 #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
52 #include <com/sun/star/container/XNameAccess.hpp>
53 #include <com/sun/star/container/XContentEnumerationAccess.hpp>
54 #include <com/sun/star/container/XEnumeration.hpp>
55 #include <com/sun/star/container/XElementAccess.hpp>
56 #include <com/sun/star/container/XIndexAccess.hpp>
57 #include <com/sun/star/container/XNamed.hpp>
58 
59 class SwFldMgr;
60 class SwView;
61 
62 #include <wrtsh.hxx>
63 #include "optload.hxx"
64 #include "swlbox.hxx"
65 
66 
67 class SwCaptionDialog : public SvxStandardDialog
68 {
69 	class CategoryBox : public ComboBox
70 	{
71 	public:
CategoryBox(Window * pParent,const ResId & rResId)72 		CategoryBox( Window* pParent, const ResId& rResId )
73 			: ComboBox( pParent, rResId )
74 		{}
75 
76 		virtual long 	PreNotify( NotifyEvent& rNEvt );
77 	};
78 
79 	FixedText	 aTextText;
80 	Edit		 aTextEdit;
81     FixedLine    aSettingsFL;
82 	FixedText	 aCategoryText;
83     CategoryBox	 aCategoryBox;
84 	FixedText	 aFormatText;
85 	ListBox 	 aFormatBox;
86     //#i61007# order of captions
87     FixedText    aNumberingSeparatorFT;
88     Edit         aNumberingSeparatorED;
89 	FixedText    aSepText;
90 	Edit         aSepEdit;
91 	FixedText	 aPosText;
92 	ListBox 	 aPosBox;
93 	OKButton	 aOKButton;
94 	CancelButton aCancelButton;
95 	HelpButton 	 aHelpButton;
96 	PushButton   aAutoCaptionButton;
97 	PushButton	 aOptionButton;
98 
99     String       sNone;
100 
101     SwCaptionPreview    aPrevWin;
102 
103     SwView       &rView; //Suchen per aktive ::com::sun::star::sdbcx::View vermeiden.
104     SwFldMgr     *pMgr;      //Ptr um das include zu sparen
105     SelectionType eType;
106 
107     String       sCharacterStyle;
108     String       sObjectName;
109 	bool		 bCopyAttributes;
110     bool        bOrderNumberingFirst; //#i61007# order of captions
111 
112 	::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > 	xNameAccess;
113 	::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed >  		xNamed;
114 
115 	DECL_LINK( SelectHdl, ListBox * );
116 	DECL_LINK( ModifyHdl, Edit * );
117 	DECL_LINK( OptionHdl, Button * );
118     DECL_LINK( CaptionHdl, PushButton*);
119 
120 	virtual void Apply();
121 
122     void    DrawSample();
123     void    CheckButtonWidth();
124     void    ApplyCaptionOrder(); //#i61007# order of captions
125 
126 public:
127 	 SwCaptionDialog( Window *pParent, SwView &rV );
128 	~SwCaptionDialog();
129 };
130 
131 #endif
132 
133 
134