summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-06 15:29:08 +0200
committerNoel Grandin <noel@peralex.com>2014-03-18 08:32:26 +0200
commit86a32589e90ee983159fb5b2c6a594428ab7d422 (patch)
tree6de946fe2b9b25614f0d197af95e9d3aadcd1bd9 /sot
parentbb17844099ba98a77c8e5d7a25c0c416a4b0641e (diff)
Find places where OUString and OString are passed by value.
It's not very efficient, because we generally end up copying it twice - once into the parameter and again into the destination OUString. So I create a clang plugin that finds such places and generates a warning so that we can convert them to pass-by-reference. Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
Diffstat (limited to 'sot')
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.cxx4
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.hxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index 90887e462297..12fcd50141e3 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -120,7 +120,7 @@ void OLESimpleStorage::UpdateOriginal_Impl()
}
-void OLESimpleStorage::InsertInputStreamToStorage_Impl( BaseStorage* pStorage, OUString aName, const uno::Reference< io::XInputStream >& xInputStream )
+void OLESimpleStorage::InsertInputStreamToStorage_Impl( BaseStorage* pStorage, const OUString & aName, const uno::Reference< io::XInputStream >& xInputStream )
throw ( uno::Exception )
{
if ( !pStorage || aName.isEmpty() || !xInputStream.is() )
@@ -165,7 +165,7 @@ void OLESimpleStorage::InsertInputStreamToStorage_Impl( BaseStorage* pStorage, O
}
-void OLESimpleStorage::InsertNameAccessToStorage_Impl( BaseStorage* pStorage, OUString aName, const uno::Reference< container::XNameAccess >& xNameAccess )
+void OLESimpleStorage::InsertNameAccessToStorage_Impl( BaseStorage* pStorage, const OUString & aName, const uno::Reference< container::XNameAccess >& xNameAccess )
throw ( uno::Exception )
{
if ( !pStorage || aName.isEmpty() || !xNameAccess.is() )
diff --git a/sot/source/unoolestorage/xolesimplestorage.hxx b/sot/source/unoolestorage/xolesimplestorage.hxx
index ecd718c1ae7c..c9777c3c3396 100644
--- a/sot/source/unoolestorage/xolesimplestorage.hxx
+++ b/sot/source/unoolestorage/xolesimplestorage.hxx
@@ -59,10 +59,10 @@ class OLESimpleStorage : public ::cppu::WeakImplHelper3
void UpdateOriginal_Impl();
- static void InsertInputStreamToStorage_Impl( BaseStorage* pStorage, OUString aName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInputStream )
+ static void InsertInputStreamToStorage_Impl( BaseStorage* pStorage, const OUString & aName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInputStream )
throw ( ::com::sun::star::uno::Exception );
- static void InsertNameAccessToStorage_Impl( BaseStorage* pStorage, OUString aName, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xNameAccess )
+ static void InsertNameAccessToStorage_Impl( BaseStorage* pStorage, const OUString & aName, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xNameAccess )
throw ( ::com::sun::star::uno::Exception );
public: