summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-30 15:10:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-30 18:03:06 +0200
commit738f7a8cb971a884f74766da0cbf7e59ef8b90e7 (patch)
tree79775212880433f4e7e860bf0efef57baf9f24c8 /sw
parentcf15c4dad74e31a035c0d1ca899dfbef4da90ad2 (diff)
reduce cost of allocating and copying SvxNumRule
by using std::move to avoid copying unnecessarily Change-Id: I940b57c9a05c8d75b9a16291fc4f05756fdeea12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118164 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/app/docstyle.cxx2
-rw-r--r--sw/source/uibase/shells/txtnum.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 2a0427e0f30f..b10570b348a2 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -1357,7 +1357,7 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
{
OSL_ENSURE(m_pNumRule, "No NumRule");
SvxNumRule aRule = m_pNumRule->MakeSvxNumRule();
- m_aCoreSet.Put(SvxNumBulletItem(aRule));
+ m_aCoreSet.Put(SvxNumBulletItem(std::move(aRule)));
}
break;
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index e1890bbd6f34..6f2885397325 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -183,7 +183,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
aSvxRule.SetFeatureFlag(SvxNumRuleFlags::ENABLE_EMBEDDED_BMP, false);
}
- aSet.Put( SvxNumBulletItem( aSvxRule ) );
+ aSet.Put( SvxNumBulletItem( std::move(aSvxRule) ) );
}
aSet.Put( SfxBoolItem( SID_PARAM_NUM_PRESET,false ));