diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-06 09:23:33 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-09 08:34:40 +0000 |
commit | 6c80a8fe89fadf9a2c7260a09c037a09462f53d1 (patch) | |
tree | d36da9ee2a5fdc579d2a57ff6ba02deaddfa785a /xmloff/source/draw | |
parent | e1fc599eb764186e5d511ace9785463eebbc7028 (diff) |
new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/animationimport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlimp.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 3 |
4 files changed, 5 insertions, 12 deletions
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index becd54016286..a012696d3238 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -90,9 +90,7 @@ using ::com::sun::star::lang::XInitialization; Sequence< OUString > SAL_CALL AnimationsImport_getSupportedServiceNames() throw() { - const OUString aServiceName( "com.sun.star.comp.Xmloff.AnimationsImport" ); - const Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; + return Sequence< OUString > { "com.sun.star.comp.Xmloff.AnimationsImport" }; } OUString SAL_CALL AnimationsImport_getImplementationName() throw() diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 51d536f5d3c3..9283b168fc10 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -2729,9 +2729,7 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage ) #define SERVICE( classname, servicename, implementationname, draw, flags )\ uno::Sequence< OUString > SAL_CALL classname##_getSupportedServiceNames() throw()\ {\ - const OUString aServiceName( servicename );\ - const uno::Sequence< OUString > aSeq( &aServiceName, 1 );\ - return aSeq;\ + return uno::Sequence< OUString > { servicename };\ }\ OUString SAL_CALL classname##_getImplementationName() throw()\ {\ diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index afc5130e15fc..88d036da02f9 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -254,13 +254,11 @@ SvXMLImportContext *SdXMLFlatDocContext_Impl::CreateChildContext( #define SERVICE(classname,servicename,implementationname,draw,flags)\ uno::Sequence< OUString > SAL_CALL classname##_getSupportedServiceNames() throw()\ {\ - const OUString aServiceName( servicename );\ - const uno::Sequence< OUString > aSeq( &aServiceName, 1 );\ - return aSeq;\ + return uno::Sequence< OUString > { servicename };\ }\ OUString SAL_CALL classname##_getImplementationName() throw()\ {\ - return OUString( implementationname );\ + return OUString( implementationname );\ }\ uno::Reference< uno::XInterface > SAL_CALL classname##_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )\ {\ diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index de47927b9331..676e5a670883 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -4205,8 +4205,7 @@ void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Reference< bean if ( aGeoPropSet >>= aGeoPropSeq ) { bool bCoordinates = false; - const OUString sCustomShapeType( "non-primitive" ); - OUString aCustomShapeType( sCustomShapeType ); + OUString aCustomShapeType( "non-primitive" ); sal_Int32 j, nGeoPropCount = aGeoPropSeq.getLength(); for ( j = 0; j < nGeoPropCount; j++ ) |