summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/com/sun/star/uno/Any.hxx3
-rw-r--r--include/vbahelper/vbacollectionimpl.hxx14
2 files changed, 6 insertions, 11 deletions
diff --git a/include/com/sun/star/uno/Any.hxx b/include/com/sun/star/uno/Any.hxx
index f021894926dd..fa3693911c5b 100644
--- a/include/com/sun/star/uno/Any.hxx
+++ b/include/com/sun/star/uno/Any.hxx
@@ -599,8 +599,7 @@ T Any::get() const
cppu_Any_extraction_failure_msg(
this,
::cppu::getTypeFavourUnsigned(&value).getTypeLibType() ),
- SAL_NO_ACQUIRE ),
- Reference<XInterface>() );
+ SAL_NO_ACQUIRE ) );
}
return value;
}
diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx
index 469802398341..0f610de36c47 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -240,7 +240,7 @@ protected:
virtual css::uno::Any getItemByStringIndex( const OUString& sIndex ) throw (css::uno::RuntimeException)
{
if ( !m_xNameAccess.is() )
- throw css::uno::RuntimeException("ScVbaCollectionBase string index access not supported by this object", css::uno::Reference< css::uno::XInterface >() );
+ throw css::uno::RuntimeException("ScVbaCollectionBase string index access not supported by this object" );
if( mbIgnoreCase )
{
@@ -260,12 +260,11 @@ protected:
virtual css::uno::Any getItemByIntIndex( const sal_Int32 nIndex ) throw (css::uno::RuntimeException)
{
if ( !m_xIndexAccess.is() )
- throw css::uno::RuntimeException("ScVbaCollectionBase numeric index access not supported by this object", css::uno::Reference< css::uno::XInterface >() );
+ throw css::uno::RuntimeException("ScVbaCollectionBase numeric index access not supported by this object" );
if ( nIndex <= 0 )
{
- throw css::lang::IndexOutOfBoundsException(
- OUString( "index is 0 or negative" ),
- css::uno::Reference< css::uno::XInterface >() );
+ throw css::lang::IndexOutOfBoundsException(
+ "index is 0 or negative" );
}
// need to adjust for vba index ( for which first element is 1 )
return createCollectionObject( m_xIndexAccess->getByIndex( nIndex - 1 ) );
@@ -294,10 +293,7 @@ public:
if ( !( Index1 >>= nIndex ) )
{
- OUString message;
- message = OUString( "Couldn't convert index to Int32");
- throw css::lang::IndexOutOfBoundsException( message,
- css::uno::Reference< css::uno::XInterface >() );
+ throw css::lang::IndexOutOfBoundsException( "Couldn't convert index to Int32" );
}
return getItemByIntIndex( nIndex );
}