From fe88fac28afac3ec0b837c1e2e38d9f8cf152080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Mon, 12 May 2014 19:18:05 +0200 Subject: [PATCH] oox: Use references to prevent unnecessary object copies Change-Id: I5113bc581a8ac98b97c6598a5355e050c7ad7860 --- include/oox/export/drawingml.hxx | 4 ++-- oox/source/export/drawingml.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index 852387deec0b..2b3eb9eec8e7 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -123,8 +123,8 @@ public: OUString WriteImage( const Graphic &rGraphic , bool bRelPathToMedia = false); void WriteColor( sal_uInt32 nColor, sal_Int32 nAlpha = MAX_PERCENT ); - void WriteColor( const OUString& sColorSchemeName, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aTransformations ); - void WriteColorTransformations( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aTransformations ); + void WriteColor( const OUString& sColorSchemeName, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aTransformations ); + void WriteColorTransformations( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aTransformations ); void WriteGradientStop( sal_uInt16 nStop, sal_uInt32 nColor ); void WriteLineArrow( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet, bool bLineStart ); void WriteConnectorConnections( EscherConnectorListEntry& rConnectorEntry, sal_Int32 nStartID, sal_Int32 nEndID ); diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 99deb828904d..eff1d2bc6efd 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -181,7 +181,7 @@ void DrawingML::WriteColor( sal_uInt32 nColor, sal_Int32 nAlpha ) } } -void DrawingML::WriteColor( const OUString& sColorSchemeName, Sequence< PropertyValue > aTransformations ) +void DrawingML::WriteColor( const OUString& sColorSchemeName, const Sequence< PropertyValue >& aTransformations ) { // prevent writing a tag with empty val attribute if( sColorSchemeName.isEmpty() ) @@ -201,7 +201,7 @@ void DrawingML::WriteColor( const OUString& sColorSchemeName, Sequence< Property FSEND ); } -void DrawingML::WriteColorTransformations( Sequence< PropertyValue > aTransformations ) +void DrawingML::WriteColorTransformations( const Sequence< PropertyValue >& aTransformations ) { for( sal_Int32 i = 0; i < aTransformations.getLength(); i++ ) {