ooo-build r11652 - in trunk: . patches/src680



Author: jholesovsky
Date: Wed Feb 20 18:42:13 2008
New Revision: 11652
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11652&view=rev

Log:
        * patches/src680/webdav-locking-serve-dav-uri.diff: Update to serve
          also davs:// and webdavs://.


Modified:
   trunk/ChangeLog
   trunk/patches/src680/webdav-locking-serve-dav-uri.diff

Modified: trunk/patches/src680/webdav-locking-serve-dav-uri.diff
==============================================================================
--- trunk/patches/src680/webdav-locking-serve-dav-uri.diff	(original)
+++ trunk/patches/src680/webdav-locking-serve-dav-uri.diff	Wed Feb 20 18:42:13 2008
@@ -1,8 +1,87 @@
-diff --git a/tools/inc/tools/urlobj.hxx b/tools/inc/tools/urlobj.hxx
-index 199079f..4b0db1c 100644
+diff --git officecfg/registry/data/org/openoffice/ucb/Configuration.xcu officecfg/registry/data/org/openoffice/ucb/Configuration.xcu
+index 4c5f119..e553404 100644
+--- officecfg/registry/data/org/openoffice/ucb/Configuration.xcu
++++ officecfg/registry/data/org/openoffice/ucb/Configuration.xcu
+@@ -150,18 +150,62 @@
+                 <value/>
+               </prop>
+             </node>
+-   		    <node oor:name="Provider12" oor:op="replace">
+-			  <prop oor:name="ServiceName">
+-			    <value>com.sun.star.ucb.WebDAVContentProvider</value>
+-			  </prop>
+-			  <prop oor:name="URLTemplate">
+-				<value>https</value>
+-			  </prop>
+-			  <prop oor:name="Arguments">
+-			    <value/>
+-			  </prop>
+-			</node>
+-		  </node>
++	    <node oor:name="Provider12" oor:op="replace">
++		<prop oor:name="ServiceName">
++		    <value>com.sun.star.ucb.WebDAVContentProvider</value>
++		</prop>
++		<prop oor:name="URLTemplate">
++		    <value>https</value>
++		</prop>
++		<prop oor:name="Arguments">
++		    <value/>
++		</prop>
++	    </node>
++	    <node oor:name="Provider13" oor:op="replace">
++		<prop oor:name="ServiceName">
++		    <value>com.sun.star.ucb.WebDAVContentProvider</value>
++		</prop>
++		<prop oor:name="URLTemplate">
++		    <value>dav</value>
++		</prop>
++		<prop oor:name="Arguments">
++		    <value/>
++		</prop>
++	    </node>
++	    <node oor:name="Provider14" oor:op="replace">
++		<prop oor:name="ServiceName">
++		    <value>com.sun.star.ucb.WebDAVContentProvider</value>
++		</prop>
++		<prop oor:name="URLTemplate">
++		    <value>davs</value>
++		</prop>
++		<prop oor:name="Arguments">
++		    <value/>
++		</prop>
++	    </node>
++	    <node oor:name="Provider15" oor:op="replace">
++		<prop oor:name="ServiceName">
++		    <value>com.sun.star.ucb.WebDAVContentProvider</value>
++		</prop>
++		<prop oor:name="URLTemplate">
++		    <value>webdav</value>
++		</prop>
++		<prop oor:name="Arguments">
++		    <value/>
++		</prop>
++	    </node>
++	    <node oor:name="Provider16" oor:op="replace">
++		<prop oor:name="ServiceName">
++		    <value>com.sun.star.ucb.WebDAVContentProvider</value>
++		</prop>
++		<prop oor:name="URLTemplate">
++		    <value>webdavs</value>
++		</prop>
++		<prop oor:name="Arguments">
++		    <value/>
++		</prop>
++	    </node>
++        </node>
+         </node>
+       </node>
+     </node>
+diff --git tools/inc/tools/urlobj.hxx tools/inc/tools/urlobj.hxx
+index 199079f..477c1ec 100644
 --- tools/inc/tools/urlobj.hxx
 +++ tools/inc/tools/urlobj.hxx
