include/svx/svdmrkv.hxx | 2 -- svx/source/svdraw/svdglev.cxx | 14 +++++++------- svx/source/svdraw/svdmrkv.cxx | 4 ++-- svx/source/svdraw/svdpoev.cxx | 14 +++++++------- 4 files changed, 16 insertions(+), 18 deletions(-)
New commits: commit e73c7982b7c374b1b28535883bd8898edad25e50 Author: Xisco Fauli <[email protected]> AuthorDate: Wed May 29 12:54:48 2024 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Wed May 29 17:07:09 2024 +0200 svx: GetDescriptionOfMarkedPoints() -> ... ... GetMarkedObjectList().GetPointMarkDescription() In order to reduce number of calls to GetMarkedObjectList() later on Change-Id: I5886fd20ffd9df115e12947f4dc7293c98b50bbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168215 Tested-by: Xisco Fauli <[email protected]> Reviewed-by: Xisco Fauli <[email protected]> diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx index 631931f8e341..2d196780d6c6 100644 --- a/include/svx/svdmrkv.hxx +++ b/include/svx/svdmrkv.hxx @@ -264,7 +264,6 @@ public: void SortMarkedObjects() const { GetMarkedObjectList().ForceSort(); } bool AreObjectsMarked() const { return 0 != GetMarkedObjectList().GetMarkCount(); } OUString const & GetDescriptionOfMarkedObjects() const { return GetMarkedObjectList().GetMarkDescription(); } - OUString const & GetDescriptionOfMarkedPoints() const { return GetMarkedObjectList().GetPointMarkDescription(); } // Get a list of all those links which are connected to marked nodes, // but which are not marked themselves. diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 669f114163a0..76b20ef5bc8f 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -2727,7 +2727,7 @@ OUString SdrMarkView::ImpGetDescriptionString(TranslateId pStrCacheID, ImpGetDes { if(nOpt == ImpGetDescriptionOptions::POINTS) { - sStr = sStr.replaceAt(nPos, 2, GetDescriptionOfMarkedPoints()); + sStr = sStr.replaceAt(nPos, 2, GetMarkedObjectList().GetPointMarkDescription()); } else if(nOpt == ImpGetDescriptionOptions::GLUEPOINTS) { diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx index 8cd84dfb4df0..7185e0bc81ba 100644 --- a/svx/source/svdraw/svdpoev.cxx +++ b/svx/source/svdraw/svdpoev.cxx @@ -196,7 +196,7 @@ void SdrPolyEditView::SetMarkedPointsSmooth(SdrPathSmoothKind eKind) const bool bUndo = IsUndoEnabled(); if( bUndo ) - BegUndo(SvxResId(STR_EditSetPointsSmooth), GetDescriptionOfMarkedPoints()); + BegUndo(SvxResId(STR_EditSetPointsSmooth), GetMarkedObjectList().GetPointMarkDescription()); const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); for(size_t nMarkNum(nMarkCount); nMarkNum > 0;) @@ -230,7 +230,7 @@ void SdrPolyEditView::SetMarkedSegmentsKind(SdrPathSegmentKind eKind) const bool bUndo = IsUndoEnabled(); if( bUndo ) - BegUndo(SvxResId(STR_EditSetSegmentsKind), GetDescriptionOfMarkedPoints()); + BegUndo(SvxResId(STR_EditSetSegmentsKind), GetMarkedObjectList().GetPointMarkDescription()); const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); for(size_t nMarkNum=nMarkCount; nMarkNum > 0;) @@ -296,7 +296,7 @@ void SdrPolyEditView::DeleteMarkedPoints() if( bUndo ) { // Description - BegUndo(SvxResId(STR_EditDelete),GetDescriptionOfMarkedPoints(),SdrRepeatFunc::Delete); + BegUndo(SvxResId(STR_EditDelete),GetMarkedObjectList().GetPointMarkDescription(),SdrRepeatFunc::Delete); } for (size_t nMarkNum=nMarkCount; nMarkNum>0;) @@ -342,7 +342,7 @@ void SdrPolyEditView::RipUpAtMarkedPoints() const bool bUndo = IsUndoEnabled(); if( bUndo ) - BegUndo(SvxResId(STR_EditRipUp), GetDescriptionOfMarkedPoints()); + BegUndo(SvxResId(STR_EditRipUp), GetMarkedObjectList().GetPointMarkDescription()); for(size_t nMarkNum = nMarkCount; nMarkNum > 0;) { @@ -605,7 +605,7 @@ void SdrPolyEditView::MoveMarkedPoints(const Size& rSiz) { ForceUndirtyMrkPnt(); OUString aStr(SvxResId(STR_EditMove)); - BegUndo(aStr,GetDescriptionOfMarkedPoints(),SdrRepeatFunc::Move); + BegUndo(aStr,GetMarkedObjectList().GetPointMarkDescription(),SdrRepeatFunc::Move); ImpTransformMarkedPoints(ImpMove,&rSiz); EndUndo(); AdjustMarkHdl(); @@ -622,7 +622,7 @@ void SdrPolyEditView::ResizeMarkedPoints(const Point& rRef, const Fraction& xFac { ForceUndirtyMrkPnt(); OUString aStr(SvxResId(STR_EditResize)); - BegUndo(aStr,GetDescriptionOfMarkedPoints(),SdrRepeatFunc::Resize); + BegUndo(aStr,GetMarkedObjectList().GetPointMarkDescription(),SdrRepeatFunc::Resize); ImpTransformMarkedPoints(ImpResize,&rRef,&xFact,&yFact); EndUndo(); AdjustMarkHdl(); @@ -639,7 +639,7 @@ void SdrPolyEditView::RotateMarkedPoints(const Point& rRef, Degree100 nAngle) { ForceUndirtyMrkPnt(); OUString aStr(SvxResId(STR_EditResize)); - BegUndo(aStr,GetDescriptionOfMarkedPoints(),SdrRepeatFunc::Rotate); + BegUndo(aStr,GetMarkedObjectList().GetPointMarkDescription(),SdrRepeatFunc::Rotate); double nSin = sin(toRadians(nAngle)); double nCos = cos(toRadians(nAngle)); ImpTransformMarkedPoints(ImpRotate,&rRef,&nAngle,&nSin,&nCos); commit ab659f2020d5320c3b2655b2909a1bd808f388b7 Author: Xisco Fauli <[email protected]> AuthorDate: Wed May 29 12:53:23 2024 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Wed May 29 17:06:59 2024 +0200 svx: GetDescriptionOfMarkedGluePoints() -> ... ... GetMarkedObjectList().GetGluePointMarkDescription() In order to reduce number of calls to GetMarkedObjectList() later on Change-Id: I7eb9bd7cfdaa53b9afcae5bc05cc2c014e0ce1e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168214 Tested-by: Xisco Fauli <[email protected]> Reviewed-by: Xisco Fauli <[email protected]> diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx index 214de9f65bf9..631931f8e341 100644 --- a/include/svx/svdmrkv.hxx +++ b/include/svx/svdmrkv.hxx @@ -265,7 +265,6 @@ public: bool AreObjectsMarked() const { return 0 != GetMarkedObjectList().GetMarkCount(); } OUString const & GetDescriptionOfMarkedObjects() const { return GetMarkedObjectList().GetMarkDescription(); } OUString const & GetDescriptionOfMarkedPoints() const { return GetMarkedObjectList().GetPointMarkDescription(); } - OUString const & GetDescriptionOfMarkedGluePoints() const { return GetMarkedObjectList().GetGluePointMarkDescription(); } // Get a list of all those links which are connected to marked nodes, // but which are not marked themselves. diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx index 6075cbc84c9d..20a560e32675 100644 --- a/svx/source/svdraw/svdglev.cxx +++ b/svx/source/svdraw/svdglev.cxx @@ -119,7 +119,7 @@ static void ImpSetEscDir(SdrGluePoint& rGP, const SdrObject* /*pObj*/, const voi void SdrGlueEditView::SetMarkedGluePointsEscDir(SdrEscapeDirection nThisEsc, bool bOn) { ForceUndirtyMrkPnt(); - BegUndo(SvxResId(STR_EditSetGlueEscDir),GetDescriptionOfMarkedGluePoints()); + BegUndo(SvxResId(STR_EditSetGlueEscDir),GetMarkedObjectList().GetGluePointMarkDescription()); ImpDoMarkedGluePoints(ImpSetEscDir,false,&nThisEsc,&bOn); EndUndo(); } @@ -159,7 +159,7 @@ static void ImpSetPercent(SdrGluePoint& rGP, const SdrObject* pObj, const void* void SdrGlueEditView::SetMarkedGluePointsPercent(bool bOn) { ForceUndirtyMrkPnt(); - BegUndo(SvxResId(STR_EditSetGluePercent),GetDescriptionOfMarkedGluePoints()); + BegUndo(SvxResId(STR_EditSetGluePercent),GetMarkedObjectList().GetGluePointMarkDescription()); ImpDoMarkedGluePoints(ImpSetPercent,false,&bOn); EndUndo(); } @@ -215,7 +215,7 @@ static void ImpSetAlign(SdrGluePoint& rGP, const SdrObject* pObj, const void* pb void SdrGlueEditView::SetMarkedGluePointsAlign(bool bVert, SdrAlign nAlign) { ForceUndirtyMrkPnt(); - BegUndo(SvxResId(STR_EditSetGlueAlign),GetDescriptionOfMarkedGluePoints()); + BegUndo(SvxResId(STR_EditSetGlueAlign),GetMarkedObjectList().GetGluePointMarkDescription()); ImpDoMarkedGluePoints(ImpSetAlign,false,&bVert,&nAlign); EndUndo(); } @@ -226,7 +226,7 @@ void SdrGlueEditView::DeleteMarkedGluePoints() ForceUndirtyMrkPnt(); const bool bUndo = IsUndoEnabled(); if( bUndo ) - BegUndo(SvxResId(STR_EditDelete),GetDescriptionOfMarkedGluePoints(),SdrRepeatFunc::Delete); + BegUndo(SvxResId(STR_EditDelete),GetMarkedObjectList().GetGluePointMarkDescription(),SdrRepeatFunc::Delete); const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) @@ -354,7 +354,7 @@ void SdrGlueEditView::MoveMarkedGluePoints(const Size& rSiz, bool bCopy) ForceUndirtyMrkPnt(); OUString aStr(SvxResId(STR_EditMove)); if (bCopy) aStr += SvxResId(STR_EditWithCopy); - BegUndo(aStr,GetDescriptionOfMarkedGluePoints(),SdrRepeatFunc::Move); + BegUndo(aStr,GetMarkedObjectList().GetGluePointMarkDescription(),SdrRepeatFunc::Move); if (bCopy) ImpCopyMarkedGluePoints(); ImpTransformMarkedGluePoints(ImpMove,&rSiz); EndUndo(); @@ -372,7 +372,7 @@ void SdrGlueEditView::ResizeMarkedGluePoints(const Point& rRef, const Fraction& ForceUndirtyMrkPnt(); OUString aStr(SvxResId(STR_EditResize)); if (bCopy) aStr+=SvxResId(STR_EditWithCopy); - BegUndo(aStr,GetDescriptionOfMarkedGluePoints(),SdrRepeatFunc::Resize); + BegUndo(aStr,GetMarkedObjectList().GetGluePointMarkDescription(),SdrRepeatFunc::Resize); if (bCopy) ImpCopyMarkedGluePoints(); ImpTransformMarkedGluePoints(ImpResize,&rRef,&xFact,&yFact); EndUndo(); @@ -390,7 +390,7 @@ void SdrGlueEditView::RotateMarkedGluePoints(const Point& rRef, Degree100 nAngle ForceUndirtyMrkPnt(); OUString aStr(SvxResId(STR_EditRotate)); if (bCopy) aStr+=SvxResId(STR_EditWithCopy); - BegUndo(aStr,GetDescriptionOfMarkedGluePoints(),SdrRepeatFunc::Rotate); + BegUndo(aStr,GetMarkedObjectList().GetGluePointMarkDescription(),SdrRepeatFunc::Rotate); if (bCopy) ImpCopyMarkedGluePoints(); double nSin = sin(toRadians(nAngle)); double nCos = cos(toRadians(nAngle)); diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 62a001e19bf1..669f114163a0 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -2731,7 +2731,7 @@ OUString SdrMarkView::ImpGetDescriptionString(TranslateId pStrCacheID, ImpGetDes } else if(nOpt == ImpGetDescriptionOptions::GLUEPOINTS) { - sStr = sStr.replaceAt(nPos, 2, GetDescriptionOfMarkedGluePoints()); + sStr = sStr.replaceAt(nPos, 2, GetMarkedObjectList().GetGluePointMarkDescription()); } else {
