[Libreoffice-commits] core.git: sd/source

Tor Lillqvist tml at collabora.com
Tue Nov 3 06:03:11 PST 2015


 sd/source/core/CustomAnimationPreset.cxx |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 250574fd1ade12030945718022e342e786952827
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Nov 3 15:43:22 2015 +0200

    Bin a few pointless variables
    
    Change-Id: I5198163e43b17786d3646cf398ec1b8e6ab1b438

diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index f1a8005..740f8b3 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -90,7 +90,6 @@ void implImportLabels( const Reference< XMultiServiceFactory >& xConfigProvider,
         Reference< XNameAccess > xConfigAccess( getNodeAccess( xConfigProvider, rNodePath ) );
         if( xConfigAccess.is() )
         {
-            OUString aLabel( "Label" );
             Reference< XNameAccess > xNameAccess;
             Sequence< OUString > aNames( xConfigAccess->getElementNames() );
             const OUString* p = aNames.getConstArray();
@@ -101,7 +100,7 @@ void implImportLabels( const Reference< XMultiServiceFactory >& xConfigProvider,
                 if( xNameAccess.is() )
                 {
                     OUString aUIName;
-                    xNameAccess->getByName( aLabel ) >>= aUIName;
+                    xNameAccess->getByName( "Label" ) >>= aUIName;
                     if( !aUIName.isEmpty() )
                     {
                         rStringMap[ *p ] = aUIName;
@@ -431,8 +430,6 @@ void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactor
         if( xTypeAccess.is() )
         {
             Reference< XNameAccess > xCategoryAccess;
-            const OUString aEffectsName( "Effects" );
-            const OUString aLabelName( "Label" );
 
             Sequence< OUString > aNames( xTypeAccess->getElementNames() );
             const OUString* p = aNames.getConstArray();
@@ -441,13 +438,13 @@ void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactor
             {
                 xTypeAccess->getByName( *p ) >>= xCategoryAccess;
 
-                if( xCategoryAccess.is() && xCategoryAccess->hasByName( aLabelName ) && xCategoryAccess->hasByName( aEffectsName ) )
+                if( xCategoryAccess.is() && xCategoryAccess->hasByName( "Label" ) && xCategoryAccess->hasByName( "Effects" ) )
                 {
                     OUString aLabel;
-                    xCategoryAccess->getByName( aLabelName ) >>= aLabel;
+                    xCategoryAccess->getByName( "Label" ) >>= aLabel;
 
                     Sequence< OUString > aEffects;
-                    xCategoryAccess->getByName( aEffectsName ) >>= aEffects;
+                    xCategoryAccess->getByName( "Effects" ) >>= aEffects;
 
                     EffectDescriptorList aEffectsList;
 


More information about the Libreoffice-commits mailing list