diff options
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/source/vbahelper/vbahelper.cxx | 28 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbapagesetupbase.cxx | 2 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbashape.cxx | 4 |
3 files changed, 26 insertions, 8 deletions
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index 828bd6c45f65..78b071aad71d 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -1076,21 +1076,39 @@ void ShapeHelper::setTop(double _fTop) xShape->setPosition(aPoint); } -void DebugHelper::exception( const OUString& DetailedMessage, const css::uno::Exception& ex, int err, const OUString& /*additionalArgument*/ ) throw( css::script::BasicErrorException ) +void DebugHelper::basicexception( const OUString& DetailedMessage, const css::uno::Exception& ex, int err, const OUString& /*additionalArgument*/ ) throw( css::script::BasicErrorException ) { // #TODO #FIXME ( do we want to support additionalArg here ) throw css::script::BasicErrorException( DetailedMessage.concat( " " ).concat( ex.Message ), css::uno::Reference< css::uno::XInterface >(), err, OUString() ); } -void DebugHelper::exception( int err, const OUString& additionalArgument ) throw( css::script::BasicErrorException ) +void DebugHelper::basicexception( int err, const OUString& additionalArgument ) throw( css::script::BasicErrorException ) { - exception( OUString(), css::uno::Exception(), err, additionalArgument ); + basicexception( OUString(), css::uno::Exception(), err, additionalArgument ); } -void DebugHelper::exception( const css::uno::Exception& ex ) throw( css::script::BasicErrorException ) + +void DebugHelper::basicexception( const css::uno::Exception& ex ) throw( css::script::BasicErrorException ) +{ + basicexception( OUString(), ex, SbERR_INTERNAL_ERROR, OUString() ); +} + +void DebugHelper::runtimeexception( const OUString& DetailedMessage, const css::uno::Exception& ex, int err, const OUString& /*additionalArgument*/ ) throw( css::uno::RuntimeException ) +{ + // #TODO #FIXME ( do we want to support additionalArg here ) + throw css::uno::RuntimeException( DetailedMessage.concat( " " ).concat( ex.Message ).concat(" ").concat(OUString::number(err)), css::uno::Reference< css::uno::XInterface >() ); +} + +void DebugHelper::runtimeexception( int err, const OUString& additionalArgument ) throw( css::uno::RuntimeException ) +{ + runtimeexception( OUString(), css::uno::Exception(), err, additionalArgument ); +} + +void DebugHelper::runtimeexception( const css::uno::Exception& ex ) throw( css::uno::RuntimeException ) { - exception( OUString(), ex, SbERR_INTERNAL_ERROR, OUString() ); + runtimeexception( OUString(), ex, SbERR_INTERNAL_ERROR, OUString() ); } + Millimeter::Millimeter():m_nMillimeter(0) {} Millimeter::Millimeter(double mm):m_nMillimeter(mm) {} diff --git a/vbahelper/source/vbahelper/vbapagesetupbase.cxx b/vbahelper/source/vbahelper/vbapagesetupbase.cxx index 7d5be2390828..46e8203a40ee 100644 --- a/vbahelper/source/vbahelper/vbapagesetupbase.cxx +++ b/vbahelper/source/vbahelper/vbapagesetupbase.cxx @@ -279,7 +279,7 @@ void SAL_CALL VbaPageSetupBase::setOrientation( sal_Int32 orientation ) throw (c if( ( orientation != mnOrientPortrait ) && ( orientation != mnOrientLandscape ) ) { - DebugHelper::exception(SbERR_BAD_PARAMETER, OUString() ); + DebugHelper::runtimeexception(SbERR_BAD_PARAMETER, OUString() ); } try diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx index c48a2cab353f..c31388b2f943 100644 --- a/vbahelper/source/vbahelper/vbashape.cxx +++ b/vbahelper/source/vbahelper/vbashape.cxx @@ -604,7 +604,7 @@ ScVbaShape::setRelativeHorizontalPosition(::sal_Int32 _relativehorizontalpositio } default: { - DebugHelper::exception(SbERR_BAD_ARGUMENT, OUString()); + DebugHelper::runtimeexception(SbERR_BAD_ARGUMENT, OUString()); } } m_xPropertySet->setPropertyValue( "HoriOrientRelation" , uno::makeAny( nType ) ); @@ -676,7 +676,7 @@ ScVbaShape::setRelativeVerticalPosition(::sal_Int32 _relativeverticalposition) } default: { - DebugHelper::exception(SbERR_BAD_ARGUMENT, OUString()); + DebugHelper::runtimeexception(SbERR_BAD_ARGUMENT, OUString()); } } m_xPropertySet->setPropertyValue( "VertOrientRelation" , uno::makeAny( nType ) ); |