summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-20 14:05:50 +0200
committerJan Holesovsky <kendy@collabora.com>2015-05-29 20:16:52 +0200
commit118da1a52a74c602ecacec9ffb163b93589cf6e1 (patch)
tree9fc08877a716ce679440eae63a5e7a59a6c465eb /include
parent66b8dfdc4d1f689d98652cdb52902a2582e801ee (diff)
convert POINTER constants to scoped enum
Change-Id: Iea29ce5fd6c620535197d3ca8538335078430e19 Reviewed-on: https://gerrit.libreoffice.org/15825 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> Signed-off-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/vbahelper/vbahelper.hxx2
-rw-r--r--include/vcl/pointr.hxx2
-rw-r--r--include/vcl/ptrstyle.hxx200
3 files changed, 100 insertions, 104 deletions
diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index d4a0de15ea36..bf413bac0c42 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -104,7 +104,7 @@ namespace ooo
VBAHELPER_DLLPUBLIC double PixelsToPoints( const css::uno::Reference< css::awt::XDevice >& xDevice, double fPixels, bool bVertical);
VBAHELPER_DLLPUBLIC sal_Int32 PointsToHmm( double fPoints );
VBAHELPER_DLLPUBLIC double HmmToPoints( sal_Int32 nHmm );
- VBAHELPER_DLLPUBLIC sal_Int32 getPointerStyle( const css::uno::Reference< css::frame::XModel >& );
+ VBAHELPER_DLLPUBLIC PointerStyle getPointerStyle( const css::uno::Reference< css::frame::XModel >& );
VBAHELPER_DLLPUBLIC void setCursorHelper( const css::uno::Reference< css::frame::XModel >& xModel, const Pointer& rPointer, bool bOverWrite );
VBAHELPER_DLLPUBLIC void setDefaultPropByIntrospection( const css::uno::Any& aObj, const css::uno::Any& aValue ) throw ( css::uno::RuntimeException );
VBAHELPER_DLLPUBLIC css::uno::Any getPropertyValue( const css::uno::Sequence< css::beans::PropertyValue >& aProp, const OUString& aName );
diff --git a/include/vcl/pointr.hxx b/include/vcl/pointr.hxx
index 751739714dad..c82fb2236db0 100644
--- a/include/vcl/pointr.hxx
+++ b/include/vcl/pointr.hxx
@@ -31,7 +31,7 @@ class VCL_DLLPUBLIC Pointer
public:
Pointer()
- { meStyle = POINTER_ARROW; }
+ { meStyle = PointerStyle::Arrow; }
Pointer( PointerStyle eStyle )
{ meStyle = eStyle; }
diff --git a/include/vcl/ptrstyle.hxx b/include/vcl/ptrstyle.hxx
index ece5af232b86..d63d44b55a5a 100644
--- a/include/vcl/ptrstyle.hxx
+++ b/include/vcl/ptrstyle.hxx
@@ -20,108 +20,104 @@
#ifndef INCLUDED_VCL_PTRSTYLE_HXX
#define INCLUDED_VCL_PTRSTYLE_HXX
-typedef sal_uInt16 PointerStyle;
-
-#define POINTER_ARROW ((PointerStyle)0)
-#define POINTER_NULL ((PointerStyle)1)
-#define POINTER_WAIT ((PointerStyle)2)
-#define POINTER_TEXT ((PointerStyle)3)
-#define POINTER_HELP ((PointerStyle)4)
-#define POINTER_CROSS ((PointerStyle)5)
-#define POINTER_MOVE ((PointerStyle)6)
-#define POINTER_NSIZE ((PointerStyle)7)
-#define POINTER_SSIZE ((PointerStyle)8)
-#define POINTER_WSIZE ((PointerStyle)9)
-#define POINTER_ESIZE ((PointerStyle)10)
-#define POINTER_NWSIZE ((PointerStyle)11)
-#define POINTER_NESIZE ((PointerStyle)12)
-#define POINTER_SWSIZE ((PointerStyle)13)
-#define POINTER_SESIZE ((PointerStyle)14)
-#define POINTER_WINDOW_NSIZE ((PointerStyle)15)
-#define POINTER_WINDOW_SSIZE ((PointerStyle)16)
-#define POINTER_WINDOW_WSIZE ((PointerStyle)17)
-#define POINTER_WINDOW_ESIZE ((PointerStyle)18)
-#define POINTER_WINDOW_NWSIZE ((PointerStyle)19)
-#define POINTER_WINDOW_NESIZE ((PointerStyle)20)
-#define POINTER_WINDOW_SWSIZE ((PointerStyle)21)
-#define POINTER_WINDOW_SESIZE ((PointerStyle)22)
-#define POINTER_HSPLIT ((PointerStyle)23)
-#define POINTER_VSPLIT ((PointerStyle)24)
-#define POINTER_HSIZEBAR ((PointerStyle)25)
-#define POINTER_VSIZEBAR ((PointerStyle)26)
-#define POINTER_HAND ((PointerStyle)27)
-#define POINTER_REFHAND ((PointerStyle)28)
-#define POINTER_PEN ((PointerStyle)29)
-#define POINTER_MAGNIFY ((PointerStyle)30)
-#define POINTER_FILL ((PointerStyle)31)
-#define POINTER_ROTATE ((PointerStyle)32)
-#define POINTER_HSHEAR ((PointerStyle)33)
-#define POINTER_VSHEAR ((PointerStyle)34)
-#define POINTER_MIRROR ((PointerStyle)35)
-#define POINTER_CROOK ((PointerStyle)36)
-#define POINTER_CROP ((PointerStyle)37)
-#define POINTER_MOVEPOINT ((PointerStyle)38)
-#define POINTER_MOVEBEZIERWEIGHT ((PointerStyle)39)
-#define POINTER_MOVEDATA ((PointerStyle)40)
-#define POINTER_COPYDATA ((PointerStyle)41)
-#define POINTER_LINKDATA ((PointerStyle)42)
-#define POINTER_MOVEDATALINK ((PointerStyle)43)
-#define POINTER_COPYDATALINK ((PointerStyle)44)
-#define POINTER_MOVEFILE ((PointerStyle)45)
-#define POINTER_COPYFILE ((PointerStyle)46)
-#define POINTER_LINKFILE ((PointerStyle)47)
-#define POINTER_MOVEFILELINK ((PointerStyle)48)
-#define POINTER_COPYFILELINK ((PointerStyle)49)
-#define POINTER_MOVEFILES ((PointerStyle)50)
-#define POINTER_COPYFILES ((PointerStyle)51)
-#define POINTER_NOTALLOWED ((PointerStyle)52)
-#define POINTER_DRAW_LINE ((PointerStyle)53)
-#define POINTER_DRAW_RECT ((PointerStyle)54)
-#define POINTER_DRAW_POLYGON ((PointerStyle)55)
-#define POINTER_DRAW_BEZIER ((PointerStyle)56)
-#define POINTER_DRAW_ARC ((PointerStyle)57)
-#define POINTER_DRAW_PIE ((PointerStyle)58)
-#define POINTER_DRAW_CIRCLECUT ((PointerStyle)59)
-#define POINTER_DRAW_ELLIPSE ((PointerStyle)60)
-#define POINTER_DRAW_FREEHAND ((PointerStyle)61)
-#define POINTER_DRAW_CONNECT ((PointerStyle)62)
-#define POINTER_DRAW_TEXT ((PointerStyle)63)
-#define POINTER_DRAW_CAPTION ((PointerStyle)64)
-#define POINTER_CHART ((PointerStyle)65)
-#define POINTER_DETECTIVE ((PointerStyle)66)
-#define POINTER_PIVOT_COL ((PointerStyle)67)
-#define POINTER_PIVOT_ROW ((PointerStyle)68)
-#define POINTER_PIVOT_FIELD ((PointerStyle)69)
-#define POINTER_CHAIN ((PointerStyle)70)
-#define POINTER_CHAIN_NOTALLOWED ((PointerStyle)71)
-#define POINTER_TIMEEVENT_MOVE ((PointerStyle)72)
-#define POINTER_TIMEEVENT_SIZE ((PointerStyle)73)
-#define POINTER_AUTOSCROLL_N ((PointerStyle)74)
-#define POINTER_AUTOSCROLL_S ((PointerStyle)75)
-#define POINTER_AUTOSCROLL_W ((PointerStyle)76)
-#define POINTER_AUTOSCROLL_E ((PointerStyle)77)
-#define POINTER_AUTOSCROLL_NW ((PointerStyle)78)
-#define POINTER_AUTOSCROLL_NE ((PointerStyle)79)
-#define POINTER_AUTOSCROLL_SW ((PointerStyle)80)
-#define POINTER_AUTOSCROLL_SE ((PointerStyle)81)
-#define POINTER_AUTOSCROLL_NS ((PointerStyle)82)
-#define POINTER_AUTOSCROLL_WE ((PointerStyle)83)
-#define POINTER_AUTOSCROLL_NSWE ((PointerStyle)84)
-#define POINTER_AIRBRUSH ((PointerStyle)85)
-#define POINTER_TEXT_VERTICAL ((PointerStyle)86)
-#define POINTER_PIVOT_DELETE ((PointerStyle)87)
-
-// #i32329#
-#define POINTER_TAB_SELECT_S ((PointerStyle)88)
-#define POINTER_TAB_SELECT_E ((PointerStyle)89)
-#define POINTER_TAB_SELECT_SE ((PointerStyle)90)
-#define POINTER_TAB_SELECT_W ((PointerStyle)91)
-#define POINTER_TAB_SELECT_SW ((PointerStyle)92)
-
-// #i20119#
-#define POINTER_PAINTBRUSH ((PointerStyle)93)
-
-#define POINTER_COUNT 94
+enum class PointerStyle
+{
+ Arrow = 0,
+ Null = 1,
+ Wait = 2,
+ Text = 3,
+ Help = 4,
+ Cross = 5,
+ Move = 6,
+ NSize = 7,
+ SSize = 8,
+ WSize = 9,
+ ESize = 10,
+ NWSize = 11,
+ NESize = 12,
+ SWSize = 13,
+ SESize = 14,
+ WindowNSize = 15,
+ WindowSSize = 16,
+ WindowWSize = 17,
+ WindowESize = 18,
+ WindowNWSize = 19,
+ WindowNESize = 20,
+ WindowSWSize = 21,
+ WindowSESize = 22,
+ HSplit = 23,
+ VSplit = 24,
+ HSizeBar = 25,
+ VSizeBar = 26,
+ Hand = 27,
+ RefHand = 28,
+ Pen = 29,
+ Magnify = 30,
+ Fill = 31,
+ Rotate = 32,
+ HShear = 33,
+ VShear = 34,
+ Mirror = 35,
+ Crook = 36,
+ Crop = 37,
+ MovePoint = 38,
+ MoveBezierWeight = 39,
+ MoveData = 40,
+ CopyData = 41,
+ LinkData = 42,
+ MoveDataLink = 43,
+ CopyDataLink = 44,
+ MoveFile = 45,
+ CopyFile = 46,
+ LinkFile = 47,
+ MoveFileLink = 48,
+ CopyFileLink = 49,
+ MoveFiles = 50,
+ CopyFiles = 51,
+ NotAllowed = 52,
+ DrawLine = 53,
+ DrawRect = 54,
+ DrawPolygon = 55,
+ DrawBezier = 56,
+ DrawArc = 57,
+ DrawPie = 58,
+ DrawCircleCut = 59,
+ DrawEllipse = 60,
+ DrawFreehand = 61,
+ DrawConnect = 62,
+ DrawText = 63,
+ DrawCaption = 64,
+ Chart = 65,
+ Detective = 66,
+ PivotCol = 67,
+ PivotRow = 68,
+ PivotField = 69,
+ Chain = 70,
+ ChainNotAllowed = 71,
+ TimeEventMove = 72,
+ TimeEventSize = 73,
+ AutoScrollN = 74,
+ AutoScrollS = 75,
+ AutoScrollW = 76,
+ AutoScrollE = 77,
+ AutoScrollNW = 78,
+ AutoScrollNE = 79,
+ AutoScrollSW = 80,
+ AutoScrollSE = 81,
+ AutoScrollNS = 82,
+ AutoScrollWE = 83,
+ AutoScrollNSWE = 84,
+ Airbrush = 85,
+ TextVertical = 86,
+ PivotDelete = 87,
+ TabSelectS = 88,
+ TabSelectE = 89,
+ TabSelectSE = 90,
+ TabSelectW = 91,
+ TabSelectSW = 92,
+ Paintbrush = 93,
+ LAST = Paintbrush,
+};
#endif // INCLUDED_VCL_PTRSTYLE_HXX