From 4cbcec9ed4c51277b00c155a5fa097880c0dee4b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 8 Apr 2016 16:33:17 +0200 Subject: clang-tidy performance-unnecessary-value-param in sfx2 Change-Id: I035eec1f3701c48b9a85c60400c68f9365299b48 --- sfx2/source/doc/SfxDocumentMetaData.cxx | 6 +++--- sfx2/source/doc/docfile.cxx | 2 +- sfx2/source/doc/docinf.cxx | 4 ++-- sfx2/source/doc/doctemplateslocal.cxx | 6 +++--- sfx2/source/doc/doctemplateslocal.hxx | 6 +++--- sfx2/source/doc/guisaveas.cxx | 2 +- sfx2/source/doc/objxtor.cxx | 4 ++-- sfx2/source/doc/oleprops.cxx | 2 +- sfx2/source/doc/oleprops.hxx | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) (limited to 'sfx2/source/doc') diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 686c57d8e8cc..22f0f27540d1 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -321,7 +321,7 @@ protected: /// check if we are initialized properly void SAL_CALL checkInit() const; /// initialize state from given DOM tree - void SAL_CALL init(css::uno::Reference i_xDom); + void SAL_CALL init(const css::uno::Reference& i_xDom); /// update element in DOM tree void SAL_CALL updateElement(const char *i_name, std::vector >* i_pAttrs = nullptr); @@ -653,7 +653,7 @@ SfxDocumentMetaData::getURLProperties( // return the text of the (hopefully unique, i.e., normalize first!) text // node _below_ the given node OUString SAL_CALL -getNodeText(css::uno::Reference i_xNode) +getNodeText(const css::uno::Reference& i_xNode) throw (css::uno::RuntimeException) { if (!i_xNode.is()) throw css::uno::RuntimeException( @@ -1119,7 +1119,7 @@ SfxDocumentMetaData::checkInit() const // throw (css::uno::RuntimeException) // initialize state from DOM tree void SAL_CALL SfxDocumentMetaData::init( - css::uno::Reference i_xDoc) + const css::uno::Reference& i_xDoc) { if (!i_xDoc.is()) throw css::uno::RuntimeException( OUString("SfxDocumentMetaData::init: no DOM tree given"), *this); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index bd2fca7cecfe..c9ecec7634fa 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2672,7 +2672,7 @@ SfxMedium::GetInteractionHandler( bool bGetAlways ) } -void SfxMedium::SetFilter( std::shared_ptr pFilter ) +void SfxMedium::SetFilter( const std::shared_ptr& pFilter ) { pImp->m_pFilter = pFilter; } diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx index 75a4dc673840..e27d276aca1a 100644 --- a/sfx2/source/doc/docinf.cxx +++ b/sfx2/source/doc/docinf.cxx @@ -45,7 +45,7 @@ using namespace ::com::sun::star; namespace sfx2 { sal_uInt32 LoadOlePropertySet( - uno::Reference< document::XDocumentProperties> i_xDocProps, + const uno::Reference< document::XDocumentProperties>& i_xDocProps, SotStorage* i_pStorage ) { // *** global properties from stream "005SummaryInformation" *** @@ -195,7 +195,7 @@ sal_uInt32 LoadOlePropertySet( } bool SaveOlePropertySet( - uno::Reference< document::XDocumentProperties> i_xDocProps, + const uno::Reference< document::XDocumentProperties>& i_xDocProps, SotStorage* i_pStorage, const uno::Sequence * i_pThumb, const uno::Sequence * i_pGuid, diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx index 63017bb00fdb..f50d3fe43cba 100644 --- a/sfx2/source/doc/doctemplateslocal.cxx +++ b/sfx2/source/doc/doctemplateslocal.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star; -std::vector< beans::StringPair > DocTemplLocaleHelper::ReadGroupLocalizationSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext > xContext ) +std::vector< beans::StringPair > DocTemplLocaleHelper::ReadGroupLocalizationSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext >& xContext ) throw( uno::Exception ) { OUString aStringID = "groupuinames.xml"; @@ -41,7 +41,7 @@ std::vector< beans::StringPair > DocTemplLocaleHelper::ReadGroupLocalizationSequ } -void SAL_CALL DocTemplLocaleHelper::WriteGroupLocalizationSequence( const uno::Reference< io::XOutputStream >& xOutStream, const std::vector< beans::StringPair >& aSequence, const uno::Reference< uno::XComponentContext > xContext ) +void SAL_CALL DocTemplLocaleHelper::WriteGroupLocalizationSequence( const uno::Reference< io::XOutputStream >& xOutStream, const std::vector< beans::StringPair >& aSequence, const uno::Reference< uno::XComponentContext >& xContext ) throw( uno::Exception ) { if ( !xOutStream.is() ) @@ -88,7 +88,7 @@ void SAL_CALL DocTemplLocaleHelper::WriteGroupLocalizationSequence( const uno::R } -std::vector< beans::StringPair > SAL_CALL DocTemplLocaleHelper::ReadLocalizationSequence_Impl( const uno::Reference< io::XInputStream >& xInStream, const OUString& aStringID, const uno::Reference< uno::XComponentContext > xContext ) +std::vector< beans::StringPair > SAL_CALL DocTemplLocaleHelper::ReadLocalizationSequence_Impl( const uno::Reference< io::XInputStream >& xInStream, const OUString& aStringID, const uno::Reference< uno::XComponentContext >& xContext ) throw( uno::Exception ) { if ( !xContext.is() || !xInStream.is() ) diff --git a/sfx2/source/doc/doctemplateslocal.hxx b/sfx2/source/doc/doctemplateslocal.hxx index 53a98140d714..a98ae0377d7c 100644 --- a/sfx2/source/doc/doctemplateslocal.hxx +++ b/sfx2/source/doc/doctemplateslocal.hxx @@ -42,7 +42,7 @@ class DocTemplLocaleHelper : public cppu::WeakImplHelper < css::xml::sax::XDocum DocTemplLocaleHelper(); std::vector< css::beans::StringPair > GetParsingResult(); - static std::vector< css::beans::StringPair > SAL_CALL ReadLocalizationSequence_Impl( const css::uno::Reference< css::io::XInputStream >& xInStream, const OUString& aStringID, const css::uno::Reference< css::uno::XComponentContext > xContext ) + static std::vector< css::beans::StringPair > SAL_CALL ReadLocalizationSequence_Impl( const css::uno::Reference< css::io::XInputStream >& xInStream, const OUString& aStringID, const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw( css::uno::Exception ); public: @@ -53,7 +53,7 @@ public: std::vector< css::beans::StringPair > ReadGroupLocalizationSequence( const css::uno::Reference< css::io::XInputStream >& xInStream, - const css::uno::Reference< css::uno::XComponentContext > xContext ) + const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw( css::uno::Exception ); // writes sequence of elements ( GroupName, GroupUIName ) @@ -61,7 +61,7 @@ public: void SAL_CALL WriteGroupLocalizationSequence( const css::uno::Reference< css::io::XOutputStream >& xOutStream, const std::vector< css::beans::StringPair >& aSequence, - const css::uno::Reference< css::uno::XComponentContext > xContext ) + const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw( css::uno::Exception ); // XDocumentHandler diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index c00ed82c5d40..fc63a1bf9820 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1300,7 +1300,7 @@ uno::Reference< css::frame::XModuleManager2 > SfxStoringHelper::GetModuleManager } -bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel, +bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xModel, const OUString& aSlotName, uno::Sequence< beans::PropertyValue >& aArgsSequence, bool bPreselectPassword, diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 5f2ff89adc0b..eddcb68f0057 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -464,7 +464,7 @@ OUString SfxObjectShell::CreateShellID( const SfxObjectShell* pShell ) SfxObjectShell* SfxObjectShell::GetFirst ( - std::function isObjectShell, + const std::function& isObjectShell, bool bOnlyVisible ) { @@ -491,7 +491,7 @@ SfxObjectShell* SfxObjectShell::GetFirst SfxObjectShell* SfxObjectShell::GetNext ( const SfxObjectShell& rPrev, - std::function isObjectShell, + const std::function& isObjectShell, bool bOnlyVisible ) { diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx index f25c14f081c4..c29de45b3a17 100644 --- a/sfx2/source/doc/oleprops.cxx +++ b/sfx2/source/doc/oleprops.cxx @@ -796,7 +796,7 @@ bool SfxOleSection::GetDateValue( util::Date& rValue, sal_Int32 nPropId ) const return pProp != nullptr; } -void SfxOleSection::SetProperty( SfxOlePropertyRef xProp ) +void SfxOleSection::SetProperty( const SfxOlePropertyRef& xProp ) { if( xProp.get() ) maPropMap[ xProp->GetPropId() ] = xProp; diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx index ffe70d30b4d4..bba734276c19 100644 --- a/sfx2/source/doc/oleprops.hxx +++ b/sfx2/source/doc/oleprops.hxx @@ -292,7 +292,7 @@ public: bool GetDateValue( css::util::Date& rValue, sal_Int32 nPropId ) const; /** Adds the passed property to the property set. Drops an existing old property. */ - void SetProperty( SfxOlePropertyRef xProp ); + void SetProperty( const SfxOlePropertyRef& xProp ); /** Inserts a signed int32 property with the passed value. */ void SetInt32Value( sal_Int32 nPropId, sal_Int32 nValue ); /** Inserts a floating-point property with the passed value. */ -- cgit