summaryrefslogtreecommitdiff
path: root/sd/source/ui/func/futransf.cxx
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-05-30 13:39:31 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2024-05-31 09:25:03 +0200
commit5da4acd4818741c3b68be211bd7a21e4c080ed4d (patch)
tree2e3bfbdd3a991d28a4a641b33689663b1f2b6b96 /sd/source/ui/func/futransf.cxx
parentac3f2bd367743cc28fe4728279c65125c6f30e7a (diff)
sd: Reduce number of calls to GetMarkedObjectList()
From 211 to 129 Change-Id: I2ccb4261f5f842e7f1514bc0c8eab2591ead173e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168256 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd/source/ui/func/futransf.cxx')
-rw-r--r--sd/source/ui/func/futransf.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index 3b1790028102..d9e92c000413 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -52,7 +52,8 @@ namespace {
void setUndo(::sd::View* pView, const SfxItemSet* pArgs, bool addPageMargin)
{
// Undo
- OUString aString = pView->GetMarkedObjectList().GetMarkDescription() +
+ const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
+ OUString aString = rMarkList.GetMarkDescription() +
" " + SdResId(STR_TRANSFORM);
pView->BegUndo(aString);
pView->SetGeoAttrToMarked(*pArgs, addPageMargin);
@@ -64,7 +65,8 @@ void setUndo(::sd::View* pView, const SfxItemSet* pArgs, bool addPageMargin)
void FuTransform::DoExecute( SfxRequest& rReq )
{
- if (mpView->GetMarkedObjectList().GetMarkCount() == 0)
+ const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
+ if (rMarkList.GetMarkCount() == 0)
return;
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -82,7 +84,6 @@ void FuTransform::DoExecute( SfxRequest& rReq )
VclPtr<SfxAbstractTabDialog> pDlg;
bool bWelded = false;
- const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
if( rMarkList.GetMarkCount() == 1 &&
pObj->GetObjInventor() == SdrInventor::Default &&