-@@ -163,9 +163,11 @@ enum INetProtocol
+@@ -163,9 +163,13 @@ enum INetProtocol
      INET_PROT_VND_SUN_STAR_EXPAND = 29,
      INET_PROT_VND_SUN_STAR_TDOC = 30,
      INET_PROT_SMB = 31,
@@ -10,58 +89,68 @@
 -    INET_PROT_GENERIC_HIERARCHICAL = 33,
 -    INET_PROT_END = 34
 +    INET_PROT_DAV = 32,
-+    INET_PROT_WEBDAV = 33,
-+    INET_PROT_GENERIC = 34,
-+    INET_PROT_GENERIC_HIERARCHICAL = 35,
-+    INET_PROT_END = 36
++    INET_PROT_DAVS = 33,
++    INET_PROT_WEBDAV = 34,
++    INET_PROT_WEBDAVS = 35,
++    INET_PROT_GENERIC = 36,
++    INET_PROT_GENERIC_HIERARCHICAL = 37,
++    INET_PROT_END = 38
  };
  
  //============================================================================
-diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
-index 431bfb5..29023c7 100644
+diff --git tools/source/fsys/urlobj.cxx tools/source/fsys/urlobj.cxx
+index 431bfb5..b5a51f9 100644
 --- tools/source/fsys/urlobj.cxx
 +++ tools/source/fsys/urlobj.cxx
-@@ -464,6 +464,10 @@ static INetURLObject::SchemeInfo const aSchemeInfoMap[INET_PROT_END]
+@@ -464,6 +464,14 @@ static INetURLObject::SchemeInfo const aSchemeInfoMap[INET_PROT_END]
            false, false, false, true, false },
          { "smb", "smb://", 139, true, true, false, true, true, true, true,
            true },
 +        { "dav", "dav://", 80, true, false, false, false, true, true, true,
 +          true },
++        { "davs", "davs://", 443, true, false, false, false, true, true,
++          true, true },
 +        { "webdav", "webdav://", 80, true, false, false, false, true, true, true,
 +          true },
++        { "webdavs", "webdavs://", 443, true, false, false, false, true, true,
++          true, true },
          { "", "", 0, false, false, false, false, false, false, false, false },
          { "", "", 0, false, false, false, false, false, false, true, false }
        };
