Kaydet (Commit) aa82339b authored tarafından Noel Grandin's avatar Noel Grandin

convert DRAG_ constants to scoped enum

Change-Id: I7946a1406bfbbc894a0a2aca32ead43e4cc89508
üst 88254f05
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <svtools/ruler.hxx> #include <svtools/ruler.hxx>
#include <svl/lstner.hxx> #include <svl/lstner.hxx>
#include <svx/svxdllapi.h> #include <svx/svxdllapi.h>
#include <o3tl/typed_flags_set.hxx>
#include <boost/scoped_array.hpp> #include <boost/scoped_array.hpp>
#include <memory> #include <memory>
...@@ -41,6 +42,23 @@ class SvxObjectItem; ...@@ -41,6 +42,23 @@ class SvxObjectItem;
class SfxBoolItem; class SfxBoolItem;
struct SvxRuler_Impl; struct SvxRuler_Impl;
enum class SvxRulerDragFlags
{
NONE = 0x00,
OBJECT = 0x01,
// reduce size of the last column, shift
OBJECT_SIZE_LINEAR = 0x02,
OBJECT_SIZE_PROPORTIONAL = 0x04, // proportional, Ctrl
// only current line (table; Shift-Ctrl)
OBJECT_ACTLINE_ONLY = 0x08,
// currently same key assignment
OBJECT_LEFT_INDENT_ONLY = OBJECT_SIZE_PROPORTIONAL,
};
namespace o3tl
{
template<> struct typed_flags<SvxRulerDragFlags> : is_typed_flags<SvxRulerDragFlags, 0x0f> {};
}
class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
{ {
friend class SvxRulerItem; friend class SvxRulerItem;
...@@ -68,20 +86,7 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener ...@@ -68,20 +86,7 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
long lMinFrame; // minimal frame width in pixels long lMinFrame; // minimal frame width in pixels
long lInitialDragPos; long lInitialDragPos;
sal_uInt16 nFlags; sal_uInt16 nFlags;
SvxRulerDragFlags nDragType;
enum
{
NONE = 0x0000,
DRAG_OBJECT = 0x0001,
// reduce size of the last column, shift
DRAG_OBJECT_SIZE_LINEAR = 0x0002,
DRAG_OBJECT_SIZE_PROPORTIONAL = 0x0004, // proportional, Ctrl
// only current line (table; Shift-Ctrl)
DRAG_OBJECT_ACTLINE_ONLY = 0x0008,
// currently same key assignment
DRAG_OBJECT_LEFT_INDENT_ONLY = DRAG_OBJECT_SIZE_PROPORTIONAL
} nDragType;
sal_uInt16 nDefTabType; sal_uInt16 nDefTabType;
sal_uInt16 nTabCount; sal_uInt16 nTabCount;
sal_uInt16 nTabBufSize; sal_uInt16 nTabBufSize;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment