diff --git a/include/svl/IndexedStyleSheets.hxx b/include/svl/IndexedStyleSheets.hxx index 1067316e9efc..790a07821b79 100644 --- a/include/svl/IndexedStyleSheets.hxx +++ b/include/svl/IndexedStyleSheets.hxx @@ -86,15 +86,15 @@ public: * If the style sheet is already contained, this call has no effect. */ void - AddStyleSheet(rtl::Reference< SfxStyleSheetBase > style); + AddStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style); /** Removes a style sheet. */ bool - RemoveStyleSheet(rtl::Reference< SfxStyleSheetBase > style); + RemoveStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style); /** Check whether a specified style sheet is stored. */ bool - HasStyleSheet(rtl::Reference< SfxStyleSheetBase > style) const; + HasStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) const; /** Obtain the number of style sheets which are held */ unsigned diff --git a/include/svl/currencytable.hxx b/include/svl/currencytable.hxx index 964038da3ed7..275391649ff5 100644 --- a/include/svl/currencytable.hxx +++ b/include/svl/currencytable.hxx @@ -36,7 +36,7 @@ public: size_t size() const; - void insert(iterator it, std::unique_ptr p); + void insert(const iterator& it, std::unique_ptr p); }; #endif diff --git a/include/svl/documentlockfile.hxx b/include/svl/documentlockfile.hxx index b658dccf8c29..98dde757cf7b 100644 --- a/include/svl/documentlockfile.hxx +++ b/include/svl/documentlockfile.hxx @@ -39,7 +39,7 @@ class SVL_DLLPUBLIC DocumentLockFile : public LockFileCommon css::uno::Reference< css::io::XInputStream > OpenStream(); - void WriteEntryToStream( const LockFileEntry& aEntry, css::uno::Reference< css::io::XOutputStream > xStream ); + void WriteEntryToStream( const LockFileEntry& aEntry, const css::uno::Reference< css::io::XOutputStream >& xStream ); public: DocumentLockFile( const OUString& aOrigURL ); diff --git a/include/svl/style.hxx b/include/svl/style.hxx index 79814cc2d3b9..dc9c99df55fe 100644 --- a/include/svl/style.hxx +++ b/include/svl/style.hxx @@ -208,7 +208,7 @@ protected: virtual ~SfxStyleSheetBasePool(); - void StoreStyleSheet(rtl::Reference< SfxStyleSheetBase >); + void StoreStyleSheet(const rtl::Reference< SfxStyleSheetBase >&); /** Obtain the indexed style sheets. */ diff --git a/include/svl/stylepool.hxx b/include/svl/stylepool.hxx index 93caa6aea0f9..461ba2f3bc6b 100644 --- a/include/svl/stylepool.hxx +++ b/include/svl/stylepool.hxx @@ -69,7 +69,7 @@ public: virtual ~StylePool(); - static OUString nameOf( SfxItemSet_Pointer_t pSet ); + static OUString nameOf( const SfxItemSet_Pointer_t& pSet ); }; class SVL_DLLPUBLIC IStylePoolIteratorAccess diff --git a/svl/source/items/IndexedStyleSheets.cxx b/svl/source/items/IndexedStyleSheets.cxx index f543d18b15d6..750a7fd18771 100644 --- a/svl/source/items/IndexedStyleSheets.cxx +++ b/svl/source/items/IndexedStyleSheets.cxx @@ -86,7 +86,7 @@ IndexedStyleSheets::GetNumberOfStyleSheets() const } void -IndexedStyleSheets::AddStyleSheet(rtl::Reference< SfxStyleSheetBase > style) +IndexedStyleSheets::AddStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) { if (!HasStyleSheet(style)) { mStyleSheets.push_back(style); @@ -96,7 +96,7 @@ IndexedStyleSheets::AddStyleSheet(rtl::Reference< SfxStyleSheetBase > style) } bool -IndexedStyleSheets::RemoveStyleSheet(rtl::Reference< SfxStyleSheetBase > style) +IndexedStyleSheets::RemoveStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) { rtl::OUString styleName = style->GetName(); std::vector positions = FindPositionsByName(styleName); @@ -207,7 +207,7 @@ IndexedStyleSheets::~IndexedStyleSheets() {;} bool -IndexedStyleSheets::HasStyleSheet(rtl::Reference< SfxStyleSheetBase > style) const +IndexedStyleSheets::HasStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) const { rtl::OUString styleName = style->GetName(); std::vector positions = FindPositionsByName(styleName); diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 1ec3a1870c4b..4221020c5077 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -965,7 +965,7 @@ SfxUnoStyleSheet* SfxUnoStyleSheet::getUnoStyleSheet( const css::uno::Reference< } void -SfxStyleSheetBasePool::StoreStyleSheet(rtl::Reference< SfxStyleSheetBase > xStyle) +SfxStyleSheetBasePool::StoreStyleSheet(const rtl::Reference< SfxStyleSheetBase >& xStyle) { pImp->mxIndexedStyleSheets->AddStyleSheet(xStyle); } diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx index f75435a6c59b..f260672d8d4e 100644 --- a/svl/source/items/stylepool.cxx +++ b/svl/source/items/stylepool.cxx @@ -332,7 +332,7 @@ namespace { * This static method creates a unique name from a shared pointer to a SfxItemSet * The name is the memory address of the SfxItemSet itself. */ -OUString StylePool::nameOf( SfxItemSet_Pointer_t pSet ) +OUString StylePool::nameOf( const SfxItemSet_Pointer_t& pSet ) { return OUString::number( reinterpret_cast( pSet.get() ), 16 ); } diff --git a/svl/source/misc/documentlockfile.cxx b/svl/source/misc/documentlockfile.cxx index 6cd169972739..d71e2e958e5a 100644 --- a/svl/source/misc/documentlockfile.cxx +++ b/svl/source/misc/documentlockfile.cxx @@ -63,7 +63,7 @@ DocumentLockFile::~DocumentLockFile() } -void DocumentLockFile::WriteEntryToStream( const LockFileEntry& aEntry, uno::Reference< io::XOutputStream > xOutput ) +void DocumentLockFile::WriteEntryToStream( const LockFileEntry& aEntry, const uno::Reference< io::XOutputStream >& xOutput ) { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/svl/source/numbers/currencytable.cxx b/svl/source/numbers/currencytable.cxx index 17e362d1c833..380e47bd4a2e 100644 --- a/svl/source/numbers/currencytable.cxx +++ b/svl/source/numbers/currencytable.cxx @@ -29,7 +29,7 @@ size_t NfCurrencyTable::size() const return maData.size(); } -void NfCurrencyTable::insert(iterator it, std::unique_ptr p) +void NfCurrencyTable::insert(const iterator& it, std::unique_ptr p) { maData.insert(it, std::move(p)); }