summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-05-08 18:57:46 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-05-08 19:16:22 +0200
commit66f866d2f5f65a677f3721b7d6c482bf724c97a7 (patch)
tree6908721014cb69d3d02580d6b9ab481c4949384c /dbaccess
parent5eb6bd4db7fb3d43672c386ac9cde58e981c8aa2 (diff)
dbaccess: avoid exceptions during loading embedded data sources
Situation before/after the patch is the same, just silence lots of harmless warnings for now. Change-Id: I00428bdfd939d8cdd3bfd447339e0417e70f4689
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 936ba5c4dbbb..4788df6aa7c4 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -824,21 +824,27 @@ Reference< XStorage > ODatabaseModelImpl::getOrCreateRootStorage()
aStorageCreationArgs[1] <<= ElementModes::READWRITE;
Reference< XStorage > xDocumentStorage;
- try
- {
- xDocumentStorage.set( xStorageFactory->createInstanceWithArguments( aStorageCreationArgs ), UNO_QUERY_THROW );
- }
- catch( const Exception& )
+ OUString sURL;
+ aSource >>= sURL;
+ // Don't try to load a meta-URL as-is.
+ if (!sURL.startsWithIgnoreAsciiCase("vnd.sun.star.pkg:"))
{
- m_bDocumentReadOnly = true;
- aStorageCreationArgs[1] <<= ElementModes::READ;
try
{
xDocumentStorage.set( xStorageFactory->createInstanceWithArguments( aStorageCreationArgs ), UNO_QUERY_THROW );
}
catch( const Exception& )
{
- DBG_UNHANDLED_EXCEPTION();
+ m_bDocumentReadOnly = true;
+ aStorageCreationArgs[1] <<= ElementModes::READ;
+ try
+ {
+ xDocumentStorage.set( xStorageFactory->createInstanceWithArguments( aStorageCreationArgs ), UNO_QUERY_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
}