diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/com/sun/star/uno/Any.hxx | 3 | ||||
-rw-r--r-- | include/vbahelper/vbacollectionimpl.hxx | 14 |
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 ); } |