diff options
Diffstat (limited to 'package/source/xstor/owriteablestream.cxx')
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index eb4b75d160d6..22e21d239cd2 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -2587,12 +2587,33 @@ sal_Bool SAL_CALL OWriteStream::hasEncryptionData() ::osl::ResettableMutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() ); if (!m_pImpl) - return sal_False; + return false; + + bool bRet = false; - bool bRet = m_pImpl->IsEncrypted(); + try + { + bRet = m_pImpl->IsEncrypted(); - if (!bRet && m_pImpl->m_bUseCommonEncryption && m_pImpl->m_pParent) - bRet = m_pImpl->m_pParent->m_bHasCommonEncryptionData; + if (!bRet && m_pImpl->m_bUseCommonEncryption && m_pImpl->m_pParent) + bRet = m_pImpl->m_pParent->m_bHasCommonEncryptionData; + } + catch( const uno::RuntimeException& rRuntimeException ) + { + m_pImpl->AddLog( rRuntimeException.Message ); + m_pImpl->AddLog( "Rethrow" ); + throw; + } + catch( const uno::Exception& rException ) + { + m_pImpl->AddLog( rException.Message ); + m_pImpl->AddLog( "Rethrow" ); + + uno::Any aCaught( ::cppu::getCaughtException() ); + throw lang::WrappedTargetRuntimeException( "Problems on hasEncryptionData!", + static_cast< ::cppu::OWeakObject* >( this ), + aCaught ); + } return bRet; } |