summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-07-05 20:59:12 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-07-06 08:38:01 +0200
commitcfc677d667e118bfe7f092b584c4773476b9b906 (patch)
tree205c30d062899a48e7ce2394cf1cf38520daa446
parent1c8483d2174bc6419829dface97627a4304c8912 (diff)
sw: avoid not needed copy in SwTextBoxHelper::getProperty()
Change-Id: If4b4cecf083367082542e12d57ddf16fef3c6dd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118454 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/inc/textboxhelper.hxx2
-rw-r--r--sw/source/core/doc/textboxhelper.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index 1c9fdc66e703..4e73188debee 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -74,7 +74,7 @@ public:
static void getProperty(SwFrameFormat const* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID,
css::uno::Any& rValue);
/// Get a property of the underlying TextFrame.
- static css::uno::Any getProperty(SwFrameFormat const* pShape, OUString sPropName);
+ static css::uno::Any getProperty(SwFrameFormat const* pShape, const OUString& rPropName);
/// There are two types of enum of anchor type, so this function maps this.
static css::text::TextContentAnchorType mapAnchorType(const RndStdIds& rAnchorID);
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index b8edbb9918cd..a47d1d251164 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -584,7 +584,7 @@ void SwTextBoxHelper::getProperty(SwFrameFormat const* pShape, sal_uInt16 nWID,
}
}
-css::uno::Any SwTextBoxHelper::getProperty(SwFrameFormat const* pShape, OUString sPropName)
+css::uno::Any SwTextBoxHelper::getProperty(SwFrameFormat const* pShape, const OUString& rPropName)
{
if (!pShape)
return uno::Any();
@@ -596,7 +596,7 @@ css::uno::Any SwTextBoxHelper::getProperty(SwFrameFormat const* pShape, OUString
uno::Reference<beans::XPropertySet> const xPropertySet(
SwXTextFrame::CreateXTextFrame(*pFormat->GetDoc(), pFormat), uno::UNO_QUERY);
- return xPropertySet->getPropertyValue(sPropName);
+ return xPropertySet->getPropertyValue(rPropName);
}
void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID,