summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2017-11-26 11:21:08 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2017-12-08 16:17:54 +0100
commit985f95215785a7eecd37e2b8eeb7fd232de850df (patch)
treea3e2f78f3846f00fd3f9a8e84299f77c1803d729
parentc1d58c46eec5081576979f584151c7e9a4f67fe0 (diff)
Data members to enums
After 1d852b32d7ad89b2317c04958060f366f8922ca4 these data members were initialized only in constructor and never changed afterwards, behaving de-facto as constants. Convert them to an enum and take the chance to change their type from sal_uIntPtr to size_t. Change-Id: Ief33b7d3cfd3e181837f77c5b8a51812e314121d
-rw-r--r--include/svx/svddrgv.hxx16
-rw-r--r--svx/source/svdraw/svddrgv.cxx2
2 files changed, 9 insertions, 9 deletions
diff --git a/include/svx/svddrgv.hxx b/include/svx/svddrgv.hxx
index e3b0e153e641..067b954b7d73 100644
--- a/include/svx/svddrgv.hxx
+++ b/include/svx/svddrgv.hxx
@@ -30,6 +30,12 @@ class SVX_DLLPUBLIC SdrDragView: public SdrExchangeView
friend class SdrPageView;
friend class SdrDragMethod;
+ // See GetDragXorPolyLimit/GetDragXorPointLimit
+ enum : size_t {
+ eDragXorPolyLimit = 100,
+ eDragXorPointLimit = 500
+ };
+
protected:
SdrHdl* mpDragHdl;
SdrDragMethod* mpCurrentSdrDragMethod;
@@ -38,9 +44,6 @@ protected:
OUString maInsPointUndoStr;
SdrHdlKind meDragHdl;
- sal_uIntPtr mnDragXorPolyLimit;
- sal_uIntPtr mnDragXorPointLimit;
-
bool mbFramDrag : 1; // currently frame dragging
bool mbMarkedHitMovesAlways : 1; // Persistent
bool mbDragLimit : 1; // Limit on SnapRect instead of BoundRect
@@ -150,14 +153,13 @@ public:
// If the number of selected objects exceeds the value set here,
// NoDragPolys is (temporarily) activated implicitly.
// PolyPolygons etc. are regarded as multiple objects respectively.
- // Default=100
- sal_uIntPtr GetDragXorPolyLimit() const { return mnDragXorPolyLimit; }
+ size_t GetDragXorPolyLimit() const { return eDragXorPolyLimit; }
// Like DragXorPolyLimit, but in respect to the total number of
- // all polygons. Default=500.
+ // all polygons.
// NoDragPolys is (temporarily) activated, if one of the limits
// is exceeded.
- sal_uIntPtr GetDragXorPointLimit() const { return mnDragXorPointLimit; }
+ size_t GetDragXorPointLimit() const { return eDragXorPointLimit; }
void SetSolidDragging(bool bOn);
bool IsSolidDragging() const;
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index d5734123d5f9..2716bf42ea49 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -63,8 +63,6 @@ void SdrDragView::ImpClearVars()
mbInsGluePoint=false;
mbInsObjPointMode=false;
mbInsGluePointMode=false;
- mnDragXorPolyLimit=100;
- mnDragXorPointLimit=500;
mbNoDragXorPolys=false;
mbResizeAtCenter=false;
mbCrookAtCenter=false;