summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-23 12:03:21 +0200
committerNoel Grandin <noel@peralex.com>2014-05-23 15:06:00 +0200
commite7bc3cab019fbf040f9fb8b53ae2cf3f977d200b (patch)
treebc507bccee9fb71134e362b72d22991561e32aa0 /framework
parentc5d47c327a57df55fa3dac0fff6b65888d0345e4 (diff)
remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params, remove lots of boilerplate code. Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
Diffstat (limited to 'framework')
-rw-r--r--framework/source/accelerators/acceleratorcache.cxx6
-rw-r--r--framework/source/accelerators/presethandler.cxx3
-rw-r--r--framework/source/fwi/threadhelp/transactionmanager.cxx4
-rw-r--r--framework/source/recording/dispatchrecorder.cxx16
4 files changed, 10 insertions, 19 deletions
diff --git a/framework/source/accelerators/acceleratorcache.cxx b/framework/source/accelerators/acceleratorcache.cxx
index 301667b51167..03cee4d7b1d7 100644
--- a/framework/source/accelerators/acceleratorcache.cxx
+++ b/framework/source/accelerators/acceleratorcache.cxx
@@ -107,8 +107,7 @@ AcceleratorCache::TKeyList AcceleratorCache::getKeysByCommand(const OUString& sC
SolarMutexGuard g;
TCommand2Keys::const_iterator pCommand = m_lCommand2Keys.find(sCommand);
if (pCommand == m_lCommand2Keys.end())
- throw css::container::NoSuchElementException(
- OUString(), css::uno::Reference< css::uno::XInterface >());
+ throw css::container::NoSuchElementException();
return pCommand->second;
}
@@ -117,8 +116,7 @@ OUString AcceleratorCache::getCommandByKey(const css::awt::KeyEvent& aKey) const
SolarMutexGuard g;
TKey2Commands::const_iterator pKey = m_lKey2Commands.find(aKey);
if (pKey == m_lKey2Commands.end())
- throw css::container::NoSuchElementException(
- OUString(), css::uno::Reference< css::uno::XInterface >());
+ throw css::container::NoSuchElementException();
return pKey->second;
}
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index f9ce7d41f4d9..d7548c40760e 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -349,8 +349,7 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType
{
if (!xDocumentRoot.is())
throw css::uno::RuntimeException(
- OUString("There is valid root storage, where the UI configuration can work on."),
- css::uno::Reference< css::uno::XInterface >());
+ "There is valid root storage, where the UI configuration can work on.");
m_lDocumentStorages.setRootStorage(xDocumentRoot);
xShare = xDocumentRoot;
xUser = xDocumentRoot;
diff --git a/framework/source/fwi/threadhelp/transactionmanager.cxx b/framework/source/fwi/threadhelp/transactionmanager.cxx
index 366b38505b90..20bcdd6c020d 100644
--- a/framework/source/fwi/threadhelp/transactionmanager.cxx
+++ b/framework/source/fwi/threadhelp/transactionmanager.cxx
@@ -266,13 +266,13 @@ void TransactionManager::impl_throwExceptions( EExceptionMode eMode, ERejectReas
{
// Help programmer to find out, why this exception is thrown!
SAL_WARN( "fwk", "TransactionManager...: Owner instance stand in close method. Call was rejected!" );
- throw css::lang::DisposedException( "TransactionManager...\nOwner instance stand in close method. Call was rejected!\n", css::uno::Reference< css::uno::XInterface >() );
+ throw css::lang::DisposedException( "TransactionManager...\nOwner instance stand in close method. Call was rejected!" );
}
break;
case E_CLOSED : {
// Help programmer to find out, why this exception is thrown!
SAL_WARN( "fwk", "TransactionManager...: Owner instance already closed. Call was rejected!" );
- throw css::lang::DisposedException( "TransactionManager...\nOwner instance already closed. Call was rejected!\n", css::uno::Reference< css::uno::XInterface >() );
+ throw css::lang::DisposedException( "TransactionManager...\nOwner instance already closed. Call was rejected!" );
}
case E_NOREASON : {
// Help programmer to find out
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx
index c5bbaebb70cc..8794d315bdfa 100644
--- a/framework/source/recording/dispatchrecorder.cxx
+++ b/framework/source/recording/dispatchrecorder.cxx
@@ -73,8 +73,7 @@ Sequence< Any > make_seq_out_of_struct(
{
throw RuntimeException(
type.getTypeName() +
- OUString( "is no struct or exception!" ),
- Reference< XInterface >() );
+ OUString( "is no struct or exception!" ) );
}
typelib_TypeDescription * pTD = 0;
TYPELIB_DANGER_GET( &pTD, type.getTypeLibType() );
@@ -83,8 +82,7 @@ Sequence< Any > make_seq_out_of_struct(
{
throw RuntimeException(
OUString( "cannot get type descr of type " ) +
- type.getTypeName(),
- Reference< XInterface >() );
+ type.getTypeName() );
}
::std::vector< Any > vec;
@@ -398,11 +396,8 @@ sal_Int32 SAL_CALL DispatchRecorder::getCount() throw (::com::sun::star::uno::Ru
com::sun::star::uno::Any SAL_CALL DispatchRecorder::getByIndex(sal_Int32 idx) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception)
{
if (idx >= (sal_Int32)m_aStatements.size()) {
- throw com::sun::star::lang::IndexOutOfBoundsException(
- OUString( "Dispatch recorder out of bounds" ),
- Reference< XInterface >() );
-
- }
+ throw com::sun::star::lang::IndexOutOfBoundsException( "Dispatch recorder out of bounds" );
+ }
Any element(&m_aStatements[idx],
cppu::UnoType<com::sun::star::frame::DispatchStatement>::get());
@@ -421,8 +416,7 @@ void SAL_CALL DispatchRecorder::replaceByIndex(sal_Int32 idx, const com::sun::st
if (idx >= (sal_Int32)m_aStatements.size()) {
throw com::sun::star::lang::IndexOutOfBoundsException(
- OUString( "Dispatch recorder out of bounds" ),
- Reference< XInterface >() );
+ "Dispatch recorder out of bounds" );
}