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 /oox | |
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 'oox')
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 2 | ||||
-rw-r--r-- | oox/source/export/chartexport.cxx | 2 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index bb8e114757c5..14d50fc0f3c6 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -544,7 +544,7 @@ writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const util::DateTime& rTi } static void -writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, Sequence< OUString > aItems ) +writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const Sequence< OUString >& aItems ) { if( aItems.getLength() == 0 ) return; diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 78c6ea985b23..68bb9f0c2e7c 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -3096,7 +3096,7 @@ const char* getErrorBarStyle(sal_Int32 nErrorBarStyle) } Reference< chart2::data::XDataSequence> getLabeledSequence( - uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aSequences, + const uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > >& aSequences, bool bPositive ) { const OUString aRolePrefix( "error-bars" ); diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index eff1d2bc6efd..2f9f7f275eee 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -221,7 +221,7 @@ void DrawingML::WriteSolidFill( sal_uInt32 nColor, sal_Int32 nAlpha ) mpFS->endElementNS( XML_a, XML_solidFill ); } -void DrawingML::WriteSolidFill( const OUString& sSchemeName, Sequence< PropertyValue > aTransformations ) +void DrawingML::WriteSolidFill( const OUString& sSchemeName, const Sequence< PropertyValue >& aTransformations ) { mpFS->startElementNS( XML_a, XML_solidFill, FSEND ); WriteColor( sSchemeName, aTransformations ); @@ -360,7 +360,7 @@ void DrawingML::WriteGradientFill( Reference< XPropertySet > rXPropSet ) } } -void DrawingML::WriteGrabBagGradientFill( Sequence< PropertyValue > aGradientStops, awt::Gradient rGradient ) +void DrawingML::WriteGrabBagGradientFill( const Sequence< PropertyValue >& aGradientStops, awt::Gradient rGradient ) { // write back the original gradient mpFS->startElementNS( XML_a, XML_gsLst, FSEND ); @@ -2027,7 +2027,7 @@ void DrawingML::WriteFill( Reference< XPropertySet > xPropSet ) return; } -void DrawingML::WriteStyleProperties( sal_Int32 nTokenId, Sequence< PropertyValue > aProperties ) +void DrawingML::WriteStyleProperties( sal_Int32 nTokenId, const Sequence< PropertyValue >& aProperties ) { if( aProperties.getLength() > 0 ) { |