merge the formfield patch from ooo-build
[ooovba.git] / sw / source / ui / inc / optpage.hxx
blob050ea9f54d4591396cccad2a998e07b054ced55e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: optpage.hxx,v $
10 * $Revision: 1.24 $
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 ************************************************************************/
30 #ifndef _OPTPAGE_HXX
31 #define _OPTPAGE_HXX
32 #include <sfx2/tabdlg.hxx>
34 #ifndef _GROUP_HXX //autogen
35 #include <vcl/group.hxx>
36 #endif
38 #ifndef _BUTTON_HXX //autogen
39 #include <vcl/button.hxx>
40 #endif
42 #ifndef _LSTBOX_HXX //autogen
43 #include <vcl/lstbox.hxx>
44 #endif
46 #ifndef _FIELD_HXX //autogen
47 #include <vcl/field.hxx>
48 #endif
50 #ifndef _FIXED_HXX //autogen
51 #include <vcl/fixed.hxx>
52 #endif
53 #include <svtools/ctrlbox.hxx>
54 #include <svx/fntctrl.hxx>
55 #include <fontcfg.hxx>
56 class SvStringsDtor;
57 class SfxPrinter;
58 class SwStdFontConfig;
59 class SwWrtShell;
60 class FontList;
62 /*-----------------31.08.96 10.09-------------------
64 --------------------------------------------------*/
66 class SwContentOptPage : public SfxTabPage
68 //visual aids
69 FixedLine aLineFL;
70 CheckBox aCrossCB;
71 CheckBox aSolidHandleCB;
72 CheckBox aBigHandleCB;
74 //view
75 FixedLine aWindowFL;
76 CheckBox aHScrollBox;
77 CheckBox aVScrollBox;
78 CheckBox aAnyRulerCB;
79 CheckBox aHRulerCBox;
80 ListBox aHMetric;
81 CheckBox aVRulerCBox;
82 CheckBox aVRulerRightCBox;
83 ListBox aVMetric;
84 CheckBox aSmoothCBox;
86 //display
87 FixedLine aDispFL;
88 CheckBox aGrfCB;
89 CheckBox aTblCB;
90 CheckBox aDrwCB;
91 CheckBox aFldNameCB;
92 CheckBox aPostItCB;
94 FixedLine aSettingsFL;
95 FixedText aMetricFT;
96 ListBox aMetricLB;
98 DECL_LINK(VertRulerHdl, CheckBox*);
99 DECL_LINK(AnyRulerHdl, CheckBox*);
100 public:
101 SwContentOptPage( Window* pParent,
102 const SfxItemSet& rSet );
103 ~SwContentOptPage();
105 static SfxTabPage* Create( Window* pParent,
106 const SfxItemSet& rAttrSet);
108 virtual BOOL FillItemSet( SfxItemSet& rSet );
109 virtual void Reset( const SfxItemSet& rSet );
113 /*-------- OS 27.01.95 -----------------------------------
114 TabPage Druckereinstellungen Zusaetze
115 --------------------------------------------------------- */
118 class SwAddPrinterTabPage : public SfxTabPage
120 FixedLine aFL1;
121 CheckBox aGrfCB;
122 CheckBox aTabCB;
123 CheckBox aDrawCB;
124 CheckBox aCtrlFldCB;
125 CheckBox aBackgroundCB;
126 CheckBox aBlackFontCB;
127 CheckBox aPrintHiddenTextCB;
128 CheckBox aPrintTextPlaceholderCB;
130 FixedLine aSeparatorLFL;
132 FixedLine aFL2;
133 CheckBox aLeftPageCB;
134 CheckBox aRightPageCB;
135 CheckBox aReverseCB;
136 CheckBox aProspectCB;
137 CheckBox aProspectCB_RTL;
139 FixedLine aSeparatorRFL;
141 RadioButton aNoRB;
142 RadioButton aOnlyRB;
143 RadioButton aEndRB;
144 RadioButton aEndPageRB;
145 FixedLine aFL3;
146 FixedLine aFL4;
147 CheckBox aPrintEmptyPagesCB;
148 CheckBox aSingleJobsCB;
149 CheckBox aPaperFromSetupCB;
150 FixedText aFaxFT;
151 ListBox aFaxLB;
152 String sNone;
154 BOOL bAttrModified;
155 BOOL bPreview;
157 void Init();
158 DECL_LINK( AutoClickHdl, CheckBox * );
159 DECL_LINK( SelectHdl, ListBox * );
162 SwAddPrinterTabPage( Window* pParent,
163 const SfxItemSet& rSet );
164 public:
166 static SfxTabPage* Create( Window* pParent,
167 const SfxItemSet& rAttrSet );
169 virtual BOOL FillItemSet( SfxItemSet& rSet );
170 virtual void Reset( const SfxItemSet& rSet );
171 void SetFax( const SvStringsDtor& );
172 void SelectFax( const String& );
173 void SetPreview(BOOL bPrev);
174 virtual void PageCreated (SfxAllItemSet aSet);
178 /*-----------------03.09.96 11.50-------------------
180 --------------------------------------------------*/
182 class SwStdFontTabPage : public SfxTabPage
184 FixedLine aStdChrFL ;
186 FixedText aTypeFT;
188 FixedText aStandardLbl;
189 ComboBox aStandardBox;
191 FixedText aHeightFT;
192 FontSizeBox aStandardHeightLB;
194 FixedText aTitleLbl ;
195 ComboBox aTitleBox ;
196 FontSizeBox aTitleHeightLB;
198 FixedText aListLbl ;
199 ComboBox aListBox ;
200 FontSizeBox aListHeightLB;
202 FixedText aLabelLbl ;
203 ComboBox aLabelBox ;
204 FontSizeBox aLabelHeightLB;
206 FixedText aIdxLbl ;
207 ComboBox aIdxBox ;
208 FontSizeBox aIndexHeightLB;
210 CheckBox aDocOnlyCB ;
211 PushButton aStandardPB;
213 String sShellStd;
214 String sShellTitle;
215 String sShellList;
216 String sShellLabel;
217 String sShellIndex;
219 SfxPrinter* pPrt;
220 FontList* pFontList;
221 SwStdFontConfig* pFontConfig;
222 SwWrtShell* pWrtShell;
223 LanguageType eLanguage;
224 // waren nur defaults vorhanden? wurden sie mit den Boxen ueberschrieben
225 BOOL bListDefault :1;
226 BOOL bSetListDefault :1;
227 BOOL bLabelDefault :1;
228 BOOL bSetLabelDefault :1;
229 BOOL bIdxDefault :1;
230 BOOL bSetIdxDefault :1;
231 BOOL bDeletePrinter :1;
233 BOOL bListHeightDefault :1;
234 BOOL bSetListHeightDefault :1;
235 BOOL bLabelHeightDefault :1;
236 BOOL bSetLabelHeightDefault :1;
237 BOOL bIndexHeightDefault :1;
238 BOOL bSetIndexHeightDefault :1;
240 sal_uInt8 nFontGroup; //fontcfg.hxx: FONT_GROUP_[STANDARD|CJK|CTL]
242 String sScriptWestern;
243 String sScriptAsian;
244 String sScriptComplex;
246 DECL_LINK( StandardHdl, PushButton * );
247 DECL_LINK( ModifyHdl, ComboBox * );
248 DECL_LINK( ModifyHeightHdl, FontSizeBox * );
249 DECL_LINK( LoseFocusHdl, ComboBox * );
251 SwStdFontTabPage( Window* pParent,
252 const SfxItemSet& rSet );
253 ~SwStdFontTabPage();
255 public:
256 static SfxTabPage* Create( Window* pParent,
257 const SfxItemSet& rAttrSet );
259 virtual BOOL FillItemSet( SfxItemSet& rSet );
260 virtual void Reset( const SfxItemSet& rSet );
262 void SetFontMode(sal_uInt8 nGroup) {nFontGroup = nGroup;}
263 virtual void PageCreated (SfxAllItemSet aSet);
266 /*-----------------18.01.97 12.10-------------------
268 --------------------------------------------------*/
270 class SwTableOptionsTabPage : public SfxTabPage
272 FixedLine aTableFL;
273 CheckBox aHeaderCB;
274 CheckBox aRepeatHeaderCB;
275 CheckBox aDontSplitCB;
276 CheckBox aBorderCB;
278 FixedLine aSeparatorFL;
280 FixedLine aTableInsertFL;
281 CheckBox aNumFormattingCB;
282 CheckBox aNumFmtFormattingCB;
283 CheckBox aNumAlignmentCB;
285 FixedLine aMoveFL;
286 FixedText aMoveFT;
287 FixedText aRowMoveFT;
288 MetricField aRowMoveMF;
289 FixedText aColMoveFT;
290 MetricField aColMoveMF;
292 FixedText aInsertFT;
293 FixedText aRowInsertFT;
294 MetricField aRowInsertMF;
295 FixedText aColInsertFT;
296 MetricField aColInsertMF;
298 FixedText aHandlingFT;
299 RadioButton aFixRB;
300 RadioButton aFixPropRB;
301 RadioButton aVarRB;
302 FixedText aFixFT;
303 FixedText aFixPropFT;
304 FixedText aVarFT;
306 SwWrtShell* pWrtShell;
307 BOOL bHTMLMode;
309 DECL_LINK(CheckBoxHdl, CheckBox *pCB);
312 SwTableOptionsTabPage( Window* pParent,
313 const SfxItemSet& rSet );
314 ~SwTableOptionsTabPage();
316 public:
318 static SfxTabPage* Create( Window* pParent,
319 const SfxItemSet& rAttrSet );
321 virtual BOOL FillItemSet( SfxItemSet& rSet );
322 virtual void Reset( const SfxItemSet& rSet );
324 void SetWrtShell(SwWrtShell* pSh) {pWrtShell = pSh;}
325 virtual void PageCreated (SfxAllItemSet aSet);
328 /*-----------------31.10.97 17:55-------------------
329 TabPage fuer ShadowCrsr
330 --------------------------------------------------*/
331 class SwShdwCrsrOptionsTabPage : public SfxTabPage
333 //nonprinting characters
334 FixedLine aUnprintFL;
335 CheckBox aParaCB;
336 CheckBox aSHyphCB;
337 CheckBox aSpacesCB;
338 CheckBox aHSpacesCB;
339 CheckBox aTabCB;
340 CheckBox aBreakCB;
341 CheckBox aCharHiddenCB;
342 CheckBox aFldHiddenCB;
343 CheckBox aFldHiddenParaCB;
345 FixedLine aSeparatorFL;
347 FixedLine aFlagFL;
348 CheckBox aOnOffCB;
350 FixedText aFillModeFT;
351 RadioButton aFillMarginRB;
352 RadioButton aFillIndentRB;
353 RadioButton aFillTabRB;
354 RadioButton aFillSpaceRB;
356 FixedLine aCrsrOptFL;
357 CheckBox aCrsrInProtCB;
359 SwShdwCrsrOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
360 ~SwShdwCrsrOptionsTabPage();
362 public:
364 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
366 virtual BOOL FillItemSet( SfxItemSet& rSet );
367 virtual void Reset( const SfxItemSet& rSet );
370 /*-----------------------------------------------------------------------
371 Beschreibung: Markierungsvorschau
372 -----------------------------------------------------------------------*/
374 class SwMarkPreview : public Window
376 Color m_aBgCol; // background
377 Color m_aTransCol; // transparency
378 Color m_aMarkCol; // marks
379 Color m_aLineCol; // general lines
380 Color m_aShadowCol; // shadow
381 Color m_aTxtCol; // text
382 Color m_aPrintAreaCol; // frame for print area
384 Rectangle aPage;
385 Rectangle aLeftPagePrtArea;
386 Rectangle aRightPagePrtArea;
388 USHORT nMarkPos;
390 using OutputDevice::DrawRect;
391 void DrawRect(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor);
393 void Paint(const Rectangle&);
394 void PaintPage(const Rectangle &rRect);
395 void InitColors( void );
397 protected:
398 virtual void DataChanged( const DataChangedEvent& rDCEvt );
400 public:
401 SwMarkPreview(Window* pParent, const ResId& rResID);
402 virtual ~SwMarkPreview();
404 inline void SetColor(const Color& rCol) { m_aMarkCol = rCol; }
405 inline void SetMarkPos(USHORT nPos) { nMarkPos = nPos; }
408 /*-----------------------------------------------------------------------
409 Beschreibung: Redlining-Optionen
410 -----------------------------------------------------------------------*/
412 class SwRedlineOptionsTabPage : public SfxTabPage
414 FixedLine aInsertFL;
416 FixedText aInsertFT;
417 FixedText aInsertAttrFT;
418 ListBox aInsertLB;
419 FixedText aInsertColorFT;
420 ColorListBox aInsertColorLB;
421 SvxFontPrevWindow aInsertedPreviewWN;
423 FixedText aDeletedFT;
424 FixedText aDeletedAttrFT;
425 ListBox aDeletedLB;
426 FixedText aDeletedColorFT;
427 ColorListBox aDeletedColorLB;
428 SvxFontPrevWindow aDeletedPreviewWN;
430 FixedText aChangedFT;
431 FixedText aChangedAttrFT;
432 ListBox aChangedLB;
433 FixedText aChangedColorFT;
434 ColorListBox aChangedColorLB;
435 SvxFontPrevWindow aChangedPreviewWN;
437 FixedLine aChangedFL;
439 FixedText aMarkPosFT;
440 ListBox aMarkPosLB;
441 FixedText aMarkColorFT;
442 ColorListBox aMarkColorLB;
443 SwMarkPreview aMarkPreviewWN;
445 String sAuthor;
446 String sNone;
448 SwRedlineOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
449 ~SwRedlineOptionsTabPage();
451 DECL_LINK( AttribHdl, ListBox *pLB );
452 DECL_LINK( ChangedMaskPrevHdl, ListBox *pLB = 0 );
453 DECL_LINK( ColorHdl, ColorListBox *pColorLB );
455 void InitFontStyle(SvxFontPrevWindow& rExampleWin);
457 public:
459 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
461 virtual BOOL FillItemSet( SfxItemSet& rSet );
462 virtual void Reset( const SfxItemSet& rSet );
465 /*--------OS 11.01.95 -----------------------------------
466 TabPage Testeinstellungen fuer SW
467 --------------------------------------------------------- */
469 #ifndef PRODUCT
471 class SwTestTabPage : public SfxTabPage
473 public:
474 SwTestTabPage( Window* pParent,
475 const SfxItemSet& rSet );
477 static SfxTabPage* Create( Window* pParent,
478 const SfxItemSet& rAttrSet );
480 virtual BOOL FillItemSet( SfxItemSet& rSet );
481 virtual void Reset( const SfxItemSet& rSet );
483 private:
484 FixedLine aTestFL;
485 CheckBox aTest1CBox;
486 CheckBox aTest2CBox;
487 CheckBox aTest3CBox;
488 CheckBox aTest4CBox;
489 CheckBox aTest5CBox;
490 CheckBox aTest6CBox;
491 CheckBox aTest7CBox;
492 CheckBox aTest8CBox;
493 CheckBox aTest9CBox;
494 CheckBox aTest10CBox;
496 BOOL bAttrModified;
498 void Init();
499 DECL_LINK( AutoClickHdl, CheckBox * );
502 #endif //PRODUCT
503 #endif