summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-03-24 17:42:39 +0100
committerMichael Stahl <mstahl@redhat.com>2017-03-24 18:00:45 +0100
commitd9c2ba239d0b3d71aa64fc9319b7b1025517170f (patch)
tree4f1b2b86a7bca9b9cf782278dd78dfb4bf2dce6f /sw
parentc1f5339c169c893e63c0de25d0cad3029b475d1b (diff)
sw: remove THROW_RUNTIME_EXCEPTION macro
Change-Id: I74d4b31ea619c94245759b7a061c40095a0879ad
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/acccontext.cxx13
-rw-r--r--sw/source/core/access/acccontext.hxx7
-rw-r--r--sw/source/core/access/accpara.cxx2
3 files changed, 7 insertions, 15 deletions
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index f93cc5d2c1e0..9263e150a681 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -680,8 +680,8 @@ sal_Int16 SAL_CALL SwAccessibleContext::getAccessibleRole()
OUString SAL_CALL SwAccessibleContext::getAccessibleDescription()
{
- OSL_ENSURE(false, "description needs to be overridden");
- THROW_RUNTIME_EXCEPTION( XAccessibleContext, "internal error (method must be overridden)" );
+ assert(!"description needs to be overridden");
+ throw uno::RuntimeException("description needs to be overridden");
}
OUString SAL_CALL SwAccessibleContext::getAccessibleName()
@@ -977,9 +977,8 @@ sal_Int32 SAL_CALL SwAccessibleContext::getBackground()
OUString SAL_CALL SwAccessibleContext::getImplementationName()
{
- OSL_ENSURE( false, "implementation name needs to be overridden" );
-
- THROW_RUNTIME_EXCEPTION( lang::XServiceInfo, "implementation name needs to be overridden" )
+ assert(!"implementation name needs to be overridden");
+ throw uno::RuntimeException("implementation name needs to be overridden");
}
sal_Bool SAL_CALL SwAccessibleContext::supportsService (const OUString& ServiceName)
@@ -989,8 +988,8 @@ sal_Bool SAL_CALL SwAccessibleContext::supportsService (const OUString& ServiceN
uno::Sequence< OUString > SAL_CALL SwAccessibleContext::getSupportedServiceNames()
{
- OSL_ENSURE( false, "supported services names needs to be overridden" );
- THROW_RUNTIME_EXCEPTION( lang::XServiceInfo, "supported services needs to be overridden" )
+ assert(!"supported services names needs to be overridden");
+ throw uno::RuntimeException("supported services names needs to be overridden");
}
void SwAccessibleContext::DisposeShape( const SdrObject *pObj,
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
index a9aeffec8550..4c006266c475 100644
--- a/sw/source/core/access/acccontext.hxx
+++ b/sw/source/core/access/acccontext.hxx
@@ -360,13 +360,6 @@ public:
const OUString *pArg2 = nullptr );
};
-// some heavily used exception support
-#define THROW_RUNTIME_EXCEPTION( ifc, msg ) \
- css::uno::Reference < ifc > xThis( this ); \
- css::uno::RuntimeException aExcept( \
- msg, xThis ); \
- throw aExcept;
-
#define CHECK_FOR_DEFUNC_THIS( ifc, ths ) \
if( !(GetFrame() && GetMap()) ) \
{ \
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 358472664edf..449e9a910b78 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -938,7 +938,7 @@ lang::Locale SAL_CALL SwAccessibleParagraph::getLocale()
const SwTextFrame *pTextFrame = dynamic_cast<const SwTextFrame*>( GetFrame() );
if( !pTextFrame )
{
- THROW_RUNTIME_EXCEPTION( XAccessibleContext, "internal error (no text frame)" );
+ throw uno::RuntimeException("no SwTextFrame", static_cast<cppu::OWeakObject*>(this));
}
const SwTextNode *pTextNd = pTextFrame->GetTextNode();