xref: /aoo41x/main/sw/source/ui/inc/regionsw.hxx (revision 1d2dbeb0)
1*1d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1d2dbeb0SAndrew Rist  * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*1d2dbeb0SAndrew Rist  *
11*1d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*1d2dbeb0SAndrew Rist  *
13*1d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist  * under the License.
19*1d2dbeb0SAndrew Rist  *
20*1d2dbeb0SAndrew Rist  *************************************************************/
21*1d2dbeb0SAndrew Rist 
22*1d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir #ifndef _REGIONSW_HXX
24cdf0e10cSrcweir #define _REGIONSW_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <hintids.hxx>
27cdf0e10cSrcweir #include <vcl/field.hxx>
28cdf0e10cSrcweir #include <vcl/lstbox.hxx>
29cdf0e10cSrcweir #include <vcl/edit.hxx>
30cdf0e10cSrcweir #include <vcl/button.hxx>
31cdf0e10cSrcweir #include <vcl/fixed.hxx>
32cdf0e10cSrcweir #include <vcl/combobox.hxx>
33cdf0e10cSrcweir #include <vcl/group.hxx>
34cdf0e10cSrcweir #include <svtools/svtreebx.hxx>
35cdf0e10cSrcweir #include <sfx2/basedlgs.hxx>
36cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
37cdf0e10cSrcweir #include <editeng/brshitem.hxx>
38cdf0e10cSrcweir 
39cdf0e10cSrcweir #include <condedit.hxx>
40cdf0e10cSrcweir #include <section.hxx>
41cdf0e10cSrcweir #include <fmtclds.hxx>
42cdf0e10cSrcweir #include <fmtftntx.hxx>
43cdf0e10cSrcweir #include <fmtclbl.hxx>
44cdf0e10cSrcweir #include <numberingtypelistbox.hxx>
45cdf0e10cSrcweir #include <editeng/frmdiritem.hxx>
46cdf0e10cSrcweir #include <vcl/image.hxx>
47cdf0e10cSrcweir #include <svx/paraprev.hxx>
48cdf0e10cSrcweir #include <editeng/lrspitem.hxx>
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 
51cdf0e10cSrcweir class SwWrtShell;
52cdf0e10cSrcweir class EditRegionDlg;
53cdf0e10cSrcweir 
54cdf0e10cSrcweir namespace sfx2
55cdf0e10cSrcweir {
56cdf0e10cSrcweir     class DocumentInserter;
57cdf0e10cSrcweir     class FileDialogHelper;
58cdf0e10cSrcweir }
59cdf0e10cSrcweir 
60cdf0e10cSrcweir /*************************************************************************
61cdf0e10cSrcweir 	Dialog "Bereiche bearbeiten"
62cdf0e10cSrcweir *************************************************************************/
63cdf0e10cSrcweir 
64cdf0e10cSrcweir class SectRepr;
65cdf0e10cSrcweir typedef SectRepr* SectReprPtr;
66cdf0e10cSrcweir SV_DECL_PTRARR_SORT( SectReprArr, SectReprPtr, 0, 4 )
67cdf0e10cSrcweir 
68cdf0e10cSrcweir class SwEditRegionDlg : public SfxModalDialog
69cdf0e10cSrcweir {
70cdf0e10cSrcweir     FixedLine       aNameFL;
71cdf0e10cSrcweir     Edit            aCurName;
72cdf0e10cSrcweir     SvTreeListBox   aTree;
73cdf0e10cSrcweir 
74cdf0e10cSrcweir     FixedLine       aLinkFL;
75cdf0e10cSrcweir     TriStateBox     aFileCB;
76cdf0e10cSrcweir 	CheckBox		aDDECB;
77cdf0e10cSrcweir 	FixedText		aFileNameFT;
78cdf0e10cSrcweir 	FixedText		aDDECommandFT;
79cdf0e10cSrcweir 	Edit 			aFileNameED;
80cdf0e10cSrcweir     PushButton      aFilePB;
81cdf0e10cSrcweir     FixedText       aSubRegionFT;
82cdf0e10cSrcweir     ComboBox        aSubRegionED;
83cdf0e10cSrcweir     bool            bSubRegionsFilled;
84cdf0e10cSrcweir 
85cdf0e10cSrcweir     FixedLine       aProtectFL;
86cdf0e10cSrcweir     TriStateBox     aProtectCB;
87cdf0e10cSrcweir     CheckBox        aPasswdCB;
88cdf0e10cSrcweir     PushButton      aPasswdPB;
89cdf0e10cSrcweir 
90cdf0e10cSrcweir     FixedLine       aHideFL;
91cdf0e10cSrcweir     TriStateBox     aHideCB;
92cdf0e10cSrcweir     FixedText       aConditionFT;
93cdf0e10cSrcweir 	ConditionEdit	aConditionED;
94cdf0e10cSrcweir 
95cdf0e10cSrcweir     // --> FME 2004-06-22 #114856# edit in readonly sections
96cdf0e10cSrcweir     FixedLine       aPropertiesFL;
97cdf0e10cSrcweir     TriStateBox     aEditInReadonlyCB;
98cdf0e10cSrcweir     // <--
99cdf0e10cSrcweir 
100cdf0e10cSrcweir     OKButton        aOK;
101cdf0e10cSrcweir 	CancelButton 	aCancel;
102cdf0e10cSrcweir 	PushButton 		aOptionsPB;
103cdf0e10cSrcweir 	PushButton 		aDismiss;
104cdf0e10cSrcweir 	HelpButton		aHelp;
105cdf0e10cSrcweir     ImageList       aImageIL;
106cdf0e10cSrcweir     ImageList       aImageILH;
107cdf0e10cSrcweir 
108cdf0e10cSrcweir     SwWrtShell&             rSh;
109cdf0e10cSrcweir     SectReprArr             aSectReprArr;
110cdf0e10cSrcweir     SvLBoxEntry*            pAktEntry;
111cdf0e10cSrcweir     const SwSection*        pCurrSect;
112cdf0e10cSrcweir     sfx2::DocumentInserter* m_pDocInserter;
113cdf0e10cSrcweir     Window*                 m_pOldDefDlgParent;
114cdf0e10cSrcweir 
115cdf0e10cSrcweir     sal_Bool            bDontCheckPasswd :1;
116cdf0e10cSrcweir 	sal_Bool 			bWeb			:1;
117cdf0e10cSrcweir 
118cdf0e10cSrcweir 
119cdf0e10cSrcweir     Image  BuildBitmap(sal_Bool bProtect,sal_Bool bHidden,sal_Bool bHighContrast);
120cdf0e10cSrcweir 
121cdf0e10cSrcweir     void    RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry);
122cdf0e10cSrcweir 	sal_uInt16 	FindArrPos(const SwSectionFmt* pFmt);
123cdf0e10cSrcweir 
124cdf0e10cSrcweir 	DECL_LINK( GetFirstEntryHdl, SvTreeListBox * );
125cdf0e10cSrcweir 	DECL_LINK( DeselectHdl, SvTreeListBox * );
126cdf0e10cSrcweir 
127cdf0e10cSrcweir 	DECL_LINK( OkHdl, CheckBox * );
128cdf0e10cSrcweir 	DECL_LINK( NameEditHdl, Edit * );
129cdf0e10cSrcweir 	DECL_LINK( ConditionEditHdl, Edit * );
130cdf0e10cSrcweir 
131cdf0e10cSrcweir     DECL_LINK( ChangePasswdHdl, Button * );
132cdf0e10cSrcweir 	DECL_LINK( ChangeProtectHdl, TriStateBox * );
133cdf0e10cSrcweir 	DECL_LINK( ChangeHideHdl, TriStateBox * );
134cdf0e10cSrcweir     // --> FME 2004-06-22 #114856# edit in readonly sections
135cdf0e10cSrcweir     DECL_LINK( ChangeEditInReadonlyHdl, TriStateBox * );
136cdf0e10cSrcweir     // <--
137cdf0e10cSrcweir     DECL_LINK( ChangeDismissHdl, CheckBox * );
138cdf0e10cSrcweir 	DECL_LINK( UseFileHdl, CheckBox* );
139cdf0e10cSrcweir 	DECL_LINK( FileSearchHdl, PushButton* );
140cdf0e10cSrcweir 	DECL_LINK( OptionsHdl, PushButton* );
141cdf0e10cSrcweir 	DECL_LINK( FileNameHdl, Edit* );
142cdf0e10cSrcweir 	DECL_LINK( DDEHdl, CheckBox* );
143cdf0e10cSrcweir     DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
144cdf0e10cSrcweir     DECL_LINK( SubRegionEventHdl, VclWindowEvent * );
145cdf0e10cSrcweir 
146cdf0e10cSrcweir     sal_Bool CheckPasswd(CheckBox* pBox = 0);
147cdf0e10cSrcweir 
148cdf0e10cSrcweir public:
149cdf0e10cSrcweir 	SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh );
150cdf0e10cSrcweir 	virtual ~SwEditRegionDlg();
151cdf0e10cSrcweir 
152cdf0e10cSrcweir     void    SelectSection(const String& rSectionName);
153cdf0e10cSrcweir 
154cdf0e10cSrcweir };
155cdf0e10cSrcweir /*************************************************************************
156cdf0e10cSrcweir 	Dialog "Bereich einfuegen"
157cdf0e10cSrcweir *************************************************************************/
158cdf0e10cSrcweir 
159cdf0e10cSrcweir /* -----------------21.05.99 11:05-------------------
160cdf0e10cSrcweir  *
161cdf0e10cSrcweir  * --------------------------------------------------*/
162cdf0e10cSrcweir class SwInsertSectionTabPage : public SfxTabPage
163cdf0e10cSrcweir {
164cdf0e10cSrcweir     FixedLine       aNameFL;
165cdf0e10cSrcweir     ComboBox        aCurName;
166cdf0e10cSrcweir 
167cdf0e10cSrcweir     FixedLine       aLinkFL;
168cdf0e10cSrcweir     CheckBox        aFileCB;
169cdf0e10cSrcweir 	CheckBox		aDDECB;
170cdf0e10cSrcweir 	FixedText		aDDECommandFT;
171cdf0e10cSrcweir 	FixedText		aFileNameFT;
172cdf0e10cSrcweir 	Edit 			aFileNameED;
173cdf0e10cSrcweir     PushButton      aFilePB;
174cdf0e10cSrcweir     FixedText       aSubRegionFT;
175cdf0e10cSrcweir 	ComboBox		aSubRegionED;
176cdf0e10cSrcweir 
177cdf0e10cSrcweir     FixedLine       aProtectFL;
178cdf0e10cSrcweir     CheckBox        aProtectCB;
179cdf0e10cSrcweir     CheckBox        aPasswdCB;
180cdf0e10cSrcweir     PushButton      aPasswdPB;
181cdf0e10cSrcweir 
182cdf0e10cSrcweir     FixedLine       aHideFL;
183cdf0e10cSrcweir     CheckBox        aHideCB;
184cdf0e10cSrcweir     FixedText       aConditionFT;
185cdf0e10cSrcweir 	ConditionEdit	aConditionED;
186cdf0e10cSrcweir 
187cdf0e10cSrcweir     // --> FME 2004-06-22 #114856# edit in readonly sections
188cdf0e10cSrcweir     FixedLine       aPropertiesFL;
189cdf0e10cSrcweir     CheckBox        aEditInReadonlyCB;
190cdf0e10cSrcweir     // <--
191cdf0e10cSrcweir 
192cdf0e10cSrcweir     String          m_sFileName;
193cdf0e10cSrcweir     String          m_sFilterName;
194cdf0e10cSrcweir     String          m_sFilePasswd;
195cdf0e10cSrcweir 
196cdf0e10cSrcweir //	SwFmtCol*		pCols;
197cdf0e10cSrcweir     ::com::sun::star::uno::Sequence <sal_Int8 > m_aNewPasswd;
198cdf0e10cSrcweir     SwWrtShell*             m_pWrtSh;
199cdf0e10cSrcweir     sfx2::DocumentInserter* m_pDocInserter;
200cdf0e10cSrcweir     Window*                 m_pOldDefDlgParent;
201cdf0e10cSrcweir 
202cdf0e10cSrcweir 	DECL_LINK( ChangeHideHdl, CheckBox * );
203cdf0e10cSrcweir     // --> FME 2004-06-22 #114856# edit in readonly sections
204cdf0e10cSrcweir     DECL_LINK( ChangeEditInReadonlyHdl, CheckBox * );
205cdf0e10cSrcweir     // <--
206cdf0e10cSrcweir 	DECL_LINK( ChangeProtectHdl, CheckBox * );
207cdf0e10cSrcweir     DECL_LINK( ChangePasswdHdl, Button * );
208cdf0e10cSrcweir     DECL_LINK( NameEditHdl, Edit * );
209cdf0e10cSrcweir 	DECL_LINK( UseFileHdl, CheckBox* );
210cdf0e10cSrcweir 	DECL_LINK( FileSearchHdl, PushButton* );
211cdf0e10cSrcweir 	DECL_LINK( DDEHdl, CheckBox* );
212cdf0e10cSrcweir     DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
213cdf0e10cSrcweir 
214cdf0e10cSrcweir public:
215cdf0e10cSrcweir 	SwInsertSectionTabPage(Window *pParent, const SfxItemSet &rAttrSet);
216cdf0e10cSrcweir 	virtual ~SwInsertSectionTabPage();
217cdf0e10cSrcweir 
218cdf0e10cSrcweir 	void	SetWrtShell(SwWrtShell& rSh);
219cdf0e10cSrcweir 
220cdf0e10cSrcweir 	virtual sal_Bool		FillItemSet( SfxItemSet& );
221cdf0e10cSrcweir 	virtual void		Reset( const SfxItemSet& );
222cdf0e10cSrcweir 
223cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent,
224cdf0e10cSrcweir 								const SfxItemSet& rAttrSet);
225cdf0e10cSrcweir };
226cdf0e10cSrcweir 
227cdf0e10cSrcweir class SwSectionFtnEndTabPage : public SfxTabPage
228cdf0e10cSrcweir {
229cdf0e10cSrcweir     FixedLine       aFtnFL;
230cdf0e10cSrcweir 	CheckBox 		aFtnNtAtTextEndCB;
231cdf0e10cSrcweir 
232cdf0e10cSrcweir 	CheckBox 		aFtnNtNumCB;
233cdf0e10cSrcweir 	FixedText 		aFtnOffsetLbl;
234cdf0e10cSrcweir 	NumericField 	aFtnOffsetFld;
235cdf0e10cSrcweir 
236cdf0e10cSrcweir 	CheckBox 		aFtnNtNumFmtCB;
237cdf0e10cSrcweir 	FixedText		aFtnPrefixFT;
238cdf0e10cSrcweir 	Edit			aFtnPrefixED;
239cdf0e10cSrcweir 	SwNumberingTypeListBox	 aFtnNumViewBox;
240cdf0e10cSrcweir 	FixedText		aFtnSuffixFT;
241cdf0e10cSrcweir 	Edit			aFtnSuffixED;
242cdf0e10cSrcweir 
243cdf0e10cSrcweir     FixedLine       aEndFL;
244cdf0e10cSrcweir 	CheckBox 		aEndNtAtTextEndCB;
245cdf0e10cSrcweir 
246cdf0e10cSrcweir 	CheckBox 		aEndNtNumCB;
247cdf0e10cSrcweir 	FixedText 		aEndOffsetLbl;
248cdf0e10cSrcweir 	NumericField 	aEndOffsetFld;
249cdf0e10cSrcweir 
250cdf0e10cSrcweir 	CheckBox 		aEndNtNumFmtCB;
251cdf0e10cSrcweir 	FixedText		aEndPrefixFT;
252cdf0e10cSrcweir 	Edit			aEndPrefixED;
253cdf0e10cSrcweir 	SwNumberingTypeListBox	 aEndNumViewBox;
254cdf0e10cSrcweir 	FixedText		aEndSuffixFT;
255cdf0e10cSrcweir 	Edit			aEndSuffixED;
256cdf0e10cSrcweir 
257cdf0e10cSrcweir 
258cdf0e10cSrcweir 	DECL_LINK( FootEndHdl, CheckBox * );
259cdf0e10cSrcweir 	void ResetState( sal_Bool bFtn, const SwFmtFtnEndAtTxtEnd& );
260cdf0e10cSrcweir 
261cdf0e10cSrcweir public:
262cdf0e10cSrcweir 	SwSectionFtnEndTabPage( Window *pParent, const SfxItemSet &rAttrSet );
263cdf0e10cSrcweir 	virtual ~SwSectionFtnEndTabPage();
264cdf0e10cSrcweir 
265cdf0e10cSrcweir 	virtual sal_Bool		FillItemSet( SfxItemSet& );
266cdf0e10cSrcweir 	virtual void		Reset( const SfxItemSet& );
267cdf0e10cSrcweir 
268cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent,
269cdf0e10cSrcweir 								const SfxItemSet& rAttrSet);
270cdf0e10cSrcweir };
271cdf0e10cSrcweir /* -----------------13.06.2003 09:51-----------------
272cdf0e10cSrcweir 
273cdf0e10cSrcweir  --------------------------------------------------*/
274cdf0e10cSrcweir class SwSectionIndentTabPage : public SfxTabPage
275cdf0e10cSrcweir {
276cdf0e10cSrcweir     FixedLine           aIndentFL;
277cdf0e10cSrcweir     FixedText           aBeforeFT;
278cdf0e10cSrcweir     MetricField         aBeforeMF;
279cdf0e10cSrcweir     FixedText           aAfterFT;
280cdf0e10cSrcweir     MetricField         aAfterMF;
281cdf0e10cSrcweir 
282cdf0e10cSrcweir     SvxParaPrevWindow   aPreviewWin;
283cdf0e10cSrcweir 
284cdf0e10cSrcweir     DECL_LINK(IndentModifyHdl, MetricField*);
285cdf0e10cSrcweir public:
286cdf0e10cSrcweir     SwSectionIndentTabPage( Window *pParent, const SfxItemSet &rAttrSet );
287cdf0e10cSrcweir     virtual ~SwSectionIndentTabPage();
288cdf0e10cSrcweir 
289cdf0e10cSrcweir     virtual sal_Bool        FillItemSet( SfxItemSet& );
290cdf0e10cSrcweir     virtual void        Reset( const SfxItemSet& );
291cdf0e10cSrcweir 
292cdf0e10cSrcweir     static SfxTabPage*  Create( Window* pParent,
293cdf0e10cSrcweir                                 const SfxItemSet& rAttrSet);
294cdf0e10cSrcweir 
295cdf0e10cSrcweir     void    SetWrtShell(SwWrtShell& rSh);
296cdf0e10cSrcweir };
297cdf0e10cSrcweir 
298cdf0e10cSrcweir /* -----------------21.05.99 13:07-------------------
299cdf0e10cSrcweir  *
300cdf0e10cSrcweir  * --------------------------------------------------*/
301cdf0e10cSrcweir class SwInsertSectionTabDialog : public SfxTabDialog
302cdf0e10cSrcweir {
303cdf0e10cSrcweir 	SwWrtShell& 	rWrtSh;
304cdf0e10cSrcweir     ::std::auto_ptr<SwSectionData> m_pSectionData;
305cdf0e10cSrcweir 
306cdf0e10cSrcweir protected:
307cdf0e10cSrcweir 	virtual void 	PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
308cdf0e10cSrcweir 	virtual short	Ok();
309cdf0e10cSrcweir public:
310cdf0e10cSrcweir 	SwInsertSectionTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
311cdf0e10cSrcweir 	virtual ~SwInsertSectionTabDialog();
312cdf0e10cSrcweir 
313cdf0e10cSrcweir     void        SetSectionData(SwSectionData const& rSect);
GetSectionData()314cdf0e10cSrcweir     SwSectionData * GetSectionData() { return m_pSectionData.get(); }
315cdf0e10cSrcweir };
316cdf0e10cSrcweir 
317cdf0e10cSrcweir /* -----------------21.05.99 13:07-------------------
318cdf0e10cSrcweir  *
319cdf0e10cSrcweir  * --------------------------------------------------*/
320cdf0e10cSrcweir class SwSectionPropertyTabDialog : public SfxTabDialog
321cdf0e10cSrcweir {
322cdf0e10cSrcweir     SwWrtShell& rWrtSh;
323cdf0e10cSrcweir protected:
324cdf0e10cSrcweir 	virtual void 	PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
325cdf0e10cSrcweir public:
326cdf0e10cSrcweir 	SwSectionPropertyTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
327cdf0e10cSrcweir 	virtual ~SwSectionPropertyTabDialog();
328cdf0e10cSrcweir };
329cdf0e10cSrcweir 
330cdf0e10cSrcweir #endif
331cdf0e10cSrcweir 
332cdf0e10cSrcweir 
333