[Libreoffice-commits] core.git: sw/inc sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 6 06:38:35 UTC 2021
sw/inc/textboxhelper.hxx | 2 +-
sw/source/core/doc/textboxhelper.cxx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit cfc677d667e118bfe7f092b584c4773476b9b906
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Jul 5 20:59:12 2021 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Jul 6 08:38:01 2021 +0200
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 at collabora.com>
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,
More information about the Libreoffice-commits
mailing list