bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / optpage.hxx
blobbf4166a2d61067c41f6634a8699f20de521d78e9
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _OPTPAGE_HXX
20 #define _OPTPAGE_HXX
21 #include <sfx2/tabdlg.hxx>
23 #include <vcl/group.hxx>
25 #include <vcl/button.hxx>
27 #include <vcl/lstbox.hxx>
29 #include <vcl/field.hxx>
31 #include <vcl/fixed.hxx>
32 #include <svtools/ctrlbox.hxx>
33 #include <svx/fntctrl.hxx>
34 #include <fontcfg.hxx>
35 class SfxPrinter;
36 class SwStdFontConfig;
37 class SwWrtShell;
38 class FontList;
40 /*--------------------------------------------------------
41 Tools->Options->Writer->View
42 Tools->Options->Writer/Web->View
43 --------------------------------------------------------- */
44 class SwContentOptPage : public SfxTabPage
46 CheckBox* m_pCrossCB;
48 CheckBox* m_pHScrollBox;
49 CheckBox* m_pVScrollBox;
50 CheckBox* m_pAnyRulerCB;
51 CheckBox* m_pHRulerCBox;
52 ListBox* m_pHMetric;
53 CheckBox* m_pVRulerCBox;
54 CheckBox* m_pVRulerRightCBox;
55 ListBox* m_pVMetric;
56 CheckBox* m_pSmoothCBox;
58 CheckBox* m_pGrfCB;
59 CheckBox* m_pTblCB;
60 CheckBox* m_pDrwCB;
61 CheckBox* m_pFldNameCB;
62 CheckBox* m_pPostItCB;
64 VclFrame* m_pSettingsFrame;
65 FixedText* m_pSettingsLabel;
66 FixedText* m_pMetricLabel;
67 ListBox* m_pMetricLB;
69 DECL_LINK(VertRulerHdl, CheckBox*);
70 DECL_LINK(AnyRulerHdl, CheckBox*);
71 public:
72 SwContentOptPage( Window* pParent,
73 const SfxItemSet& rSet );
74 ~SwContentOptPage();
76 static SfxTabPage* Create( Window* pParent,
77 const SfxItemSet& rAttrSet);
79 virtual sal_Bool FillItemSet( SfxItemSet& rSet );
80 virtual void Reset( const SfxItemSet& rSet );
84 /*--------------------------------------------------------
85 TabPage printer settings additions
86 --------------------------------------------------------- */
87 class SwAddPrinterTabPage : public SfxTabPage
89 CheckBox* m_pGrfCB;
90 CheckBox* m_pCtrlFldCB;
91 CheckBox* m_pBackgroundCB;
92 CheckBox* m_pBlackFontCB;
93 CheckBox* m_pPrintHiddenTextCB;
94 CheckBox* m_pPrintTextPlaceholderCB;
96 VclFrame* m_pPagesFrame;
97 CheckBox* m_pLeftPageCB;
98 CheckBox* m_pRightPageCB;
99 CheckBox* m_pProspectCB;
100 CheckBox* m_pProspectCB_RTL;
102 VclFrame* m_pCommentsFrame;
103 RadioButton* m_pNoRB;
104 RadioButton* m_pOnlyRB;
105 RadioButton* m_pEndRB;
106 RadioButton* m_pEndPageRB;
108 CheckBox* m_pPrintEmptyPagesCB;
109 CheckBox* m_pPaperFromSetupCB;
110 ListBox* m_pFaxLB;
112 String sNone;
114 sal_Bool bAttrModified;
115 sal_Bool bPreview;
117 void Init();
118 DECL_LINK(AutoClickHdl, void *);
119 DECL_LINK(SelectHdl, void *);
122 SwAddPrinterTabPage( Window* pParent,
123 const SfxItemSet& rSet );
124 public:
126 static SfxTabPage* Create( Window* pParent,
127 const SfxItemSet& rAttrSet );
129 virtual sal_Bool FillItemSet( SfxItemSet& rSet );
130 virtual void Reset( const SfxItemSet& rSet );
131 void SetFax( const std::vector<String>& );
132 void SelectFax( const String& );
133 void SetPreview(sal_Bool bPrev);
134 virtual void PageCreated (SfxAllItemSet aSet);
138 class SwStdFontTabPage : public SfxTabPage
140 FixedLine aStdChrFL ;
142 FixedText aTypeFT;
144 FixedText aStandardLbl;
145 ComboBox aStandardBox;
147 FixedText aHeightFT;
148 FontSizeBox aStandardHeightLB;
150 FixedText aTitleLbl ;
151 ComboBox aTitleBox ;
152 FontSizeBox aTitleHeightLB;
154 FixedText aListLbl ;
155 ComboBox aListBox ;
156 FontSizeBox aListHeightLB;
158 FixedText aLabelLbl ;
159 ComboBox aLabelBox ;
160 FontSizeBox aLabelHeightLB;
162 FixedText aIdxLbl ;
163 ComboBox aIdxBox ;
164 FontSizeBox aIndexHeightLB;
166 CheckBox aDocOnlyCB ;
167 PushButton aStandardPB;
169 String sShellStd;
170 String sShellTitle;
171 String sShellList;
172 String sShellLabel;
173 String sShellIndex;
175 SfxPrinter* pPrt;
176 FontList* pFontList;
177 SwStdFontConfig* pFontConfig;
178 SwWrtShell* pWrtShell;
179 LanguageType eLanguage;
180 // only defaults were there? they were signed with the boxes
181 sal_Bool bListDefault :1;
182 sal_Bool bSetListDefault :1;
183 sal_Bool bLabelDefault :1;
184 sal_Bool bSetLabelDefault :1;
185 sal_Bool bIdxDefault :1;
186 sal_Bool bSetIdxDefault :1;
187 sal_Bool bDeletePrinter :1;
189 sal_Bool bListHeightDefault :1;
190 sal_Bool bSetListHeightDefault :1;
191 sal_Bool bLabelHeightDefault :1;
192 sal_Bool bSetLabelHeightDefault :1;
193 sal_Bool bIndexHeightDefault :1;
194 sal_Bool bSetIndexHeightDefault :1;
196 sal_uInt8 nFontGroup; //fontcfg.hxx: FONT_GROUP_[STANDARD|CJK|CTL]
198 String sScriptWestern;
199 String sScriptAsian;
200 String sScriptComplex;
202 DECL_LINK(StandardHdl, void *);
203 DECL_LINK( ModifyHdl, ComboBox * );
204 DECL_LINK( ModifyHeightHdl, FontSizeBox * );
205 DECL_LINK( LoseFocusHdl, ComboBox * );
207 SwStdFontTabPage( Window* pParent,
208 const SfxItemSet& rSet );
209 ~SwStdFontTabPage();
211 public:
212 static SfxTabPage* Create( Window* pParent,
213 const SfxItemSet& rAttrSet );
215 virtual sal_Bool FillItemSet( SfxItemSet& rSet );
216 virtual void Reset( const SfxItemSet& rSet );
218 void SetFontMode(sal_uInt8 nGroup) {nFontGroup = nGroup;}
219 virtual void PageCreated (SfxAllItemSet aSet);
222 class SwTableOptionsTabPage : public SfxTabPage
224 FixedLine aTableFL;
225 CheckBox aHeaderCB;
226 CheckBox aRepeatHeaderCB;
227 CheckBox aDontSplitCB;
228 CheckBox aBorderCB;
230 FixedLine aSeparatorFL;
232 FixedLine aTableInsertFL;
233 CheckBox aNumFormattingCB;
234 CheckBox aNumFmtFormattingCB;
235 CheckBox aNumAlignmentCB;
237 FixedLine aMoveFL;
238 FixedText aMoveFT;
239 FixedText aRowMoveFT;
240 MetricField aRowMoveMF;
241 FixedText aColMoveFT;
242 MetricField aColMoveMF;
244 FixedText aInsertFT;
245 FixedText aRowInsertFT;
246 MetricField aRowInsertMF;
247 FixedText aColInsertFT;
248 MetricField aColInsertMF;
250 FixedText aHandlingFT;
251 RadioButton aFixRB;
252 RadioButton aFixPropRB;
253 RadioButton aVarRB;
254 FixedText aFixFT;
255 FixedText aFixPropFT;
256 FixedText aVarFT;
258 SwWrtShell* pWrtShell;
259 sal_Bool bHTMLMode;
261 DECL_LINK(CheckBoxHdl, void *);
264 SwTableOptionsTabPage( Window* pParent,
265 const SfxItemSet& rSet );
266 ~SwTableOptionsTabPage();
268 public:
270 static SfxTabPage* Create( Window* pParent,
271 const SfxItemSet& rAttrSet );
273 virtual sal_Bool FillItemSet( SfxItemSet& rSet );
274 virtual void Reset( const SfxItemSet& rSet );
276 void SetWrtShell(SwWrtShell* pSh) {pWrtShell = pSh;}
277 virtual void PageCreated (SfxAllItemSet aSet);
281 /*--------------------------------------------------
282 TabPage for ShadowCrsr
283 --------------------------------------------------*/
284 class SwShdwCrsrOptionsTabPage : public SfxTabPage
286 //nonprinting characters
287 FixedLine aUnprintFL;
288 CheckBox aParaCB;
289 CheckBox aSHyphCB;
290 CheckBox aSpacesCB;
291 CheckBox aHSpacesCB;
292 CheckBox aTabCB;
293 CheckBox aBreakCB;
294 CheckBox aCharHiddenCB;
295 CheckBox aFldHiddenCB;
296 CheckBox aFldHiddenParaCB;
298 FixedLine aSeparatorFL;
300 FixedLine aFlagFL;
301 CheckBox aOnOffCB;
303 FixedText aFillModeFT;
304 RadioButton aFillMarginRB;
305 RadioButton aFillIndentRB;
306 RadioButton aFillTabRB;
307 RadioButton aFillSpaceRB;
309 FixedLine aCrsrOptFL;
310 CheckBox aCrsrInProtCB;
312 FixedLine m_aLayoutOptionsFL;
313 CheckBox m_aMathBaselineAlignmentCB;
315 SwWrtShell * m_pWrtShell;
318 SwShdwCrsrOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
319 ~SwShdwCrsrOptionsTabPage();
321 public:
323 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
325 virtual sal_Bool FillItemSet( SfxItemSet& rSet );
326 virtual void Reset( const SfxItemSet& rSet );
328 void SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; }
329 virtual void PageCreated( SfxAllItemSet aSet );
332 /*-----------------------------------------------------------------------
333 Description: mark preview
334 -----------------------------------------------------------------------*/
335 class SwMarkPreview : public Window
337 Color m_aBgCol; // background
338 Color m_aTransCol; // transparency
339 Color m_aMarkCol; // marks
340 Color m_aLineCol; // general lines
341 Color m_aShadowCol; // shadow
342 Color m_aTxtCol; // text
343 Color m_aPrintAreaCol; // frame for print area
345 Rectangle aPage;
346 Rectangle aLeftPagePrtArea;
347 Rectangle aRightPagePrtArea;
349 sal_uInt16 nMarkPos;
351 using OutputDevice::DrawRect;
352 void DrawRect(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor);
354 void Paint(const Rectangle&);
355 void PaintPage(const Rectangle &rRect);
356 void InitColors( void );
358 protected:
359 virtual void DataChanged( const DataChangedEvent& rDCEvt );
361 public:
362 SwMarkPreview(Window* pParent, const ResId& rResID);
363 virtual ~SwMarkPreview();
365 inline void SetColor(const Color& rCol) { m_aMarkCol = rCol; }
366 inline void SetMarkPos(sal_uInt16 nPos) { nMarkPos = nPos; }
369 /*-----------------------------------------------------------------------
370 Description: redlining options
371 -----------------------------------------------------------------------*/
372 class SwRedlineOptionsTabPage : public SfxTabPage
374 FixedLine aInsertFL;
376 FixedText aInsertFT;
377 FixedText aInsertAttrFT;
378 ListBox aInsertLB;
379 FixedText aInsertColorFT;
380 ColorListBox aInsertColorLB;
381 SvxFontPrevWindow aInsertedPreviewWN;
383 FixedText aDeletedFT;
384 FixedText aDeletedAttrFT;
385 ListBox aDeletedLB;
386 FixedText aDeletedColorFT;
387 ColorListBox aDeletedColorLB;
388 SvxFontPrevWindow aDeletedPreviewWN;
390 FixedText aChangedFT;
391 FixedText aChangedAttrFT;
392 ListBox aChangedLB;
393 FixedText aChangedColorFT;
394 ColorListBox aChangedColorLB;
395 SvxFontPrevWindow aChangedPreviewWN;
397 FixedLine aChangedFL;
399 FixedText aMarkPosFT;
400 ListBox aMarkPosLB;
401 FixedText aMarkColorFT;
402 ColorListBox aMarkColorLB;
403 SwMarkPreview aMarkPreviewWN;
405 String sAuthor;
406 String sNone;
408 SwRedlineOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
409 ~SwRedlineOptionsTabPage();
411 DECL_LINK( AttribHdl, ListBox *pLB );
412 DECL_LINK(ChangedMaskPrevHdl, void * = 0);
413 DECL_LINK( ColorHdl, ColorListBox *pColorLB );
415 void InitFontStyle(SvxFontPrevWindow& rExampleWin);
417 public:
419 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
421 virtual sal_Bool FillItemSet( SfxItemSet& rSet );
422 virtual void Reset( const SfxItemSet& rSet );
425 /*-------------------------------------------------------
426 TabPage test settings for SW
427 --------------------------------------------------------- */
429 #ifdef DBG_UTIL
431 class SwTestTabPage : public SfxTabPage
433 public:
434 SwTestTabPage( Window* pParent,
435 const SfxItemSet& rSet );
437 static SfxTabPage* Create( Window* pParent,
438 const SfxItemSet& rAttrSet );
440 virtual sal_Bool FillItemSet( SfxItemSet& rSet );
441 virtual void Reset( const SfxItemSet& rSet );
443 private:
444 CheckBox* m_pTest1CBox;
445 CheckBox* m_pTest2CBox;
446 CheckBox* m_pTest3CBox;
447 CheckBox* m_pTest4CBox;
448 CheckBox* m_pTest5CBox;
449 CheckBox* m_pTest6CBox;
450 CheckBox* m_pTest7CBox;
451 CheckBox* m_pTest8CBox;
452 CheckBox* m_pTest9CBox;
453 CheckBox* m_pTest10CBox;
455 sal_Bool bAttrModified;
457 void Init();
458 DECL_LINK(AutoClickHdl, void *);
461 #endif // DBG_UTIL
463 class SwCompareOptionsTabPage : public SfxTabPage
465 RadioButton* m_pAutoRB;
466 RadioButton* m_pWordRB;
467 RadioButton* m_pCharRB;
469 CheckBox* m_pRsidCB;
470 CheckBox* m_pIgnoreCB;
471 NumericField* m_pLenNF;
473 SwCompareOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
474 ~SwCompareOptionsTabPage();
476 DECL_LINK(ComparisonHdl, void *);
477 DECL_LINK(IgnoreHdl, void *);
479 public:
481 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
483 virtual sal_Bool FillItemSet( SfxItemSet& rSet );
484 virtual void Reset( const SfxItemSet& rSet );
487 #endif
488 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */