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

dbaccess: avoid pointless ucbhelper::Content instance in case of embedding

Change-Id: Ibc3d7a0d9b3373f17aa8d1da081946814904e6d5
üst 4101949b
......@@ -320,11 +320,14 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa
bool bEmbeddedDataSource = _sURL.startsWithIgnoreAsciiCase("vnd.sun.star.pkg:");
try
{
::ucbhelper::Content aContent( _sURL, NULL, comphelper::getProcessComponentContext() );
if ( !aContent.isDocument() && !bEmbeddedDataSource )
throw InteractiveIOException(
_sURL, *this, InteractionClassification_ERROR, IOErrorCode_NO_FILE
);
if (!bEmbeddedDataSource)
{
::ucbhelper::Content aContent( _sURL, NULL, comphelper::getProcessComponentContext() );
if ( !aContent.isDocument() )
throw InteractiveIOException(
_sURL, *this, InteractionClassification_ERROR, IOErrorCode_NO_FILE
);
}
}
catch ( const InteractiveIOException& e )
{
......
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