xref: /trunk/main/sw/source/ui/inc/optload.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 _OPTLOAD_HXX
24 #define _OPTLOAD_HXX
25 
26 #include <sfx2/tabdlg.hxx>
27 
28 #ifndef _GROUP_HXX
29 #include <vcl/group.hxx>
30 #endif
31 #include <vcl/fixed.hxx>
32 #include <vcl/lstbox.hxx>
33 #include <vcl/field.hxx>
34 #include <svx/strarray.hxx>
35 #include <sfx2/basedlgs.hxx>
36 #include <svx/checklbx.hxx>
37 #include <swlbox.hxx>
38 #include <caption.hxx>
39 
40 class SwFldMgr;
41 class SvLBoxEntry;
42 class SwWrtShell;
43 
44 /*-----------------31.08.96 10.09-------------------
45 
46 --------------------------------------------------*/
47 
48 class SwLoadOptPage : public SfxTabPage
49 {
50 private:
51     FixedLine   aUpdateFL;
52     FixedText   aLinkFT;
53     RadioButton aAlwaysRB;
54 	RadioButton	aRequestRB;
55 	RadioButton	aNeverRB;
56 
57     FixedText   aFieldFT;
58     CheckBox    aAutoUpdateFields;
59 	CheckBox	aAutoUpdateCharts;
60 
61     FixedLine   aSettingsFL;
62     FixedText   aMetricFT;
63     ListBox     aMetricLB;
64     FixedText   aTabFT;
65 	MetricField aTabMF;
66     CheckBox    aUseSquaredPageMode;
67 
68 	SwWrtShell*	pWrtShell;
69     sal_Bool    bHTMLMode;
70     sal_uInt16      nLastTab;
71     sal_Int32   nOldLinkMode;
72 
73     DECL_LINK(CaptionHdl, PushButton*);
74     DECL_LINK(MetricHdl, ListBox*);
75 
76 public:
77 	SwLoadOptPage( Window* pParent, const SfxItemSet& rSet );
78 	~SwLoadOptPage();
79 
80 	static SfxTabPage*	Create( Window* pParent,
81 								const SfxItemSet& rAttrSet);
82 
83 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
84 	virtual	void 		Reset( const SfxItemSet& rSet );
85 };
86 
87 /*--------------------------------------------------------------------
88 	Beschreibung:
89  --------------------------------------------------------------------*/
90 class SwCaptionOptDlg : public SfxSingleTabDialog
91 {
92 public:
93 	 SwCaptionOptDlg(Window* pParent, const SfxItemSet& rSet);
94 	~SwCaptionOptDlg();
95 };
96 /* -----------------23.10.98 13:19-------------------
97  *
98  * --------------------------------------------------*/
99 
100 class CaptionComboBox : public SwComboBox
101 {
102 protected:
103 	virtual void KeyInput( const KeyEvent& );
104 
105 public:
CaptionComboBox(Window * pParent,const ResId & rResId)106 	CaptionComboBox( Window* pParent, const ResId& rResId)
107 		: SwComboBox(pParent, rResId)
108 	{}
109 };
110 
111 /*-----------------31.08.96 10.09-------------------
112 
113 --------------------------------------------------*/
114 
115 class SwCaptionPreview : public Window
116 {
117 private:
118 	String			maText;
119 	Point			maDrawPos;
120 public:
121 					SwCaptionPreview( Window* pParent, const ResId& rResId );
122 	void			SetPreviewText( const String& rText );
123 	virtual void	Paint( const Rectangle& rRect );
124 };
125 
126 class SwCaptionOptPage : public SfxTabPage
127 {
128 private:
129 	FixedText		aCheckFT;
130 	SvxCheckListBox	aCheckLB;
131 
132     FixedText       aFtCaptionOrder;
133     ListBox         aLbCaptionOrder;
134 
135     SwCaptionPreview    aPreview;
136 
137     FixedLine       aSettingsGroupFL;
138 	FixedText		aCategoryText;
139 	CaptionComboBox	aCategoryBox;
140 	FixedText		aFormatText;
141 	ListBox			aFormatBox;
142     //#i61007# order of captions
143     FixedText       aNumberingSeparatorFT;
144     Edit            aNumberingSeparatorED;
145 	FixedText		aTextText;
146 	Edit			aTextEdit;
147 	FixedText		aPosText;
148 	ListBox			aPosBox;
149 
150 	FixedLine		aNumCaptFL;
151 	FixedText 		aFtLevel;
152 	ListBox 		aLbLevel;
153 	FixedText 		aFtDelim;
154 	Edit 			aEdDelim;
155 
156 	FixedLine		aCategoryFL;
157 	FixedText		aCharStyleFT;
158 	ListBox			aCharStyleLB;
159 	CheckBox		aApplyBorderCB;
160 
161 	String			sSWTable;
162 	String			sSWFrame;
163 	String			sSWGraphic;
164 	String			sOLE;
165 
166 	String			sIllustration;
167 	String			sTable;
168 	String			sText;
169     String          sDrawing;
170 
171 	String			sBegin;
172 	String			sEnd;
173 	String			sAbove;
174 	String			sBelow;
175 
176     String          sNone;
177 
178 	SwFldMgr		*pMgr;
179 	sal_uInt16			eType;
180 	sal_Bool 			bHTMLMode;
181 
182 	DECL_LINK( SelectHdl, ListBox *pLB = 0 );
183 	DECL_LINK( ModifyHdl, Edit *pEdt = 0 );
184     DECL_LINK( OrderHdl, ListBox* );
185 	DECL_LINK( ShowEntryHdl, SvxCheckListBox *pLB = 0 );
186 	DECL_LINK( SaveEntryHdl, SvxCheckListBox *pLB = 0 );
187 
188 	void				DelUserData();
189 	void				SetOptions(	const sal_uInt16 nPos,
190 									const SwCapObjType eType,
191 									const SvGlobalName *pOleId = 0);
192 	void				SaveEntry( SvLBoxEntry* pEntry );
193 	void				DrawSample();
194 
195 public:
196 						SwCaptionOptPage( Window* pParent,
197 										 const SfxItemSet& rSet );
198 						~SwCaptionOptPage();
199 
200 	static SfxTabPage*	Create( Window* pParent,
201 								const SfxItemSet& rAttrSet);
202 
203 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
204 	virtual	void 		Reset( const SfxItemSet& rSet );
205 };
206 
207 #endif
208 
209 
210