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
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;
......
......@@ -63,8 +63,6 @@ void SdrDragView::ImpClearVars()
mbInsGluePoint=false;
mbInsObjPointMode=false;
mbInsGluePointMode=false;
mnDragXorPolyLimit=100;
mnDragXorPointLimit=500;
mbNoDragXorPolys=false;
mbResizeAtCenter=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