coverity#706569 Uncaught exception

Change-Id: I7c1245eacd92b5869e6dab0389ee0ca3cebd98da
This commit is contained in:
Caolán McNamara
2014-10-30 09:55:44 +00:00
parent dd59e89b8f
commit 6bff65dfa6

View File

@@ -3161,9 +3161,16 @@ uno::Any SAL_CALL OWriteStream::getPropertyValue( const OUString& aProp )
return uno::makeAny( m_pImpl->m_bUseCommonEncryption );
else if ( aPropertyName == "Size" )
{
CheckInitOnDemand();
if ( !m_xSeekable.is() )
bool bThrow = false;
try
{
CheckInitOnDemand();
}
catch (const io::IOException&)
{
bThrow = true;
}
if (bThrow || !m_xSeekable.is())
throw uno::RuntimeException();
return uno::makeAny( m_xSeekable->getLength() );