summaryrefslogtreecommitdiff
path: root/include/editeng
diff options
context:
space:
mode:
Diffstat (limited to 'include/editeng')
-rw-r--r--include/editeng/editstat.hxx27
-rw-r--r--include/editeng/editview.hxx5
-rw-r--r--include/editeng/outliner.hxx4
3 files changed, 22 insertions, 14 deletions
diff --git a/include/editeng/editstat.hxx b/include/editeng/editstat.hxx
index ba973a71fc2b..59461a0c2cfe 100644
--- a/include/editeng/editstat.hxx
+++ b/include/editeng/editstat.hxx
@@ -60,15 +60,22 @@ namespace o3tl
template<> struct typed_flags<EEControlBits> : is_typed_flags<EEControlBits, 0x07ffffff> {};
}
-#define EV_CNTRL_AUTOSCROLL 0x00000001 // Auto scrolling horizontally
-#define EV_CNTRL_BIGSCROLL 0x00000002 // Scroll further to the cursor
-#define EV_CNTRL_ENABLEPASTE 0x00000004 // Enable Paste
-#define EV_CNTRL_SINGLELINEPASTE 0x00000008 // View: Paste in input line ...
-#define EV_CNTRL_OVERWRITE 0x00000010 // Overwrite mode
-#define EV_CNTRL_INVONEMORE 0x00000020 // Invalidate one pixel more
-#define EV_CNTRL_AUTOSIZEX 0x00000040 // Automatically adapt to text width
-#define EV_CNTRL_AUTOSIZEY 0x00000080 // Automatically adapt to Text width
-#define EV_CNTRL_AUTOSIZE (EV_CNTRL_AUTOSIZEX|EV_CNTRL_AUTOSIZEY)
+enum class EVControlBits
+{
+ AUTOSCROLL = 0x0001, // Auto scrolling horizontally
+ BIGSCROLL = 0x0002, // Scroll further to the cursor
+ ENABLEPASTE = 0x0004, // Enable Paste
+ SINGLELINEPASTE = 0x0008, // View: Paste in input line ...
+ OVERWRITE = 0x0010, // Overwrite mode
+ INVONEMORE = 0x0020, // Invalidate one pixel more
+ AUTOSIZEX = 0x0040, // Automatically adapt to text width
+ AUTOSIZEY = 0x0080, // Automatically adapt to Text width
+ AUTOSIZE = (AUTOSIZEX|AUTOSIZEY)
+};
+namespace o3tl
+{
+ template<> struct typed_flags<EVControlBits> : is_typed_flags<EVControlBits, 0xff> {};
+}
#define EE_STAT_HSCROLL 0x00000001
#define EE_STAT_VSCROLL 0x00000002
@@ -91,7 +98,7 @@ inline void SetFlags( EEControlBits& rBits, EEControlBits nMask, bool bOn )
rBits &= ~nMask;
}
-inline void SetFlags( sal_uLong& rBits, const sal_uInt32 nMask, bool bOn )
+inline void SetFlags( EVControlBits& rBits, EVControlBits nMask, bool bOn )
{
if ( bOn )
rBits |= nMask;
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index a1d05efe4ce1..3e2fb1a4d1f0 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -27,6 +27,7 @@
#include <tools/color.hxx>
#include <tools/gen.hxx>
#include <vcl/cursor.hxx>
+#include <editeng/editstat.hxx>
#define LOK_USE_UNSTABLE_API
#include <LibreOfficeKit/LibreOfficeKitTypes.h>
@@ -176,8 +177,8 @@ public:
/// @see vcl::ITiledRenderable::registerCallback().
void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData);
- void SetControlWord( sal_uInt32 nWord );
- sal_uInt32 GetControlWord() const;
+ void SetControlWord( EVControlBits nWord );
+ EVControlBits GetControlWord() const;
EditTextObject* CreateTextObject();
void InsertText( const EditTextObject& rTextObject );
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index d80263f1b74d..b973e64e1d79 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -284,8 +284,8 @@ public:
const SfxStyleSheet* GetStyleSheet() const;
SfxStyleSheet* GetStyleSheet();
- void SetControlWord( sal_uLong nWord );
- sal_uLong GetControlWord() const;
+ void SetControlWord( EVControlBits nWord );
+ EVControlBits GetControlWord() const;
void SetAnchorMode( EVAnchorMode eMode );
EVAnchorMode GetAnchorMode() const;