summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-06-08 09:41:18 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-08 09:54:40 +0200
commitcd33c5355f7c334e385595ba29adaa7844b252e2 (patch)
tree5fc645659beaa4082804d8a3382d321f4c1033dd /dbaccess
parent4101949b2a9fcf399a1fa10c2547f745a24f5a3d (diff)
dbaccess: avoid pointless ucbhelper::Content instance in case of embedding
Change-Id: Ibc3d7a0d9b3373f17aa8d1da081946814904e6d5
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 775ecb66dbd4..32c63a1ed550 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -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 )
{