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 _OPTPAGE_HXX 24 #define _OPTPAGE_HXX 25 #include <sfx2/tabdlg.hxx> 26 27 #ifndef _GROUP_HXX //autogen 28 #include <vcl/group.hxx> 29 #endif 30 31 #ifndef _BUTTON_HXX //autogen 32 #include <vcl/button.hxx> 33 #endif 34 35 #ifndef _LSTBOX_HXX //autogen 36 #include <vcl/lstbox.hxx> 37 #endif 38 39 #ifndef _FIELD_HXX //autogen 40 #include <vcl/field.hxx> 41 #endif 42 43 #ifndef _FIXED_HXX //autogen 44 #include <vcl/fixed.hxx> 45 #endif 46 #include <svtools/ctrlbox.hxx> 47 #include <svx/fntctrl.hxx> 48 #include <fontcfg.hxx> 49 class SvStringsDtor; 50 class SfxPrinter; 51 class SwStdFontConfig; 52 class SwWrtShell; 53 class FontList; 54 55 /*-----------------31.08.96 10.09------------------- 56 57 --------------------------------------------------*/ 58 59 class SwContentOptPage : public SfxTabPage 60 { 61 //visual aids 62 FixedLine aLineFL; 63 CheckBox aCrossCB; 64 CheckBox aSolidHandleCB; 65 CheckBox aBigHandleCB; 66 67 //view 68 FixedLine aWindowFL; 69 CheckBox aHScrollBox; 70 CheckBox aVScrollBox; 71 CheckBox aAnyRulerCB; 72 CheckBox aHRulerCBox; 73 ListBox aHMetric; 74 CheckBox aVRulerCBox; 75 CheckBox aVRulerRightCBox; 76 ListBox aVMetric; 77 CheckBox aSmoothCBox; 78 79 //display 80 FixedLine aDispFL; 81 CheckBox aGrfCB; 82 CheckBox aTblCB; 83 CheckBox aDrwCB; 84 CheckBox aFldNameCB; 85 CheckBox aPostItCB; 86 87 FixedLine aSettingsFL; 88 FixedText aMetricFT; 89 ListBox aMetricLB; 90 91 DECL_LINK(VertRulerHdl, CheckBox*); 92 DECL_LINK(AnyRulerHdl, CheckBox*); 93 public: 94 SwContentOptPage( Window* pParent, 95 const SfxItemSet& rSet ); 96 ~SwContentOptPage(); 97 98 static SfxTabPage* Create( Window* pParent, 99 const SfxItemSet& rAttrSet); 100 101 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 102 virtual void Reset( const SfxItemSet& rSet ); 103 104 }; 105 106 /*-------- OS 27.01.95 ----------------------------------- 107 TabPage Druckereinstellungen Zusaetze 108 --------------------------------------------------------- */ 109 110 111 class SwAddPrinterTabPage : public SfxTabPage 112 { 113 FixedLine aFL1; 114 CheckBox aGrfCB; 115 // CheckBox aTabCB; 116 // CheckBox aDrawCB; 117 CheckBox aCtrlFldCB; 118 CheckBox aBackgroundCB; 119 CheckBox aBlackFontCB; 120 CheckBox aPrintHiddenTextCB; 121 CheckBox aPrintTextPlaceholderCB; 122 123 FixedLine aSeparatorLFL; 124 125 FixedLine aFL2; 126 CheckBox aLeftPageCB; 127 CheckBox aRightPageCB; 128 // CheckBox aReverseCB; 129 CheckBox aProspectCB; 130 CheckBox aProspectCB_RTL; 131 132 FixedLine aSeparatorRFL; 133 134 FixedLine aFL3; 135 RadioButton aNoRB; 136 RadioButton aOnlyRB; 137 RadioButton aEndRB; 138 RadioButton aEndPageRB; 139 FixedLine aFL4; 140 CheckBox aPrintEmptyPagesCB; 141 // CheckBox aSingleJobsCB; 142 CheckBox aPaperFromSetupCB; 143 FixedText aFaxFT; 144 ListBox aFaxLB; 145 String sNone; 146 147 sal_Bool bAttrModified; 148 sal_Bool bPreview; 149 150 void Init(); 151 DECL_LINK( AutoClickHdl, CheckBox * ); 152 DECL_LINK( SelectHdl, ListBox * ); 153 154 155 SwAddPrinterTabPage( Window* pParent, 156 const SfxItemSet& rSet ); 157 public: 158 159 static SfxTabPage* Create( Window* pParent, 160 const SfxItemSet& rAttrSet ); 161 162 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 163 virtual void Reset( const SfxItemSet& rSet ); 164 void SetFax( const SvStringsDtor& ); 165 void SelectFax( const String& ); 166 void SetPreview(sal_Bool bPrev); 167 virtual void PageCreated (SfxAllItemSet aSet); 168 169 }; 170 171 /*-----------------03.09.96 11.50------------------- 172 173 --------------------------------------------------*/ 174 175 class SwStdFontTabPage : public SfxTabPage 176 { 177 FixedLine aStdChrFL ; 178 179 FixedText aTypeFT; 180 181 FixedText aStandardLbl; 182 ComboBox aStandardBox; 183 184 FixedText aHeightFT; 185 FontSizeBox aStandardHeightLB; 186 187 FixedText aTitleLbl ; 188 ComboBox aTitleBox ; 189 FontSizeBox aTitleHeightLB; 190 191 FixedText aListLbl ; 192 ComboBox aListBox ; 193 FontSizeBox aListHeightLB; 194 195 FixedText aLabelLbl ; 196 ComboBox aLabelBox ; 197 FontSizeBox aLabelHeightLB; 198 199 FixedText aIdxLbl ; 200 ComboBox aIdxBox ; 201 FontSizeBox aIndexHeightLB; 202 203 CheckBox aDocOnlyCB ; 204 PushButton aStandardPB; 205 206 String sShellStd; 207 String sShellTitle; 208 String sShellList; 209 String sShellLabel; 210 String sShellIndex; 211 212 SfxPrinter* pPrt; 213 FontList* pFontList; 214 SwStdFontConfig* pFontConfig; 215 SwWrtShell* pWrtShell; 216 LanguageType eLanguage; 217 // waren nur defaults vorhanden? wurden sie mit den Boxen ueberschrieben 218 sal_Bool bListDefault :1; 219 sal_Bool bSetListDefault :1; 220 sal_Bool bLabelDefault :1; 221 sal_Bool bSetLabelDefault :1; 222 sal_Bool bIdxDefault :1; 223 sal_Bool bSetIdxDefault :1; 224 sal_Bool bDeletePrinter :1; 225 226 sal_Bool bListHeightDefault :1; 227 sal_Bool bSetListHeightDefault :1; 228 sal_Bool bLabelHeightDefault :1; 229 sal_Bool bSetLabelHeightDefault :1; 230 sal_Bool bIndexHeightDefault :1; 231 sal_Bool bSetIndexHeightDefault :1; 232 233 sal_uInt8 nFontGroup; //fontcfg.hxx: FONT_GROUP_[STANDARD|CJK|CTL] 234 235 String sScriptWestern; 236 String sScriptAsian; 237 String sScriptComplex; 238 239 DECL_LINK( StandardHdl, PushButton * ); 240 DECL_LINK( ModifyHdl, ComboBox * ); 241 DECL_LINK( ModifyHeightHdl, FontSizeBox * ); 242 DECL_LINK( LoseFocusHdl, ComboBox * ); 243 244 SwStdFontTabPage( Window* pParent, 245 const SfxItemSet& rSet ); 246 ~SwStdFontTabPage(); 247 248 public: 249 static SfxTabPage* Create( Window* pParent, 250 const SfxItemSet& rAttrSet ); 251 252 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 253 virtual void Reset( const SfxItemSet& rSet ); 254 255 void SetFontMode(sal_uInt8 nGroup) {nFontGroup = nGroup;} 256 virtual void PageCreated (SfxAllItemSet aSet); 257 }; 258 259 /*-----------------18.01.97 12.10------------------- 260 261 --------------------------------------------------*/ 262 263 class SwTableOptionsTabPage : public SfxTabPage 264 { 265 FixedLine aTableFL; 266 CheckBox aHeaderCB; 267 CheckBox aRepeatHeaderCB; 268 CheckBox aDontSplitCB; 269 CheckBox aBorderCB; 270 271 FixedLine aSeparatorFL; 272 273 FixedLine aTableInsertFL; 274 CheckBox aNumFormattingCB; 275 CheckBox aNumFmtFormattingCB; 276 CheckBox aNumAlignmentCB; 277 278 FixedLine aMoveFL; 279 FixedText aMoveFT; 280 FixedText aRowMoveFT; 281 MetricField aRowMoveMF; 282 FixedText aColMoveFT; 283 MetricField aColMoveMF; 284 285 FixedText aInsertFT; 286 FixedText aRowInsertFT; 287 MetricField aRowInsertMF; 288 FixedText aColInsertFT; 289 MetricField aColInsertMF; 290 291 FixedText aHandlingFT; 292 RadioButton aFixRB; 293 RadioButton aFixPropRB; 294 RadioButton aVarRB; 295 FixedText aFixFT; 296 FixedText aFixPropFT; 297 FixedText aVarFT; 298 299 SwWrtShell* pWrtShell; 300 sal_Bool bHTMLMode; 301 302 DECL_LINK(CheckBoxHdl, CheckBox *pCB); 303 304 305 SwTableOptionsTabPage( Window* pParent, 306 const SfxItemSet& rSet ); 307 ~SwTableOptionsTabPage(); 308 309 public: 310 311 static SfxTabPage* Create( Window* pParent, 312 const SfxItemSet& rAttrSet ); 313 314 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 315 virtual void Reset( const SfxItemSet& rSet ); 316 317 void SetWrtShell(SwWrtShell* pSh) {pWrtShell = pSh;} 318 virtual void PageCreated (SfxAllItemSet aSet); 319 320 }; 321 /*-----------------31.10.97 17:55------------------- 322 TabPage fuer ShadowCrsr 323 --------------------------------------------------*/ 324 class SwShdwCrsrOptionsTabPage : public SfxTabPage 325 { 326 //nonprinting characters 327 FixedLine aUnprintFL; 328 CheckBox aParaCB; 329 CheckBox aSHyphCB; 330 CheckBox aSpacesCB; 331 CheckBox aHSpacesCB; 332 CheckBox aTabCB; 333 CheckBox aBreakCB; 334 CheckBox aCharHiddenCB; 335 CheckBox aFldHiddenCB; 336 CheckBox aFldHiddenParaCB; 337 338 FixedLine aSeparatorFL; 339 340 FixedLine aFlagFL; 341 CheckBox aOnOffCB; 342 343 FixedText aFillModeFT; 344 RadioButton aFillMarginRB; 345 RadioButton aFillIndentRB; 346 RadioButton aFillTabRB; 347 RadioButton aFillSpaceRB; 348 349 FixedLine aCrsrOptFL; 350 CheckBox aCrsrInProtCB; 351 352 FixedLine m_aLayoutOptionsFL; 353 CheckBox m_aMathBaselineAlignmentCB; 354 355 SwWrtShell * m_pWrtShell; 356 357 358 SwShdwCrsrOptionsTabPage( Window* pParent, const SfxItemSet& rSet ); 359 ~SwShdwCrsrOptionsTabPage(); 360 361 public: 362 363 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); 364 365 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 366 virtual void Reset( const SfxItemSet& rSet ); 367 368 void SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; } 369 virtual void PageCreated( SfxAllItemSet aSet ); 370 }; 371 372 /*----------------------------------------------------------------------- 373 Beschreibung: Markierungsvorschau 374 -----------------------------------------------------------------------*/ 375 376 class SwMarkPreview : public Window 377 { 378 Color m_aBgCol; // background 379 Color m_aTransCol; // transparency 380 Color m_aMarkCol; // marks 381 Color m_aLineCol; // general lines 382 Color m_aShadowCol; // shadow 383 Color m_aTxtCol; // text 384 Color m_aPrintAreaCol; // frame for print area 385 386 Rectangle aPage; 387 Rectangle aLeftPagePrtArea; 388 Rectangle aRightPagePrtArea; 389 390 sal_uInt16 nMarkPos; 391 392 using OutputDevice::DrawRect; 393 void DrawRect(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor); 394 395 void Paint(const Rectangle&); 396 void PaintPage(const Rectangle &rRect); 397 void InitColors( void ); 398 399 protected: 400 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 401 402 public: 403 SwMarkPreview(Window* pParent, const ResId& rResID); 404 virtual ~SwMarkPreview(); 405 406 inline void SetColor(const Color& rCol) { m_aMarkCol = rCol; } 407 inline void SetMarkPos(sal_uInt16 nPos) { nMarkPos = nPos; } 408 }; 409 410 /*----------------------------------------------------------------------- 411 Beschreibung: Redlining-Optionen 412 -----------------------------------------------------------------------*/ 413 414 class SwRedlineOptionsTabPage : public SfxTabPage 415 { 416 FixedLine aInsertFL; 417 418 FixedText aInsertFT; 419 FixedText aInsertAttrFT; 420 ListBox aInsertLB; 421 FixedText aInsertColorFT; 422 ColorListBox aInsertColorLB; 423 SvxFontPrevWindow aInsertedPreviewWN; 424 425 FixedText aDeletedFT; 426 FixedText aDeletedAttrFT; 427 ListBox aDeletedLB; 428 FixedText aDeletedColorFT; 429 ColorListBox aDeletedColorLB; 430 SvxFontPrevWindow aDeletedPreviewWN; 431 432 FixedText aChangedFT; 433 FixedText aChangedAttrFT; 434 ListBox aChangedLB; 435 FixedText aChangedColorFT; 436 ColorListBox aChangedColorLB; 437 SvxFontPrevWindow aChangedPreviewWN; 438 439 FixedLine aChangedFL; 440 441 FixedText aMarkPosFT; 442 ListBox aMarkPosLB; 443 FixedText aMarkColorFT; 444 ColorListBox aMarkColorLB; 445 SwMarkPreview aMarkPreviewWN; 446 447 String sAuthor; 448 String sNone; 449 450 SwRedlineOptionsTabPage( Window* pParent, const SfxItemSet& rSet ); 451 ~SwRedlineOptionsTabPage(); 452 453 DECL_LINK( AttribHdl, ListBox *pLB ); 454 DECL_LINK( ChangedMaskPrevHdl, ListBox *pLB = 0 ); 455 DECL_LINK( ColorHdl, ColorListBox *pColorLB ); 456 457 void InitFontStyle(SvxFontPrevWindow& rExampleWin); 458 459 public: 460 461 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); 462 463 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 464 virtual void Reset( const SfxItemSet& rSet ); 465 }; 466 467 /*--------OS 11.01.95 ----------------------------------- 468 TabPage Testeinstellungen fuer SW 469 --------------------------------------------------------- */ 470 471 #ifdef DBG_UTIL 472 473 class SwTestTabPage : public SfxTabPage 474 { 475 public: 476 SwTestTabPage( Window* pParent, 477 const SfxItemSet& rSet ); 478 479 static SfxTabPage* Create( Window* pParent, 480 const SfxItemSet& rAttrSet ); 481 482 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 483 virtual void Reset( const SfxItemSet& rSet ); 484 485 private: 486 FixedLine aTestFL; 487 CheckBox aTest1CBox; 488 CheckBox aTest2CBox; 489 CheckBox aTest3CBox; 490 CheckBox aTest4CBox; 491 CheckBox aTest5CBox; 492 CheckBox aTest6CBox; 493 CheckBox aTest7CBox; 494 CheckBox aTest8CBox; 495 CheckBox aTest9CBox; 496 CheckBox aTest10CBox; 497 498 sal_Bool bAttrModified; 499 500 void Init(); 501 DECL_LINK( AutoClickHdl, CheckBox * ); 502 503 }; 504 #endif //PRODUCT 505 #endif 506