summaryrefslogtreecommitdiff
path: root/editeng/source/items
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-11-06 13:38:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-06 14:28:35 +0100
commit2796d979fad388b32c466b8fb6d3dce8b5bdf31d (patch)
treeee919530ed5da6be2901af5fe0522a17b1f1cc27 /editeng/source/items
parenta43b5e3de41856407dbad337dac8e96d7e966429 (diff)
loplugin:passstuffbyref in editeng
Change-Id: I015616d7a008692b63586cd5d2ae9cc5586ead4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176135 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source/items')
-rw-r--r--editeng/source/items/CustomPropertyField.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/editeng/source/items/CustomPropertyField.cxx b/editeng/source/items/CustomPropertyField.cxx
index eaad4c4c4db8..463f128ea2f1 100644
--- a/editeng/source/items/CustomPropertyField.cxx
+++ b/editeng/source/items/CustomPropertyField.cxx
@@ -48,21 +48,21 @@ MetaAction* CustomPropertyField::createBeginComment() const
return new MetaCommentAction("FIELD_SEQ_BEGIN"_ostr);
}
-OUString CustomPropertyField::GetFormatted(uno::Reference<document::XDocumentProperties> const & xDocumentProperties)
+const OUString & CustomPropertyField::GetFormatted(uno::Reference<document::XDocumentProperties> const & xDocumentProperties)
{
if (msName.isEmpty())
- return OUString();
+ return EMPTY_OUSTRING;
if (!xDocumentProperties.is())
- return OUString();
+ return EMPTY_OUSTRING;
uno::Reference<beans::XPropertyContainer> xPropertyContainer = xDocumentProperties->getUserDefinedProperties();
if (!xPropertyContainer.is())
- return OUString();
+ return EMPTY_OUSTRING;
uno::Reference<beans::XPropertySet> xPropertySet(xPropertyContainer, uno::UNO_QUERY);
if (!xPropertySet.is())
- return OUString();
+ return EMPTY_OUSTRING;
uno::Any aAny = xPropertySet->getPropertyValue(msName);
if (!aAny.has<OUString>())
- return OUString();
+ return EMPTY_OUSTRING;
msCurrentPresentation = aAny.get<OUString>();
return msCurrentPresentation;
}