[Libreoffice-commits] core.git: include/tools tools/source ucb/source

Stephan Bergmann sbergman at redhat.com
Sun Mar 4 20:59:39 UTC 2018


 include/tools/urlobj.hxx                      |    2 --
 tools/source/fsys/urlobj.cxx                  |   16 ++--------------
 ucb/source/ucp/webdav-neon/webdavprovider.cxx |    4 ++--
 ucb/source/ucp/webdav-neon/webdavprovider.hxx |    4 ++--
 ucb/source/ucp/webdav/webdavprovider.cxx      |    4 ++--
 ucb/source/ucp/webdav/webdavprovider.hxx      |    4 ++--
 6 files changed, 10 insertions(+), 24 deletions(-)

New commits:
commit a7780e82305fe2e900afbe9909f9df80ad4019d5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sun Mar 4 17:13:04 2018 +0100

    Remove unnecessary INetProtocol::Webdav[s] again
    
    ...that 65abd11d68ba9f849d89b98b6a56071411875c89 "Support for webdav:// and
    webdavs:// schemes from command line" had added for no good reason, and are
    removed again on the same grounds as eda273fd46e63daa4f15525e05b695450df53cea
    "Remove unnecessary INetProtocol::VndSunStarWebdavs again".
    
    Change-Id: I29135207dfdffcc818664432a11fa3b5b3a0561a
    Reviewed-on: https://gerrit.libreoffice.org/50748
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index e199ab0c49a9..99780fa0e79d 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -55,8 +55,6 @@ enum class INetProtocol
     File,
     Mailto,
     VndSunStarWebdav,
-    Webdav,
-    Webdavs,
     PrivSoffice,
     VndSunStarHelp,
     Https,
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 78e5c6b1e731..c6e74ddffc58 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -332,12 +332,6 @@ INetURLObject::getSchemeInfo(INetProtocol eTheScheme)
             "vnd.sun.star.webdav", "vnd.sun.star.webdav://", true, false,
             false, false, true, true, true, true},
         SchemeInfo{
-            "webdav", "webdav://", true, false, false, false, true, true,
-            true, true},
-        SchemeInfo{
-            "webdavs", "webdavs://", true, false, false, false, true, true,
-            true, true},
-        SchemeInfo{
             "private", "private:", false, false, false, false, false, false,
             false, true},
         SchemeInfo{
@@ -2180,10 +2174,6 @@ INetURLObject::PrefixInfo const * INetURLObject::getPrefix(sal_Unicode const *&
             { "vnd.sun.star.tdoc:", nullptr, INetProtocol::VndSunStarTdoc,
               PrefixInfo::OFFICIAL },
             { "vnd.sun.star.webdav:", nullptr, INetProtocol::VndSunStarWebdav,
-              PrefixInfo::OFFICIAL },
-            { "webdav:", nullptr, INetProtocol::Webdav,
-              PrefixInfo::OFFICIAL },
-            { "webdavs:", nullptr, INetProtocol::Webdavs,
               PrefixInfo::OFFICIAL }
         };
 /* This list needs to be sorted, or you'll introduce serious bugs */
@@ -2934,8 +2924,6 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
 
         case INetProtocol::Http:
         case INetProtocol::VndSunStarWebdav:
-        case INetProtocol::Webdav:
-        case INetProtocol::Webdavs:
         case INetProtocol::Https:
         case INetProtocol::Smb:
         case INetProtocol::Cmis:
@@ -3900,8 +3888,8 @@ bool INetURLObject::isAnyKnownWebDAVScheme() const {
              isSchemeEqualTo( INetProtocol::Https ) ||
              isSchemeEqualTo( INetProtocol::VndSunStarWebdav ) ||
              isSchemeEqualTo( u"vnd.sun.star.webdavs" ) ||
-             isSchemeEqualTo( INetProtocol::Webdav ) ||
-             isSchemeEqualTo( INetProtocol::Webdavs ));
+             isSchemeEqualTo( u"webdav" ) ||
+             isSchemeEqualTo( u"webdavs" ));
 }
 
 // static
