summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-11-05 11:19:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-07 17:20:09 +0100
commit5fdfc074c93447f9eb1c9a351ee4690126ba782c (patch)
tree76f5c4c3d4de02117fd8267cbdf06db3ae7fef27 /sot
parent0fe2b2545da977cd462c06e2a6ec6551b9903497 (diff)
loplugin:passstuffbyref make some small improvements
Change-Id: Ib14a2e6b41165887fcf99c3d155850faa8564822 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176218 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 51c43bb290e3..178194bba87d 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -569,9 +569,9 @@ struct UCBStorageElement_Impl
::ucbhelper::Content* GetContent();
bool IsModified() const;
- OUString GetContentType() const;
+ const OUString & GetContentType() const;
void SetContentType( const OUString& );
- OUString GetOriginalContentType() const;
+ const OUString & GetOriginalContentType() const;
bool IsLoaded() const
{ return m_xStream.is() || m_xStorage.is(); }
};
@@ -586,7 +586,7 @@ struct UCBStorageElement_Impl
return nullptr;
}
-OUString UCBStorageElement_Impl::GetContentType() const
+const OUString & UCBStorageElement_Impl::GetContentType() const
{
if ( m_xStream.is() )
return m_xStream->m_aContentType;
@@ -595,7 +595,7 @@ OUString UCBStorageElement_Impl::GetContentType() const
else
{
OSL_FAIL("Element not loaded!");
- return OUString();
+ return EMPTY_OUSTRING;
}
}
@@ -612,14 +612,14 @@ void UCBStorageElement_Impl::SetContentType( const OUString& rType )
}
}
-OUString UCBStorageElement_Impl::GetOriginalContentType() const
+const OUString & UCBStorageElement_Impl::GetOriginalContentType() const
{
if ( m_xStream.is() )
return m_xStream->m_aOriginalContentType;
else if ( m_xStorage.is() )
return m_xStorage->m_aOriginalContentType;
else
- return OUString();
+ return EMPTY_OUSTRING;
}
bool UCBStorageElement_Impl::IsModified() const