-@@ -2113,6 +2117,7 @@ INetURLObject::getPrefix(sal_Unicode const *& rBegin,
+@@ -2113,6 +2121,8 @@ INetURLObject::getPrefix(sal_Unicode const *& rBegin,
  			  PrefixInfo::INTERNAL },
  			{ "cid:", 0, INET_PROT_CID, PrefixInfo::OFFICIAL },
  			{ "data:", 0, INET_PROT_DATA, PrefixInfo::OFFICIAL },
 +			{ "dav:", 0, INET_PROT_DAV, PrefixInfo::OFFICIAL },
++			{ "davs:", 0, INET_PROT_DAVS, PrefixInfo::OFFICIAL },
  			{ "db:", "staroffice.db:", INET_PROT_DB, PrefixInfo::INTERNAL },
  			{ "file:", 0, INET_PROT_FILE, PrefixInfo::OFFICIAL },
  			{ "ftp:", 0, INET_PROT_FTP, PrefixInfo::OFFICIAL },
-@@ -2194,6 +2199,7 @@ INetURLObject::getPrefix(sal_Unicode const *& rBegin,
+@@ -2194,6 +2204,8 @@ INetURLObject::getPrefix(sal_Unicode const *& rBegin,
  			  PrefixInfo::OFFICIAL },
  			{ "vnd.sun.star.wfs:", 0, INET_PROT_VND_SUN_STAR_WFS,
  			  PrefixInfo::OFFICIAL },
 +			{ "webdav:", 0, INET_PROT_WEBDAV, PrefixInfo::OFFICIAL },
++			{ "webdavs:", 0, INET_PROT_WEBDAVS, PrefixInfo::OFFICIAL },
  			{ "wfs:", "vnd.sun.star.wfs:", INET_PROT_VND_SUN_STAR_WFS,
  			  PrefixInfo::ALIAS } };
  	PrefixInfo const * pFirst = aMap + 1;
-@@ -2986,6 +2992,8 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
+@@ -2986,6 +2998,10 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
  		case INET_PROT_VND_SUN_STAR_WEBDAV:
  		case INET_PROT_HTTPS:
          case INET_PROT_SMB:
 +        case INET_PROT_DAV:
++        case INET_PROT_DAVS:
 +        case INET_PROT_WEBDAV:
++        case INET_PROT_WEBDAVS:
  			if (pPos < pEnd && *pPos != '/')
  				return false;
  			while (pPos < pEnd && *pPos != nQueryDelimiter
-diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
-index 16250f8..6e01a66 100644
+diff --git ucb/source/ucp/webdav/webdavcontent.cxx ucb/source/ucp/webdav/webdavcontent.cxx
+index 16223f6..6fae616 100644
 --- ucb/source/ucp/webdav/webdavcontent.cxx
 +++ ucb/source/ucp/webdav/webdavcontent.cxx
-@@ -2801,7 +2801,11 @@ void Content::transfer(
+@@ -2814,11 +2814,23 @@ void Content::transfer(
          //
          const rtl::OUString aScheme = sourceURI.GetScheme().toAsciiLowerCase();
          if ( aScheme.equalsAsciiL(
@@ -74,7 +163,19 @@
          {
              sourceURI.SetScheme(
                  rtl::OUString::createFromAscii( HTTP_URL_SCHEME ) );
-@@ -2825,9 +2829,15 @@ void Content::transfer(
+         }
++        else if ( aScheme.equalsAsciiL(
++                     RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) ||
++                  aScheme.equalsAsciiL(
++                     RTL_CONSTASCII_STRINGPARAM( PLAIN_WEBDAVS_URL_SCHEME ) ) )
++        {
++            sourceURI.SetScheme(
++                rtl::OUString::createFromAscii( HTTPS_URL_SCHEME ) );
++        }
+         else
+         {
+             if ( !aScheme.equalsAsciiL(
+@@ -2838,9 +2850,23 @@ void Content::transfer(
          }
  
          if ( targetURI.GetScheme().toAsciiLowerCase().equalsAsciiL(
@@ -88,14 +189,22 @@
              targetURI.SetScheme(
                  rtl::OUString::createFromAscii( HTTP_URL_SCHEME ) );
 +        }
++        else if ( targetURI.GetScheme().toAsciiLowerCase().equalsAsciiL(
++                      RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) ||
++                  targetURI.GetScheme().toAsciiLowerCase().equalsAsciiL(
++                      RTL_CONSTASCII_STRINGPARAM( PLAIN_WEBDAVS_URL_SCHEME ) ) )
++        {
++            targetURI.SetScheme(
++                rtl::OUString::createFromAscii( HTTPS_URL_SCHEME ) );
++        }
  	
          // @@@ This implementation of 'transfer' only works
          //     if the source and target are located at same host.
-diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
-index 9790870..26c4baf 100644
+diff --git ucb/source/ucp/webdav/webdavprovider.cxx ucb/source/ucp/webdav/webdavprovider.cxx
+index 9790870..6b219ef 100644
 --- ucb/source/ucp/webdav/webdavprovider.cxx
 +++ ucb/source/ucp/webdav/webdavprovider.cxx
-@@ -146,10 +146,13 @@ ContentProvider::queryContent(
+@@ -146,10 +146,17 @@ ContentProvider::queryContent(
           !aScheme.equalsAsciiL(
              RTL_CONSTASCII_STRINGPARAM( HTTPS_URL_SCHEME ) ) &&
           !aScheme.equalsAsciiL(
@@ -108,46 +217,54 @@
 +         !aScheme.equalsAsciiL(
 +            RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) &&
 +         !aScheme.equalsAsciiL(
-+            RTL_CONSTASCII_STRINGPARAM( PLAIN_WEBDAV_URL_SCHEME ) )
++            RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) &&
++         !aScheme.equalsAsciiL(
++            RTL_CONSTASCII_STRINGPARAM( PLAIN_WEBDAV_URL_SCHEME ) ) &&
++         !aScheme.equalsAsciiL(
++            RTL_CONSTASCII_STRINGPARAM( PLAIN_WEBDAVS_URL_SCHEME ) )
         )
          throw ucb::IllegalIdentifierException();
  
-@@ -168,14 +171,23 @@ ContentProvider::queryContent(
+@@ -168,14 +175,27 @@ ContentProvider::queryContent(
      uno::Reference< ucb::XContentIdentifier > xCanonicId;
  
      bool bNewId = false;
 -    if ( aScheme.equalsAsciiL(
 -            RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) )
-+    const char * const pReplace[] = {
-+        WEBDAV_URL_SCHEME,
-+        DAV_URL_SCHEME,
-+        PLAIN_WEBDAV_URL_SCHEME,
-+        NULL
++    struct {
++        const char *from;
++        const char *to;
++    } const *pScheme, pReplace[] = {
++        { WEBDAV_URL_SCHEME, HTTP_URL_SCHEME },
++        { DAV_URL_SCHEME, HTTP_URL_SCHEME },
++        { DAVS_URL_SCHEME, HTTPS_URL_SCHEME },
++        { PLAIN_WEBDAV_URL_SCHEME, HTTP_URL_SCHEME },
++        { PLAIN_WEBDAVS_URL_SCHEME, HTTPS_URL_SCHEME },
++        { NULL, NULL }
 +    };
-+    for ( const char * const *pScheme = pReplace; *pScheme ; ++pScheme )
++    for ( pScheme = pReplace; pScheme->from ; ++pScheme )
      {
 -        aURL = aURL.replaceAt( 0,
 -                               WEBDAV_URL_SCHEME_LENGTH,
 -                               rtl::OUString::createFromAscii(
 -                                                    HTTP_URL_SCHEME ) );
 -        bNewId = true;
-+        if ( aScheme.equalsAscii( *pScheme ) )
++        if ( aScheme.equalsAscii( pScheme->from ) )
 +        {
 +            aURL = aURL.replaceAt( 0,
-+                    strlen( *pScheme ),
-+                    rtl::OUString::createFromAscii(
-+                        HTTP_URL_SCHEME ) );
++                    strlen( pScheme->from ),
++                    rtl::OUString::createFromAscii( pScheme->to ) );
 +            bNewId = true;
 +            break;
 +        }
      }
  
      sal_Int32 nPos = aURL.lastIndexOf( '/' );
-diff --git a/ucb/source/ucp/webdav/webdavprovider.hxx b/ucb/source/ucp/webdav/webdavprovider.hxx
-index 7068b41..a46398f 100644
+diff --git ucb/source/ucp/webdav/webdavprovider.hxx ucb/source/ucp/webdav/webdavprovider.hxx
+index 7068b41..f6d7228 100644
 --- ucb/source/ucp/webdav/webdavprovider.hxx
 +++ ucb/source/ucp/webdav/webdavprovider.hxx
-@@ -71,16 +71,17 @@ namespace webdav_ucp {
+@@ -71,16 +71,19 @@ namespace webdav_ucp {
  // contents ) according to this scheme.
  #define WEBDAV_URL_SCHEME \
  				"vnd.sun.star.webdav"
@@ -162,77 +279,26 @@
  #define FTP_URL_SCHEME "ftp"
  
 +#define DAV_URL_SCHEME "dav"
++#define DAVS_URL_SCHEME "davs"
 +
 +#define PLAIN_WEBDAV_URL_SCHEME "webdav"
++#define PLAIN_WEBDAVS_URL_SCHEME "webdavs"
 +
  #define HTTP_CONTENT_TYPE \
  				"application/" HTTP_URL_SCHEME "-content"
  
-diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
-index 2938ee6..032888b 100644
+diff --git unotools/source/ucbhelper/ucblockbytes.cxx unotools/source/ucbhelper/ucblockbytes.cxx
+index 7cda473..ab428c2 100644
 --- unotools/source/ucbhelper/ucblockbytes.cxx
 +++ unotools/source/ucbhelper/ucblockbytes.cxx
-@@ -1026,6 +1026,8 @@ static sal_Bool UCBOpenContentSync(
+@@ -1026,6 +1026,10 @@ static sal_Bool UCBOpenContentSync(
      if( ! aScheme.equalsIgnoreAsciiCaseAscii("http")                &&
  		! aScheme.equalsIgnoreAsciiCaseAscii("https")                &&
          ! aScheme.equalsIgnoreAsciiCaseAscii("vnd.sun.star.webdav") &&
 +        ! aScheme.equalsIgnoreAsciiCaseAscii("dav") &&
++        ! aScheme.equalsIgnoreAsciiCaseAscii("davs") &&
 +        ! aScheme.equalsIgnoreAsciiCaseAscii("webdav") &&
++        ! aScheme.equalsIgnoreAsciiCaseAscii("webdavs") &&
          ! aScheme.equalsIgnoreAsciiCaseAscii("ftp"))
  		return _UCBOpenContentSync(
  			xLockBytes,xContent,rArg,xSink,xInteract,xProgress,xHandler);
---- officecfg/registry/data/org/openoffice/ucb/Configuration.xcu	2007-11-07 10:54:41.000000000 +0100
-+++ officecfg/registry/data/org/openoffice/ucb/Configuration.xcu	2008-02-15 17:27:31.000000000 +0100
-@@ -150,18 +150,40 @@
-                 <value/>
-               </prop>
-             </node>
--   		    <node oor:name="Provider12" oor:op="replace">
--			  <prop oor:name="ServiceName">
--			    <value>com.sun.star.ucb.WebDAVContentProvider</value>
--			  </prop>
--			  <prop oor:name="URLTemplate">
--				<value>https</value>
--			  </prop>
--			  <prop oor:name="Arguments">
--			    <value/>
--			  </prop>
--			</node>
--		  </node>
-+	    <node oor:name="Provider12" oor:op="replace">
-+		<prop oor:name="ServiceName">
-+		    <value>com.sun.star.ucb.WebDAVContentProvider</value>
-+		</prop>
-+		<prop oor:name="URLTemplate">
-+		    <value>https</value>
-+		</prop>
-+		<prop oor:name="Arguments">
-+		    <value/>
-+		</prop>
-+	    </node>
-+	    <node oor:name="Provider13" oor:op="replace">
-+		<prop oor:name="ServiceName">
-+		    <value>com.sun.star.ucb.WebDAVContentProvider</value>
-+		</prop>
-+		<prop oor:name="URLTemplate">
-+		    <value>dav</value>
-+		</prop>
-+		<prop oor:name="Arguments">
-+		    <value/>
-+		</prop>
-+	    </node>
-+	    <node oor:name="Provider14" oor:op="replace">
-+		<prop oor:name="ServiceName">
-+		    <value>com.sun.star.ucb.WebDAVContentProvider</value>
-+		</prop>
-+		<prop oor:name="URLTemplate">
-+		    <value>webdav</value>
-+		</prop>
-+		<prop oor:name="Arguments">
-+		    <value/>
-+		</prop>
-+	    </node>
-+        </node>
-         </node>
-       </node>
-     </node>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]