[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - tools/qa tools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Aug 22 07:21:35 UTC 2018


 tools/qa/cppunit/test_urlobj.cxx |   30 ------------------------------
 tools/source/fsys/urlobj.cxx     |    9 ---------
 2 files changed, 39 deletions(-)

New commits:
commit 49e522f3d6c6045710ecb2d233a07880ac9c6c7d
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Aug 21 16:23:17 2018 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 22 09:21:10 2018 +0200

    tdf#119326 crash when adding "Windows Share" File resource
    
    this was a regression from
    
        commit ce43d0ae9279edbf1ad108fe0d8325327a038d49
        use consistent #define checks for the Windows platform
    
    where I converted
        #ifdef WIN
    to
        #ifdef _WIN32
    
    But that was already dead code at that point since we did not define
    that preprocessor constant anywhere.
    
    Change-Id: Ieadafd61fada05fc19d04d83992fba7c42969daa
    Reviewed-on: https://gerrit.libreoffice.org/59402
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 82034b04e81b74a048595b0eac0f73581ecbc9e4)
    Reviewed-on: https://gerrit.libreoffice.org/59415
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/tools/qa/cppunit/test_urlobj.cxx b/tools/qa/cppunit/test_urlobj.cxx
index f9996172a863..581a19478e67 100644
--- a/tools/qa/cppunit/test_urlobj.cxx
+++ b/tools/qa/cppunit/test_urlobj.cxx
@@ -54,11 +54,6 @@ namespace tools_urlobj
                                  aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
             CPPUNIT_ASSERT_EQUAL(INetProtocol::Smb, aUrl.GetProtocol());
 #endif
-#ifdef _WIN32
-            CPPUNIT_ASSERT_EQUAL( OUString("file://10.10.1.1/sampledir/sample.file"),
-                            aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
-            CPPUNIT_ASSERT_EQUAL( INetProtocol::File, aUrl.GetProtocol(  ) );
-#endif
             CPPUNIT_ASSERT_EQUAL(OUString("10.10.1.1"),
                                  aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
             CPPUNIT_ASSERT_EQUAL(OUString("/sampledir/sample.file"),
@@ -80,11 +75,6 @@ namespace tools_urlobj
                                  aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
             CPPUNIT_ASSERT_EQUAL(INetProtocol::Smb, aUrl.GetProtocol());
 #endif
-#ifdef _WIN32
-            CPPUNIT_ASSERT_EQUAL( OUString("file://137.65.170.24/c$/Img0001.jpg"),
-                            aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
-            CPPUNIT_ASSERT_EQUAL( INetProtocol::File, aUrl.GetProtocol(  ) );
-#endif
             CPPUNIT_ASSERT_EQUAL(OUString("137.65.170.24"),
                                  aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
             CPPUNIT_ASSERT_EQUAL(OUString("/c$/Img0001.jpg"),
@@ -106,11 +96,6 @@ namespace tools_urlobj
                                  aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
             CPPUNIT_ASSERT_EQUAL(INetProtocol::Smb, aUrl.GetProtocol());
 #endif
-#ifdef _WIN32
-            CPPUNIT_ASSERT_EQUAL( OUString("file://hive-winxp-x86/pmladek/test2.odt"),
-                            aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
-            CPPUNIT_ASSERT_EQUAL( INetProtocol::File, aUrl.GetProtocol(  ) );
-#endif
             CPPUNIT_ASSERT_EQUAL(OUString("hive-winxp-x86"),
                                  aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
             CPPUNIT_ASSERT_EQUAL(OUString("/pmladek/test2.odt"),
@@ -125,11 +110,6 @@ namespace tools_urlobj
                                  aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
             CPPUNIT_ASSERT_EQUAL( INetProtocol::Smb, aUrl.GetProtocol(  ) );
 #endif
-#ifdef _WIN32
-            CPPUNIT_ASSERT_EQUAL( OUString("file://10.10.1.1/sampledir/sample.file"),
-                            aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
-            CPPUNIT_ASSERT_EQUAL( INetProtocol::File, aUrl.GetProtocol(  ) );
-#endif
             CPPUNIT_ASSERT_EQUAL(OUString("10.10.1.1"),
                                  aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
             CPPUNIT_ASSERT_EQUAL(OUString("/sampledir/sample.file"),
@@ -149,11 +129,6 @@ namespace tools_urlobj
                                  aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
             CPPUNIT_ASSERT_EQUAL(INetProtocol::Smb, aUrl.GetProtocol());
 #endif
-#ifdef _WIN32
-            CPPUNIT_ASSERT_EQUAL( OUString("file://137.65.170.24/c$/Img0001.jpg"),
-                            aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
-            CPPUNIT_ASSERT_EQUAL( INetProtocol::File, aUrl.GetProtocol(  ) );
-#endif
             CPPUNIT_ASSERT_EQUAL(OUString("137.65.170.24"),
                                  aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
             CPPUNIT_ASSERT_EQUAL(OUString("/c$/Img0001.jpg"),
@@ -174,11 +149,6 @@ namespace tools_urlobj
                                  aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
             CPPUNIT_ASSERT_EQUAL(INetProtocol::Smb, aUrl.GetProtocol());
 #endif
-#ifdef _WIN32
-            CPPUNIT_ASSERT_EQUAL( OUString("file://hive-winxp-x86/pmladek/test2.odt"),
-                            aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
-            CPPUNIT_ASSERT_EQUAL( INetProtocol::File, aUrl.GetProtocol(  ) );
-#endif
             CPPUNIT_ASSERT_EQUAL(OUString("hive-winxp-x86"),
                                  aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
             CPPUNIT_ASSERT_EQUAL(OUString("/pmladek/test2.odt"),
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index c8719b6732b3..efa4c48d5a94 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -1455,15 +1455,6 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
     }
 #endif
 
-#ifdef _WIN32
-    if (m_eScheme==INetProtocol::Smb) {
-        // Change "smb://server/path" URIs to "file://server/path"
-        // URIs on Windows, since Windows doesn't understand the
-        // SMB scheme.
-        changeScheme(INetProtocol::File);
-    }
-#endif
-
     return true;
 }
 


More information about the Libreoffice-commits mailing list