[Libreoffice-commits] core.git: dbaccess/source

Mike Kaganski mike.kaganski at collabora.com
Mon Nov 6 19:53:07 UTC 2017


 dbaccess/source/core/dataaccess/databasecontext.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 170ff1fb645af843cdbb084f79544ceb016d92c8
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Mon Nov 6 13:30:03 2017 +0200

    ODatabaseContext::loadObjectFromURL: don't parse string for protocol
    
    "vnd.sun.star.pkg:" is already recognized as INetProtocol::VndSunStarPkg
    by INetURLObject
    
    Change-Id: I385dfb0f545f81171b1794f2d5d991d8b9f28eaf
    Reviewed-on: https://gerrit.libreoffice.org/44355
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 3305198bf98a..b2cc08996dbf 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -316,7 +316,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa
     if ( aURL.GetProtocol() == INetProtocol::NotValid )
         throw NoSuchElementException( _rName, *this );
 
-    bool bEmbeddedDataSource = _sURL.startsWithIgnoreAsciiCase("vnd.sun.star.pkg:");
+    bool bEmbeddedDataSource = aURL.isSchemeEqualTo(INetProtocol::VndSunStarPkg);
     try
     {
         if (!bEmbeddedDataSource)


More information about the Libreoffice-commits mailing list