[Libreoffice-commits] .: framework/source linguistic/source scripting/source

Julien Nabet serval2412 at kemper.freedesktop.org
Sun Jul 31 09:41:49 PDT 2011


 framework/source/uielement/uicommanddescription.cxx |    4 ++--
 linguistic/source/lngprophelp.cxx                   |    2 +-
 scripting/source/provider/ProviderCache.cxx         |    2 +-
 scripting/source/runtimemgr/StorageBridge.cxx       |    4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit f297934deba46b009499c110982ba5e2dec32eb1
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Jul 31 18:41:58 2011 +0200

    Some cppcheck cleaning

diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index d6fac13..8dc94d5 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -439,7 +439,7 @@ sal_Bool ConfigurationAccess_UICommand::addGenericInfoToCache()
         }
         catch ( RuntimeException& e )
         {
-            throw e;
+            throw;
         }
         catch ( Exception& )
         {
@@ -453,7 +453,7 @@ sal_Bool ConfigurationAccess_UICommand::addGenericInfoToCache()
         }
         catch ( RuntimeException& e )
         {
-            throw e;
+            throw;
         }
         catch ( Exception& )
         {
diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx
index d1ad962..7000c23 100644
--- a/linguistic/source/lngprophelp.cxx
+++ b/linguistic/source/lngprophelp.cxx
@@ -453,7 +453,6 @@ sal_Bool PropertyHelper_Spell::propertyChange_Impl( const PropertyChangeEvent& r
 
     if (!bRes  &&  GetPropSet().is()  &&  rEvt.Source == GetPropSet())
     {
-        sal_Int16 nLngSvcFlags = 0;
         sal_Bool bSCWA = sal_False,	// SPELL_CORRECT_WORDS_AGAIN ?
              bSWWA = sal_False;	// SPELL_WRONG_WORDS_AGAIN ?
 
@@ -490,6 +489,7 @@ sal_Bool PropertyHelper_Spell::propertyChange_Impl( const PropertyChangeEvent& r
         bRes = (pbVal != 0);
         if (bRes)
         {
+            sal_Int16 nLngSvcFlags = 0;
             if (bSCWA)
                 nLngSvcFlags |= LinguServiceEventFlags::SPELL_CORRECT_WORDS_AGAIN;
             if (bSWWA)
diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx
index ff95f49..ef86493 100644
--- a/scripting/source/provider/ProviderCache.cxx
+++ b/scripting/source/provider/ProviderCache.cxx
@@ -188,7 +188,7 @@ ProviderCache::populateCache() throw ( RuntimeException )
             }		    
         }
     }
-    catch ( Exception e )
+    catch ( Exception &e )
     {
         ::rtl::OUString temp = OUSTR(
             "ProviderCache::populateCache: couldn't obtain XSingleComponentFactory for " );
diff --git a/scripting/source/runtimemgr/StorageBridge.cxx b/scripting/source/runtimemgr/StorageBridge.cxx
index b28dc7f..df6015a 100644
--- a/scripting/source/runtimemgr/StorageBridge.cxx
+++ b/scripting/source/runtimemgr/StorageBridge.cxx
@@ -104,7 +104,7 @@ throw ( lang::IllegalArgumentException,
     {
         results = m_xScriptInfoAccess->getScriptLogicalNames();
     }
-    catch ( Exception e )
+    catch ( Exception &e )
     {
         OUString temp = OUSTR( "StorageBridge::getScriptLogicalNames: " );
         throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
@@ -123,7 +123,7 @@ throw ( lang::IllegalArgumentException, RuntimeException )
     {
         results = m_xScriptInfoAccess->getImplementations( queryURI );
     }
-    catch ( Exception e )
+    catch ( Exception &e )
     {
         OUString temp = OUSTR( "StorageBridge::getImplementations: " );
         throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );


More information about the Libreoffice-commits mailing list