1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef _VIEWOPT_HXX 28*cdf0e10cSrcweir #define _VIEWOPT_HXX 29*cdf0e10cSrcweir #include <tools/gen.hxx> 30*cdf0e10cSrcweir #include <tools/string.hxx> 31*cdf0e10cSrcweir #include <tools/color.hxx> 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir #include <svx/zoomitem.hxx> 34*cdf0e10cSrcweir #include "swdllapi.h" 35*cdf0e10cSrcweir #include "authratr.hxx" 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir class SwRect; 38*cdf0e10cSrcweir class Window; 39*cdf0e10cSrcweir class OutputDevice; 40*cdf0e10cSrcweir class ViewShell; 41*cdf0e10cSrcweir class SwDocShell; 42*cdf0e10cSrcweir namespace svtools{ class ColorConfig;} 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir //#define VIEWOPT_1_IDLE 0x00000001L no longer used, see new member 'bIdle' 45*cdf0e10cSrcweir #define VIEWOPT_1_TAB 0x00000002L 46*cdf0e10cSrcweir #define VIEWOPT_1_BLANK 0x00000004L 47*cdf0e10cSrcweir #define VIEWOPT_1_HARDBLANK 0x00000008L 48*cdf0e10cSrcweir #define VIEWOPT_1_PARAGRAPH 0x00000010L 49*cdf0e10cSrcweir #define VIEWOPT_1_LINEBREAK 0x00000020L 50*cdf0e10cSrcweir #define VIEWOPT_1_PAGEBREAK 0x00000040L 51*cdf0e10cSrcweir #define VIEWOPT_1_COLUMNBREAK 0x00000080L 52*cdf0e10cSrcweir #define VIEWOPT_1_SOFTHYPH 0x00000100L 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir #define VIEWOPT_1_REF 0x00000400L 55*cdf0e10cSrcweir #define VIEWOPT_1_FLDNAME 0x00000800L 56*cdf0e10cSrcweir //#define 0x00001000L 57*cdf0e10cSrcweir //#define 0x00002000L 58*cdf0e10cSrcweir #define VIEWOPT_1_POSTITS 0x00004000L 59*cdf0e10cSrcweir #define VIEWOPT_1_FLD_HIDDEN 0x00008000L 60*cdf0e10cSrcweir #define VIEWOPT_1_CHAR_HIDDEN 0x00010000L 61*cdf0e10cSrcweir #define VIEWOPT_1_GRAPHIC 0x00020000L 62*cdf0e10cSrcweir #define VIEWOPT_1_TABLE 0x00040000L 63*cdf0e10cSrcweir #define VIEWOPT_1_DRAW 0x00080000L 64*cdf0e10cSrcweir #define VIEWOPT_1_CONTROL 0x00100000L 65*cdf0e10cSrcweir //#define 0x00200000L 66*cdf0e10cSrcweir #define VIEWOPT_1_CROSSHAIR 0x00400000L 67*cdf0e10cSrcweir #define VIEWOPT_1_SNAP 0x00800000L 68*cdf0e10cSrcweir #define VIEWOPT_1_SYNCHRONIZE 0x01000000L 69*cdf0e10cSrcweir #define VIEWOPT_1_GRIDVISIBLE 0x02000000L 70*cdf0e10cSrcweir #define VIEWOPT_1_ONLINESPELL 0x04000000L 71*cdf0e10cSrcweir //#define VIEWOPT_1_HIDESPELL 0x08000000L /* removed #i91949 */ 72*cdf0e10cSrcweir #define VIEWOPT_1_RESERVED1 0x10000000L 73*cdf0e10cSrcweir #define VIEWOPT_1_VIEWMETACHARS 0x20000000L 74*cdf0e10cSrcweir #define VIEWOPT_1_PAGEBACK 0x40000000L 75*cdf0e10cSrcweir #define VIEWOPT_1_SOLIDMARKHDL 0x80000000L 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir #define VIEWOPT_CORE2_BLACKFONT 0x00000001L 78*cdf0e10cSrcweir #define VIEWOPT_CORE2_HIDDENPARA 0x00000002L 79*cdf0e10cSrcweir #define VIEWOPT_CORE2_SMOOTHSCROLL 0x00000004L 80*cdf0e10cSrcweir #define VIEWOPT_CORE2_CRSR_IN_PROT 0x00000008L 81*cdf0e10cSrcweir #define VIEWOPT_CORE2_PDF_EXPORT 0x00000010L 82*cdf0e10cSrcweir #define VIEWOPT_CORE2_PRINTING 0x00000020L 83*cdf0e10cSrcweir #define VIEWOPT_CORE2_BIGMARKHDL 0x00000040L 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir #define VIEWOPT_2_UNUSED1 0x00000100L 86*cdf0e10cSrcweir #define VIEWOPT_2_UNUSED2 0x00000200L 87*cdf0e10cSrcweir #define VIEWOPT_2_H_RULER 0x00000400L 88*cdf0e10cSrcweir #define VIEWOPT_2_VSCROLLBAR 0x00000800L 89*cdf0e10cSrcweir #define VIEWOPT_2_HSCROLLBAR 0x00001000L 90*cdf0e10cSrcweir #define VIEWOPT_2_STATUSLINE 0x00002000L 91*cdf0e10cSrcweir #define VIEWOPT_2_V_RULER 0x00004000L 92*cdf0e10cSrcweir #define VIEWOPT_2_ANY_RULER 0x00008000L 93*cdf0e10cSrcweir #define VIEWOPT_2_MODIFIED 0x00010000L 94*cdf0e10cSrcweir #define VIEWOPT_2_KEEPASPECTRATIO 0x00020000L 95*cdf0e10cSrcweir #define VIEWOPT_2_GRFKEEPZOOM 0x00040000L 96*cdf0e10cSrcweir #define VIEWOPT_2_PREVENT_TIPS 0x00100000L 97*cdf0e10cSrcweir #define VIEWOPT_2_RESERVED3 0x00200000L 98*cdf0e10cSrcweir #define VIEWOPT_2_RESERVED4 0x00400000L 99*cdf0e10cSrcweir #define VIEWOPT_2_PRTFORMAT 0x00800000L 100*cdf0e10cSrcweir #define VIEWOPT_2_SHADOWCRSR 0x01000000L 101*cdf0e10cSrcweir #define VIEWOPT_2_V_RULER_RIGHT 0x02000000L 102*cdf0e10cSrcweir 103*cdf0e10cSrcweir //Tabellenhintergrund 104*cdf0e10cSrcweir #define TBL_DEST_CELL 0 105*cdf0e10cSrcweir #define TBL_DEST_ROW 1 106*cdf0e10cSrcweir #define TBL_DEST_TBL 2 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir //Appearance flags 109*cdf0e10cSrcweir #define VIEWOPT_DOC_BOUNDARIES 0x0001 110*cdf0e10cSrcweir #define VIEWOPT_OBJECT_BOUNDARIES 0x0002 111*cdf0e10cSrcweir #define VIEWOPT_TABLE_BOUNDARIES 0x0004 112*cdf0e10cSrcweir #define VIEWOPT_INDEX_SHADINGS 0x0008 113*cdf0e10cSrcweir #define VIEWOPT_LINKS 0x0010 114*cdf0e10cSrcweir #define VIEWOPT_VISITED_LINKS 0x0020 115*cdf0e10cSrcweir #define VIEWOPT_FIELD_SHADINGS 0x0040 116*cdf0e10cSrcweir #define VIEWOPT_SECTION_BOUNDARIES 0x0080 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir // Implementierung in core/text/txtpaint.cxx 119*cdf0e10cSrcweir extern void SyncVout( const OutputDevice *pOut ); 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir class SwViewOption 122*cdf0e10cSrcweir { 123*cdf0e10cSrcweir static Color aDocColor; // color of document boundaries 124*cdf0e10cSrcweir static Color aDocBoundColor; // color of document boundaries 125*cdf0e10cSrcweir static Color aObjectBoundColor; // color of object boundaries 126*cdf0e10cSrcweir static Color aAppBackgroundColor; // application background 127*cdf0e10cSrcweir static Color aTableBoundColor; // color of table boundaries 128*cdf0e10cSrcweir static Color aFontColor; 129*cdf0e10cSrcweir static Color aIndexShadingsColor; // background color of indexes 130*cdf0e10cSrcweir static Color aLinksColor; 131*cdf0e10cSrcweir static Color aVisitedLinksColor; 132*cdf0e10cSrcweir static Color aDirectCursorColor; 133*cdf0e10cSrcweir static Color aTextGridColor; 134*cdf0e10cSrcweir static Color aSpellColor; // mark color of online spell checking 135*cdf0e10cSrcweir static Color aSmarttagColor; 136*cdf0e10cSrcweir static Color aFieldShadingsColor; 137*cdf0e10cSrcweir static Color aSectionBoundColor; 138*cdf0e10cSrcweir static Color aPageBreakColor; 139*cdf0e10cSrcweir static Color aScriptIndicatorColor; 140*cdf0e10cSrcweir 141*cdf0e10cSrcweir static sal_Int32 nAppearanceFlags; // 142*cdf0e10cSrcweir protected: 143*cdf0e10cSrcweir static sal_uInt16 nPixelTwips;// 1 Pixel == ? Twips 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir String sSymbolFont; // Symbolzeichensatz 146*cdf0e10cSrcweir sal_uInt32 nCoreOptions; // Bits fuer die ViewShell 147*cdf0e10cSrcweir sal_uInt32 nCore2Options; // Bits fuer die ViewShell 148*cdf0e10cSrcweir sal_uInt32 nUIOptions; // UI-Bits 149*cdf0e10cSrcweir Color aRetoucheColor; // DefaultBackground fuer BrowseView 150*cdf0e10cSrcweir Size aSnapSize; // Beschreibt hori. wie vert. Snap 151*cdf0e10cSrcweir sal_uInt16 mnViewLayoutColumns;// # columns for edit view 152*cdf0e10cSrcweir short nDivisionX; // Rasterunterteilung 153*cdf0e10cSrcweir short nDivisionY; 154*cdf0e10cSrcweir sal_uInt8 nPagePrevRow; // Page Preview Row/Columns 155*cdf0e10cSrcweir sal_uInt8 nPagePrevCol; // Page Preview Row/Columns 156*cdf0e10cSrcweir sal_uInt8 nShdwCrsrFillMode; // FillMode fuer den ShadowCrsr 157*cdf0e10cSrcweir sal_Bool bReadonly : 1; // Readonly-Doc 158*cdf0e10cSrcweir sal_Bool bStarOneSetting : 1;// prevent from UI automatics (no scrollbars in readonly documents) 159*cdf0e10cSrcweir sal_Bool bIsPagePreview : 1; // the preview mustn't print field/footnote/... shadings 160*cdf0e10cSrcweir sal_Bool bSelectionInReadonly : 1; //determines whether selection is switched on in readonly documents 161*cdf0e10cSrcweir sal_Bool mbFormView : 1; 162*cdf0e10cSrcweir sal_Bool mbBrowseMode : 1; //swmod 080130 163*cdf0e10cSrcweir sal_Bool mbBookView : 1; // view mode for page preview 164*cdf0e10cSrcweir sal_Bool mbViewLayoutBookMode : 1; // book view mode for edit view 165*cdf0e10cSrcweir sal_Bool bShowPlaceHolderFields : 1; //only used in printing! 166*cdf0e10cSrcweir mutable bool bIdle; 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir // Maszstab 169*cdf0e10cSrcweir sal_uInt16 nZoom; // Angaben in Prozent 170*cdf0e10cSrcweir SvxZoomType eZoom; // 'enum' fuer Zoom 171*cdf0e10cSrcweir 172*cdf0e10cSrcweir sal_uInt8 nTblDest; // Ziel fuer Tabellenhintergrund 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir #ifdef DBG_UTIL 175*cdf0e10cSrcweir // korrespondieren zu den Angaben in ui/config/cfgvw.src 176*cdf0e10cSrcweir sal_Bool bTest1 :1; // Test-Flag "Layout not loading" 177*cdf0e10cSrcweir sal_Bool bTest2 :1; // Test-Flag "WYSIWYG++" 178*cdf0e10cSrcweir sal_Bool bTest3 :1; // Test-Flag "" 179*cdf0e10cSrcweir sal_Bool bTest4 :1; // Test-Flag "WYSIWYG debug" 180*cdf0e10cSrcweir sal_Bool bTest5 :1; // Test-Flag "No idle format" 181*cdf0e10cSrcweir sal_Bool bTest6 :1; // Test-Flag "No screen adj" 182*cdf0e10cSrcweir sal_Bool bTest7 :1; // Test-Flag "win format" 183*cdf0e10cSrcweir sal_Bool bTest8 :1; // Test-Flag "" 184*cdf0e10cSrcweir static sal_Bool bTest9; // Test-Flag "DrawingLayerNotLoading" 185*cdf0e10cSrcweir sal_Bool bTest10 :1; // Test-Flag "Format by Input" 186*cdf0e10cSrcweir #endif 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir public: 189*cdf0e10cSrcweir SwViewOption(); // CTOR 190*cdf0e10cSrcweir SwViewOption(const SwViewOption&); // 191*cdf0e10cSrcweir ~SwViewOption(); // 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir void Init( Window *pWin ); // Initialisierung der statischen Daten 194*cdf0e10cSrcweir 195*cdf0e10cSrcweir sal_uInt16 GetPixelTwips() const { return nPixelTwips; } 196*cdf0e10cSrcweir 197*cdf0e10cSrcweir inline sal_uInt32 GetCoreOptions() const {return nCoreOptions;} 198*cdf0e10cSrcweir inline void SetUIOptions( const SwViewOption& ); 199*cdf0e10cSrcweir 200*cdf0e10cSrcweir /*--------------------------------------------------------------------------- 201*cdf0e10cSrcweir Optionen aus nCoreOptions 202*cdf0e10cSrcweir ----------------------------------------------------------------------------*/ 203*cdf0e10cSrcweir 204*cdf0e10cSrcweir inline sal_Bool IsIdle() const 205*cdf0e10cSrcweir { return bIdle; } 206*cdf0e10cSrcweir 207*cdf0e10cSrcweir // logically this is a const function since it does not modify the viewoptions 208*cdf0e10cSrcweir // but only effects idle formatting. Of course that member is already implement 209*cdf0e10cSrcweir // in the wrong place here... Also currently there are many const modifying casts in the code 210*cdf0e10cSrcweir // just to call this function on otherwise const objects. Thus declaring it as const now. 211*cdf0e10cSrcweir inline void SetIdle( sal_Bool b ) const 212*cdf0e10cSrcweir { bIdle = b; } 213*cdf0e10cSrcweir 214*cdf0e10cSrcweir inline sal_Bool IsTab(sal_Bool bHard = sal_False) const 215*cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) && 216*cdf0e10cSrcweir ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) 217*cdf0e10cSrcweir ? sal_True : sal_False; } 218*cdf0e10cSrcweir inline void SetTab( sal_Bool b ) { 219*cdf0e10cSrcweir (b != 0) ? (nCoreOptions |= VIEWOPT_1_TAB ) : ( nCoreOptions &= ~VIEWOPT_1_TAB); } 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir inline sal_Bool IsBlank(sal_Bool bHard = sal_False) const 222*cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_BLANK) && 223*cdf0e10cSrcweir ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) 224*cdf0e10cSrcweir ? sal_True : sal_False; } 225*cdf0e10cSrcweir inline void SetBlank( sal_Bool b ) 226*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_BLANK ) : ( nCoreOptions &= ~VIEWOPT_1_BLANK); } 227*cdf0e10cSrcweir 228*cdf0e10cSrcweir inline sal_Bool IsHardBlank() const 229*cdf0e10cSrcweir { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? sal_True : sal_False; } 230*cdf0e10cSrcweir inline void SetHardBlank( sal_Bool b ) 231*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_HARDBLANK ) : ( nCoreOptions &= ~VIEWOPT_1_HARDBLANK); } 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir inline sal_Bool IsParagraph(sal_Bool bHard = sal_False) const 234*cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_PARAGRAPH) && 235*cdf0e10cSrcweir ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) 236*cdf0e10cSrcweir ? sal_True : sal_False; } 237*cdf0e10cSrcweir inline void SetParagraph( sal_Bool b ) 238*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PARAGRAPH ) : ( nCoreOptions &= ~VIEWOPT_1_PARAGRAPH); } 239*cdf0e10cSrcweir 240*cdf0e10cSrcweir inline sal_Bool IsLineBreak(sal_Bool bHard = sal_False) const 241*cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_LINEBREAK) && 242*cdf0e10cSrcweir ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) 243*cdf0e10cSrcweir ? sal_True : sal_False; } 244*cdf0e10cSrcweir inline void SetLineBreak( sal_Bool b ) 245*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_LINEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_LINEBREAK); } 246*cdf0e10cSrcweir 247*cdf0e10cSrcweir inline void SetPageBreak( sal_Bool b ) 248*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBREAK); } 249*cdf0e10cSrcweir 250*cdf0e10cSrcweir inline void SetColumnBreak( sal_Bool b) 251*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_COLUMNBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_COLUMNBREAK); } 252*cdf0e10cSrcweir 253*cdf0e10cSrcweir inline sal_Bool IsSoftHyph() const 254*cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? sal_True : sal_False; } 255*cdf0e10cSrcweir inline void SetSoftHyph( sal_Bool b ) 256*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOFTHYPH ) : ( nCoreOptions &= ~VIEWOPT_1_SOFTHYPH); } 257*cdf0e10cSrcweir 258*cdf0e10cSrcweir inline sal_Bool IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? sal_True : sal_False; } 259*cdf0e10cSrcweir inline void SetFldName( sal_Bool b ) 260*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLDNAME ) : ( nCoreOptions &= ~VIEWOPT_1_FLDNAME); } 261*cdf0e10cSrcweir 262*cdf0e10cSrcweir inline sal_Bool IsPostIts() const 263*cdf0e10cSrcweir { return (nCoreOptions & VIEWOPT_1_POSTITS) ? sal_True : sal_False; } 264*cdf0e10cSrcweir inline void SetPostIts( sal_Bool b ) 265*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_POSTITS ) : ( nCoreOptions &= ~VIEWOPT_1_POSTITS); } 266*cdf0e10cSrcweir void PaintPostIts( OutputDevice *pOut, const SwRect &rRect, 267*cdf0e10cSrcweir sal_Bool bIsScript ) const; 268*cdf0e10cSrcweir sal_uInt16 GetPostItsWidth( const OutputDevice *pOut = 0 ) const; 269*cdf0e10cSrcweir 270*cdf0e10cSrcweir inline sal_Bool IsShowHiddenChar(sal_Bool bHard = sal_False) const 271*cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_CHAR_HIDDEN) && 272*cdf0e10cSrcweir ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) 273*cdf0e10cSrcweir ? sal_True : sal_False; } 274*cdf0e10cSrcweir 275*cdf0e10cSrcweir inline void SetShowHiddenChar( sal_Bool b ) 276*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CHAR_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_CHAR_HIDDEN); } 277*cdf0e10cSrcweir 278*cdf0e10cSrcweir 279*cdf0e10cSrcweir inline sal_Bool IsShowHiddenField() const 280*cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLD_HIDDEN) ? sal_True : sal_False; } 281*cdf0e10cSrcweir inline void SetShowHiddenField( sal_Bool b ) 282*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLD_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_FLD_HIDDEN); } 283*cdf0e10cSrcweir 284*cdf0e10cSrcweir inline sal_Bool IsGraphic() const 285*cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_GRAPHIC ? sal_True : sal_False; } 286*cdf0e10cSrcweir inline void SetGraphic( sal_Bool b ) 287*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRAPHIC ) : ( nCoreOptions &= ~VIEWOPT_1_GRAPHIC); } 288*cdf0e10cSrcweir 289*cdf0e10cSrcweir inline sal_Bool IsPageBack() const 290*cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_PAGEBACK ? sal_True : sal_False; } 291*cdf0e10cSrcweir inline void SetPageBack( sal_Bool b ) 292*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBACK) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBACK); } 293*cdf0e10cSrcweir 294*cdf0e10cSrcweir inline sal_Bool IsSolidMarkHdl() const 295*cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_SOLIDMARKHDL ? sal_True : sal_False; } 296*cdf0e10cSrcweir inline void SetSolidMarkHdl( sal_Bool b ) 297*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOLIDMARKHDL) : ( nCoreOptions &= ~VIEWOPT_1_SOLIDMARKHDL); } 298*cdf0e10cSrcweir 299*cdf0e10cSrcweir inline sal_Bool IsBigMarkHdl() const 300*cdf0e10cSrcweir { return nCore2Options & VIEWOPT_CORE2_BIGMARKHDL ? sal_True : sal_False;} 301*cdf0e10cSrcweir inline void SetBigMarkHdl(sal_Bool b) 302*cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BIGMARKHDL ) : (nCore2Options &= ~VIEWOPT_CORE2_BIGMARKHDL);} 303*cdf0e10cSrcweir 304*cdf0e10cSrcweir inline sal_Bool IsTable() const 305*cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_TABLE ? sal_True : sal_False; } 306*cdf0e10cSrcweir inline void SetTable( sal_Bool b ) 307*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_TABLE ) : ( nCoreOptions &= ~VIEWOPT_1_TABLE); } 308*cdf0e10cSrcweir 309*cdf0e10cSrcweir inline sal_Bool IsDraw() const 310*cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_DRAW ? sal_True : sal_False; } 311*cdf0e10cSrcweir inline void SetDraw( sal_Bool b ) 312*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_DRAW ) : ( nCoreOptions &= ~VIEWOPT_1_DRAW); } 313*cdf0e10cSrcweir 314*cdf0e10cSrcweir inline sal_Bool IsControl() const 315*cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_CONTROL ? sal_True : sal_False; } 316*cdf0e10cSrcweir inline void SetControl( sal_Bool b ) 317*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CONTROL ) : ( nCoreOptions &= ~VIEWOPT_1_CONTROL); } 318*cdf0e10cSrcweir 319*cdf0e10cSrcweir inline sal_Bool IsSnap() const 320*cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_SNAP ? sal_True : sal_False; } 321*cdf0e10cSrcweir inline void SetSnap( sal_Bool b ) 322*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SNAP ) : ( nCoreOptions &= ~VIEWOPT_1_SNAP); } 323*cdf0e10cSrcweir 324*cdf0e10cSrcweir inline void SetSnapSize( Size &rSz ){ aSnapSize = rSz; } 325*cdf0e10cSrcweir inline const Size &GetSnapSize() const { return aSnapSize; } 326*cdf0e10cSrcweir 327*cdf0e10cSrcweir inline sal_Bool IsGridVisible() const 328*cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? sal_True : sal_False; } 329*cdf0e10cSrcweir inline void SetGridVisible( sal_Bool b ) 330*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRIDVISIBLE ) : ( nCoreOptions &= ~VIEWOPT_1_GRIDVISIBLE); } 331*cdf0e10cSrcweir 332*cdf0e10cSrcweir inline sal_Bool IsOnlineSpell() const 333*cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? sal_True : sal_False; } 334*cdf0e10cSrcweir inline void SetOnlineSpell( sal_Bool b ) 335*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL); } 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir inline sal_Bool IsViewMetaChars() const 338*cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? sal_True : sal_False; } 339*cdf0e10cSrcweir inline void SetViewMetaChars( sal_Bool b) 340*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_VIEWMETACHARS ) : ( nCoreOptions &= ~VIEWOPT_1_VIEWMETACHARS); } 341*cdf0e10cSrcweir 342*cdf0e10cSrcweir inline sal_Bool IsSynchronize() const 343*cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? sal_True : sal_False;} 344*cdf0e10cSrcweir inline void SetSynchronize( sal_Bool b ) 345*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SYNCHRONIZE ) : ( nCoreOptions &= ~VIEWOPT_1_SYNCHRONIZE); } 346*cdf0e10cSrcweir 347*cdf0e10cSrcweir inline sal_Bool IsCrossHair() const 348*cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? sal_True : sal_False; } 349*cdf0e10cSrcweir inline void SetCrossHair( sal_Bool b ) 350*cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CROSSHAIR ) : ( nCoreOptions &= ~VIEWOPT_1_CROSSHAIR); } 351*cdf0e10cSrcweir 352*cdf0e10cSrcweir /*--------------------------------------------------------------------------- 353*cdf0e10cSrcweir Optionen aus nCore2Options 354*cdf0e10cSrcweir ----------------------------------------------------------------------------*/ 355*cdf0e10cSrcweir inline sal_Bool IsBlackFont() const 356*cdf0e10cSrcweir {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? sal_True : sal_False;} 357*cdf0e10cSrcweir 358*cdf0e10cSrcweir inline void SetBlackFont(sal_Bool b) 359*cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BLACKFONT) : (nCore2Options &= ~VIEWOPT_CORE2_BLACKFONT);} 360*cdf0e10cSrcweir 361*cdf0e10cSrcweir inline sal_Bool IsShowHiddenPara() const 362*cdf0e10cSrcweir {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? sal_True : sal_False;} 363*cdf0e10cSrcweir 364*cdf0e10cSrcweir inline void SetShowHiddenPara(sal_Bool b) 365*cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_HIDDENPARA) : (nCore2Options &= ~VIEWOPT_CORE2_HIDDENPARA);} 366*cdf0e10cSrcweir 367*cdf0e10cSrcweir inline sal_Bool IsSmoothScroll() const 368*cdf0e10cSrcweir {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? sal_True : sal_False;} 369*cdf0e10cSrcweir 370*cdf0e10cSrcweir inline void SetSmoothScroll(sal_Bool b) 371*cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_SMOOTHSCROLL) : (nCore2Options &= ~VIEWOPT_CORE2_SMOOTHSCROLL);} 372*cdf0e10cSrcweir 373*cdf0e10cSrcweir inline sal_Bool IsCursorInProtectedArea() const 374*cdf0e10cSrcweir {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? sal_True : sal_False;} 375*cdf0e10cSrcweir 376*cdf0e10cSrcweir inline void SetCursorInProtectedArea(sal_Bool b) 377*cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_CRSR_IN_PROT) : (nCore2Options &= ~VIEWOPT_CORE2_CRSR_IN_PROT);} 378*cdf0e10cSrcweir 379*cdf0e10cSrcweir inline sal_Bool IsPDFExport() const 380*cdf0e10cSrcweir {return nCore2Options & VIEWOPT_CORE2_PDF_EXPORT ? sal_True : sal_False;} 381*cdf0e10cSrcweir 382*cdf0e10cSrcweir inline void SetPDFExport(sal_Bool b) 383*cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PDF_EXPORT) : (nCore2Options &= ~VIEWOPT_CORE2_PDF_EXPORT);} 384*cdf0e10cSrcweir 385*cdf0e10cSrcweir inline sal_Bool IsPrinting() const 386*cdf0e10cSrcweir {return nCore2Options & VIEWOPT_CORE2_PRINTING ? sal_True : sal_False;} 387*cdf0e10cSrcweir 388*cdf0e10cSrcweir inline void SetPrinting(sal_Bool b) 389*cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PRINTING) : (nCore2Options &= ~VIEWOPT_CORE2_PRINTING);} 390*cdf0e10cSrcweir 391*cdf0e10cSrcweir /*--------------------------------------------------------------------------- 392*cdf0e10cSrcweir 393*cdf0e10cSrcweir ----------------------------------------------------------------------------*/ 394*cdf0e10cSrcweir 395*cdf0e10cSrcweir 396*cdf0e10cSrcweir inline short GetDivisionX() const { return nDivisionX; } 397*cdf0e10cSrcweir inline void SetDivisionX( short n ){ nDivisionX = n; } 398*cdf0e10cSrcweir inline short GetDivisionY() const { return nDivisionY; } 399*cdf0e10cSrcweir inline void SetDivisionY( short n ){ nDivisionY = n; } 400*cdf0e10cSrcweir 401*cdf0e10cSrcweir inline sal_uInt8 GetPagePrevRow() const { return nPagePrevRow; } 402*cdf0e10cSrcweir inline void SetPagePrevRow( sal_uInt8 n ) { nPagePrevRow = n; } 403*cdf0e10cSrcweir inline sal_uInt8 GetPagePrevCol() const { return nPagePrevCol; } 404*cdf0e10cSrcweir inline void SetPagePrevCol( sal_uInt8 n ) { nPagePrevCol = n; } 405*cdf0e10cSrcweir sal_Bool IsReadonly() const { return bReadonly; } 406*cdf0e10cSrcweir void SetReadonly(sal_Bool bSet) { bReadonly = bSet; } 407*cdf0e10cSrcweir 408*cdf0e10cSrcweir sal_Bool IsSelectionInReadonly() const {return bSelectionInReadonly;} 409*cdf0e10cSrcweir void SetSelectionInReadonly(sal_Bool bSet) {bSelectionInReadonly = bSet;} 410*cdf0e10cSrcweir 411*cdf0e10cSrcweir sal_Bool IsFormView() const { return mbFormView; } 412*cdf0e10cSrcweir void SetFormView( sal_Bool bSet ) { mbFormView = bSet; } 413*cdf0e10cSrcweir // <-- 414*cdf0e10cSrcweir 415*cdf0e10cSrcweir inline sal_Bool getBrowseMode() const { return mbBrowseMode; } 416*cdf0e10cSrcweir inline void setBrowseMode(sal_Bool bSet) { mbBrowseMode = bSet; } 417*cdf0e10cSrcweir inline sal_Bool IsPagePrevBookview() const { return mbBookView; } 418*cdf0e10cSrcweir inline void SetPagePrevBookview(sal_Bool bSet) { mbBookView = bSet; } 419*cdf0e10cSrcweir 420*cdf0e10cSrcweir sal_Bool IsAutoCompleteWords() const; 421*cdf0e10cSrcweir 422*cdf0e10cSrcweir // PAGES01 423*cdf0e10cSrcweir bool IsViewLayoutBookMode() const { return mbViewLayoutBookMode; } 424*cdf0e10cSrcweir void SetViewLayoutBookMode( bool bNew ) { mbViewLayoutBookMode = bNew; } 425*cdf0e10cSrcweir sal_uInt16 GetViewLayoutColumns() const { return mnViewLayoutColumns; } 426*cdf0e10cSrcweir void SetViewLayoutColumns( sal_uInt16 nNew ) { mnViewLayoutColumns = nNew; } 427*cdf0e10cSrcweir 428*cdf0e10cSrcweir #ifdef DBG_UTIL 429*cdf0e10cSrcweir // korrespondieren zu den Angaben in ui/config/cfgvw.src 430*cdf0e10cSrcweir inline sal_Bool IsTest1() const { return bTest1; } 431*cdf0e10cSrcweir inline void SetTest1( sal_Bool b ) { bTest1 = b; } 432*cdf0e10cSrcweir inline sal_Bool IsTest2() const { return bTest2; } 433*cdf0e10cSrcweir inline void SetTest2( sal_Bool b ) { bTest2 = b; } 434*cdf0e10cSrcweir inline sal_Bool IsTest3() const { return bTest3; } 435*cdf0e10cSrcweir inline void SetTest3( sal_Bool b ) { bTest3 = b; } 436*cdf0e10cSrcweir inline sal_Bool IsTest4() const { return bTest4; } 437*cdf0e10cSrcweir inline void SetTest4( sal_Bool b ) { bTest4 = b; } 438*cdf0e10cSrcweir inline sal_Bool IsTest5() const { return bTest5; } 439*cdf0e10cSrcweir inline void SetTest5( sal_Bool b ) { bTest5 = b; } 440*cdf0e10cSrcweir inline sal_Bool IsTest6() const { return bTest6; } 441*cdf0e10cSrcweir inline void SetTest6( sal_Bool b ) { bTest6 = b; } 442*cdf0e10cSrcweir inline sal_Bool IsTest7() const { return bTest7; } 443*cdf0e10cSrcweir inline void SetTest7( sal_Bool b ) { bTest7 = b; } 444*cdf0e10cSrcweir inline sal_Bool IsTest8() const { return bTest8; } 445*cdf0e10cSrcweir inline void SetTest8( sal_Bool b ) { bTest8 = b; } 446*cdf0e10cSrcweir static inline sal_Bool IsTest9() { return bTest9; } 447*cdf0e10cSrcweir static inline void SetTest9( sal_Bool b ) { bTest9 = b; } 448*cdf0e10cSrcweir inline sal_Bool IsTest10() const { return bTest10; } 449*cdf0e10cSrcweir inline void SetTest10( sal_Bool b ) { bTest10 = b; } 450*cdf0e10cSrcweir #endif 451*cdf0e10cSrcweir 452*cdf0e10cSrcweir inline sal_uInt16 GetZoom() const { return nZoom; } 453*cdf0e10cSrcweir inline void SetZoom( sal_uInt16 n ){ nZoom = n; } 454*cdf0e10cSrcweir 455*cdf0e10cSrcweir void DrawRect( OutputDevice* pOut, const SwRect &rRect, long nCol ) const; 456*cdf0e10cSrcweir void DrawRectPrinter( OutputDevice* pOut, const SwRect& rRect ) const; 457*cdf0e10cSrcweir 458*cdf0e10cSrcweir SwViewOption& operator=( const SwViewOption &rOpt ); 459*cdf0e10cSrcweir // Vergleichsmethoden 460*cdf0e10cSrcweir sal_Bool IsEqualFlags ( const SwViewOption &rOpt ) const; 461*cdf0e10cSrcweir inline sal_Bool operator == ( const SwViewOption &rOpt ) const; 462*cdf0e10cSrcweir inline sal_Bool operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); } 463*cdf0e10cSrcweir 464*cdf0e10cSrcweir 465*cdf0e10cSrcweir /*--------------------------------------------------------------------------- 466*cdf0e10cSrcweir Optionen aus nUIOptions 467*cdf0e10cSrcweir ----------------------------------------------------------------------------*/ 468*cdf0e10cSrcweir 469*cdf0e10cSrcweir sal_Bool IsViewVScrollBar() const 470*cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? sal_True : sal_False; } 471*cdf0e10cSrcweir sal_Bool IsViewHScrollBar() const 472*cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? sal_True : sal_False; } 473*cdf0e10cSrcweir sal_Bool IsKeepRatio() const 474*cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? sal_True : sal_False; } 475*cdf0e10cSrcweir sal_Bool IsGrfKeepZoom() const 476*cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? sal_True : sal_False; } 477*cdf0e10cSrcweir sal_Bool IsPreventTips() const 478*cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_PREVENT_TIPS ? sal_True : sal_False; } 479*cdf0e10cSrcweir sal_Bool IsPrtFormat() const 480*cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_PRTFORMAT ? sal_True : sal_False; } 481*cdf0e10cSrcweir 482*cdf0e10cSrcweir SvxZoomType GetZoomType() const { return eZoom; } 483*cdf0e10cSrcweir 484*cdf0e10cSrcweir sal_uInt8 GetTblDest() const { return nTblDest; } 485*cdf0e10cSrcweir 486*cdf0e10cSrcweir void SetViewVScrollBar(sal_Bool b) 487*cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_VSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_VSCROLLBAR); } 488*cdf0e10cSrcweir void SetViewHScrollBar(sal_Bool b) 489*cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_HSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_HSCROLLBAR); } 490*cdf0e10cSrcweir void SetKeepRatio (sal_Bool b) 491*cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_KEEPASPECTRATIO ) : ( nUIOptions &= ~VIEWOPT_2_KEEPASPECTRATIO); } 492*cdf0e10cSrcweir void SetGrfKeepZoom (sal_Bool b) 493*cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_GRFKEEPZOOM ) : ( nUIOptions &= ~VIEWOPT_2_GRFKEEPZOOM); } 494*cdf0e10cSrcweir void SetPreventTips( sal_Bool b) 495*cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_PREVENT_TIPS) : (nUIOptions &= ~VIEWOPT_2_PREVENT_TIPS); } 496*cdf0e10cSrcweir void SetPrtFormat( sal_Bool b) 497*cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_PRTFORMAT) : (nUIOptions &= ~VIEWOPT_2_PRTFORMAT); } 498*cdf0e10cSrcweir 499*cdf0e10cSrcweir void SetZoomType (SvxZoomType eZoom_){ eZoom = eZoom_; } 500*cdf0e10cSrcweir void SetTblDest( sal_uInt8 nNew ) { nTblDest = nNew; } 501*cdf0e10cSrcweir 502*cdf0e10cSrcweir const String& GetSymbolFont() const {return sSymbolFont;} 503*cdf0e10cSrcweir void SetSymbolFont(const String& sSet) {sSymbolFont = sSet;} 504*cdf0e10cSrcweir 505*cdf0e10cSrcweir const Color& GetRetoucheColor() const { return aRetoucheColor;} 506*cdf0e10cSrcweir void SetRetoucheColor(const Color&r) { aRetoucheColor = r; } 507*cdf0e10cSrcweir 508*cdf0e10cSrcweir sal_Bool IsViewAnyRuler() const {return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);} 509*cdf0e10cSrcweir void SetViewAnyRuler(sal_Bool bSet) 510*cdf0e10cSrcweir { bSet ? (nUIOptions |= VIEWOPT_2_ANY_RULER) : (nUIOptions &= ~VIEWOPT_2_ANY_RULER);} 511*cdf0e10cSrcweir 512*cdf0e10cSrcweir sal_Bool IsViewHRuler(sal_Bool bDirect = sal_False) const 513*cdf0e10cSrcweir { 514*cdf0e10cSrcweir sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect ? 515*cdf0e10cSrcweir 0 != (nUIOptions & VIEWOPT_2_H_RULER) : 516*cdf0e10cSrcweir !bReadonly ? 517*cdf0e10cSrcweir (nUIOptions & (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER) 518*cdf0e10cSrcweir : sal_False ); 519*cdf0e10cSrcweir return bRet; 520*cdf0e10cSrcweir 521*cdf0e10cSrcweir } 522*cdf0e10cSrcweir void SetViewHRuler (sal_Bool b) 523*cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_H_RULER ) : ( nUIOptions &= ~VIEWOPT_2_H_RULER);} 524*cdf0e10cSrcweir 525*cdf0e10cSrcweir sal_Bool IsViewVRuler(sal_Bool bDirect = sal_False) const 526*cdf0e10cSrcweir { 527*cdf0e10cSrcweir sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect ? 528*cdf0e10cSrcweir 0 !=(nUIOptions & VIEWOPT_2_V_RULER) : 529*cdf0e10cSrcweir !bReadonly ? 530*cdf0e10cSrcweir (nUIOptions & 531*cdf0e10cSrcweir (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER) 532*cdf0e10cSrcweir : sal_False ); 533*cdf0e10cSrcweir return bRet; 534*cdf0e10cSrcweir } 535*cdf0e10cSrcweir void SetViewVRuler (sal_Bool b) 536*cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_V_RULER ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER);} 537*cdf0e10cSrcweir 538*cdf0e10cSrcweir // ShadowCursor ein schalten/abfragen/Farbe setzen/Modus setzen 539*cdf0e10cSrcweir sal_Bool IsShadowCursor() const 540*cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? sal_True : sal_False; } 541*cdf0e10cSrcweir void SetShadowCursor(sal_Bool b) 542*cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_SHADOWCRSR ) : ( nUIOptions &= ~VIEWOPT_2_SHADOWCRSR); } 543*cdf0e10cSrcweir 544*cdf0e10cSrcweir //move vertical ruler to the right 545*cdf0e10cSrcweir sal_Bool IsVRulerRight() const 546*cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_V_RULER_RIGHT ? sal_True : sal_False; } 547*cdf0e10cSrcweir void SetVRulerRight(sal_Bool b) 548*cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_V_RULER_RIGHT ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER_RIGHT); } 549*cdf0e10cSrcweir 550*cdf0e10cSrcweir sal_Bool IsStarOneSetting() const {return bStarOneSetting; } 551*cdf0e10cSrcweir void SetStarOneSetting(sal_Bool bSet) {bStarOneSetting = bSet; } 552*cdf0e10cSrcweir 553*cdf0e10cSrcweir sal_Bool IsPagePreview() const {return bIsPagePreview; } 554*cdf0e10cSrcweir void SetPagePreview(sal_Bool bSet) { bIsPagePreview= bSet; } 555*cdf0e10cSrcweir 556*cdf0e10cSrcweir sal_uInt8 GetShdwCrsrFillMode() const { return nShdwCrsrFillMode; } 557*cdf0e10cSrcweir void SetShdwCrsrFillMode( sal_uInt8 nMode ) { nShdwCrsrFillMode = nMode; }; 558*cdf0e10cSrcweir 559*cdf0e10cSrcweir sal_Bool IsShowPlaceHolderFields() const { return bShowPlaceHolderFields; } 560*cdf0e10cSrcweir void SetShowPlaceHolderFields(sal_Bool bSet) { bShowPlaceHolderFields = bSet; } 561*cdf0e10cSrcweir 562*cdf0e10cSrcweir static Color& GetDocColor(); 563*cdf0e10cSrcweir static Color& GetDocBoundariesColor(); 564*cdf0e10cSrcweir static Color& GetAppBackgroundColor(); 565*cdf0e10cSrcweir static Color& GetObjectBoundariesColor(); 566*cdf0e10cSrcweir static Color& GetTableBoundariesColor(); 567*cdf0e10cSrcweir static Color& GetIndexShadingsColor(); 568*cdf0e10cSrcweir static Color& GetLinksColor(); 569*cdf0e10cSrcweir static Color& GetVisitedLinksColor(); 570*cdf0e10cSrcweir static Color& GetDirectCursorColor(); 571*cdf0e10cSrcweir static Color& GetTextGridColor(); 572*cdf0e10cSrcweir static Color& GetSpellColor(); 573*cdf0e10cSrcweir static Color& GetSmarttagColor(); 574*cdf0e10cSrcweir SW_DLLPUBLIC static Color& GetFontColor(); 575*cdf0e10cSrcweir static Color& GetFieldShadingsColor(); 576*cdf0e10cSrcweir static Color& GetSectionBoundColor(); 577*cdf0e10cSrcweir static Color& GetPageBreakColor(); 578*cdf0e10cSrcweir 579*cdf0e10cSrcweir static sal_Bool IsAppearanceFlag(sal_Int32 nFlag); 580*cdf0e10cSrcweir 581*cdf0e10cSrcweir static sal_Bool IsDocBoundaries() {return IsAppearanceFlag(VIEWOPT_DOC_BOUNDARIES);} 582*cdf0e10cSrcweir static sal_Bool IsObjectBoundaries(){return IsAppearanceFlag(VIEWOPT_OBJECT_BOUNDARIES);} 583*cdf0e10cSrcweir static sal_Bool IsTableBoundaries() {return IsAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES );} 584*cdf0e10cSrcweir static sal_Bool IsIndexShadings() {return IsAppearanceFlag(VIEWOPT_INDEX_SHADINGS );} 585*cdf0e10cSrcweir static sal_Bool IsLinks() {return IsAppearanceFlag(VIEWOPT_LINKS );} 586*cdf0e10cSrcweir static sal_Bool IsVisitedLinks() {return IsAppearanceFlag(VIEWOPT_VISITED_LINKS );} 587*cdf0e10cSrcweir static sal_Bool IsFieldShadings() {return IsAppearanceFlag(VIEWOPT_FIELD_SHADINGS);} 588*cdf0e10cSrcweir static sal_Bool IsSectionBoundaries() {return IsAppearanceFlag(VIEWOPT_SECTION_BOUNDARIES);} 589*cdf0e10cSrcweir 590*cdf0e10cSrcweir static void SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig = sal_False); 591*cdf0e10cSrcweir 592*cdf0e10cSrcweir void SetDocBoundaries(sal_Bool bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);} 593*cdf0e10cSrcweir 594*cdf0e10cSrcweir static void ApplyColorConfigValues(const svtools::ColorConfig& rConfig); 595*cdf0e10cSrcweir }; 596*cdf0e10cSrcweir 597*cdf0e10cSrcweir 598*cdf0e10cSrcweir inline sal_Bool SwViewOption::operator==( const SwViewOption &rOpt ) const 599*cdf0e10cSrcweir { 600*cdf0e10cSrcweir return IsEqualFlags( rOpt ) && nZoom == rOpt.GetZoom(); 601*cdf0e10cSrcweir } 602*cdf0e10cSrcweir 603*cdf0e10cSrcweir inline void SwViewOption::SetUIOptions( const SwViewOption& rVOpt ) 604*cdf0e10cSrcweir { 605*cdf0e10cSrcweir nUIOptions = rVOpt.nUIOptions; 606*cdf0e10cSrcweir nTblDest = rVOpt.nTblDest; 607*cdf0e10cSrcweir nShdwCrsrFillMode = rVOpt.nShdwCrsrFillMode; 608*cdf0e10cSrcweir } 609*cdf0e10cSrcweir 610*cdf0e10cSrcweir 611*cdf0e10cSrcweir // Hilfsfunktion zur Ermittlung der HTML-Faehigkeiten 612*cdf0e10cSrcweir SW_DLLPUBLIC sal_uInt16 GetHtmlMode(const SwDocShell*); 613*cdf0e10cSrcweir 614*cdf0e10cSrcweir 615*cdf0e10cSrcweir #endif 616