diff options
author | PKEuS <philipp.kloke@web.de> | 2012-02-05 11:53:47 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-02-05 14:29:54 +0100 |
commit | ba5a460bc15393cc64522f288b7b2b678d6fcc99 (patch) | |
tree | a4a322e415f301aa5d253f6578983d7ca5cbce72 | |
parent | 32fa7e9208b2053d2ff7743b88b0c0edacb8a7e7 (diff) |
Fixed cppcheck messages about rethrowing copy of exception.
-rw-r--r-- | chart2/source/tools/WrappedPropertySet.cxx | 32 | ||||
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_xtable.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_xview.cxx | 2 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 4 | ||||
-rw-r--r-- | framework/source/accelerators/storageholder.cxx | 8 | ||||
-rw-r--r-- | framework/source/helper/persistentwindowstate.cxx | 12 | ||||
-rw-r--r-- | framework/source/jobs/helponstartup.cxx | 16 | ||||
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 8 | ||||
-rw-r--r-- | svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx | 4 | ||||
-rw-r--r-- | svtools/source/config/itemholder2.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unopage.cxx | 4 |
11 files changed, 48 insertions, 48 deletions
diff --git a/chart2/source/tools/WrappedPropertySet.cxx b/chart2/source/tools/WrappedPropertySet.cxx index fffe6549e227..d5c4c0ea77b2 100644 --- a/chart2/source/tools/WrappedPropertySet.cxx +++ b/chart2/source/tools/WrappedPropertySet.cxx @@ -124,25 +124,25 @@ void SAL_CALL WrappedPropertySet::setPropertyValue( const OUString& rPropertyNam #endif } } - catch( const beans::UnknownPropertyException& ex ) + catch( const beans::UnknownPropertyException& ) { - throw ex; + throw; } - catch( const beans::PropertyVetoException& ex ) + catch( const beans::PropertyVetoException& ) { - throw ex; + throw; } - catch( const lang::IllegalArgumentException& ex ) + catch( const lang::IllegalArgumentException& ) { - throw ex; + throw; } - catch( const lang::WrappedTargetException& ex ) + catch( const lang::WrappedTargetException& ) { - throw ex; + throw; } - catch( const uno::RuntimeException& ex ) + catch( const uno::RuntimeException& ) { - throw ex; + throw; } catch( const uno::Exception& ex ) { @@ -173,17 +173,17 @@ Any SAL_CALL WrappedPropertySet::getPropertyValue( const OUString& rPropertyName #endif } } - catch( const beans::UnknownPropertyException& ex ) + catch( const beans::UnknownPropertyException& ) { - throw ex; + throw; } - catch( const lang::WrappedTargetException& ex ) + catch( const lang::WrappedTargetException& ) { - throw ex; + throw; } - catch( const uno::RuntimeException& ex ) + catch( const uno::RuntimeException& ) { - throw ex; + throw; } catch( const uno::Exception& ex ) { diff --git a/connectivity/source/drivers/postgresql/pq_xtable.cxx b/connectivity/source/drivers/postgresql/pq_xtable.cxx index e501056c2082..606299e4f33d 100644 --- a/connectivity/source/drivers/postgresql/pq_xtable.cxx +++ b/connectivity/source/drivers/postgresql/pq_xtable.cxx @@ -244,7 +244,7 @@ void Table::rename( const ::rtl::OUString& newName ) OUStringBuffer buf( e.Message ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "(NOTE: Only postgresql server >= V8.1 support changing a table's schema)" ) ); e.Message = buf.makeStringAndClear(); - throw e; + throw; } } diff --git a/connectivity/source/drivers/postgresql/pq_xview.cxx b/connectivity/source/drivers/postgresql/pq_xview.cxx index 6f27f92eb92e..dde838d4cc24 100644 --- a/connectivity/source/drivers/postgresql/pq_xview.cxx +++ b/connectivity/source/drivers/postgresql/pq_xview.cxx @@ -182,7 +182,7 @@ void View::rename( const ::rtl::OUString& newName ) OUStringBuffer buf( e.Message ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "(NOTE: Only postgresql server >= V8.1 support changing a table's schema)" ) ); e.Message = buf.makeStringAndClear(); - throw e; + throw; } } diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 769789e16f93..de3ed22d4447 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -471,9 +471,9 @@ OUString GetUIModuleName( const OUString& aModuleId, const uno::Reference< css:: } } } - catch ( uno::RuntimeException& e ) + catch ( uno::RuntimeException& ) { - throw e; + throw; } catch ( uno::Exception& ) { diff --git a/framework/source/accelerators/storageholder.cxx b/framework/source/accelerators/storageholder.cxx index 285b771aee37..4f6b140e0427 100644 --- a/framework/source/accelerators/storageholder.cxx +++ b/framework/source/accelerators/storageholder.cxx @@ -181,9 +181,9 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::openPath(const ::rtl: { xChild = StorageHolder::openSubStorageWithFallback(xParent, sChild, nOpenMode, sal_True); // TODO think about delegating fallback decision to our own calli! } - catch(const css::uno::RuntimeException& exRun) - { throw exRun; } - catch(const css::uno::Exception& exAny) + catch(const css::uno::RuntimeException&) + { throw; } + catch(const css::uno::Exception&) { /* TODO URGENT! in case we found some "already existing storages" on the path before and increased its UseCount ... @@ -195,7 +195,7 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::openPath(const ::rtl: A flush method with the same unique number force increasing of the "UseCount" variable then inside a synchronized block ... */ - throw exAny; + throw; } // SAFE -> ------------------------------ diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx index f2e9bcfc89ec..e7ea0650dd23 100644 --- a/framework/source/helper/persistentwindowstate.cxx +++ b/framework/source/helper/persistentwindowstate.cxx @@ -208,8 +208,8 @@ void SAL_CALL PersistentWindowState::disposing(const css::lang::EventObject&) { sModuleName = xModuleManager->identify(xFrame); } - catch(const css::uno::RuntimeException& exRun) - { throw exRun; } + catch(const css::uno::RuntimeException&) + { throw; } catch(const css::uno::Exception&) { sModuleName = ::rtl::OUString(); } @@ -239,8 +239,8 @@ void SAL_CALL PersistentWindowState::disposing(const css::lang::EventObject&) sKey, ::comphelper::ConfigurationHelper::E_READONLY) >>= sWindowState; } - catch(const css::uno::RuntimeException& exRun) - { throw exRun; } + catch(const css::uno::RuntimeException&) + { throw; } catch(const css::uno::Exception&) { sWindowState = ::rtl::OUString(); } @@ -270,8 +270,8 @@ void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Refere css::uno::makeAny(sWindowState), ::comphelper::ConfigurationHelper::E_STANDARD); } - catch(const css::uno::RuntimeException& exRun) - { throw exRun; } + catch(const css::uno::RuntimeException&) + { throw; } catch(const css::uno::Exception&) {} } diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx index c897ccec7c18..b1d0dab71803 100644 --- a/framework/source/jobs/helponstartup.cxx +++ b/framework/source/jobs/helponstartup.cxx @@ -268,8 +268,8 @@ void SAL_CALL HelpOnStartup::disposing(const css::lang::EventObject& aEvent) { sModuleId = xModuleManager->identify(xDoc); } - catch(const css::uno::RuntimeException& exRun) - { throw exRun; } + catch(const css::uno::RuntimeException&) + { throw; } catch(const css::uno::Exception&) { sModuleId = ::rtl::OUString(); } @@ -310,8 +310,8 @@ void SAL_CALL HelpOnStartup::disposing(const css::lang::EventObject& aEvent) if (xHelpContent.is()) sCurrentHelpURL = xHelpContent->getURL(); } - catch(const css::uno::RuntimeException& exRun) - { throw exRun; } + catch(const css::uno::RuntimeException&) + { throw; } catch(const css::uno::Exception&) { sCurrentHelpURL = ::rtl::OUString(); } @@ -357,8 +357,8 @@ void SAL_CALL HelpOnStartup::disposing(const css::lang::EventObject& aEvent) if (sHelpURL.equals(sHelpURLForModule)) return sal_True; } - catch(const css::uno::RuntimeException& exRun) - { throw exRun; } + catch(const css::uno::RuntimeException&) + { throw; } catch(const css::uno::Exception&) {} } @@ -396,8 +396,8 @@ void SAL_CALL HelpOnStartup::disposing(const css::lang::EventObject& aEvent) sHelpURL = HelpOnStartup::ist_createHelpURL(sHelpBaseURL, sLocale, sSystem); } } - catch(const css::uno::RuntimeException& exRun) - { throw exRun; } + catch(const css::uno::RuntimeException&) + { throw; } catch(const css::uno::Exception&) { sHelpURL = ::rtl::OUString(); } diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index dc5736f4a8e3..0b394066c1f5 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1383,8 +1383,8 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() // Break search. break; } - catch(const css::uno::RuntimeException& exRun) - { throw exRun; } + catch(const css::uno::RuntimeException&) + { throw; } catch(const css::uno::Exception&) { continue; } } @@ -1811,8 +1811,8 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw // <- SOLAR SAFE } } - catch(const css::uno::RuntimeException& exRun) - { throw exRun; } + catch(const css::uno::RuntimeException&) + { throw; } catch(const css::uno::Exception&) {} } diff --git a/svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx b/svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx index dde561d08406..818e3e417d7a 100644 --- a/svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx +++ b/svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx @@ -169,10 +169,10 @@ void HistoryOptTest::impl_testHistory(EHistoryType eHistory , // without problems :-) impl_clearList(); } - catch (const css::uno::Exception& ex) + catch (const css::uno::Exception&) { impl_clearList(); - throw ex; + throw; } } diff --git a/svtools/source/config/itemholder2.cxx b/svtools/source/config/itemholder2.cxx index 9e9a1ab8ced3..0811e40d4bda 100644 --- a/svtools/source/config/itemholder2.cxx +++ b/svtools/source/config/itemholder2.cxx @@ -69,9 +69,9 @@ ItemHolder2::ItemHolder2() if (xCfg.is()) xCfg->addEventListener(static_cast< css::lang::XEventListener* >(this)); } - catch(const css::uno::RuntimeException& rREx) + catch(const css::uno::RuntimeException&) { - throw rREx; + throw; } #ifdef DBG_UTIL catch(const css::uno::Exception& rEx) diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index cb5aab34acdc..0f8197cabe9d 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -185,14 +185,14 @@ void SvxDrawPage::dispose() // notify subclasses to do their dispose disposing(); } - catch(const ::com::sun::star::uno::Exception& e) + catch(const ::com::sun::star::uno::Exception&) { // catch exception and throw again but signal that // the object was disposed. Dispose should be called // only once. mrBHelper.bDisposed = sal_True; mrBHelper.bInDispose = sal_False; - throw e; + throw; } // the values bDispose and bInDisposing must set in this order. |