Kaydet (Commit) bfff081e authored tarafından Noel Grandin's avatar Noel Grandin

clang-tidy performance-unnecessary-value-param in svl

Change-Id: I8abc272d12e62e25be358dc4c73008971f1cd609
üst 9f877f67
...@@ -86,15 +86,15 @@ public: ...@@ -86,15 +86,15 @@ public:
* If the style sheet is already contained, this call has no effect. * If the style sheet is already contained, this call has no effect.
*/ */
void void
AddStyleSheet(rtl::Reference< SfxStyleSheetBase > style); AddStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style);
/** Removes a style sheet. */ /** Removes a style sheet. */
bool bool
RemoveStyleSheet(rtl::Reference< SfxStyleSheetBase > style); RemoveStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style);
/** Check whether a specified style sheet is stored. */ /** Check whether a specified style sheet is stored. */
bool bool
HasStyleSheet(rtl::Reference< SfxStyleSheetBase > style) const; HasStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) const;
/** Obtain the number of style sheets which are held */ /** Obtain the number of style sheets which are held */
unsigned unsigned
......
...@@ -36,7 +36,7 @@ public: ...@@ -36,7 +36,7 @@ public:
size_t size() const; size_t size() const;
void insert(iterator it, std::unique_ptr<NfCurrencyEntry> p); void insert(const iterator& it, std::unique_ptr<NfCurrencyEntry> p);
}; };
#endif #endif
......
...@@ -39,7 +39,7 @@ class SVL_DLLPUBLIC DocumentLockFile : public LockFileCommon ...@@ -39,7 +39,7 @@ class SVL_DLLPUBLIC DocumentLockFile : public LockFileCommon
css::uno::Reference< css::io::XInputStream > OpenStream(); 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: public:
DocumentLockFile( const OUString& aOrigURL ); DocumentLockFile( const OUString& aOrigURL );
......
...@@ -208,7 +208,7 @@ protected: ...@@ -208,7 +208,7 @@ protected:
virtual ~SfxStyleSheetBasePool(); virtual ~SfxStyleSheetBasePool();
void StoreStyleSheet(rtl::Reference< SfxStyleSheetBase >); void StoreStyleSheet(const rtl::Reference< SfxStyleSheetBase >&);
/** Obtain the indexed style sheets. /** Obtain the indexed style sheets.
*/ */
......
...@@ -69,7 +69,7 @@ public: ...@@ -69,7 +69,7 @@ public:
virtual ~StylePool(); virtual ~StylePool();
static OUString nameOf( SfxItemSet_Pointer_t pSet ); static OUString nameOf( const SfxItemSet_Pointer_t& pSet );
}; };
class SVL_DLLPUBLIC IStylePoolIteratorAccess class SVL_DLLPUBLIC IStylePoolIteratorAccess
......
...@@ -86,7 +86,7 @@ IndexedStyleSheets::GetNumberOfStyleSheets() const ...@@ -86,7 +86,7 @@ IndexedStyleSheets::GetNumberOfStyleSheets() const
} }
void void
IndexedStyleSheets::AddStyleSheet(rtl::Reference< SfxStyleSheetBase > style) IndexedStyleSheets::AddStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style)
{ {
if (!HasStyleSheet(style)) { if (!HasStyleSheet(style)) {
mStyleSheets.push_back(style); mStyleSheets.push_back(style);
...@@ -96,7 +96,7 @@ IndexedStyleSheets::AddStyleSheet(rtl::Reference< SfxStyleSheetBase > style) ...@@ -96,7 +96,7 @@ IndexedStyleSheets::AddStyleSheet(rtl::Reference< SfxStyleSheetBase > style)
} }
bool bool
IndexedStyleSheets::RemoveStyleSheet(rtl::Reference< SfxStyleSheetBase > style) IndexedStyleSheets::RemoveStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style)
{ {
rtl::OUString styleName = style->GetName(); rtl::OUString styleName = style->GetName();
std::vector<unsigned> positions = FindPositionsByName(styleName); std::vector<unsigned> positions = FindPositionsByName(styleName);
...@@ -207,7 +207,7 @@ IndexedStyleSheets::~IndexedStyleSheets() ...@@ -207,7 +207,7 @@ IndexedStyleSheets::~IndexedStyleSheets()
{;} {;}
bool bool
IndexedStyleSheets::HasStyleSheet(rtl::Reference< SfxStyleSheetBase > style) const IndexedStyleSheets::HasStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) const
{ {
rtl::OUString styleName = style->GetName(); rtl::OUString styleName = style->GetName();
std::vector<unsigned> positions = FindPositionsByName(styleName); std::vector<unsigned> positions = FindPositionsByName(styleName);
......
...@@ -965,7 +965,7 @@ SfxUnoStyleSheet* SfxUnoStyleSheet::getUnoStyleSheet( const css::uno::Reference< ...@@ -965,7 +965,7 @@ SfxUnoStyleSheet* SfxUnoStyleSheet::getUnoStyleSheet( const css::uno::Reference<
} }
void void
SfxStyleSheetBasePool::StoreStyleSheet(rtl::Reference< SfxStyleSheetBase > xStyle) SfxStyleSheetBasePool::StoreStyleSheet(const rtl::Reference< SfxStyleSheetBase >& xStyle)
{ {
pImp->mxIndexedStyleSheets->AddStyleSheet(xStyle); pImp->mxIndexedStyleSheets->AddStyleSheet(xStyle);
} }
......
...@@ -332,7 +332,7 @@ namespace { ...@@ -332,7 +332,7 @@ namespace {
* This static method creates a unique name from a shared pointer to a SfxItemSet * This static method creates a unique name from a shared pointer to a SfxItemSet
* The name is the memory address of the SfxItemSet itself. * 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<sal_IntPtr>( pSet.get() ), 16 ); return OUString::number( reinterpret_cast<sal_IntPtr>( pSet.get() ), 16 );
} }
......
...@@ -63,7 +63,7 @@ DocumentLockFile::~DocumentLockFile() ...@@ -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 ); ::osl::MutexGuard aGuard( m_aMutex );
......
...@@ -29,7 +29,7 @@ size_t NfCurrencyTable::size() const ...@@ -29,7 +29,7 @@ size_t NfCurrencyTable::size() const
return maData.size(); return maData.size();
} }
void NfCurrencyTable::insert(iterator it, std::unique_ptr<NfCurrencyEntry> p) void NfCurrencyTable::insert(const iterator& it, std::unique_ptr<NfCurrencyEntry> p)
{ {
maData.insert(it, std::move(p)); maData.insert(it, std::move(p));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment