11d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
31d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
41d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file
51d2dbeb0SAndrew Rist * distributed with this work for additional information
61d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file
71d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the
81d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance
91d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at
10cdf0e10cSrcweir *
111d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
131d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing,
141d2dbeb0SAndrew Rist * software distributed under the License is distributed on an
151d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
161d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the
171d2dbeb0SAndrew Rist * specific language governing permissions and limitations
181d2dbeb0SAndrew Rist * under the License.
19cdf0e10cSrcweir *
201d2dbeb0SAndrew Rist *************************************************************/
211d2dbeb0SAndrew Rist
221d2dbeb0SAndrew 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
92ef785786SAriel Constenla-Haile #define VIEWOPT_2_CONTENT_TIPS 0x00100000L
93cdf0e10cSrcweir #define VIEWOPT_2_RESERVED3 0x00200000L
94*a41e6500SAriel Constenla-Haile #define VIEWOPT_2_SCROLLBAR_TIPS 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
GetPixelTwips() const191cdf0e10cSrcweir sal_uInt16 GetPixelTwips() const { return nPixelTwips; }
192cdf0e10cSrcweir
GetCoreOptions() const193cdf0e10cSrcweir inline sal_uInt32 GetCoreOptions() const {return nCoreOptions;}
194cdf0e10cSrcweir inline void SetUIOptions( const SwViewOption& );
195cdf0e10cSrcweir
196cdf0e10cSrcweir /*---------------------------------------------------------------------------
197cdf0e10cSrcweir Optionen aus nCoreOptions
198cdf0e10cSrcweir ----------------------------------------------------------------------------*/
199cdf0e10cSrcweir
IsIdle() const200cdf0e10cSrcweir 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.
SetIdle(sal_Bool b) const207cdf0e10cSrcweir inline void SetIdle( sal_Bool b ) const
208cdf0e10cSrcweir { bIdle = b; }
209cdf0e10cSrcweir
IsTab(sal_Bool bHard=sal_False) const210cdf0e10cSrcweir 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; }
SetTab(sal_Bool b)214cdf0e10cSrcweir inline void SetTab( sal_Bool b ) {
215cdf0e10cSrcweir (b != 0) ? (nCoreOptions |= VIEWOPT_1_TAB ) : ( nCoreOptions &= ~VIEWOPT_1_TAB); }
216cdf0e10cSrcweir
IsBlank(sal_Bool bHard=sal_False) const217cdf0e10cSrcweir 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; }
SetBlank(sal_Bool b)221cdf0e10cSrcweir inline void SetBlank( sal_Bool b )
222cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_BLANK ) : ( nCoreOptions &= ~VIEWOPT_1_BLANK); }
223cdf0e10cSrcweir
IsHardBlank() const224cdf0e10cSrcweir inline sal_Bool IsHardBlank() const
225cdf0e10cSrcweir { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? sal_True : sal_False; }
SetHardBlank(sal_Bool b)226cdf0e10cSrcweir inline void SetHardBlank( sal_Bool b )
227cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_HARDBLANK ) : ( nCoreOptions &= ~VIEWOPT_1_HARDBLANK); }
228cdf0e10cSrcweir
IsParagraph(sal_Bool bHard=sal_False) const229cdf0e10cSrcweir 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; }
SetParagraph(sal_Bool b)233cdf0e10cSrcweir inline void SetParagraph( sal_Bool b )
234cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PARAGRAPH ) : ( nCoreOptions &= ~VIEWOPT_1_PARAGRAPH); }
235cdf0e10cSrcweir
IsLineBreak(sal_Bool bHard=sal_False) const236cdf0e10cSrcweir 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; }
SetLineBreak(sal_Bool b)240cdf0e10cSrcweir inline void SetLineBreak( sal_Bool b )
241cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_LINEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_LINEBREAK); }
242cdf0e10cSrcweir
SetPageBreak(sal_Bool b)243cdf0e10cSrcweir inline void SetPageBreak( sal_Bool b )
244cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBREAK); }
245cdf0e10cSrcweir
SetColumnBreak(sal_Bool b)246cdf0e10cSrcweir inline void SetColumnBreak( sal_Bool b)
247cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_COLUMNBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_COLUMNBREAK); }
248cdf0e10cSrcweir
IsSoftHyph() const249cdf0e10cSrcweir inline sal_Bool IsSoftHyph() const
250cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? sal_True : sal_False; }
SetSoftHyph(sal_Bool b)251cdf0e10cSrcweir inline void SetSoftHyph( sal_Bool b )
252cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOFTHYPH ) : ( nCoreOptions &= ~VIEWOPT_1_SOFTHYPH); }
253cdf0e10cSrcweir
IsFldName() const254cdf0e10cSrcweir inline sal_Bool IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? sal_True : sal_False; }
SetFldName(sal_Bool b)255cdf0e10cSrcweir inline void SetFldName( sal_Bool b )
256cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLDNAME ) : ( nCoreOptions &= ~VIEWOPT_1_FLDNAME); }
257cdf0e10cSrcweir
IsPostIts() const258cdf0e10cSrcweir inline sal_Bool IsPostIts() const
259cdf0e10cSrcweir { return (nCoreOptions & VIEWOPT_1_POSTITS) ? sal_True : sal_False; }
SetPostIts(sal_Bool b)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
IsShowHiddenChar(sal_Bool bHard=sal_False) const266cdf0e10cSrcweir 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
SetShowHiddenChar(sal_Bool b)271cdf0e10cSrcweir inline void SetShowHiddenChar( sal_Bool b )
272cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CHAR_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_CHAR_HIDDEN); }
273cdf0e10cSrcweir
274cdf0e10cSrcweir
IsShowHiddenField() const275cdf0e10cSrcweir inline sal_Bool IsShowHiddenField() const
276cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLD_HIDDEN) ? sal_True : sal_False; }
SetShowHiddenField(sal_Bool b)277cdf0e10cSrcweir inline void SetShowHiddenField( sal_Bool b )
278cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLD_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_FLD_HIDDEN); }
279cdf0e10cSrcweir
IsGraphic() const280cdf0e10cSrcweir inline sal_Bool IsGraphic() const
281cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_GRAPHIC ? sal_True : sal_False; }
SetGraphic(sal_Bool b)282cdf0e10cSrcweir inline void SetGraphic( sal_Bool b )
283cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRAPHIC ) : ( nCoreOptions &= ~VIEWOPT_1_GRAPHIC); }
284cdf0e10cSrcweir
IsPageBack() const285cdf0e10cSrcweir inline sal_Bool IsPageBack() const
286cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_PAGEBACK ? sal_True : sal_False; }
SetPageBack(sal_Bool b)287cdf0e10cSrcweir inline void SetPageBack( sal_Bool b )
288cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBACK) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBACK); }
289cdf0e10cSrcweir
IsSolidMarkHdl() const290cdf0e10cSrcweir inline sal_Bool IsSolidMarkHdl() const
291cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_SOLIDMARKHDL ? sal_True : sal_False; }
SetSolidMarkHdl(sal_Bool b)292cdf0e10cSrcweir inline void SetSolidMarkHdl( sal_Bool b )
293cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOLIDMARKHDL) : ( nCoreOptions &= ~VIEWOPT_1_SOLIDMARKHDL); }
294cdf0e10cSrcweir
IsBigMarkHdl() const295cdf0e10cSrcweir inline sal_Bool IsBigMarkHdl() const
296cdf0e10cSrcweir { return nCore2Options & VIEWOPT_CORE2_BIGMARKHDL ? sal_True : sal_False;}
SetBigMarkHdl(sal_Bool b)297cdf0e10cSrcweir inline void SetBigMarkHdl(sal_Bool b)
298cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BIGMARKHDL ) : (nCore2Options &= ~VIEWOPT_CORE2_BIGMARKHDL);}
299cdf0e10cSrcweir
IsTable() const300cdf0e10cSrcweir inline sal_Bool IsTable() const
301cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_TABLE ? sal_True : sal_False; }
SetTable(sal_Bool b)302cdf0e10cSrcweir inline void SetTable( sal_Bool b )
303cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_TABLE ) : ( nCoreOptions &= ~VIEWOPT_1_TABLE); }
304cdf0e10cSrcweir
IsDraw() const305cdf0e10cSrcweir inline sal_Bool IsDraw() const
306cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_DRAW ? sal_True : sal_False; }
SetDraw(sal_Bool b)307cdf0e10cSrcweir inline void SetDraw( sal_Bool b )
308cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_DRAW ) : ( nCoreOptions &= ~VIEWOPT_1_DRAW); }
309cdf0e10cSrcweir
IsControl() const310cdf0e10cSrcweir inline sal_Bool IsControl() const
311cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_CONTROL ? sal_True : sal_False; }
SetControl(sal_Bool b)312cdf0e10cSrcweir inline void SetControl( sal_Bool b )
313cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CONTROL ) : ( nCoreOptions &= ~VIEWOPT_1_CONTROL); }
314cdf0e10cSrcweir
IsSnap() const315cdf0e10cSrcweir inline sal_Bool IsSnap() const
316cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_SNAP ? sal_True : sal_False; }
SetSnap(sal_Bool b)317cdf0e10cSrcweir inline void SetSnap( sal_Bool b )
318cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SNAP ) : ( nCoreOptions &= ~VIEWOPT_1_SNAP); }
319cdf0e10cSrcweir
SetSnapSize(Size & rSz)320cdf0e10cSrcweir inline void SetSnapSize( Size &rSz ){ aSnapSize = rSz; }
GetSnapSize() const321cdf0e10cSrcweir inline const Size &GetSnapSize() const { return aSnapSize; }
322cdf0e10cSrcweir
IsGridVisible() const323cdf0e10cSrcweir inline sal_Bool IsGridVisible() const
324cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? sal_True : sal_False; }
SetGridVisible(sal_Bool b)325cdf0e10cSrcweir inline void SetGridVisible( sal_Bool b )
326cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRIDVISIBLE ) : ( nCoreOptions &= ~VIEWOPT_1_GRIDVISIBLE); }
327cdf0e10cSrcweir
IsOnlineSpell() const328cdf0e10cSrcweir inline sal_Bool IsOnlineSpell() const
329cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? sal_True : sal_False; }
SetOnlineSpell(sal_Bool b)330cdf0e10cSrcweir inline void SetOnlineSpell( sal_Bool b )
331cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL); }
332cdf0e10cSrcweir
IsViewMetaChars() const333cdf0e10cSrcweir inline sal_Bool IsViewMetaChars() const
334cdf0e10cSrcweir { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? sal_True : sal_False; }
SetViewMetaChars(sal_Bool b)335cdf0e10cSrcweir inline void SetViewMetaChars( sal_Bool b)
336cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_VIEWMETACHARS ) : ( nCoreOptions &= ~VIEWOPT_1_VIEWMETACHARS); }
337cdf0e10cSrcweir
IsSynchronize() const338cdf0e10cSrcweir inline sal_Bool IsSynchronize() const
339cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? sal_True : sal_False;}
SetSynchronize(sal_Bool b)340cdf0e10cSrcweir inline void SetSynchronize( sal_Bool b )
341cdf0e10cSrcweir { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SYNCHRONIZE ) : ( nCoreOptions &= ~VIEWOPT_1_SYNCHRONIZE); }
342cdf0e10cSrcweir
IsCrossHair() const343cdf0e10cSrcweir inline sal_Bool IsCrossHair() const
344cdf0e10cSrcweir { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? sal_True : sal_False; }
SetCrossHair(sal_Bool b)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 ----------------------------------------------------------------------------*/
IsBlackFont() const351cdf0e10cSrcweir inline sal_Bool IsBlackFont() const
352cdf0e10cSrcweir {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? sal_True : sal_False;}
353cdf0e10cSrcweir
SetBlackFont(sal_Bool b)354cdf0e10cSrcweir inline void SetBlackFont(sal_Bool b)
355cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BLACKFONT) : (nCore2Options &= ~VIEWOPT_CORE2_BLACKFONT);}
356cdf0e10cSrcweir
IsShowHiddenPara() const357cdf0e10cSrcweir inline sal_Bool IsShowHiddenPara() const
358cdf0e10cSrcweir {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? sal_True : sal_False;}
359cdf0e10cSrcweir
SetShowHiddenPara(sal_Bool b)360cdf0e10cSrcweir inline void SetShowHiddenPara(sal_Bool b)
361cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_HIDDENPARA) : (nCore2Options &= ~VIEWOPT_CORE2_HIDDENPARA);}
362cdf0e10cSrcweir
IsSmoothScroll() const363cdf0e10cSrcweir inline sal_Bool IsSmoothScroll() const
364cdf0e10cSrcweir {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? sal_True : sal_False;}
365cdf0e10cSrcweir
SetSmoothScroll(sal_Bool b)366cdf0e10cSrcweir inline void SetSmoothScroll(sal_Bool b)
367cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_SMOOTHSCROLL) : (nCore2Options &= ~VIEWOPT_CORE2_SMOOTHSCROLL);}
368cdf0e10cSrcweir
IsCursorInProtectedArea() const369cdf0e10cSrcweir inline sal_Bool IsCursorInProtectedArea() const
370cdf0e10cSrcweir {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? sal_True : sal_False;}
371cdf0e10cSrcweir
SetCursorInProtectedArea(sal_Bool b)372cdf0e10cSrcweir inline void SetCursorInProtectedArea(sal_Bool b)
373cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_CRSR_IN_PROT) : (nCore2Options &= ~VIEWOPT_CORE2_CRSR_IN_PROT);}
374cdf0e10cSrcweir
IsPDFExport() const375cdf0e10cSrcweir inline sal_Bool IsPDFExport() const
376cdf0e10cSrcweir {return nCore2Options & VIEWOPT_CORE2_PDF_EXPORT ? sal_True : sal_False;}
377cdf0e10cSrcweir
SetPDFExport(sal_Bool b)378cdf0e10cSrcweir inline void SetPDFExport(sal_Bool b)
379cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PDF_EXPORT) : (nCore2Options &= ~VIEWOPT_CORE2_PDF_EXPORT);}
380cdf0e10cSrcweir
IsPrinting() const381cdf0e10cSrcweir inline sal_Bool IsPrinting() const
382cdf0e10cSrcweir {return nCore2Options & VIEWOPT_CORE2_PRINTING ? sal_True : sal_False;}
383cdf0e10cSrcweir
SetPrinting(sal_Bool b)384cdf0e10cSrcweir inline void SetPrinting(sal_Bool b)
385cdf0e10cSrcweir { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PRINTING) : (nCore2Options &= ~VIEWOPT_CORE2_PRINTING);}
386cdf0e10cSrcweir
387cdf0e10cSrcweir /*---------------------------------------------------------------------------
388cdf0e10cSrcweir
389cdf0e10cSrcweir ----------------------------------------------------------------------------*/
390cdf0e10cSrcweir
391cdf0e10cSrcweir
GetDivisionX() const392cdf0e10cSrcweir inline short GetDivisionX() const { return nDivisionX; }
SetDivisionX(short n)393cdf0e10cSrcweir inline void SetDivisionX( short n ){ nDivisionX = n; }
GetDivisionY() const394cdf0e10cSrcweir inline short GetDivisionY() const { return nDivisionY; }
SetDivisionY(short n)395cdf0e10cSrcweir inline void SetDivisionY( short n ){ nDivisionY = n; }
396cdf0e10cSrcweir
GetPagePrevRow() const397cdf0e10cSrcweir inline sal_uInt8 GetPagePrevRow() const { return nPagePrevRow; }
SetPagePrevRow(sal_uInt8 n)398cdf0e10cSrcweir inline void SetPagePrevRow( sal_uInt8 n ) { nPagePrevRow = n; }
GetPagePrevCol() const399cdf0e10cSrcweir inline sal_uInt8 GetPagePrevCol() const { return nPagePrevCol; }
SetPagePrevCol(sal_uInt8 n)400cdf0e10cSrcweir inline void SetPagePrevCol( sal_uInt8 n ) { nPagePrevCol = n; }
IsReadonly() const401cdf0e10cSrcweir sal_Bool IsReadonly() const { return bReadonly; }
SetReadonly(sal_Bool bSet)402cdf0e10cSrcweir void SetReadonly(sal_Bool bSet) { bReadonly = bSet; }
403cdf0e10cSrcweir
IsSelectionInReadonly() const404cdf0e10cSrcweir sal_Bool IsSelectionInReadonly() const {return bSelectionInReadonly;}
SetSelectionInReadonly(sal_Bool bSet)405cdf0e10cSrcweir void SetSelectionInReadonly(sal_Bool bSet) {bSelectionInReadonly = bSet;}
406cdf0e10cSrcweir
IsFormView() const407cdf0e10cSrcweir sal_Bool IsFormView() const { return mbFormView; }
SetFormView(sal_Bool bSet)408cdf0e10cSrcweir void SetFormView( sal_Bool bSet ) { mbFormView = bSet; }
409cdf0e10cSrcweir // <--
410cdf0e10cSrcweir
getBrowseMode() const411cdf0e10cSrcweir inline sal_Bool getBrowseMode() const { return mbBrowseMode; }
setBrowseMode(sal_Bool bSet)412cdf0e10cSrcweir inline void setBrowseMode(sal_Bool bSet) { mbBrowseMode = bSet; }
IsPagePrevBookview() const413cdf0e10cSrcweir inline sal_Bool IsPagePrevBookview() const { return mbBookView; }
SetPagePrevBookview(sal_Bool bSet)414cdf0e10cSrcweir inline void SetPagePrevBookview(sal_Bool bSet) { mbBookView = bSet; }
415cdf0e10cSrcweir
416cdf0e10cSrcweir sal_Bool IsAutoCompleteWords() const;
417cdf0e10cSrcweir
418cdf0e10cSrcweir // PAGES01
IsViewLayoutBookMode() const419cdf0e10cSrcweir bool IsViewLayoutBookMode() const { return mbViewLayoutBookMode; }
SetViewLayoutBookMode(bool bNew)420cdf0e10cSrcweir void SetViewLayoutBookMode( bool bNew ) { mbViewLayoutBookMode = bNew; }
GetViewLayoutColumns() const421cdf0e10cSrcweir sal_uInt16 GetViewLayoutColumns() const { return mnViewLayoutColumns; }
SetViewLayoutColumns(sal_uInt16 nNew)422cdf0e10cSrcweir void SetViewLayoutColumns( sal_uInt16 nNew ) { mnViewLayoutColumns = nNew; }
423cdf0e10cSrcweir
424cdf0e10cSrcweir #ifdef DBG_UTIL
425cdf0e10cSrcweir // korrespondieren zu den Angaben in ui/config/cfgvw.src
IsTest1() const426cdf0e10cSrcweir inline sal_Bool IsTest1() const { return bTest1; }
SetTest1(sal_Bool b)427cdf0e10cSrcweir inline void SetTest1( sal_Bool b ) { bTest1 = b; }
IsTest2() const428cdf0e10cSrcweir inline sal_Bool IsTest2() const { return bTest2; }
SetTest2(sal_Bool b)429cdf0e10cSrcweir inline void SetTest2( sal_Bool b ) { bTest2 = b; }
IsTest3() const430cdf0e10cSrcweir inline sal_Bool IsTest3() const { return bTest3; }
SetTest3(sal_Bool b)431cdf0e10cSrcweir inline void SetTest3( sal_Bool b ) { bTest3 = b; }
IsTest4() const432cdf0e10cSrcweir inline sal_Bool IsTest4() const { return bTest4; }
SetTest4(sal_Bool b)433cdf0e10cSrcweir inline void SetTest4( sal_Bool b ) { bTest4 = b; }
IsTest5() const434cdf0e10cSrcweir inline sal_Bool IsTest5() const { return bTest5; }
SetTest5(sal_Bool b)435cdf0e10cSrcweir inline void SetTest5( sal_Bool b ) { bTest5 = b; }
IsTest6() const436cdf0e10cSrcweir inline sal_Bool IsTest6() const { return bTest6; }
SetTest6(sal_Bool b)437cdf0e10cSrcweir inline void SetTest6( sal_Bool b ) { bTest6 = b; }
IsTest7() const438cdf0e10cSrcweir inline sal_Bool IsTest7() const { return bTest7; }
SetTest7(sal_Bool b)439cdf0e10cSrcweir inline void SetTest7( sal_Bool b ) { bTest7 = b; }
IsTest8() const440cdf0e10cSrcweir inline sal_Bool IsTest8() const { return bTest8; }
SetTest8(sal_Bool b)441cdf0e10cSrcweir inline void SetTest8( sal_Bool b ) { bTest8 = b; }
IsTest9()442cdf0e10cSrcweir static inline sal_Bool IsTest9() { return bTest9; }
SetTest9(sal_Bool b)443cdf0e10cSrcweir static inline void SetTest9( sal_Bool b ) { bTest9 = b; }
IsTest10() const444cdf0e10cSrcweir inline sal_Bool IsTest10() const { return bTest10; }
SetTest10(sal_Bool b)445cdf0e10cSrcweir inline void SetTest10( sal_Bool b ) { bTest10 = b; }
446cdf0e10cSrcweir #endif
447cdf0e10cSrcweir
GetZoom() const448cdf0e10cSrcweir inline sal_uInt16 GetZoom() const { return nZoom; }
SetZoom(sal_uInt16 n)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;
operator !=(const SwViewOption & rOpt) const458cdf0e10cSrcweir inline sal_Bool operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); }
459cdf0e10cSrcweir
460cdf0e10cSrcweir
461cdf0e10cSrcweir /*---------------------------------------------------------------------------
462cdf0e10cSrcweir Optionen aus nUIOptions
463cdf0e10cSrcweir ----------------------------------------------------------------------------*/
464cdf0e10cSrcweir
IsViewVScrollBar() const465cdf0e10cSrcweir sal_Bool IsViewVScrollBar() const
466cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? sal_True : sal_False; }
IsViewHScrollBar() const467cdf0e10cSrcweir sal_Bool IsViewHScrollBar() const
468cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? sal_True : sal_False; }
IsKeepRatio() const469cdf0e10cSrcweir sal_Bool IsKeepRatio() const
470cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? sal_True : sal_False; }
IsGrfKeepZoom() const471cdf0e10cSrcweir sal_Bool IsGrfKeepZoom() const
472cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? sal_True : sal_False; }
IsShowContentTips() const473ef785786SAriel Constenla-Haile sal_Bool IsShowContentTips() const
474ef785786SAriel Constenla-Haile { return nUIOptions & VIEWOPT_2_CONTENT_TIPS ? sal_True : sal_False; }
IsPrtFormat() const475cdf0e10cSrcweir sal_Bool IsPrtFormat() const
476cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_PRTFORMAT ? sal_True : sal_False; }
IsShowScrollBarTips() const477*a41e6500SAriel Constenla-Haile sal_Bool IsShowScrollBarTips() const
478*a41e6500SAriel Constenla-Haile { return nUIOptions & VIEWOPT_2_SCROLLBAR_TIPS ? sal_True : sal_False; }
479cdf0e10cSrcweir
GetZoomType() const480cdf0e10cSrcweir SvxZoomType GetZoomType() const { return eZoom; }
481cdf0e10cSrcweir
GetTblDest() const482cdf0e10cSrcweir sal_uInt8 GetTblDest() const { return nTblDest; }
483cdf0e10cSrcweir
SetViewVScrollBar(sal_Bool b)484cdf0e10cSrcweir void SetViewVScrollBar(sal_Bool b)
485cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_VSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_VSCROLLBAR); }
SetViewHScrollBar(sal_Bool b)486cdf0e10cSrcweir void SetViewHScrollBar(sal_Bool b)
487cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_HSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_HSCROLLBAR); }
SetKeepRatio(sal_Bool b)488cdf0e10cSrcweir void SetKeepRatio (sal_Bool b)
489cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_KEEPASPECTRATIO ) : ( nUIOptions &= ~VIEWOPT_2_KEEPASPECTRATIO); }
SetGrfKeepZoom(sal_Bool b)490cdf0e10cSrcweir void SetGrfKeepZoom (sal_Bool b)
491cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_GRFKEEPZOOM ) : ( nUIOptions &= ~VIEWOPT_2_GRFKEEPZOOM); }
SetShowContentTips(sal_Bool b)492ef785786SAriel Constenla-Haile void SetShowContentTips( sal_Bool b)
493ef785786SAriel Constenla-Haile { b ? (nUIOptions |= VIEWOPT_2_CONTENT_TIPS) : (nUIOptions &= ~VIEWOPT_2_CONTENT_TIPS); }
SetPrtFormat(sal_Bool b)494cdf0e10cSrcweir void SetPrtFormat( sal_Bool b)
495cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_PRTFORMAT) : (nUIOptions &= ~VIEWOPT_2_PRTFORMAT); }
SetShowScrollBarTips(sal_Bool b)496*a41e6500SAriel Constenla-Haile void SetShowScrollBarTips( sal_Bool b)
497*a41e6500SAriel Constenla-Haile { b ? (nUIOptions |= VIEWOPT_2_SCROLLBAR_TIPS) : (nUIOptions &= ~VIEWOPT_2_SCROLLBAR_TIPS); }
498cdf0e10cSrcweir
SetZoomType(SvxZoomType eZoom_)499cdf0e10cSrcweir void SetZoomType (SvxZoomType eZoom_){ eZoom = eZoom_; }
SetTblDest(sal_uInt8 nNew)500cdf0e10cSrcweir void SetTblDest( sal_uInt8 nNew ) { nTblDest = nNew; }
501cdf0e10cSrcweir
GetSymbolFont() const502cdf0e10cSrcweir const String& GetSymbolFont() const {return sSymbolFont;}
SetSymbolFont(const String & sSet)503cdf0e10cSrcweir void SetSymbolFont(const String& sSet) {sSymbolFont = sSet;}
504cdf0e10cSrcweir
GetRetoucheColor() const505cdf0e10cSrcweir const Color& GetRetoucheColor() const { return aRetoucheColor;}
SetRetoucheColor(const Color & r)506cdf0e10cSrcweir void SetRetoucheColor(const Color&r) { aRetoucheColor = r; }
507cdf0e10cSrcweir
IsViewAnyRuler() const508cdf0e10cSrcweir sal_Bool IsViewAnyRuler() const {return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);}
SetViewAnyRuler(sal_Bool bSet)509cdf0e10cSrcweir void SetViewAnyRuler(sal_Bool bSet)
510cdf0e10cSrcweir { bSet ? (nUIOptions |= VIEWOPT_2_ANY_RULER) : (nUIOptions &= ~VIEWOPT_2_ANY_RULER);}
511cdf0e10cSrcweir
IsViewHRuler(sal_Bool bDirect=sal_False) const512cdf0e10cSrcweir sal_Bool IsViewHRuler(sal_Bool bDirect = sal_False) const
513cdf0e10cSrcweir {
514cdf0e10cSrcweir sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect ?
515cdf0e10cSrcweir 0 != (nUIOptions & VIEWOPT_2_H_RULER) :
516cdf0e10cSrcweir !bReadonly ?
517cdf0e10cSrcweir (nUIOptions & (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)
518cdf0e10cSrcweir : sal_False );
519cdf0e10cSrcweir return bRet;
520cdf0e10cSrcweir
521cdf0e10cSrcweir }
SetViewHRuler(sal_Bool b)522cdf0e10cSrcweir void SetViewHRuler (sal_Bool b)
523cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_H_RULER ) : ( nUIOptions &= ~VIEWOPT_2_H_RULER);}
524cdf0e10cSrcweir
IsViewVRuler(sal_Bool bDirect=sal_False) const525cdf0e10cSrcweir sal_Bool IsViewVRuler(sal_Bool bDirect = sal_False) const
526cdf0e10cSrcweir {
527cdf0e10cSrcweir sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect ?
528cdf0e10cSrcweir 0 !=(nUIOptions & VIEWOPT_2_V_RULER) :
529cdf0e10cSrcweir !bReadonly ?
530cdf0e10cSrcweir (nUIOptions &
531cdf0e10cSrcweir (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)
532cdf0e10cSrcweir : sal_False );
533cdf0e10cSrcweir return bRet;
534cdf0e10cSrcweir }
SetViewVRuler(sal_Bool b)535cdf0e10cSrcweir void SetViewVRuler (sal_Bool b)
536cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_V_RULER ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER);}
537cdf0e10cSrcweir
538cdf0e10cSrcweir // ShadowCursor ein schalten/abfragen/Farbe setzen/Modus setzen
IsShadowCursor() const539cdf0e10cSrcweir sal_Bool IsShadowCursor() const
540cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? sal_True : sal_False; }
SetShadowCursor(sal_Bool b)541cdf0e10cSrcweir void SetShadowCursor(sal_Bool b)
542cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_SHADOWCRSR ) : ( nUIOptions &= ~VIEWOPT_2_SHADOWCRSR); }
543cdf0e10cSrcweir
544cdf0e10cSrcweir //move vertical ruler to the right
IsVRulerRight() const545cdf0e10cSrcweir sal_Bool IsVRulerRight() const
546cdf0e10cSrcweir { return nUIOptions & VIEWOPT_2_V_RULER_RIGHT ? sal_True : sal_False; }
SetVRulerRight(sal_Bool b)547cdf0e10cSrcweir void SetVRulerRight(sal_Bool b)
548cdf0e10cSrcweir { b ? (nUIOptions |= VIEWOPT_2_V_RULER_RIGHT ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER_RIGHT); }
549cdf0e10cSrcweir
IsStarOneSetting() const550cdf0e10cSrcweir sal_Bool IsStarOneSetting() const {return bStarOneSetting; }
SetStarOneSetting(sal_Bool bSet)551cdf0e10cSrcweir void SetStarOneSetting(sal_Bool bSet) {bStarOneSetting = bSet; }
552cdf0e10cSrcweir
IsPagePreview() const553cdf0e10cSrcweir sal_Bool IsPagePreview() const {return bIsPagePreview; }
SetPagePreview(sal_Bool bSet)554cdf0e10cSrcweir void SetPagePreview(sal_Bool bSet) { bIsPagePreview= bSet; }
555cdf0e10cSrcweir
GetShdwCrsrFillMode() const556cdf0e10cSrcweir sal_uInt8 GetShdwCrsrFillMode() const { return nShdwCrsrFillMode; }
SetShdwCrsrFillMode(sal_uInt8 nMode)557cdf0e10cSrcweir void SetShdwCrsrFillMode( sal_uInt8 nMode ) { nShdwCrsrFillMode = nMode; };
558cdf0e10cSrcweir
IsShowPlaceHolderFields() const559cdf0e10cSrcweir sal_Bool IsShowPlaceHolderFields() const { return bShowPlaceHolderFields; }
SetShowPlaceHolderFields(sal_Bool bSet)560cdf0e10cSrcweir void SetShowPlaceHolderFields(sal_Bool bSet) { bShowPlaceHolderFields = bSet; }
561cdf0e10cSrcweir
562cdf0e10cSrcweir static Color& GetDocColor();
563cdf0e10cSrcweir static Color& GetDocBoundariesColor();
564cdf0e10cSrcweir static Color& GetAppBackgroundColor();
565cdf0e10cSrcweir static Color& GetObjectBoundariesColor();
566cdf0e10cSrcweir static Color& GetTableBoundariesColor();
567cdf0e10cSrcweir static Color& GetIndexShadingsColor();
568cdf0e10cSrcweir static Color& GetLinksColor();
569cdf0e10cSrcweir static Color& GetVisitedLinksColor();
570cdf0e10cSrcweir static Color& GetDirectCursorColor();
571cdf0e10cSrcweir static Color& GetTextGridColor();
572cdf0e10cSrcweir static Color& GetSpellColor();
573cdf0e10cSrcweir static Color& GetSmarttagColor();
574cdf0e10cSrcweir SW_DLLPUBLIC static Color& GetFontColor();
575cdf0e10cSrcweir static Color& GetFieldShadingsColor();
576cdf0e10cSrcweir static Color& GetSectionBoundColor();
577cdf0e10cSrcweir static Color& GetPageBreakColor();
578cdf0e10cSrcweir
579cdf0e10cSrcweir static sal_Bool IsAppearanceFlag(sal_Int32 nFlag);
580cdf0e10cSrcweir
IsDocBoundaries()581cdf0e10cSrcweir static sal_Bool IsDocBoundaries() {return IsAppearanceFlag(VIEWOPT_DOC_BOUNDARIES);}
IsObjectBoundaries()582cdf0e10cSrcweir static sal_Bool IsObjectBoundaries(){return IsAppearanceFlag(VIEWOPT_OBJECT_BOUNDARIES);}
IsTableBoundaries()583cdf0e10cSrcweir static sal_Bool IsTableBoundaries() {return IsAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES );}
IsIndexShadings()584cdf0e10cSrcweir static sal_Bool IsIndexShadings() {return IsAppearanceFlag(VIEWOPT_INDEX_SHADINGS );}
IsLinks()585cdf0e10cSrcweir static sal_Bool IsLinks() {return IsAppearanceFlag(VIEWOPT_LINKS );}
IsVisitedLinks()586cdf0e10cSrcweir static sal_Bool IsVisitedLinks() {return IsAppearanceFlag(VIEWOPT_VISITED_LINKS );}
IsFieldShadings()587cdf0e10cSrcweir static sal_Bool IsFieldShadings() {return IsAppearanceFlag(VIEWOPT_FIELD_SHADINGS);}
IsSectionBoundaries()588cdf0e10cSrcweir static sal_Bool IsSectionBoundaries() {return IsAppearanceFlag(VIEWOPT_SECTION_BOUNDARIES);}
589cdf0e10cSrcweir
590cdf0e10cSrcweir static void SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig = sal_False);
591cdf0e10cSrcweir
SetDocBoundaries(sal_Bool bSet)592cdf0e10cSrcweir void SetDocBoundaries(sal_Bool bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);}
593cdf0e10cSrcweir
594cdf0e10cSrcweir static void ApplyColorConfigValues(const svtools::ColorConfig& rConfig);
595cdf0e10cSrcweir };
596cdf0e10cSrcweir
597cdf0e10cSrcweir
operator ==(const SwViewOption & rOpt) const598cdf0e10cSrcweir inline sal_Bool SwViewOption::operator==( const SwViewOption &rOpt ) const
599cdf0e10cSrcweir {
600cdf0e10cSrcweir return IsEqualFlags( rOpt ) && nZoom == rOpt.GetZoom();
601cdf0e10cSrcweir }
602cdf0e10cSrcweir
SetUIOptions(const SwViewOption & rVOpt)603cdf0e10cSrcweir inline void SwViewOption::SetUIOptions( const SwViewOption& rVOpt )
604cdf0e10cSrcweir {
605cdf0e10cSrcweir nUIOptions = rVOpt.nUIOptions;
606cdf0e10cSrcweir nTblDest = rVOpt.nTblDest;
607cdf0e10cSrcweir nShdwCrsrFillMode = rVOpt.nShdwCrsrFillMode;
608cdf0e10cSrcweir }
609cdf0e10cSrcweir
610cdf0e10cSrcweir
611cdf0e10cSrcweir // Hilfsfunktion zur Ermittlung der HTML-Faehigkeiten
612cdf0e10cSrcweir SW_DLLPUBLIC sal_uInt16 GetHtmlMode(const SwDocShell*);
613cdf0e10cSrcweir
614cdf0e10cSrcweir
615cdf0e10cSrcweir #endif
616