Kaydet (Commit) 44460044 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#706946 Uncaught exception

Change-Id: I836e353ae3a8274842465719b3d8ae82ad433375
üst e8815714
...@@ -43,9 +43,34 @@ public: ...@@ -43,9 +43,34 @@ public:
ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( _xParent, xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ) {} ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( _xParent, xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ) {}
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) SAL_OVERRIDE virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) SAL_OVERRIDE
{ {
uno::Reference< table::XTableChart > xTableChart( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); uno::Any ret;
// parent Object is sheet
return uno::makeAny( uno::Reference< excel::XChartObject > ( new ScVbaChartObject( m_xParent, m_xContext, xTableChart, xDrawPageSupplier ) ) ); try
{
uno::Reference< table::XTableChart > xTableChart( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
// parent Object is sheet
ret = uno::makeAny( uno::Reference< excel::XChartObject > ( new ScVbaChartObject( m_xParent, m_xContext, xTableChart, xDrawPageSupplier ) ) );
}
catch (const lang::WrappedTargetException&)
{
throw;
}
catch (const container::NoSuchElementException&)
{
throw;
}
catch (const uno::RuntimeException&)
{
throw;
}
catch (const uno::Exception& e)
{
throw lang::WrappedTargetException(
"Error creating ScVbaChartObject!",
static_cast < OWeakObject * > ( this ),
makeAny( e ) );
}
return ret;
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment