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