diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-14 09:58:40 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-05-14 08:10:22 +0000 |
commit | 248145f99e95cc30bb6231a8e5ea4e294f147040 (patch) | |
tree | c3b5c1e226cc631cde530f2cfb7df2d46f00b8c9 /writerfilter | |
parent | 671eb12dee290607ed66f3b325f28e7bd4695cba (diff) |
Find places where uno::Sequence is passed by value.
Implement a clang plugin to find them, and clean up existing code
to pass them by reference.
Change-Id: If642d87407c73346d9c0164b9fc77c5c3c4354b8
Reviewed-on: https://gerrit.libreoffice.org/9351
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 12 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.hxx | 8 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/SdtHelper.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/SdtHelper.hxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/ThemeTable.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/ThemeTable.hxx | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index bfeb77025e20..9cda8061bb5d 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1289,7 +1289,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, PropertyMapP void DomainMapper_Impl::appendTextContent( const uno::Reference< text::XTextContent > xContent, - const uno::Sequence< beans::PropertyValue > xPropertyValues + const uno::Sequence< beans::PropertyValue >& xPropertyValues ) { SAL_WARN_IF(m_aTextAppendStack.empty(), "writerfilter.dmapper", "no text append stack"); @@ -2865,7 +2865,7 @@ void DomainMapper_Impl::handleAuthor } uno::Sequence< beans::PropertyValues > lcl_createTOXLevelHyperlinks( bool bHyperlinks, const OUString& sChapterNoSeparator, - uno::Sequence< beans::PropertyValues >aLevel, + const uno::Sequence< beans::PropertyValues >& aLevel, PropertyNameSupplier& rPropNameSupplier ) { //create a copy of the level and add two new entries - hyperlink start and end @@ -4400,9 +4400,9 @@ _PageMar::_PageMar() void DomainMapper_Impl::RegisterFrameConversion( - uno::Reference< text::XTextRange > xFrameStartRange, - uno::Reference< text::XTextRange > xFrameEndRange, - uno::Sequence< beans::PropertyValue > aFrameProperties + uno::Reference< text::XTextRange > xFrameStartRange, + uno::Reference< text::XTextRange > xFrameEndRange, + const uno::Sequence< beans::PropertyValue >& aFrameProperties ) { OSL_ENSURE( @@ -4524,7 +4524,7 @@ void DomainMapper_Impl::SetCurrentRedlineToken( sal_Int32 nToken ) pCurrent->m_nToken = nToken; } -void DomainMapper_Impl::SetCurrentRedlineRevertProperties( uno::Sequence<beans::PropertyValue> aProperties ) +void DomainMapper_Impl::SetCurrentRedlineRevertProperties( const uno::Sequence<beans::PropertyValue>& aProperties ) { RedlineParamsPtr pCurrent( GetTopRedline( ) ); if ( pCurrent.get( ) ) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 5b17baf31f8a..130ec482c25c 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -279,7 +279,7 @@ struct FloatingTableInfo uno::Sequence<beans::PropertyValue> m_aFrameProperties; sal_Int32 m_nTableWidth; - FloatingTableInfo(uno::Reference<text::XTextRange> xStart, uno::Reference<text::XTextRange> xEnd, uno::Sequence<beans::PropertyValue> aFrameProperties, sal_Int32 nTableWidth) + FloatingTableInfo(uno::Reference<text::XTextRange> xStart, uno::Reference<text::XTextRange> xEnd, const uno::Sequence<beans::PropertyValue>& aFrameProperties, sal_Int32 nTableWidth) : m_xStart(xStart), m_xEnd(xEnd), m_aFrameProperties(aFrameProperties), @@ -483,7 +483,7 @@ public: void finishParagraph( PropertyMapPtr pPropertyMap ); void appendTextPortion( const OUString& rString, PropertyMapPtr pPropertyMap ); void appendTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >, - const uno::Sequence< beans::PropertyValue > ); + const uno::Sequence< beans::PropertyValue >& ); void appendOLE( const OUString& rStreamName, OLEHandlerPtr pOleHandler ); void appendStarMath( const Value& v ); ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > appendTextSectionAfter( @@ -690,7 +690,7 @@ public: void RegisterFrameConversion( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xFrameStartRange, ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xFrameEndRange, - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aFrameProperties + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aFrameProperties ); bool ExecuteFrameConversion(); @@ -703,7 +703,7 @@ public: void SetCurrentRedlineDate( const OUString& sDate ); void SetCurrentRedlineId( sal_Int32 nId ); void SetCurrentRedlineToken( sal_Int32 nToken ); - void SetCurrentRedlineRevertProperties( uno::Sequence<beans::PropertyValue> aProperties ); + void SetCurrentRedlineRevertProperties( const uno::Sequence<beans::PropertyValue>& aProperties ); void RemoveCurrentRedline( ); void ResetParaMarkerRedline( ); void SetCurrentRedlineInitials( const OUString& sInitials ); diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index cb1ce8c7a8bf..547c7b062d0b 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -66,7 +66,7 @@ void lcl_printProperties( uno::Sequence< beans::PropertyValue > aProps ) } #endif -sal_Int32 lcl_findProperty( uno::Sequence< beans::PropertyValue > aProps, const OUString& sName ) +sal_Int32 lcl_findProperty( const uno::Sequence< beans::PropertyValue >& aProps, const OUString& sName ) { sal_Int32 i = 0; sal_Int32 nLen = aProps.getLength( ); diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx index a18f84ddaef1..5abccdc86f01 100644 --- a/writerfilter/source/dmapper/SdtHelper.cxx +++ b/writerfilter/source/dmapper/SdtHelper.cxx @@ -141,7 +141,7 @@ void SdtHelper::createControlShape(awt::Size aSize, uno::Reference<awt::XControl createControlShape(aSize, xControlModel, uno::Sequence<beans::PropertyValue>()); } -void SdtHelper::createControlShape(awt::Size aSize, uno::Reference<awt::XControlModel> xControlModel, uno::Sequence<beans::PropertyValue> rGrabBag) +void SdtHelper::createControlShape(awt::Size aSize, uno::Reference<awt::XControlModel> xControlModel, const uno::Sequence<beans::PropertyValue>& rGrabBag) { uno::Reference<drawing::XControlShape> xControlShape(m_rDM_Impl.GetTextFactory()->createInstance("com.sun.star.drawing.ControlShape"), uno::UNO_QUERY); xControlShape->setSize(aSize); diff --git a/writerfilter/source/dmapper/SdtHelper.hxx b/writerfilter/source/dmapper/SdtHelper.hxx index 9e730b2335ef..11b776de83e1 100644 --- a/writerfilter/source/dmapper/SdtHelper.hxx +++ b/writerfilter/source/dmapper/SdtHelper.hxx @@ -64,7 +64,7 @@ class SdtHelper /// Create and append the drawing::XControlShape, containing the various models. void createControlShape(com::sun::star::awt::Size aSize, com::sun::star::uno::Reference<com::sun::star::awt::XControlModel>); void createControlShape(com::sun::star::awt::Size aSize, com::sun::star::uno::Reference<com::sun::star::awt::XControlModel>, - com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> rGrabBag); + const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rGrabBag); public: SdtHelper(DomainMapper_Impl& rDM_Impl); virtual ~SdtHelper(); diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx index f654e2c406fc..406a2bc2b09f 100644 --- a/writerfilter/source/dmapper/ThemeTable.cxx +++ b/writerfilter/source/dmapper/ThemeTable.cxx @@ -251,7 +251,7 @@ const OUString ThemeTable::getFontNameForTheme(const Id id) const } } -void ThemeTable::setThemeFontLangProperties(uno::Sequence<beans::PropertyValue> aPropSeq) +void ThemeTable::setThemeFontLangProperties(const uno::Sequence<beans::PropertyValue>& aPropSeq) { for (sal_Int32 i = 0 ; i < aPropSeq.getLength() ; i ++) { diff --git a/writerfilter/source/dmapper/ThemeTable.hxx b/writerfilter/source/dmapper/ThemeTable.hxx index afd7456a2590..e55216bb3815 100644 --- a/writerfilter/source/dmapper/ThemeTable.hxx +++ b/writerfilter/source/dmapper/ThemeTable.hxx @@ -42,7 +42,7 @@ public: const OUString getFontNameForTheme(const Id id) const; static OUString getStringForTheme(const Id id); - void setThemeFontLangProperties(uno::Sequence<beans::PropertyValue> aPropSeq); + void setThemeFontLangProperties(const uno::Sequence<beans::PropertyValue>& aPropSeq); private: // Properties |