diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-15 09:56:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-15 10:31:48 +0100 |
commit | ddb682f6f7955595065df97b5d13497c08e38389 (patch) | |
tree | 13e27e651729a68bcd1d44ecb3ef65fd4508f99b /svx | |
parent | 2029fb151855fba2f812403fbb96b0db1965bcf6 (diff) |
return by const& from SdrObject::GetName
shaves some small amount off the profile of loading a large chart
Change-Id: I24c99a68382663e52baccd34e22b63bf16fa1eb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129954
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index cdae6b949c43..cb89a2fc5555 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -800,14 +800,16 @@ void SdrObject::SetName(const OUString& rStr, const bool bSetChanged) } } -OUString SdrObject::GetName() const +const OUString & SdrObject::GetName() const { + static const OUString EMPTY = u""; + if(m_pPlusData) { return m_pPlusData->aObjName; } - return OUString(); + return EMPTY; } void SdrObject::SetTitle(const OUString& rStr) |