diff --git a/ucb/source/ucp/webdav-neon/webdavprovider.cxx b/ucb/source/ucp/webdav-neon/webdavprovider.cxx
index ee2febfe1872..54d4ed5de655 100644
--- a/ucb/source/ucp/webdav-neon/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavprovider.cxx
@@ -140,14 +140,14 @@ ContentProvider::queryContent(
 
     if (aURL.isSchemeEqualTo( INetProtocol::VndSunStarWebdav ) ||
         aURL.isSchemeEqualTo(DAV_URL_SCHEME) ||
-        aURL.isSchemeEqualTo( INetProtocol::Webdav ) )
+        aURL.isSchemeEqualTo( WEBDAV_URL_SCHEME ) )
     {
         aURL.changeScheme( INetProtocol::Http );
         xCanonicId = new ::ucbhelper::ContentIdentifier( aURL.getExternalURL() );
     }
     else if ( aURL.isSchemeEqualTo( VNDSUNSTARWEBDAVS_URL_SCHEME ) ||
         aURL.isSchemeEqualTo( DAVS_URL_SCHEME ) ||
-        aURL.isSchemeEqualTo( INetProtocol::Webdavs ))
+        aURL.isSchemeEqualTo( WEBDAVS_URL_SCHEME ))
     {
         aURL.changeScheme( INetProtocol::Https );
         xCanonicId = new ::ucbhelper::ContentIdentifier( aURL.getExternalURL() );
diff --git a/ucb/source/ucp/webdav-neon/webdavprovider.hxx b/ucb/source/ucp/webdav-neon/webdavprovider.hxx
index c8b4679ac1fc..e90d5364a742 100644
--- a/ucb/source/ucp/webdav-neon/webdavprovider.hxx
+++ b/ucb/source/ucp/webdav-neon/webdavprovider.hxx
@@ -53,8 +53,8 @@ namespace webdav_ucp {
 #define HTTPS_URL_SCHEME             "https"
 #define DAV_URL_SCHEME               u"dav"
 #define DAVS_URL_SCHEME              u"davs"
-#define WEBDAV_URL_SCHEME            "webdav"
-#define WEBDAVS_URL_SCHEME           "webdavs"
+#define WEBDAV_URL_SCHEME            u"webdav"
+#define WEBDAVS_URL_SCHEME           u"webdavs"
 
 #define FTP_URL_SCHEME "ftp"
 
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index 5c3cf218da15..0096b5a39384 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -130,14 +130,14 @@ ContentProvider::queryContent(
 
     if (aURL.isSchemeEqualTo(INetProtocol::VndSunStarWebdav) ||
         aURL.isSchemeEqualTo(DAV_URL_SCHEME) ||
-        aURL.isSchemeEqualTo(INetProtocol::Webdav))
+        aURL.isSchemeEqualTo(WEBDAV_URL_SCHEME))
     {
         aURL.changeScheme(INetProtocol::Http);
         xCanonicId = new ::ucbhelper::ContentIdentifier( aURL.getExternalURL() );
     }
     else if (aURL.isSchemeEqualTo(VNDSUNSTARWEBDAVS_URL_SCHEME) ||
         aURL.isSchemeEqualTo(DAVS_URL_SCHEME) ||
-        aURL.isSchemeEqualTo(INetProtocol::Webdavs))
+        aURL.isSchemeEqualTo(WEBDAVS_URL_SCHEME))
     {
         aURL.changeScheme(INetProtocol::Https);
         xCanonicId = new ::ucbhelper::ContentIdentifier( aURL.getExternalURL() );
diff --git a/ucb/source/ucp/webdav/webdavprovider.hxx b/ucb/source/ucp/webdav/webdavprovider.hxx
index 4540535a4208..fa6e6e3c8ec2 100644
--- a/ucb/source/ucp/webdav/webdavprovider.hxx
+++ b/ucb/source/ucp/webdav/webdavprovider.hxx
@@ -47,8 +47,8 @@ namespace http_dav_ucp {
 #define HTTPS_URL_SCHEME             "https"
 #define DAV_URL_SCHEME               u"dav"
 #define DAVS_URL_SCHEME              u"davs"
-#define WEBDAV_URL_SCHEME            "webdav"
-#define WEBDAVS_URL_SCHEME           "webdavs"
+#define WEBDAV_URL_SCHEME            u"webdav"
+#define WEBDAVS_URL_SCHEME           u"webdavs"
 
 #define HTTP_CONTENT_TYPE      "application/" HTTP_URL_SCHEME "-content"
 


More information about the Libreoffice-commits mailing list