diff options
-rw-r--r-- | include/svx/svdmrkv.hxx | 12 | ||||
-rw-r--r-- | svx/source/svdraw/svddrgmt.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdview.cxx | 4 |
4 files changed, 16 insertions, 12 deletions
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx index 18d2a83c71a7..28c37454986e 100644 --- a/include/svx/svdmrkv.hxx +++ b/include/svx/svdmrkv.hxx @@ -83,9 +83,13 @@ enum SdrViewEditMode {SDREDITMODE_EDIT, // Also known as arrow or poin SDREDITMODE_CREATE, // Tool for object creation SDREDITMODE_GLUEPOINTEDIT}; // Glue point editing mode -#define IMPSDR_POINTSDESCRIPTION 0x0001 -#define IMPSDR_GLUEPOINTSDESCRIPTION 0x0002 - +/** options for ImpTakeDescriptionStr() */ +enum class ImpTakeDescriptionOptions +{ + NONE = 0, + POINTS = 1, + GLUEPOINTS = 2, +}; class ImplMarkingOverlay; @@ -161,7 +165,7 @@ protected: SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const; SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const; bool ImpIsFrameHandles() const; - void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 nVal=0, sal_uInt16 nOpt=0) const; + void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 nVal=0, ImpTakeDescriptionOptions nOpt=ImpTakeDescriptionOptions::NONE) const; // Generates a string including degrees symbol, from an angel specification in 1/100deg bool ImpMarkPoint(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark); diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index a1ae7ca6f7b1..0d0c1a518349 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -563,11 +563,11 @@ void SdrDragMethod::createSdrDragEntries_GlueDrag() void SdrDragMethod::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 nVal) const { - sal_uInt16 nOpt=0; + ImpTakeDescriptionOptions nOpt=ImpTakeDescriptionOptions::NONE; if (IsDraggingPoints()) { - nOpt=IMPSDR_POINTSDESCRIPTION; + nOpt=ImpTakeDescriptionOptions::POINTS; } else if (IsDraggingGluePoints()) { - nOpt=IMPSDR_GLUEPOINTSDESCRIPTION; + nOpt=ImpTakeDescriptionOptions::GLUEPOINTS; } getSdrDragView().ImpTakeDescriptionStr(nStrCacheID,rStr,nVal,nOpt); } diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 45a09abb2861..a9baeb9a35aa 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -2023,18 +2023,18 @@ const Rectangle& SdrMarkView::GetMarkedObjRect() const -void SdrMarkView::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 nVal, sal_uInt16 nOpt) const +void SdrMarkView::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 nVal, ImpTakeDescriptionOptions nOpt) const { rStr = ImpGetResStr(nStrCacheID); sal_Int32 nPos = rStr.indexOf("%1"); if(nPos != -1) { - if(nOpt == IMPSDR_POINTSDESCRIPTION) + if(nOpt == ImpTakeDescriptionOptions::POINTS) { rStr = rStr.replaceAt(nPos, 2, GetDescriptionOfMarkedPoints()); } - else if(nOpt == IMPSDR_GLUEPOINTSDESCRIPTION) + else if(nOpt == ImpTakeDescriptionOptions::GLUEPOINTS) { rStr = rStr.replaceAt(nPos, 2, GetDescriptionOfMarkedGluePoints()); } diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 15654fa7c0e4..0f8b42428bd3 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -1282,11 +1282,11 @@ OUString SdrView::GetStatusText() ImpTakeDescriptionStr(STR_ViewMarked,aStr); if (IsGluePointEditMode()) { if (HasMarkedGluePoints()) { - ImpTakeDescriptionStr(STR_ViewMarked,aStr,0,IMPSDR_GLUEPOINTSDESCRIPTION); + ImpTakeDescriptionStr(STR_ViewMarked,aStr,0,ImpTakeDescriptionOptions::GLUEPOINTS); } } else { if (HasMarkedPoints()) { - ImpTakeDescriptionStr(STR_ViewMarked,aStr,0,IMPSDR_POINTSDESCRIPTION); + ImpTakeDescriptionStr(STR_ViewMarked,aStr,0,ImpTakeDescriptionOptions::POINTS); } } } else { |