[Libreoffice-commits] core.git: officecfg/registry ucb/source unotools/source vcl/unx
Stephan Bergmann
sbergman at redhat.com
Thu Aug 27 02:32:37 PDT 2015
officecfg/registry/data/org/openoffice/ucb/Configuration.xcu | 11 +++++++++++
ucb/source/ucp/webdav-neon/webdavcontent.cxx | 8 ++++++++
ucb/source/ucp/webdav-neon/webdavprovider.cxx | 10 +++++++++-
ucb/source/ucp/webdav-neon/webdavprovider.hxx | 3 +++
ucb/source/ucp/webdav/webdavcontent.cxx | 8 ++++++++
ucb/source/ucp/webdav/webdavprovider.cxx | 11 +++++++++--
ucb/source/ucp/webdav/webdavprovider.hxx | 3 +++
unotools/source/ucbhelper/ucblockbytes.cxx | 1 +
vcl/unx/kde/fpicker/kdefilepicker.cxx | 2 +-
9 files changed, 53 insertions(+), 4 deletions(-)
New commits:
commit d3de490437df4c9093f32e97fc185066d64c0f46
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Aug 27 11:26:18 2015 +0200
Add vnd.sun.star.webdavs URL scheme
...as https-equivalent to complement vnd.sun.star.webdav scheme. See the mail
thread starting at
<http://lists.freedesktop.org/archives/libreoffice/2015-August/069929.html>
"What autogen.sh for an alternative ContentProvider for dav:// scheme?" for why
it is considered beneficial to have the WebDAV UCP support---in addition to the
standard pair of http[s] schemes---a non-standard pair of
vnd.sun.star.webdav[s] schemes different from the "accidentally supported"
non-standard pair of dav[s].
Change-Id: I7032aa1ed599f735969cf0163cd9dc121a1fdcb3
diff --git a/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu b/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu
index 9cb2a1a..27d45d5 100644
--- a/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu
+++ b/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu
@@ -156,6 +156,17 @@
<value/>
</prop>
</node>
+ <node oor:name="Provider12a" oor:op="replace" install:module="neon">
+ <prop oor:name="ServiceName">
+ <value>com.sun.star.ucb.WebDAVContentProvider</value>
+ </prop>
+ <prop oor:name="URLTemplate">
+ <value>vnd.sun.star.webdavs</value>
+ </prop>
+ <prop oor:name="Arguments">
+ <value/>
+ </prop>
+ </node>
<node oor:name="Provider13" oor:op="replace"
install:module="neon_gnomevfs">
<prop oor:name="ServiceName">
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index b815bc1..efe31e8 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -2516,6 +2516,11 @@ void Content::transfer(
sourceURI.SetScheme(
OUString( HTTP_URL_SCHEME ) );
}
+ else if ( aScheme == WEBDAVS_URL_SCHEME )
+ {
+ sourceURI.SetScheme(
+ OUString( HTTPS_URL_SCHEME ) );
+ }
else if ( aScheme == DAV_URL_SCHEME )
{
sourceURI.SetScheme(
@@ -2544,6 +2549,9 @@ void Content::transfer(
if ( aScheme == WEBDAV_URL_SCHEME )
targetURI.SetScheme(
OUString( HTTP_URL_SCHEME ) );
+ else if ( aScheme == WEBDAVS_URL_SCHEME )
+ targetURI.SetScheme(
+ OUString( HTTPS_URL_SCHEME ) );
else if ( aScheme == DAV_URL_SCHEME )
targetURI.SetScheme(
OUString( HTTP_URL_SCHEME ) );
diff --git a/ucb/source/ucp/webdav-neon/webdavprovider.cxx b/ucb/source/ucp/webdav-neon/webdavprovider.cxx
index 1a8b91b..1f67114 100644
--- a/ucb/source/ucp/webdav-neon/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavprovider.cxx
@@ -137,7 +137,8 @@ ContentProvider::queryContent(
const OUString aScheme
= Identifier->getContentProviderScheme().toAsciiLowerCase();
- if ( aScheme != HTTP_URL_SCHEME && aScheme != HTTPS_URL_SCHEME && aScheme != WEBDAV_URL_SCHEME
+ if ( aScheme != HTTP_URL_SCHEME && aScheme != HTTPS_URL_SCHEME
+ && aScheme != WEBDAV_URL_SCHEME && aScheme != WEBDAVS_URL_SCHEME
&& aScheme != DAV_URL_SCHEME && aScheme != DAVS_URL_SCHEME && aScheme != FTP_URL_SCHEME )
throw ucb::IllegalIdentifierException();
@@ -161,6 +162,13 @@ ContentProvider::queryContent(
OUString( HTTP_URL_SCHEME ) );
bNewId = true;
}
+ else if ( aScheme == WEBDAVS_URL_SCHEME )
+ {
+ aURL = aURL.replaceAt( 0,
+ WEBDAVS_URL_SCHEME_LENGTH,
+ OUString( HTTPS_URL_SCHEME ) );
+ bNewId = true;
+ }
else if ( aScheme == DAV_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
diff --git a/ucb/source/ucp/webdav-neon/webdavprovider.hxx b/ucb/source/ucp/webdav-neon/webdavprovider.hxx
index da789cf..dbec74e4 100644
--- a/ucb/source/ucp/webdav-neon/webdavprovider.hxx
+++ b/ucb/source/ucp/webdav-neon/webdavprovider.hxx
@@ -50,6 +50,9 @@ namespace webdav_ucp {
#define WEBDAV_URL_SCHEME "vnd.sun.star.webdav"
#define WEBDAV_URL_SCHEME_LENGTH 19
+#define WEBDAVS_URL_SCHEME "vnd.sun.star.webdavs"
+#define WEBDAVS_URL_SCHEME_LENGTH 20
+
#define HTTP_URL_SCHEME "http"
#define HTTPS_URL_SCHEME "https"
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index cf370b7..b69e81e 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -2667,6 +2667,11 @@ void Content::transfer(
sourceURI.SetScheme(
OUString( HTTP_URL_SCHEME ) );
}
+ else if ( aScheme == WEBDAVS_URL_SCHEME )
+ {
+ sourceURI.SetScheme(
+ OUString( HTTPS_URL_SCHEME ) );
+ }
else if ( aScheme == DAV_URL_SCHEME )
{
sourceURI.SetScheme(
@@ -2695,6 +2700,9 @@ void Content::transfer(
if ( aScheme == WEBDAV_URL_SCHEME )
targetURI.SetScheme(
OUString( HTTP_URL_SCHEME ) );
+ else if ( aScheme == WEBDAVS_URL_SCHEME )
+ targetURI.SetScheme(
+ OUString( HTTPS_URL_SCHEME ) );
else if ( aScheme == DAV_URL_SCHEME )
targetURI.SetScheme(
OUString( HTTP_URL_SCHEME ) );
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index e485d0e..9d1a71b 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -123,8 +123,8 @@ ContentProvider::queryContent(
const OUString aScheme
= Identifier->getContentProviderScheme().toAsciiLowerCase();
if ( aScheme != HTTP_URL_SCHEME && aScheme != HTTPS_URL_SCHEME &&
- aScheme != WEBDAV_URL_SCHEME && aScheme != DAV_URL_SCHEME &&
- aScheme != DAVS_URL_SCHEME )
+ aScheme != WEBDAV_URL_SCHEME && aScheme != WEBDAVS_URL_SCHEME &&
+ aScheme != DAV_URL_SCHEME && aScheme != DAVS_URL_SCHEME )
throw ucb::IllegalIdentifierException();
// Normalize URL and create new Id, if nessacary.
@@ -147,6 +147,13 @@ ContentProvider::queryContent(
OUString( HTTP_URL_SCHEME ) );
bNewId = true;
}
+ else if ( aScheme == WEBDAVS_URL_SCHEME )
+ {
+ aURL = aURL.replaceAt( 0,
+ WEBDAVS_URL_SCHEME_LENGTH,
+ OUString( HTTPS_URL_SCHEME ) );
+ bNewId = true;
+ }
else if ( aScheme == DAV_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
diff --git a/ucb/source/ucp/webdav/webdavprovider.hxx b/ucb/source/ucp/webdav/webdavprovider.hxx
index 68ea853..776473b 100644
--- a/ucb/source/ucp/webdav/webdavprovider.hxx
+++ b/ucb/source/ucp/webdav/webdavprovider.hxx
@@ -42,6 +42,9 @@ namespace http_dav_ucp {
#define WEBDAV_URL_SCHEME "vnd.sun.star.webdav"
#define WEBDAV_URL_SCHEME_LENGTH 19
+#define WEBDAVS_URL_SCHEME "vnd.sun.star.webdavs"
+#define WEBDAVS_URL_SCHEME_LENGTH 20
+
#define HTTP_URL_SCHEME "http"
#define HTTPS_URL_SCHEME "https"
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 09043b4..4b64723 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -744,6 +744,7 @@ static bool UCBOpenContentSync(
if( ! aScheme.equalsIgnoreAsciiCase("http") &&
! aScheme.equalsIgnoreAsciiCase("https") &&
! aScheme.equalsIgnoreAsciiCase("vnd.sun.star.webdav") &&
+ ! aScheme.equalsIgnoreAsciiCase("vnd.sun.star.webdavs") &&
! aScheme.equalsIgnoreAsciiCase("ftp"))
return _UCBOpenContentSync(
xLockBytes,xContent,rArg,xSink,xInteract);
diff --git a/vcl/unx/kde/fpicker/kdefilepicker.cxx b/vcl/unx/kde/fpicker/kdefilepicker.cxx
index a5c8092..e2baaae 100644
--- a/vcl/unx/kde/fpicker/kdefilepicker.cxx
+++ b/vcl/unx/kde/fpicker/kdefilepicker.cxx
@@ -95,7 +95,7 @@ bool isSupportedProtocol( const QString &rProtocol )
{
// TODO Get this information directly from OOo
const char * pOOoProtocols[] = { "", "smb", "ftp", "http", "file", "mailto",
- "vnd.sun.star.webdav", "news", "private", "vnd.sun.star.help",
+ "vnd.sun.star.webdav", "vnd.sun.star.webdavs", "news", "private", "vnd.sun.star.help",
"https", "slot", "macro", "javascript", "imap", "pop3", "data",
"cid", "out", "vnd.sun.star.hier", "vim",
".uno", ".component", "vnd.sun.star.pkg", "ldap", "db",
More information about the Libreoffice-commits
mailing list