Kaydet (Commit) 66f866d2 authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst 5eb6bd4d
...@@ -824,21 +824,27 @@ Reference< XStorage > ODatabaseModelImpl::getOrCreateRootStorage() ...@@ -824,21 +824,27 @@ Reference< XStorage > ODatabaseModelImpl::getOrCreateRootStorage()
aStorageCreationArgs[1] <<= ElementModes::READWRITE; aStorageCreationArgs[1] <<= ElementModes::READWRITE;
Reference< XStorage > xDocumentStorage; Reference< XStorage > xDocumentStorage;
try OUString sURL;
{ aSource >>= sURL;
xDocumentStorage.set( xStorageFactory->createInstanceWithArguments( aStorageCreationArgs ), UNO_QUERY_THROW ); // Don't try to load a meta-URL as-is.
} if (!sURL.startsWithIgnoreAsciiCase("vnd.sun.star.pkg:"))
catch( const Exception& )
{ {
m_bDocumentReadOnly = true;
aStorageCreationArgs[1] <<= ElementModes::READ;
try try
{ {
xDocumentStorage.set( xStorageFactory->createInstanceWithArguments( aStorageCreationArgs ), UNO_QUERY_THROW ); xDocumentStorage.set( xStorageFactory->createInstanceWithArguments( aStorageCreationArgs ), UNO_QUERY_THROW );
} }
catch( const Exception& ) 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();
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment