Kaydet (Commit) 985f9521 authored tarafından Matteo Casalin's avatar Matteo Casalin

Data members to enums

After 1d852b32 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
üst c1d58c46
...@@ -30,6 +30,12 @@ class SVX_DLLPUBLIC SdrDragView: public SdrExchangeView ...@@ -30,6 +30,12 @@ class SVX_DLLPUBLIC SdrDragView: public SdrExchangeView
friend class SdrPageView; friend class SdrPageView;
friend class SdrDragMethod; friend class SdrDragMethod;
// See GetDragXorPolyLimit/GetDragXorPointLimit
enum : size_t {
eDragXorPolyLimit = 100,
eDragXorPointLimit = 500
};
protected: protected:
SdrHdl* mpDragHdl; SdrHdl* mpDragHdl;
SdrDragMethod* mpCurrentSdrDragMethod; SdrDragMethod* mpCurrentSdrDragMethod;
...@@ -38,9 +44,6 @@ protected: ...@@ -38,9 +44,6 @@ protected:
OUString maInsPointUndoStr; OUString maInsPointUndoStr;
SdrHdlKind meDragHdl; SdrHdlKind meDragHdl;
sal_uIntPtr mnDragXorPolyLimit;
sal_uIntPtr mnDragXorPointLimit;
bool mbFramDrag : 1; // currently frame dragging bool mbFramDrag : 1; // currently frame dragging
bool mbMarkedHitMovesAlways : 1; // Persistent bool mbMarkedHitMovesAlways : 1; // Persistent
bool mbDragLimit : 1; // Limit on SnapRect instead of BoundRect bool mbDragLimit : 1; // Limit on SnapRect instead of BoundRect
...@@ -150,14 +153,13 @@ public: ...@@ -150,14 +153,13 @@ public:
// If the number of selected objects exceeds the value set here, // If the number of selected objects exceeds the value set here,
// NoDragPolys is (temporarily) activated implicitly. // NoDragPolys is (temporarily) activated implicitly.
// PolyPolygons etc. are regarded as multiple objects respectively. // PolyPolygons etc. are regarded as multiple objects respectively.
// Default=100 size_t GetDragXorPolyLimit() const { return eDragXorPolyLimit; }
sal_uIntPtr GetDragXorPolyLimit() const { return mnDragXorPolyLimit; }
// Like DragXorPolyLimit, but in respect to the total number of // 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 // NoDragPolys is (temporarily) activated, if one of the limits
// is exceeded. // is exceeded.
sal_uIntPtr GetDragXorPointLimit() const { return mnDragXorPointLimit; } size_t GetDragXorPointLimit() const { return eDragXorPointLimit; }
void SetSolidDragging(bool bOn); void SetSolidDragging(bool bOn);
bool IsSolidDragging() const; bool IsSolidDragging() const;
......
...@@ -63,8 +63,6 @@ void SdrDragView::ImpClearVars() ...@@ -63,8 +63,6 @@ void SdrDragView::ImpClearVars()
mbInsGluePoint=false; mbInsGluePoint=false;
mbInsObjPointMode=false; mbInsObjPointMode=false;
mbInsGluePointMode=false; mbInsGluePointMode=false;
mnDragXorPolyLimit=100;
mnDragXorPointLimit=500;
mbNoDragXorPolys=false; mbNoDragXorPolys=false;
mbResizeAtCenter=false; mbResizeAtCenter=false;
mbCrookAtCenter=false; mbCrookAtCenter=false;
......
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