1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: optpage.hxx,v $
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 ************************************************************************/
32 #include <sfx2/tabdlg.hxx>
34 #ifndef _GROUP_HXX //autogen
35 #include <vcl/group.hxx>
38 #ifndef _BUTTON_HXX //autogen
39 #include <vcl/button.hxx>
42 #ifndef _LSTBOX_HXX //autogen
43 #include <vcl/lstbox.hxx>
46 #ifndef _FIELD_HXX //autogen
47 #include <vcl/field.hxx>
50 #ifndef _FIXED_HXX //autogen
51 #include <vcl/fixed.hxx>
53 #include <svtools/ctrlbox.hxx>
54 #include <svx/fntctrl.hxx>
55 #include <fontcfg.hxx>
58 class SwStdFontConfig
;
62 /*-----------------31.08.96 10.09-------------------
64 --------------------------------------------------*/
66 class SwContentOptPage
: public SfxTabPage
71 CheckBox aSolidHandleCB
;
72 CheckBox aBigHandleCB
;
82 CheckBox aVRulerRightCBox
;
94 FixedLine aSettingsFL
;
98 DECL_LINK(VertRulerHdl
, CheckBox
*);
99 DECL_LINK(AnyRulerHdl
, CheckBox
*);
101 SwContentOptPage( Window
* pParent
,
102 const SfxItemSet
& rSet
);
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
125 CheckBox aBackgroundCB
;
126 CheckBox aBlackFontCB
;
127 CheckBox aPrintHiddenTextCB
;
128 CheckBox aPrintTextPlaceholderCB
;
130 FixedLine aSeparatorLFL
;
133 CheckBox aLeftPageCB
;
134 CheckBox aRightPageCB
;
136 CheckBox aProspectCB
;
137 CheckBox aProspectCB_RTL
;
139 FixedLine aSeparatorRFL
;
144 RadioButton aEndPageRB
;
147 CheckBox aPrintEmptyPagesCB
;
148 CheckBox aSingleJobsCB
;
149 CheckBox aPaperFromSetupCB
;
158 DECL_LINK( AutoClickHdl
, CheckBox
* );
159 DECL_LINK( SelectHdl
, ListBox
* );
162 SwAddPrinterTabPage( Window
* pParent
,
163 const SfxItemSet
& rSet
);
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
;
188 FixedText aStandardLbl
;
189 ComboBox aStandardBox
;
192 FontSizeBox aStandardHeightLB
;
194 FixedText aTitleLbl
;
196 FontSizeBox aTitleHeightLB
;
200 FontSizeBox aListHeightLB
;
202 FixedText aLabelLbl
;
204 FontSizeBox aLabelHeightLB
;
208 FontSizeBox aIndexHeightLB
;
210 CheckBox aDocOnlyCB
;
211 PushButton aStandardPB
;
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;
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
;
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
);
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
274 CheckBox aRepeatHeaderCB
;
275 CheckBox aDontSplitCB
;
278 FixedLine aSeparatorFL
;
280 FixedLine aTableInsertFL
;
281 CheckBox aNumFormattingCB
;
282 CheckBox aNumFmtFormattingCB
;
283 CheckBox aNumAlignmentCB
;
287 FixedText aRowMoveFT
;
288 MetricField aRowMoveMF
;
289 FixedText aColMoveFT
;
290 MetricField aColMoveMF
;
293 FixedText aRowInsertFT
;
294 MetricField aRowInsertMF
;
295 FixedText aColInsertFT
;
296 MetricField aColInsertMF
;
298 FixedText aHandlingFT
;
300 RadioButton aFixPropRB
;
303 FixedText aFixPropFT
;
306 SwWrtShell
* pWrtShell
;
309 DECL_LINK(CheckBoxHdl
, CheckBox
*pCB
);
312 SwTableOptionsTabPage( Window
* pParent
,
313 const SfxItemSet
& rSet
);
314 ~SwTableOptionsTabPage();
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
;
341 CheckBox aCharHiddenCB
;
342 CheckBox aFldHiddenCB
;
343 CheckBox aFldHiddenParaCB
;
345 FixedLine aSeparatorFL
;
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();
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
385 Rectangle aLeftPagePrtArea
;
386 Rectangle aRightPagePrtArea
;
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 );
398 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
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
417 FixedText aInsertAttrFT
;
419 FixedText aInsertColorFT
;
420 ColorListBox aInsertColorLB
;
421 SvxFontPrevWindow aInsertedPreviewWN
;
423 FixedText aDeletedFT
;
424 FixedText aDeletedAttrFT
;
426 FixedText aDeletedColorFT
;
427 ColorListBox aDeletedColorLB
;
428 SvxFontPrevWindow aDeletedPreviewWN
;
430 FixedText aChangedFT
;
431 FixedText aChangedAttrFT
;
433 FixedText aChangedColorFT
;
434 ColorListBox aChangedColorLB
;
435 SvxFontPrevWindow aChangedPreviewWN
;
437 FixedLine aChangedFL
;
439 FixedText aMarkPosFT
;
441 FixedText aMarkColorFT
;
442 ColorListBox aMarkColorLB
;
443 SwMarkPreview aMarkPreviewWN
;
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
);
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 --------------------------------------------------------- */
471 class SwTestTabPage
: public SfxTabPage
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
);
494 CheckBox aTest10CBox
;
499 DECL_LINK( AutoClickHdl
, CheckBox
* );