Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_sw / viewopt.hxx
blob1f844bdb09f19b76639b8bb003ed7ce75e374bf7
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: viewopt.hxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _VIEWOPT_HXX
31 #define _VIEWOPT_HXX
33 #ifndef _GEN_HXX //autogen
34 #include <tools/gen.hxx>
35 #endif
36 #ifndef _STRING_HXX //autogen
37 #include <tools/string.hxx>
38 #endif
39 #ifndef _COLOR_HXX //autogen
40 #include <tools/color.hxx>
41 #endif
43 class Window;
44 class OutputDevice;
46 namespace binfilter {
47 class ColorConfig;
48 class SwRect;
49 class ViewShell;
50 class SwDocShell;
52 #define VIEWOPT_1_IDLE 0x00000001L
53 #define VIEWOPT_1_TAB 0x00000002L
54 #define VIEWOPT_1_BLANK 0x00000004L
55 #define VIEWOPT_1_HARDBLANK 0x00000008L
56 #define VIEWOPT_1_PARAGRAPH 0x00000010L
57 #define VIEWOPT_1_LINEBREAK 0x00000020L
58 #define VIEWOPT_1_PAGEBREAK 0x00000040L
59 #define VIEWOPT_1_COLUMNBREAK 0x00000080L
60 #define VIEWOPT_1_SOFTHYPH 0x00000100L
62 #define VIEWOPT_1_REF 0x00000400L
63 #define VIEWOPT_1_FLDNAME 0x00000800L
64 //#define 0x00001000L
65 //#define 0x00002000L
66 #define VIEWOPT_1_POSTITS 0x00004000L
67 #define VIEWOPT_1_HIDDEN 0x00008000L
68 //#define 0x00010000L
69 #define VIEWOPT_1_GRAPHIC 0x00020000L
70 #define VIEWOPT_1_TABLE 0x00040000L
71 #define VIEWOPT_1_DRAW 0x00080000L
72 #define VIEWOPT_1_CONTROL 0x00100000L
73 //#define 0x00200000L
74 #define VIEWOPT_1_CROSSHAIR 0x00400000L
75 #define VIEWOPT_1_SNAP 0x00800000L
76 #define VIEWOPT_1_SYNCHRONIZE 0x01000000L
77 #define VIEWOPT_1_GRIDVISIBLE 0x02000000L
78 #define VIEWOPT_1_ONLINESPELL 0x04000000L
79 #define VIEWOPT_1_HIDESPELL 0x08000000L
80 #define VIEWOPT_1_RESERVED1 0x10000000L
81 #define VIEWOPT_1_VIEWMETACHARS 0x20000000L
82 #define VIEWOPT_1_PAGEBACK 0x40000000L
83 #define VIEWOPT_1_SOLIDMARKHDL 0x80000000L
85 #define VIEWOPT_CORE2_BLACKFONT 0x00000001L
86 #define VIEWOPT_CORE2_HIDDENPARA 0x00000002L
87 #define VIEWOPT_CORE2_SMOOTHSCROLL 0x00000004L
88 #define VIEWOPT_CORE2_CRSR_IN_PROT 0x00000008L
89 #define VIEWOPT_CORE2_PDF_EXPORT 0x00000010L
92 #define VIEWOPT_CORE2_BIGMARKHDL 0x00000040L
94 #define VIEWOPT_2_UNUSED1 0x00000100L
95 #define VIEWOPT_2_UNUSED2 0x00000200L
96 #define VIEWOPT_2_H_RULER 0x00000400L
97 #define VIEWOPT_2_VSCROLLBAR 0x00000800L
98 #define VIEWOPT_2_HSCROLLBAR 0x00001000L
99 #define VIEWOPT_2_STATUSLINE 0x00002000L
100 #define VIEWOPT_2_V_RULER 0x00004000L
101 #define VIEWOPT_2_ANY_RULER 0x00008000L
102 #define VIEWOPT_2_MODIFIED 0x00010000L
103 #define VIEWOPT_2_KEEPASPECTRATIO 0x00020000L
104 #define VIEWOPT_2_GRFKEEPZOOM 0x00040000L
105 #define VIEWOPT_2_EXECHYPERLINKS 0x00080000L
106 #define VIEWOPT_2_PREVENT_TIPS 0x00100000L
107 #define VIEWOPT_2_RESERVED3 0x00200000L
108 #define VIEWOPT_2_RESERVED4 0x00400000L
109 #define VIEWOPT_2_PRTFORMAT 0x00800000L
110 #define VIEWOPT_2_SHADOWCRSR 0x01000000L
111 #define VIEWOPT_2_V_RULER_RIGHT 0x02000000L
113 //Tabellenhintergrund
114 #define TBL_DEST_CELL 0
115 #define TBL_DEST_ROW 1
116 #define TBL_DEST_TBL 2
118 //Appearance flags
119 #define VIEWOPT_DOC_BOUNDARIES 0x0001
120 #define VIEWOPT_OBJECT_BOUNDARIES 0x0002
121 #define VIEWOPT_TABLE_BOUNDARIES 0x0004
122 #define VIEWOPT_INDEX_SHADINGS 0x0008
123 #define VIEWOPT_LINKS 0x0010
124 #define VIEWOPT_VISITED_LINKS 0x0020
125 #define VIEWOPT_FIELD_SHADINGS 0x0040
126 #define VIEWOPT_SECTION_BOUNDARIES 0x0080
128 // Implementierung in core/text/txtpaint.cxx
129 extern void SyncVout( const OutputDevice *pOut );
131 class SwViewOption
133 static Color aDocColor; // color of document boundaries
134 static Color aDocBoundColor; // color of document boundaries
135 static Color aObjectBoundColor; // color of object boundaries
136 static Color aAppBackgroundColor; // application background
137 static Color aTableBoundColor; // color of table boundaries
138 static Color aFontColor;
139 static Color aIndexShadingsColor; // background color of indexes
140 static Color aLinksColor;
141 static Color aVisitedLinksColor;
142 static Color aDirectCursorColor;
143 static Color aTextGridColor;
144 static Color aSpellColor; // mark color of online spell checking
145 static Color aFieldShadingsColor;
146 static Color aSectionBoundColor;
147 static Color aPageBreakColor;
148 static Color aNotesIndicatorColor;
149 static Color aScriptIndicatorColor;
151 static sal_Int32 nAppearanceFlags; //
152 protected:
153 static USHORT nPixelTwips;// 1 Pixel == ? Twips
155 String sSymbolFont; // Symbolzeichensatz
156 UINT32 nCoreOptions; // Bits fuer die ViewShell
157 UINT32 nCore2Options; // Bits fuer die ViewShell
158 UINT32 nUIOptions; // UI-Bits
159 Color aRetoucheColor; // DefaultBackground fuer BrowseView
160 Size aSnapSize; // Beschreibt hori. wie vert. Snap
161 short nDivisionX; // Rasterunterteilung
162 short nDivisionY;
163 BYTE nPagePrevRow; // Page Preview Row/Columns
164 BYTE nPagePrevCol; // Page Preview Row/Columns
165 BYTE nShdwCrsrFillMode; // FillMode fuer den ShadowCrsr
166 BOOL bReadonly : 1; // Readonly-Doc
167 BOOL bStarOneSetting : 1;// prevent from UI automatics (no scrollbars in readonly documents)
168 BOOL bIsPagePreview : 1; // the preview mustn't print field/footnote/... shadings
169 BOOL bSelectionInReadonly : 1; //determines whether selection is switched on in readonly documents
171 // Maszstab
172 USHORT nZoom; // Angaben in Prozent
173 BYTE eZoom; // 'enum' fuer Zoom
174 BYTE nTblDest; // Ziel fuer Tabellenhintergrund
176 #ifndef PRODUCT
177 // korrespondieren zu den Angaben in ui/config/cfgvw.src
178 BOOL bTest1 :1; // Test-Flag "Layout not loading"
179 BOOL bTest2 :1; // Test-Flag "WYSIWYG++"
180 BOOL bTest3 :1; // Test-Flag ""
181 BOOL bTest4 :1; // Test-Flag "WYSIWYG debug"
182 BOOL bTest5 :1; // Test-Flag "No idle format"
183 BOOL bTest6 :1; // Test-Flag "No screen adj"
184 BOOL bTest7 :1; // Test-Flag "win format"
185 BOOL bTest8 :1; // Test-Flag ""
186 static BOOL bTest9; // Test-Flag "DrawingLayerNotLoading"
187 BOOL bTest10 :1; // Test-Flag "Format by Input"
188 #endif
190 public:
191 SwViewOption(); // CTOR
192 SwViewOption(const SwViewOption&); //
193 ~SwViewOption(); //
195 void Init( Window *pWin ); // Initialisierung der statischen Daten
197 USHORT GetPixelTwips() const { return nPixelTwips; }
199 inline UINT32 GetCoreOptions() const {return nCoreOptions;}
200 inline UINT32 GetUIOptions() const {return nUIOptions;}
201 inline void SetUIOptions( const SwViewOption& );
203 /*---------------------------------------------------------------------------
204 Optionen aus nCoreOptions
205 ----------------------------------------------------------------------------*/
207 inline BOOL IsIdle() const
208 { return nCoreOptions & VIEWOPT_1_IDLE ? TRUE : FALSE; }
209 inline void SetIdle( BOOL b )
210 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_IDLE ) : ( nCoreOptions &= ~VIEWOPT_1_IDLE); }
212 inline BOOL IsTab(BOOL bHard = FALSE) const
213 { return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) &&
214 ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
215 ? TRUE : FALSE; }
216 inline void SetTab( BOOL b ) {
217 (b != 0) ? (nCoreOptions |= VIEWOPT_1_TAB ) : ( nCoreOptions &= ~VIEWOPT_1_TAB); }
219 #ifdef VERTICAL_LAYOUT
220 #else
221 #endif
223 inline BOOL IsBlank(BOOL bHard = FALSE) const
224 { return !bReadonly && (nCoreOptions & VIEWOPT_1_BLANK) &&
225 ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
226 ? TRUE : FALSE; }
227 inline void SetBlank( BOOL b )
228 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_BLANK ) : ( nCoreOptions &= ~VIEWOPT_1_BLANK); }
230 inline BOOL IsHardBlank() const
231 { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? TRUE : FALSE; }
232 inline void SetHardBlank( BOOL b )
233 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_HARDBLANK ) : ( nCoreOptions &= ~VIEWOPT_1_HARDBLANK); }
235 inline BOOL IsParagraph(BOOL bHard = FALSE) const
236 { return !bReadonly && (nCoreOptions & VIEWOPT_1_PARAGRAPH) &&
237 ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
238 ? TRUE : FALSE; }
239 inline void SetParagraph( BOOL b )
240 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PARAGRAPH ) : ( nCoreOptions &= ~VIEWOPT_1_PARAGRAPH); }
242 inline BOOL IsLineBreak(BOOL bHard = FALSE) const
243 { return !bReadonly && (nCoreOptions & VIEWOPT_1_LINEBREAK) &&
244 ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
245 ? TRUE : FALSE; }
246 inline void SetLineBreak( BOOL b )
247 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_LINEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_LINEBREAK); }
248 #ifdef VERTICAL_LAYOUT
249 #else
250 #endif
252 inline BOOL IsPageBreak() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_PAGEBREAK) ? TRUE : FALSE; }
253 inline void SetPageBreak( BOOL b )
254 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBREAK); }
256 inline BOOL IsColumnBreak() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_COLUMNBREAK) ? TRUE : FALSE; }
257 inline void SetColumnBreak( BOOL b)
258 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_COLUMNBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_COLUMNBREAK); }
260 inline BOOL IsSoftHyph() const
261 { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? TRUE : FALSE; }
262 inline void SetSoftHyph( BOOL b )
263 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOFTHYPH ) : ( nCoreOptions &= ~VIEWOPT_1_SOFTHYPH); }
265 inline BOOL IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? TRUE : FALSE; }
266 inline void SetFldName( BOOL b )
267 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLDNAME ) : ( nCoreOptions &= ~VIEWOPT_1_FLDNAME); }
269 inline BOOL IsPostIts() const
270 { return !bReadonly && (nCoreOptions & VIEWOPT_1_POSTITS) ? TRUE : FALSE; }
271 inline void SetPostIts( BOOL b )
272 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_POSTITS ) : ( nCoreOptions &= ~VIEWOPT_1_POSTITS); }
274 inline BOOL IsHidden() const
275 { return !bReadonly && (nCoreOptions & VIEWOPT_1_HIDDEN) ? TRUE : FALSE; }
276 inline void SetHidden( BOOL b )
277 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_HIDDEN); }
279 inline BOOL IsGraphic() const
280 { return nCoreOptions & VIEWOPT_1_GRAPHIC ? TRUE : FALSE; }
281 inline void SetGraphic( BOOL b )
282 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRAPHIC ) : ( nCoreOptions &= ~VIEWOPT_1_GRAPHIC); }
284 inline BOOL IsPageBack() const
285 { return nCoreOptions & VIEWOPT_1_PAGEBACK ? TRUE : FALSE; }
286 inline void SetPageBack( BOOL b )
287 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBACK) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBACK); }
289 inline BOOL IsSolidMarkHdl() const
290 { return nCoreOptions & VIEWOPT_1_SOLIDMARKHDL ? TRUE : FALSE; }
291 inline void SetSolidMarkHdl( BOOL b )
292 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOLIDMARKHDL) : ( nCoreOptions &= ~VIEWOPT_1_SOLIDMARKHDL); }
294 inline BOOL IsBigMarkHdl() const
295 { return nCore2Options & VIEWOPT_CORE2_BIGMARKHDL ? TRUE : FALSE;}
296 inline void SetBigMarkHdl(BOOL b)
297 { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BIGMARKHDL ) : (nCore2Options &= ~VIEWOPT_CORE2_BIGMARKHDL);}
299 inline BOOL IsTable() const
300 { return nCoreOptions & VIEWOPT_1_TABLE ? TRUE : FALSE; }
301 inline void SetTable( BOOL b )
302 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_TABLE ) : ( nCoreOptions &= ~VIEWOPT_1_TABLE); }
304 inline BOOL IsDraw() const
305 { return nCoreOptions & VIEWOPT_1_DRAW ? TRUE : FALSE; }
306 inline void SetDraw( BOOL b )
307 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_DRAW ) : ( nCoreOptions &= ~VIEWOPT_1_DRAW); }
309 inline BOOL IsControl() const
310 { return nCoreOptions & VIEWOPT_1_CONTROL ? TRUE : FALSE; }
311 inline void SetControl( BOOL b )
312 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CONTROL ) : ( nCoreOptions &= ~VIEWOPT_1_CONTROL); }
314 inline BOOL IsSnap() const
315 { return nCoreOptions & VIEWOPT_1_SNAP ? TRUE : FALSE; }
316 inline void SetSnap( BOOL b )
317 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SNAP ) : ( nCoreOptions &= ~VIEWOPT_1_SNAP); }
319 inline void SetSnapSize( Size &rSz ){ aSnapSize = rSz; }
320 inline const Size &GetSnapSize() const { return aSnapSize; }
322 inline BOOL IsGridVisible() const
323 { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? TRUE : FALSE; }
324 inline void SetGridVisible( BOOL b )
325 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRIDVISIBLE ) : ( nCoreOptions &= ~VIEWOPT_1_GRIDVISIBLE); }
327 inline BOOL IsOnlineSpell() const
328 { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? TRUE : FALSE; }
329 inline void SetOnlineSpell( BOOL b )
330 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL); }
332 inline BOOL IsHideSpell() const
333 { return nCoreOptions & VIEWOPT_1_HIDESPELL ? TRUE : FALSE; }
334 inline void SetHideSpell( BOOL b )
335 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_HIDESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_HIDESPELL); }
337 inline BOOL IsViewMetaChars() const
338 { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? TRUE : FALSE; }
339 inline void SetViewMetaChars( BOOL b)
340 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_VIEWMETACHARS ) : ( nCoreOptions &= ~VIEWOPT_1_VIEWMETACHARS); }
342 inline BOOL IsSynchronize() const
343 { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? TRUE : FALSE;}
344 inline void SetSynchronize( BOOL b )
345 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SYNCHRONIZE ) : ( nCoreOptions &= ~VIEWOPT_1_SYNCHRONIZE); }
347 inline BOOL IsCrossHair() const
348 { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? TRUE : FALSE; }
349 inline void SetCrossHair( BOOL b )
350 { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CROSSHAIR ) : ( nCoreOptions &= ~VIEWOPT_1_CROSSHAIR); }
352 /*---------------------------------------------------------------------------
353 Optionen aus nCore2Options
354 ----------------------------------------------------------------------------*/
355 inline BOOL IsBlackFont() const
356 {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? TRUE : FALSE;}
358 inline void SetBlackFont(BOOL b)
359 { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BLACKFONT) : (nCore2Options &= ~VIEWOPT_CORE2_BLACKFONT);}
361 inline BOOL IsShowHiddenPara() const
362 {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? TRUE : FALSE;}
364 inline void SetShowHiddenPara(BOOL b)
365 { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_HIDDENPARA) : (nCore2Options &= ~VIEWOPT_CORE2_HIDDENPARA);}
367 inline BOOL IsSmoothScroll() const
368 {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? TRUE : FALSE;}
370 inline void SetSmoothScroll(BOOL b)
371 { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_SMOOTHSCROLL) : (nCore2Options &= ~VIEWOPT_CORE2_SMOOTHSCROLL);}
373 inline BOOL IsCursorInProtectedArea() const
374 {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? TRUE : FALSE;}
376 inline void SetCursorInProtectedArea(BOOL b)
377 { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_CRSR_IN_PROT) : (nCore2Options &= ~VIEWOPT_CORE2_CRSR_IN_PROT);}
379 inline BOOL IsPDFExport() const
380 {return nCore2Options & VIEWOPT_CORE2_PDF_EXPORT ? TRUE : FALSE;}
382 inline void SetPDFExport(BOOL b)
383 { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PDF_EXPORT) : (nCore2Options &= ~VIEWOPT_CORE2_PDF_EXPORT);}
385 /*---------------------------------------------------------------------------
387 ----------------------------------------------------------------------------*/
390 inline short GetDivisionX() const { return nDivisionX; }
391 inline void SetDivisionX( short n ){ nDivisionX = n; }
392 inline short GetDivisionY() const { return nDivisionY; }
393 inline void SetDivisionY( short n ){ nDivisionY = n; }
395 inline BYTE GetPagePrevRow() const { return nPagePrevRow; }
396 inline void SetPagePrevRow( BYTE n ) { nPagePrevRow = n; }
397 inline BYTE GetPagePrevCol() const { return nPagePrevCol; }
398 inline void SetPagePrevCol( BYTE n ) { nPagePrevCol = n; }
399 BOOL IsReadonly() const { return bReadonly; }
400 void SetReadonly(BOOL bSet) { bReadonly = bSet; }
402 BOOL IsSelectionInReadonly() const {return bSelectionInReadonly;}
403 void SetSelectionInReadonly(BOOL bSet) {bSelectionInReadonly = bSet;}
405 BOOL IsAutoCompleteWords() const;
408 #ifndef PRODUCT
409 // korrespondieren zu den Angaben in ui/config/cfgvw.src
410 inline BOOL IsTest1() const { return bTest1; }
411 inline void SetTest1( BOOL b ) { bTest1 = b; }
412 inline BOOL IsTest2() const { return bTest2; }
413 inline void SetTest2( BOOL b ) { bTest2 = b; }
414 inline BOOL IsTest3() const { return bTest3; }
415 inline void SetTest3( BOOL b ) { bTest3 = b; }
416 inline BOOL IsTest4() const { return bTest4; }
417 inline void SetTest4( BOOL b ) { bTest4 = b; }
418 inline BOOL IsTest5() const { return bTest5; }
419 inline void SetTest5( BOOL b ) { bTest5 = b; }
420 inline BOOL IsTest6() const { return bTest6; }
421 inline void SetTest6( BOOL b ) { bTest6 = b; }
422 inline BOOL IsTest7() const { return bTest7; }
423 inline void SetTest7( BOOL b ) { bTest7 = b; }
424 inline BOOL IsTest8() const { return bTest8; }
425 inline void SetTest8( BOOL b ) { bTest8 = b; }
426 static inline BOOL IsTest9() { return bTest9; }
427 static inline void SetTest9( BOOL b ) { bTest9 = b; }
428 inline BOOL IsTest10() const { return bTest10; }
429 inline void SetTest10( BOOL b ) { bTest10 = b; }
430 #endif
432 inline USHORT GetZoom() const { return nZoom; }
433 inline void SetZoom( USHORT n ){ nZoom = n; }
436 SwViewOption& operator=( const SwViewOption &rOpt );
437 // Vergleichsmethoden
440 /*---------------------------------------------------------------------------
441 Optionen aus nUIOptions
442 ----------------------------------------------------------------------------*/
444 BOOL IsViewVScrollBar() const
445 { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? TRUE : FALSE; }
446 BOOL IsViewHScrollBar() const
447 { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? TRUE : FALSE; }
448 BOOL IsKeepRatio() const
449 { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? TRUE : FALSE; }
450 BOOL IsGrfKeepZoom() const
451 { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? TRUE : FALSE; }
452 BOOL IsExecHyperlinks() const
453 { return nUIOptions & VIEWOPT_2_EXECHYPERLINKS ? TRUE : FALSE; }
454 BOOL IsPreventTips() const
455 { return nUIOptions & VIEWOPT_2_PREVENT_TIPS ? TRUE : FALSE; }
456 BOOL IsPrtFormat() const
457 { return nUIOptions & VIEWOPT_2_PRTFORMAT ? TRUE : FALSE; }
459 BYTE GetZoomType() const { return eZoom; }
461 BYTE GetTblDest() const { return nTblDest; }
463 void SetViewVScrollBar(BOOL b)
464 { b ? (nUIOptions |= VIEWOPT_2_VSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_VSCROLLBAR); }
465 void SetViewHScrollBar(BOOL b)
466 { b ? (nUIOptions |= VIEWOPT_2_HSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_HSCROLLBAR); }
467 void SetKeepRatio (BOOL b)
468 { b ? (nUIOptions |= VIEWOPT_2_KEEPASPECTRATIO ) : ( nUIOptions &= ~VIEWOPT_2_KEEPASPECTRATIO); }
469 void SetGrfKeepZoom (BOOL b)
470 { b ? (nUIOptions |= VIEWOPT_2_GRFKEEPZOOM ) : ( nUIOptions &= ~VIEWOPT_2_GRFKEEPZOOM); }
471 void SetExecHyperlinks( BOOL b)
472 { b ? (nUIOptions |= VIEWOPT_2_EXECHYPERLINKS) : (nUIOptions &= ~VIEWOPT_2_EXECHYPERLINKS); }
473 void SetPreventTips( BOOL b)
474 { b ? (nUIOptions |= VIEWOPT_2_PREVENT_TIPS) : (nUIOptions &= ~VIEWOPT_2_PREVENT_TIPS); }
475 void SetPrtFormat( BOOL b)
476 { b ? (nUIOptions |= VIEWOPT_2_PRTFORMAT) : (nUIOptions &= ~VIEWOPT_2_PRTFORMAT); }
478 void SetZoomType (BYTE nZoom){ eZoom = nZoom; }
479 void SetTblDest( BYTE nNew ) { nTblDest = nNew; }
481 const String& GetSymbolFont() const {return sSymbolFont;}
482 void SetSymbolFont(const String& sSet) {sSymbolFont = sSet;}
484 const Color& GetRetoucheColor() const { return aRetoucheColor;}
485 void SetRetoucheColor(const Color&r) { aRetoucheColor = r; }
487 BOOL IsViewAnyRuler() const {return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);}
488 void SetViewAnyRuler(BOOL bSet)
489 { bSet ? (nUIOptions |= VIEWOPT_2_ANY_RULER) : (nUIOptions &= ~VIEWOPT_2_ANY_RULER);}
491 BOOL IsViewHRuler(BOOL bDirect = FALSE) const
493 BOOL bRet = bDirect ?
494 0 != (nUIOptions & VIEWOPT_2_H_RULER) :
495 !bReadonly ?
496 (nUIOptions & (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)
497 : FALSE;
498 return bRet;
501 void SetViewHRuler (BOOL b)
502 { b ? (nUIOptions |= VIEWOPT_2_H_RULER ) : ( nUIOptions &= ~VIEWOPT_2_H_RULER);}
504 BOOL IsViewVRuler(BOOL bDirect = FALSE) const
506 BOOL bRet = bDirect ?
507 0 !=(nUIOptions & VIEWOPT_2_V_RULER) :
508 !bReadonly ?
509 (nUIOptions &
510 (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)
511 : FALSE;
512 return bRet;
514 void SetViewVRuler (BOOL b)
515 { b ? (nUIOptions |= VIEWOPT_2_V_RULER ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER);}
517 // ShadowCursor ein schalten/abfragen/Farbe setzen/Modus setzen
518 BOOL IsShadowCursor() const
519 { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? TRUE : FALSE; }
520 void SetShadowCursor(BOOL b)
521 { b ? (nUIOptions |= VIEWOPT_2_SHADOWCRSR ) : ( nUIOptions &= ~VIEWOPT_2_SHADOWCRSR); }
523 //move vertical ruler to the right
524 BOOL IsVRulerRight() const
525 { return nUIOptions & VIEWOPT_2_V_RULER_RIGHT ? TRUE : FALSE; }
526 void SetVRulerRight(BOOL b)
527 { b ? (nUIOptions |= VIEWOPT_2_V_RULER_RIGHT ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER_RIGHT); }
529 BOOL IsStarOneSetting() const {return bStarOneSetting; }
530 void SetStarOneSetting(BOOL bSet) {bStarOneSetting = bSet; }
532 BOOL IsPagePreview() const {return bIsPagePreview; }
533 void SetPagePreview(BOOL bSet) { bIsPagePreview= bSet; }
535 BYTE GetShdwCrsrFillMode() const { return nShdwCrsrFillMode; }
536 void SetShdwCrsrFillMode( BYTE nMode ) { nShdwCrsrFillMode = nMode; };
538 static Color& GetPageBreakColor();
540 static BOOL IsAppearanceFlag(sal_Int32 nFlag);
542 static BOOL IsDocBoundaries() {return IsAppearanceFlag(VIEWOPT_DOC_BOUNDARIES);}
543 static BOOL IsObjectBoundaries(){return IsAppearanceFlag(VIEWOPT_OBJECT_BOUNDARIES);}
544 static BOOL IsTableBoundaries() {return IsAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES );}
545 static BOOL IsIndexShadings() {return IsAppearanceFlag(VIEWOPT_INDEX_SHADINGS );}
546 static BOOL IsLinks() {return IsAppearanceFlag(VIEWOPT_LINKS );}
547 static BOOL IsVisitedLinks() {return IsAppearanceFlag(VIEWOPT_VISITED_LINKS );}
548 static BOOL IsFieldShadings() {return IsAppearanceFlag(VIEWOPT_FIELD_SHADINGS);}
549 static BOOL IsSectionBoundaries() {return IsAppearanceFlag(VIEWOPT_SECTION_BOUNDARIES);}
551 static void SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInConfig = FALSE);
553 void SetDocBoundaries(BOOL bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);}
555 static void ApplyColorConfigValues(const ColorConfig& rConfig);
560 inline void SwViewOption::SetUIOptions( const SwViewOption& rVOpt )
562 nUIOptions = rVOpt.nUIOptions;
563 nTblDest = rVOpt.nTblDest;
564 nShdwCrsrFillMode = rVOpt.nShdwCrsrFillMode;
568 // Hilfsfunktion zur Ermittlung der HTML-Faehigkeiten
569 USHORT GetHtmlMode(const SwDocShell*);
572 } //namespace binfilter
573 #endif