summaryrefslogtreecommitdiff
path: root/sw/inc/viewopt.hxx
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-09 16:35:27 +0200
committerobo <obo@openoffice.org>2010-06-09 16:35:27 +0200
commit0a11354fc949dff5860a0b4240f18c6320561f9b (patch)
treecaffe5954a41a3821057710d64e5995d773c8856 /sw/inc/viewopt.hxx
parent5059f173f05fa57e8f7009dd9c082c8e85a6cc5f (diff)
parent87c6b7fab33c03c6cab6d4365125f1acf9929811 (diff)
CWS-TOOLING: integrate CWS tl74
Diffstat (limited to 'sw/inc/viewopt.hxx')
-rwxr-xr-x[-rw-r--r--]sw/inc/viewopt.hxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index f0036e7abf35..8d37888ea789 100644..100755
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -41,7 +41,7 @@ class ViewShell;
class SwDocShell;
namespace svtools{ class ColorConfig;}
-#define VIEWOPT_1_IDLE 0x00000001L
+//#define VIEWOPT_1_IDLE 0x00000001L no longer used, see new member 'bIdle'
#define VIEWOPT_1_TAB 0x00000002L
#define VIEWOPT_1_BLANK 0x00000004L
#define VIEWOPT_1_HARDBLANK 0x00000008L
@@ -164,6 +164,7 @@ protected:
BOOL bBookview : 1; // view mode for page preview
BOOL mbViewLayoutBookMode : 1; // book view mode for edit view
sal_Bool bShowPlaceHolderFields : 1; //only used in printing!
+ mutable bool bIdle;
// Maszstab
USHORT nZoom; // Angaben in Prozent
@@ -202,9 +203,14 @@ public:
----------------------------------------------------------------------------*/
inline BOOL IsIdle() const
- { return nCoreOptions & VIEWOPT_1_IDLE ? TRUE : FALSE; }
- inline void SetIdle( BOOL b )
- { (b != 0) ? (nCoreOptions |= VIEWOPT_1_IDLE ) : ( nCoreOptions &= ~VIEWOPT_1_IDLE); }
+ { return bIdle; }
+
+ // logically this is a const function since it does not modify the viewoptions
+ // but only effects idle formatting. Of course that member is already implement
+ // in the wrong place here... Also currently there are many const modifying casts in the code
+ // just to call this function on otherwise const objects. Thus declaring it as const now.
+ inline void SetIdle( BOOL b ) const
+ { bIdle = b; }
inline BOOL IsTab(BOOL bHard = FALSE) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) &&