summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-14 10:03:17 +0100
committerAndras Timar <andras.timar@collabora.com>2014-11-23 08:17:40 +0000
commit68c03150c27815a7be98324421a1560a00408724 (patch)
tree9c93fdd68ad49d3f1634fed23a281198318461f6
parenta45c9334f68fdfde10f60747206bef1638cd7192 (diff)
Resolves: fdo#86485 fix terminate on SAXException on malformed input
SAXException thrown and not caught (cherry picked from commit 58a96d3ccedbade4f1a8bfbbc4b7d8f1615cfc69) Change-Id: I874ffbcd457e102b572f398f4e531f4be30ca3d3 Reviewed-on: https://gerrit.libreoffice.org/12981 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--package/source/xstor/xstorage.cxx23
1 files changed, 22 insertions, 1 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 1858d76c3dcf..fc80f90d4e7c 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -5196,7 +5196,28 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getAllRel
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
- return m_pImpl->GetAllRelationshipsIfAny();
+ uno::Sequence< uno::Sequence< beans::StringPair > > aRet;
+ try
+ {
+ aRet = m_pImpl->GetAllRelationshipsIfAny();
+ }
+ catch (const io::IOException&)
+ {
+ throw;
+ }
+ catch (const uno::RuntimeException&)
+ {
+ throw;
+ }
+ catch (const uno::Exception &)
+ {
+ uno::Any aCaught( ::cppu::getCaughtException() );
+ throw lang::WrappedTargetRuntimeException(THROW_WHERE "Can't getAllRelationships!",
+ uno::Reference< uno::XInterface >(),
+ aCaught);
+ }
+
+ return aRet;
}
void SAL_CALL OStorage::insertRelationshipByID( const OUString& sID, const uno::Sequence< beans::StringPair >& aEntry, sal_Bool bReplace )