coverity#706578 uncaught exception
Change-Id: I70640f42db49da274118f7336ff072b1b53ac640
This commit is contained in:
@@ -5986,15 +5986,22 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle
|
|||||||
uno::Reference< embed::XExtendedStorageStream > xResult;
|
uno::Reference< embed::XExtendedStorageStream > xResult;
|
||||||
if ( aListPath.size() == 1 )
|
if ( aListPath.size() == 1 )
|
||||||
{
|
{
|
||||||
// that must be a direct request for a stream
|
try
|
||||||
// the transacted version of the stream should be opened
|
{
|
||||||
|
// that must be a direct request for a stream
|
||||||
|
// the transacted version of the stream should be opened
|
||||||
|
|
||||||
SotElement_Impl *pElement = OpenStreamElement_Impl( aStreamPath, nOpenMode, false );
|
SotElement_Impl *pElement = OpenStreamElement_Impl( aStreamPath, nOpenMode, false );
|
||||||
assert(pElement && pElement->m_pStream && "In case element can not be created an exception must be thrown!");
|
assert(pElement && pElement->m_pStream && "In case element can not be created an exception must be thrown!");
|
||||||
|
|
||||||
xResult = uno::Reference< embed::XExtendedStorageStream >(
|
xResult = uno::Reference< embed::XExtendedStorageStream >(
|
||||||
pElement->m_pStream->GetStream( nOpenMode, true ),
|
pElement->m_pStream->GetStream( nOpenMode, true ),
|
||||||
uno::UNO_QUERY_THROW );
|
uno::UNO_QUERY_THROW );
|
||||||
|
}
|
||||||
|
catch ( const container::NoSuchElementException & )
|
||||||
|
{
|
||||||
|
throw io::IOException( THROW_WHERE ); // file not found
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user