summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-09 09:05:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-09 09:59:02 +0100
commit92fe8838f7c6e2bd411b381a77f0fc4c43272b1d (patch)
tree609c0b7f33ecce86197365a18e51d6f74a8b28b3 /vbahelper
parented8678f3f810d096f00b2dc4053d519ab487be69 (diff)
coverity#707382 Uncaught exception
and coverity#707383 Uncaught exception coverity#707384 Uncaught exception coverity#707385 Uncaught exception coverity#707386 Uncaught exception coverity#707387 Uncaught exception coverity#707388 Uncaught exception coverity#707389 Uncaught exception coverity#707390 Uncaught exception coverity#707391 Uncaught exception coverity#707409 Uncaught exception coverity#707411 Uncaught exception coverity#707413 Uncaught exception coverity#707414 Uncaught exception coverity#706919 Uncaught exception coverity#706920 Uncaught exception coverity#706933 Uncaught exception coverity#706935 Uncaught exception coverity#706968 Uncaught exception coverity#706970 Uncaught exception coverity#706973 Uncaught exception coverity#706974 Uncaught exception coverity#707032 Uncaught exception coverity#707044 Uncaught exception coverity#738455 Uncaught exception coverity#738456 Uncaught exception Change-Id: Ifd4c0a2b6b4ddcb5df01a951b8d56435ee32d754
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx28
-rw-r--r--vbahelper/source/vbahelper/vbapagesetupbase.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbashape.cxx4
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 ) );