ooo-build r13573 - in trunk: . patches/dev300



Author: jholesovsky
Date: Thu Aug 14 16:26:10 2008
New Revision: 13573
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13573&view=rev

Log:
2008-08-14  Jan Holesovsky  <kendy suse cz>

        * patches/dev300/cws-webdavandgvfslocking1-comphelper.diff,
          patches/dev300/cws-webdavandgvfslocking1-sc.diff,
          patches/dev300/cws-webdavandgvfslocking1-officecfg.diff,
          patches/dev300/cws-webdavandgvfslocking1-unotools.diff,
          patches/dev300/cws-webdavandgvfslocking1-tools.diff,
          patches/dev300/cws-webdavandgvfslocking1-sal.diff,
          patches/dev300/cws-webdavandgvfslocking1-ucb.diff,
          patches/dev300/cws-webdavandgvfslocking1-sfx2.diff,
          patches/dev300/apply: Update to the newest version, enable the
          disabled -ucb patch again.


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply
   trunk/patches/dev300/cws-webdavandgvfslocking1-comphelper.diff
   trunk/patches/dev300/cws-webdavandgvfslocking1-officecfg.diff
   trunk/patches/dev300/cws-webdavandgvfslocking1-sal.diff
   trunk/patches/dev300/cws-webdavandgvfslocking1-sc.diff
   trunk/patches/dev300/cws-webdavandgvfslocking1-sfx2.diff
   trunk/patches/dev300/cws-webdavandgvfslocking1-tools.diff
   trunk/patches/dev300/cws-webdavandgvfslocking1-ucb.diff
   trunk/patches/dev300/cws-webdavandgvfslocking1-unotools.diff

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Thu Aug 14 16:26:10 2008
@@ -297,8 +297,6 @@
 libwps.diff
 
 [ CWSBackports < dev300-m25 > beb300-m0 ]
-# FIXME: port cws-webdavandgvfslocking1-ucb.diff for dev300-m25
-#        and enable all the patches again
 # WebDAV and gnome-vfs locking implementation
 cws-webdavandgvfslocking1-comphelper.diff
 cws-webdavandgvfslocking1-officecfg.diff
@@ -306,7 +304,7 @@
 cws-webdavandgvfslocking1-sc.diff
 cws-webdavandgvfslocking1-sfx2.diff
 cws-webdavandgvfslocking1-tools.diff
-#cws-webdavandgvfslocking1-ucb.diff
+cws-webdavandgvfslocking1-ucb.diff
 cws-webdavandgvfslocking1-unotools.diff
 # don't lock for infinite, instead set timeout to 3 minutes, and refresh 30
 # sec before expiration

Modified: trunk/patches/dev300/cws-webdavandgvfslocking1-comphelper.diff
==============================================================================
--- trunk/patches/dev300/cws-webdavandgvfslocking1-comphelper.diff	(original)
+++ trunk/patches/dev300/cws-webdavandgvfslocking1-comphelper.diff	Thu Aug 14 16:26:10 2008
@@ -72,7 +72,7 @@
 RCS file: /cvs/util/comphelper/source/misc/mediadescriptor.cxx,v
 retrieving revision 1.20
 retrieving revision 1.17.86.3
-diff -u -p -u -p -B -r1.20 -r1.17.86.3
+diff -u -p -u -p -b -w -B -r1.20 -r1.17.86.3
 --- comphelper/source/misc/mediadescriptor.cxx	6 Jun 2008 14:36:10 -0000	1.20
 +++ comphelper/source/misc/mediadescriptor.cxx	30 Jun 2008 09:09:57 -0000	1.17.86.3
 @@ -30,61 +30,28 @@
@@ -139,26 +139,23 @@
  #include <com/sun/star/ucb/PostCommandArgument2.hpp>
  #include <ucbhelper/interceptedinteraction.hxx>
  #include <ucbhelper/content.hxx>
-@@ -93,9 +60,7 @@
+@@ -93,10 +60,8 @@
  #include <comphelper/processfactory.hxx>
  
  #if OSL_DEBUG_LEVEL>0
 -    #ifndef _RTL_USTRBUF_HXX_
      #include <rtl/ustrbuf.hxx>
--    #endif
- #endif
+     #endif
+-#endif
  
  //_______________________________________________
-@@ -628,109 +593,97 @@ sal_Bool MediaDescriptor::impl_openStrea
+ // namespace
+@@ -628,18 +593,7 @@ sal_Bool MediaDescriptor::impl_openStrea
  }
  
  /*-----------------------------------------------*/
 -class StillReadWriteInteraction : public ::ucbhelper::InterceptedInteraction
-+StillReadWriteInteraction::StillReadWriteInteraction(const css::uno::Reference< css::task::XInteractionHandler >& xHandler)
-+: m_bUsed                    (sal_False)
-+, m_bHandledByMySelf         (sal_False)
-+, m_bHandledByInternalHandler(sal_False)
- {
+-{
 -    private:
 -		static const sal_Int32 HANDLE_INTERACTIVEIOEXCEPTION       = 0;
 -		static const sal_Int32 HANDLE_UNSUPPORTEDDATASINKEXCEPTION = 1;
@@ -169,173 +166,46 @@
 -
 -    public:
 -		StillReadWriteInteraction(const css::uno::Reference< css::task::XInteractionHandler >& xHandler)
--			: m_bUsed                    (sal_False)
--			, m_bHandledByMySelf         (sal_False)
--			, m_bHandledByInternalHandler(sal_False)
--		{
--			::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest > lInterceptions;
--			::ucbhelper::InterceptedInteraction::InterceptedRequest                  aInterceptedRequest;
-+    ::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest > lInterceptions;
-+    ::ucbhelper::InterceptedInteraction::InterceptedRequest                  aInterceptedRequest;
- 
--			aInterceptedRequest.Handle               = HANDLE_INTERACTIVEIOEXCEPTION;
--			aInterceptedRequest.Request            <<= css::ucb::InteractiveIOException();
--			aInterceptedRequest.Continuation         = ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0));
--			aInterceptedRequest.MatchExact           = sal_False;
--			lInterceptions.push_back(aInterceptedRequest);
--
--			aInterceptedRequest.Handle               = HANDLE_UNSUPPORTEDDATASINKEXCEPTION;
--			aInterceptedRequest.Request            <<= css::ucb::UnsupportedDataSinkException();
--			aInterceptedRequest.Continuation         = ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0));
--			aInterceptedRequest.MatchExact           = sal_False;
--			lInterceptions.push_back(aInterceptedRequest);
-+    aInterceptedRequest.Handle               = HANDLE_INTERACTIVEIOEXCEPTION;
-+    aInterceptedRequest.Request            <<= css::ucb::InteractiveIOException();
-+    aInterceptedRequest.Continuation         = ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0));
-+    aInterceptedRequest.MatchExact           = sal_False;
-+    lInterceptions.push_back(aInterceptedRequest);
- 
--			setInterceptedHandler(xHandler);
--			setInterceptions(lInterceptions);
--		}
-+    aInterceptedRequest.Handle               = HANDLE_UNSUPPORTEDDATASINKEXCEPTION;
-+    aInterceptedRequest.Request            <<= css::ucb::UnsupportedDataSinkException();
-+    aInterceptedRequest.Continuation         = ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0));
-+    aInterceptedRequest.MatchExact           = sal_False;
-+    lInterceptions.push_back(aInterceptedRequest);
++StillReadWriteInteraction::StillReadWriteInteraction(const css::uno::Reference< css::task::XInteractionHandler >& xHandler)
+ 			: m_bUsed                    (sal_False)
+ 			, m_bHandledByMySelf         (sal_False)
+ 			, m_bHandledByInternalHandler(sal_False)
+@@ -663,25 +617,25 @@ class StillReadWriteInteraction : public
+ 			setInterceptions(lInterceptions);
+ 		}
  
 -		void resetInterceptions()
--		{
--			setInterceptions(::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest >());
--		}
-+    setInterceptedHandler(xHandler);
-+    setInterceptions(lInterceptions);
-+}
++void StillReadWriteInteraction::resetInterceptions()
+ 		{
+ 			setInterceptions(::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest >());
+ 		}
  
 -		void resetErrorStates()
--		{
--			m_bUsed                     = sal_False;
--			m_bHandledByMySelf          = sal_False;
--			m_bHandledByInternalHandler = sal_False;
--		}
-+void StillReadWriteInteraction::resetInterceptions()
-+{
-+    setInterceptions(::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest >());
-+}
-+
 +void StillReadWriteInteraction::resetErrorStates()
-+{
-+    m_bUsed                     = sal_False;
-+    m_bHandledByMySelf          = sal_False;
-+    m_bHandledByInternalHandler = sal_False;
-+}
-+
-+sal_Bool StillReadWriteInteraction::wasWriteError()
-+{
-+    return (m_bUsed && m_bHandledByMySelf);
-+}
-+
-+ucbhelper::InterceptedInteraction::EInterceptionState StillReadWriteInteraction::intercepted(
-+                                                      const ::ucbhelper::InterceptedInteraction::InterceptedRequest&                         aRequest,
-+                                                      const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& xRequest)
-+{
-+    // we are used!
-+    m_bUsed = sal_True;
+ 		{
+ 			m_bUsed                     = sal_False;
+ 			m_bHandledByMySelf          = sal_False;
+ 			m_bHandledByInternalHandler = sal_False;
+ 		}
  
 -        sal_Bool wasWriteError()
-+    // check if its a real interception - might some parameters are not the right ones ...
-+    sal_Bool bAbort = sal_False;
-+    switch(aRequest.Handle)
-+    {
-+        case HANDLE_INTERACTIVEIOEXCEPTION:
++sal_Bool StillReadWriteInteraction::wasWriteError()
          {
--            return (m_bUsed && m_bHandledByMySelf);
-+            css::ucb::InteractiveIOException exIO;
-+            xRequest->getRequest() >>= exIO;
-+            bAbort = (
-+                        (exIO.Code == css::ucb::IOErrorCode_ACCESS_DENIED     ) ||
-+                        (exIO.Code == css::ucb::IOErrorCode_LOCKING_VIOLATION )
-+                    );
+             return (m_bUsed && m_bHandledByMySelf);
          }
-+        break;
  
 -    private:
 -		virtual ucbhelper::InterceptedInteraction::EInterceptionState intercepted(const ::ucbhelper::InterceptedInteraction::InterceptedRequest&                         aRequest,
--																				  const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& xRequest)
--		{
--            // we are used!
--            m_bUsed = sal_True;
-+        case HANDLE_UNSUPPORTEDDATASINKEXCEPTION:
-+        {
-+            bAbort = sal_True;
-+        }
-+        break;
-+    }
- 
--            // check if its a real interception - might some parameters are not the right ones ...
--            sal_Bool bAbort = sal_False;
--			switch(aRequest.Handle)
--			{
--				case HANDLE_INTERACTIVEIOEXCEPTION:
--				{
--					css::ucb::InteractiveIOException exIO;
--					xRequest->getRequest() >>= exIO;
--					bAbort = (
--								(exIO.Code == css::ucb::IOErrorCode_ACCESS_DENIED     ) ||
--								(exIO.Code == css::ucb::IOErrorCode_LOCKING_VIOLATION )
--							);
--				}
--				break;
--
--				case HANDLE_UNSUPPORTEDDATASINKEXCEPTION:
--				{
--					bAbort = sal_True;
--				}
--				break;
--			}
--
--			// handle interaction by ourself
--            if (bAbort)
--			{
--                m_bHandledByMySelf = sal_True;
--				css::uno::Reference< css::task::XInteractionContinuation > xAbort = ::ucbhelper::InterceptedInteraction::extractContinuation(
--					xRequest->getContinuations(),
--					::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0)));
--				if (!xAbort.is())
--					return ::ucbhelper::InterceptedInteraction::E_NO_CONTINUATION_FOUND;
--				xAbort->select();
--				return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED;
--			}
-+    // handle interaction by ourself
-+    if (bAbort)
-+    {
-+        m_bHandledByMySelf = sal_True;
-+        css::uno::Reference< css::task::XInteractionContinuation > xAbort = ::ucbhelper::InterceptedInteraction::extractContinuation(
-+            xRequest->getContinuations(),
-+            ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0)));
-+        if (!xAbort.is())
-+            return ::ucbhelper::InterceptedInteraction::E_NO_CONTINUATION_FOUND;
-+        xAbort->select();
-+        return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED;
-+    }
- 
--			// Otherwhise use internal handler.
--            if (m_xInterceptedHandler.is())
--            {
--                m_bHandledByInternalHandler = sal_True;
--				m_xInterceptedHandler->handle(xRequest);
--            }
--			return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED;
--		}
++ucbhelper::InterceptedInteraction::EInterceptionState StillReadWriteInteraction::intercepted(
++                                                      const ::ucbhelper::InterceptedInteraction::InterceptedRequest&                         aRequest,
+ 																				  const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& xRequest)
+ 		{
+             // we are used!
+@@ -730,7 +684,6 @@ class StillReadWriteInteraction : public
+             }
+ 			return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED;
+ 		}
 -};
-+    // Otherwhise use internal handler.
-+    if (m_xInterceptedHandler.is())
-+    {
-+        m_bHandledByInternalHandler = sal_True;
-+        m_xInterceptedHandler->handle(xRequest);
-+    }
-+    return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED;
-+}
  
  /*-----------------------------------------------
      25.03.2004 12:29

Modified: trunk/patches/dev300/cws-webdavandgvfslocking1-officecfg.diff
==============================================================================
--- trunk/patches/dev300/cws-webdavandgvfslocking1-officecfg.diff	(original)
+++ trunk/patches/dev300/cws-webdavandgvfslocking1-officecfg.diff	Thu Aug 14 16:26:10 2008
@@ -3,7 +3,7 @@
 RCS file: /cvs/util/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu,v
 retrieving revision 1.13
 retrieving revision 1.10.112.3
-diff -u -p -u -p -B -r1.13 -r1.10.112.3
+diff -u -p -u -p -b -w -B -r1.13 -r1.10.112.3
 --- officecfg/registry/data/org/openoffice/ucb/Configuration.xcu	4 Jun 2008 09:50:35 -0000	1.13
 +++ officecfg/registry/data/org/openoffice/ucb/Configuration.xcu	30 Jun 2008 09:01:40 -0000	1.10.112.3
 @@ -178,6 +178,28 @@

Modified: trunk/patches/dev300/cws-webdavandgvfslocking1-sal.diff
==============================================================================
--- trunk/patches/dev300/cws-webdavandgvfslocking1-sal.diff	(original)
+++ trunk/patches/dev300/cws-webdavandgvfslocking1-sal.diff	Thu Aug 14 16:26:10 2008
@@ -3,7 +3,7 @@
 RCS file: /cvs/porting/sal/inc/osl/file.h,v
 retrieving revision 1.34
 retrieving revision 1.32.32.2
-diff -u -p -u -p -B -r1.34 -r1.32.32.2
+diff -u -p -u -p -b -w -B -r1.34 -r1.32.32.2
 --- sal/inc/osl/file.h	15 Apr 2008 14:25:46 -0000	1.34
 +++ sal/inc/osl/file.h	2 Jun 2008 14:03:40 -0000	1.32.32.2
 @@ -139,6 +139,7 @@ typedef enum {
@@ -17,11 +17,11 @@
 Index: sal/inc/osl/file.hxx
 ===================================================================
 RCS file: /cvs/porting/sal/inc/osl/file.hxx,v
-retrieving revision 1.38
-retrieving revision 1.36.32.2
-diff -u -p -u -p -B -r1.38 -r1.36.32.2
---- sal/inc/osl/file.hxx	15 Apr 2008 14:27:23 -0000	1.38
-+++ sal/inc/osl/file.hxx	2 Jun 2008 14:03:44 -0000	1.36.32.2
+retrieving revision 1.39
+retrieving revision 1.36.32.3
+diff -u -p -u -p -b -w -B -r1.39 -r1.36.32.3
+--- sal/inc/osl/file.hxx	22 Jul 2008 16:57:17 -0000	1.39
++++ sal/inc/osl/file.hxx	14 Aug 2008 15:39:27 -0000	1.36.32.3
 @@ -106,6 +106,7 @@ public:
  		E_USERS        = osl_File_E_USERS,
  		E_OVERFLOW     = osl_File_E_OVERFLOW,
@@ -35,7 +35,7 @@
 RCS file: /cvs/porting/sal/osl/unx/file_error_transl.cxx,v
 retrieving revision 1.5
 retrieving revision 1.4.232.2
-diff -u -p -u -p -B -r1.5 -r1.4.232.2
+diff -u -p -u -p -b -w -B -r1.5 -r1.4.232.2
 --- sal/osl/unx/file_error_transl.cxx	10 Apr 2008 11:06:30 -0000	1.5
 +++ sal/osl/unx/file_error_transl.cxx	2 Jun 2008 14:03:47 -0000	1.4.232.2
 @@ -247,6 +247,10 @@ oslFileError oslTranslateFileError(sal_B

Modified: trunk/patches/dev300/cws-webdavandgvfslocking1-sc.diff
==============================================================================
--- trunk/patches/dev300/cws-webdavandgvfslocking1-sc.diff	(original)
+++ trunk/patches/dev300/cws-webdavandgvfslocking1-sc.diff	Thu Aug 14 16:26:10 2008
@@ -1,12 +1,12 @@
 Index: sc/source/ui/docshell/docsh.cxx
 ===================================================================
 RCS file: /cvs/sc/sc/source/ui/docshell/docsh.cxx,v
-retrieving revision 1.100
-retrieving revision 1.98.32.2
-diff -u -p -u -p -B -r1.100 -r1.98.32.2
---- sc/source/ui/docshell/docsh.cxx	15 Apr 2008 14:12:23 -0000	1.100
-+++ sc/source/ui/docshell/docsh.cxx	2 Jun 2008 13:52:36 -0000	1.98.32.2
-@@ -1003,7 +1003,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( S
+retrieving revision 1.103
+retrieving revision 1.98.32.3
+diff -u -p -u -p -b -w -B -r1.103 -r1.98.32.3
+--- sc/source/ui/docshell/docsh.cxx	8 Jul 2008 09:43:20 -0000	1.103
++++ sc/source/ui/docshell/docsh.cxx	14 Aug 2008 15:37:57 -0000	1.98.32.3
+@@ -1025,7 +1025,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( S
  	//	Alle Filter brauchen die komplette Datei am Stueck (nicht asynchron),
  	//	darum vorher per CreateFileStream dafuer sorgen, dass die komplette
  	//	Datei uebertragen wird.

Modified: trunk/patches/dev300/cws-webdavandgvfslocking1-sfx2.diff
==============================================================================
--- trunk/patches/dev300/cws-webdavandgvfslocking1-sfx2.diff	(original)
+++ trunk/patches/dev300/cws-webdavandgvfslocking1-sfx2.diff	Thu Aug 14 16:26:10 2008
@@ -2,11 +2,19 @@
 ===================================================================
 RCS file: /cvs/framework/sfx2/inc/sfx2/docfile.hxx,v
 retrieving revision 1.8
-retrieving revision 1.6.22.2
-diff -u -p -u -p -B -r1.8 -r1.6.22.2
+retrieving revision 1.6.22.3
+diff -u -p -u -p -b -w -B -r1.8 -r1.6.22.3
 --- sfx2/inc/sfx2/docfile.hxx	15 Apr 2008 14:18:01 -0000	1.8
-+++ sfx2/inc/sfx2/docfile.hxx	2 Jun 2008 14:00:55 -0000	1.6.22.2
-@@ -181,7 +181,7 @@ public:
++++ sfx2/inc/sfx2/docfile.hxx	5 Aug 2008 14:43:31 -0000	1.6.22.3
+@@ -153,6 +153,7 @@ public:
+     void                UseInteractionHandler( BOOL );
+     ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >
+ 						GetInteractionHandler();
++    ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > GetStillCommandEnvironment();
+ 
+     void setStreamToLoadFrom(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream,sal_Bool bIsReadOnly )
+     { m_xInputStreamToLoadFrom = xInputStream; m_bIsReadOnly = bIsReadOnly; }
+@@ -181,7 +182,7 @@ public:
  	const INetURLObject& GetURLObject() const;
  #endif
      ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent > GetContent() const;
@@ -15,7 +23,7 @@
  	void                SetTemporary( sal_Bool bTemp );
      sal_Bool            IsTemporary() const;
      sal_Bool            IsRemote();
-@@ -254,6 +254,8 @@ public:
+@@ -254,6 +255,8 @@ public:
  	void				SetCharset( ::rtl::OUString );
      ::rtl::OUString     GetBaseURL( bool bForSaving=false );
  
@@ -29,7 +37,7 @@
 RCS file: /cvs/framework/sfx2/source/bastyp/helper.cxx,v
 retrieving revision 1.30
 retrieving revision 1.29.234.2
-diff -u -p -u -p -B -r1.30 -r1.29.234.2
+diff -u -p -u -p -b -w -B -r1.30 -r1.29.234.2
 --- sfx2/source/bastyp/helper.cxx	11 Apr 2008 12:17:07 -0000	1.30
 +++ sfx2/source/bastyp/helper.cxx	2 Jun 2008 14:00:58 -0000	1.29.234.2
 @@ -796,16 +796,15 @@ ErrCode SfxContentHelper::QueryDiskSpace
@@ -63,12 +71,12 @@
 Index: sfx2/source/dialog/dinfdlg.cxx
 ===================================================================
 RCS file: /cvs/framework/sfx2/source/dialog/dinfdlg.cxx,v
-retrieving revision 1.45
-retrieving revision 1.43.38.3
-diff -u -p -u -p -B -r1.45 -r1.43.38.3
---- sfx2/source/dialog/dinfdlg.cxx	20 Jun 2008 07:11:58 -0000	1.45
-+++ sfx2/source/dialog/dinfdlg.cxx	30 Jun 2008 09:09:22 -0000	1.43.38.3
-@@ -1066,8 +1066,9 @@ void SfxDocumentPage::Reset( const SfxIt
+retrieving revision 1.46
+retrieving revision 1.43.38.4
+diff -u -p -u -p -b -w -B -r1.46 -r1.43.38.4
+--- sfx2/source/dialog/dinfdlg.cxx	30 Jul 2008 09:23:33 -0000	1.46
++++ sfx2/source/dialog/dinfdlg.cxx	14 Aug 2008 15:39:03 -0000	1.43.38.4
+@@ -1171,8 +1171,9 @@ void SfxDocumentPage::Reset( const SfxIt
  
  	// determine size and type
  	String aSizeText( aUnknownSize );
@@ -83,11 +91,11 @@
 Index: sfx2/source/doc/docfile.cxx
 ===================================================================
 RCS file: /cvs/framework/sfx2/source/doc/docfile.cxx,v
-retrieving revision 1.202
-retrieving revision 1.198.22.5
-diff -u -p -u -p -B -r1.202 -r1.198.22.5
---- sfx2/source/doc/docfile.cxx	24 Apr 2008 19:15:48 -0000	1.202
-+++ sfx2/source/doc/docfile.cxx	1 Jul 2008 14:50:36 -0000	1.198.22.5
+retrieving revision 1.203
+retrieving revision 1.198.22.7
+diff -u -p -u -p -b -w -B -r1.203 -r1.198.22.7
+--- sfx2/source/doc/docfile.cxx	25 Jul 2008 14:45:51 -0000	1.203
++++ sfx2/source/doc/docfile.cxx	14 Aug 2008 15:39:07 -0000	1.198.22.7
 @@ -108,6 +108,7 @@ using namespace ::com::sun::star::io;
  
  #include <comphelper/storagehelper.hxx>
@@ -140,19 +148,16 @@
  class SfxPoolCancelManager_Impl  :   public SfxCancelManager ,
                                       public SfxCancellable   ,
                                       public SfxListener      ,
-@@ -460,6 +424,11 @@ Reference < XContent > SfxMedium::GetCon
+@@ -458,7 +422,7 @@ Reference < XContent > SfxMedium::GetCon
+     if ( !pImp->aContent.get().is() )
+     {
  		Reference < ::com::sun::star::ucb::XContent > xContent;
- 	    Reference < ::com::sun::star::ucb::XCommandEnvironment > xEnv;
+-	    Reference < ::com::sun::star::ucb::XCommandEnvironment > xEnv;
++	    Reference < ::com::sun::star::ucb::XCommandEnvironment > xEnv = const_cast< SfxMedium* >( this )->GetStillCommandEnvironment();
  
-+        Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = const_cast< SfxMedium* >( this )->GetInteractionHandler();
-+        if ( xInteractionHandler.is() )
-+            xEnv = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ),
-+                                                        Reference< ::com::sun::star::ucb::XProgressHandler >() );
-+
          SFX_ITEMSET_ARG( pSet, pItem, SfxUnoAnyItem, SID_CONTENT, sal_False);
          if ( pItem )
-             pItem->GetValue() >>= xContent;
-@@ -653,10 +622,13 @@ sal_Bool SfxMedium::CloseOutStream_Impl(
+@@ -653,10 +617,13 @@ sal_Bool SfxMedium::CloseOutStream_Impl(
  }
  
  //------------------------------------------------------------------
@@ -160,15 +165,14 @@
 +const String& SfxMedium::GetPhysicalName( sal_Bool bForceCreateTempIfRemote ) const
  {
      if ( !aName.Len() && aLogicName.Len() )
--        (( SfxMedium*)this)->CreateFileStream();
 +    {
 +        if ( bForceCreateTempIfRemote || !SupportsActiveStreaming( aLogicName ) )
-+            (( SfxMedium*)this)->CreateFileStream();
+         (( SfxMedium*)this)->CreateFileStream();
 +    }
  
      // return the name then
      return aName;
-@@ -822,11 +794,37 @@ sal_Bool SfxMedium::TryStorage()
+@@ -822,21 +789,44 @@ sal_Bool SfxMedium::TryStorage()
  }
  
  //------------------------------------------------------------------
@@ -178,12 +182,7 @@
 +        return sal_True;
 +
 +    ::ucbhelper::Content aTmpContent;
-+    Reference< ::com::sun::star::ucb::XCommandEnvironment > xEnv;
-+
-+    Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = const_cast< SfxMedium* >( this )->GetInteractionHandler();
-+    if ( xInteractionHandler.is() )
-+        xEnv = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ),
-+                                                    Reference< ::com::sun::star::ucb::XProgressHandler >() );
++    Reference < ::com::sun::star::ucb::XCommandEnvironment > xEnv = const_cast< SfxMedium* >( this )->GetStillCommandEnvironment();
 +
 +    if ( ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xEnv, aTmpContent ) )
 +    {
@@ -203,21 +202,18 @@
  	return ( !pImp->pTempFile && !( aLogicName.Len() && pImp->m_bSalvageMode )
  	  && GetURLObject().GetMainURL( INetURLObject::NO_DECODE ).getLength()
 -      && ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) )
+-	  && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) );
 + 	  && SupportsActiveStreaming( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) )
- 	  && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) );
++	  && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), GetStillCommandEnvironment() ) );
  }
  
-@@ -834,9 +832,15 @@ sal_Bool SfxMedium::BasedOnOriginalFile_
+ //------------------------------------------------------------------
  void SfxMedium::StorageBackup_Impl()
  {
  	::ucbhelper::Content aOriginalContent;
 -	Reference< ::com::sun::star::ucb::XCommandEnvironment > xDummyEnv;
 +
-+	Reference< ::com::sun::star::ucb::XCommandEnvironment > xEnv;
-+    Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = GetInteractionHandler();
-+    if ( xInteractionHandler.is() )
-+        xEnv = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ),
-+                                                    Reference< ::com::sun::star::ucb::XProgressHandler >() );
++    Reference < ::com::sun::star::ucb::XCommandEnvironment > xEnv = const_cast< SfxMedium* >( this )->GetStillCommandEnvironment();
 +
  	if ( BasedOnOriginalFile_Impl() && !pImp->m_aBackupURL.getLength()
 -	  && ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, aOriginalContent ) )
@@ -225,16 +221,7 @@
  	{
  		DoInternalBackup_Impl( aOriginalContent );
  		if( !pImp->m_aBackupURL.getLength() )
-@@ -892,7 +896,7 @@ uno::Reference < embed::XStorage > SfxMe
- 
-     // medium based on OutputStream: must work with TempFile
-     if( aLogicName.CompareToAscii( "private:stream", 14 ) == COMPARE_EQUAL
--	  || !::utl::LocalFileHelper::IsLocalFile( aLogicName ) )
-+            || !::utl::LocalFileHelper::IsLocalFile( aLogicName ) )
-         CreateTempFileNoCopy();
- 	// if Medium already contains a stream - TODO/LATER: store stream/outputstream in ImplData, not in Medium
- 	else if ( GetItemSet()->GetItemState( SID_STREAM ) < SFX_ITEM_SET )
-@@ -1165,7 +1169,7 @@ uno::Reference < embed::XStorage > SfxMe
+@@ -1165,7 +1155,7 @@ uno::Reference < embed::XStorage > SfxMe
  
              try
              {
@@ -243,7 +230,7 @@
                  {
                      //TODO/LATER: performance problem if not controlled by special Mode in SfxMedium
                      //(should be done only for permanently open storages)
-@@ -1212,21 +1216,6 @@ uno::Reference < embed::XStorage > SfxMe
+@@ -1212,21 +1202,6 @@ uno::Reference < embed::XStorage > SfxMe
      					if ( aLogicName.CompareToAscii( "private:stream", 14 ) != COMPARE_EQUAL
  						  && GetContent().is() )
  						{
@@ -265,7 +252,7 @@
                              try
                              {
                                  Any aAny = pImp->aContent.getPropertyValue(
-@@ -1240,9 +1229,6 @@ uno::Reference < embed::XStorage > SfxMe
+@@ -1240,9 +1215,6 @@ uno::Reference < embed::XStorage > SfxMe
                              }
                              catch( uno::Exception& )
                              {}
@@ -275,23 +262,16 @@
  						}
  
  						// if the document is opened as readonly the copy should be done according to selected approach
-@@ -1556,9 +1542,14 @@ sal_Bool SfxMedium::UseBackupToRestore_I
+@@ -1556,7 +1528,7 @@ sal_Bool SfxMedium::UseBackupToRestore_I
  sal_Bool SfxMedium::StorageCommit_Impl()
  {
  	sal_Bool bResult = sal_False;
 -	Reference< ::com::sun::star::ucb::XCommandEnvironment > xDummyEnv;
-+	Reference< ::com::sun::star::ucb::XCommandEnvironment > xEnv;
++	Reference< ::com::sun::star::ucb::XCommandEnvironment > xEnv = GetStillCommandEnvironment();
  	::ucbhelper::Content aOriginalContent;
  
-+    Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = GetInteractionHandler();
-+    if ( xInteractionHandler.is() )
-+        xEnv = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ),
-+                                                    Reference< ::com::sun::star::ucb::XProgressHandler >() );
-+
  	if ( pImp->xStorage.is() )
- 	{
- 		StorageBackup_Impl();
-@@ -1581,13 +1572,13 @@ sal_Bool SfxMedium::StorageCommit_Impl()
+@@ -1581,13 +1553,13 @@ sal_Bool SfxMedium::StorageCommit_Impl()
  						OSL_ENSURE( pImp->m_aBackupURL.getLength(), "No backup on storage commit!\n" );
  						if ( pImp->m_aBackupURL.getLength()
  							&& ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ),
@@ -307,7 +287,25 @@
  							{
  								// connect the medium to the temporary file of the storage
              					pImp->aContent = ::ucbhelper::Content();
-@@ -1982,7 +1973,7 @@ void SfxMedium::Transfer_Impl()
+@@ -1668,7 +1640,7 @@ sal_Bool SfxMedium::TransactedTransferFo
+ 
+ 			try
+ 			{
+-				if( bOverWrite && ::utl::UCBContentHelper::IsDocument( aDest.GetMainURL( INetURLObject::NO_DECODE ) ) )
++				if( bOverWrite && ::utl::UCBContentHelper::IsDocument( aDest.GetMainURL( INetURLObject::NO_DECODE ), GetStillCommandEnvironment() ) )
+ 				{
+ 					if( ! pImp->m_aBackupURL.getLength() )
+ 						DoInternalBackup_Impl( aOriginalContent );
+@@ -1775,7 +1747,7 @@ sal_Bool SfxMedium::TryDirectTransfer( c
+ 						xSeek->seek( 0 );
+ 					}
+ 
+-        			uno::Reference < ::com::sun::star::ucb::XCommandEnvironment > xEnv;
++        			uno::Reference < ::com::sun::star::ucb::XCommandEnvironment > xEnv = GetStillCommandEnvironment();
+ 					::ucbhelper::Content aTargetContent( aURL, xEnv );
+ 
+             		InsertCommandArgument aInsertArg;
+@@ -1982,7 +1954,7 @@ void SfxMedium::Transfer_Impl()
  			xComEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler,
  													  Reference< ::com::sun::star::ucb::XProgressHandler >() );
  
@@ -316,7 +314,18 @@
  		{
  			TransactedTransferForFS_Impl( aSource, aDest, xComEnv );
  		}
-@@ -2141,7 +2132,7 @@ void SfxMedium::DoInternalBackup_Impl( c
+@@ -2101,9 +2073,8 @@ void SfxMedium::DoInternalBackup_Impl( c
+ 	INetURLObject aBackObj( aTransactTemp.GetURL() );
+ 	::rtl::OUString aBackupName = aBackObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ 
+-	Reference < ::com::sun::star::ucb::XCommandEnvironment > xDummyEnv;
+ 	::ucbhelper::Content aBackupCont;
+-	if( ::ucbhelper::Content::create( aDestDir, xDummyEnv, aBackupCont ) )
++	if( ::ucbhelper::Content::create( aDestDir, GetStillCommandEnvironment(), aBackupCont ) )
+ 	{
+ 		try
+ 		{
+@@ -2141,7 +2112,7 @@ void SfxMedium::DoInternalBackup_Impl( c
  
  	DoInternalBackup_Impl( aOriginalContent, aPrefix, aExtension, aBakDir );
  
@@ -325,12 +334,86 @@
  	{
  		// the copiing to the backup catalog failed ( for example because
  		// of using an encrypted partition as target catalog )
+@@ -2166,7 +2137,8 @@ void SfxMedium::DoBackup_Impl()
+     INetURLObject aSource( GetURLObject() );
+ 
+ 	// there is nothing to backup in case source file does not exist
+-	if ( !::utl::UCBContentHelper::IsDocument( aSource.GetMainURL( INetURLObject::NO_DECODE ) ) )
++    Reference < ::com::sun::star::ucb::XCommandEnvironment > xStillEnv = GetStillCommandEnvironment();
++	if ( !::utl::UCBContentHelper::IsDocument( aSource.GetMainURL( INetURLObject::NO_DECODE ), xStillEnv ) )
+ 		return;
+ 
+     sal_Bool        bSuccess = sal_False;
+@@ -2188,7 +2160,7 @@ void SfxMedium::DoBackup_Impl()
+ 
+         	// create a content for the source file
+         	::ucbhelper::Content aSourceContent;
+-        	if ( ::ucbhelper::Content::create( aSource.GetMainURL( INetURLObject::NO_DECODE ), xEnv, aSourceContent ) )
++        	if ( ::ucbhelper::Content::create( aSource.GetMainURL( INetURLObject::NO_DECODE ), xStillEnv, aSourceContent ) )
+         	{
+             	try
+             	{
+@@ -2633,6 +2605,19 @@ SfxMedium::GetInteractionHandler()
+ 
+ //----------------------------------------------------------------
+ 
++uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > SfxMedium::GetStillCommandEnvironment()
++{
++	Reference< ::com::sun::star::ucb::XCommandEnvironment > xEnv;
++    Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = GetInteractionHandler();
++    if ( xInteractionHandler.is() )
++        xEnv = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ),
++                                                    Reference< ::com::sun::star::ucb::XProgressHandler >() );
++    
++    return xEnv;
++}
++
++//----------------------------------------------------------------
++
+ void SfxMedium::SetFilter( const SfxFilter* pFilterP, sal_Bool /*bResetOrig*/ )
+ {
+     pFilter = pFilterP;
+Index: sfx2/source/doc/objstor.cxx
+===================================================================
+RCS file: /cvs/framework/sfx2/source/doc/objstor.cxx,v
+retrieving revision 1.212
+retrieving revision 1.212.4.1
+diff -u -p -u -p -b -w -B -r1.212 -r1.212.4.1
+--- sfx2/source/doc/objstor.cxx	28 May 2008 13:07:23 -0000	1.212
++++ sfx2/source/doc/objstor.cxx	5 Aug 2008 14:43:32 -0000	1.212.4.1
+@@ -2461,20 +2461,17 @@ sal_Bool SfxObjectShell::DoSave_Impl( co
+     {
+         bSaved = sal_True;
+ 
+-		if( pMediumTmp->GetItemSet() )
+-		{
+-			pMediumTmp->GetItemSet()->ClearItem( SID_INTERACTIONHANDLER );
+-			pMediumTmp->GetItemSet()->ClearItem( SID_PROGRESS_STATUSBAR_CONTROL );
+-		}
+-
+         SetError(pMediumTmp->GetErrorCode());
+ 
+-//REMOVE	        if ( !IsHandsOff() )
+-//REMOVE			pMediumTmp->Close();
+-
+         sal_Bool bOpen( sal_False );
+         bOpen = DoSaveCompleted( pMediumTmp );
+         DBG_ASSERT(bOpen,"Fehlerbehandlung fuer DoSaveCompleted nicht implementiert");
++
++		if( pMediumTmp->GetItemSet() )
++		{
++			pMediumTmp->GetItemSet()->ClearItem( SID_INTERACTIONHANDLER );
++			pMediumTmp->GetItemSet()->ClearItem( SID_PROGRESS_STATUSBAR_CONTROL );
++		}
+     }
+     else
+     {
 Index: sfx2/source/inc/helper.hxx
 ===================================================================
 RCS file: /cvs/framework/sfx2/source/inc/helper.hxx,v
 retrieving revision 1.9
 retrieving revision 1.8.726.2
-diff -u -p -u -p -B -r1.9 -r1.8.726.2
+diff -u -p -u -p -b -w -B -r1.9 -r1.8.726.2
 --- sfx2/source/inc/helper.hxx	11 Apr 2008 13:19:50 -0000	1.9
 +++ sfx2/source/inc/helper.hxx	2 Jun 2008 14:01:19 -0000	1.8.726.2
 @@ -69,7 +69,7 @@ public:
@@ -347,7 +430,7 @@
 RCS file: /cvs/framework/sfx2/source/view/viewfrm.cxx,v
 retrieving revision 1.136
 retrieving revision 1.133.70.2
-diff -u -p -u -p -B -r1.136 -r1.133.70.2
+diff -u -p -u -p -b -w -B -r1.136 -r1.133.70.2
 --- sfx2/source/view/viewfrm.cxx	13 May 2008 13:09:22 -0000	1.136
 +++ sfx2/source/view/viewfrm.cxx	2 Jun 2008 14:01:23 -0000	1.133.70.2
 @@ -626,6 +626,11 @@ void SfxViewFrame::ExecReload_Impl( SfxR

Modified: trunk/patches/dev300/cws-webdavandgvfslocking1-tools.diff
==============================================================================
--- trunk/patches/dev300/cws-webdavandgvfslocking1-tools.diff	(original)
+++ trunk/patches/dev300/cws-webdavandgvfslocking1-tools.diff	Thu Aug 14 16:26:10 2008
@@ -3,7 +3,7 @@
 RCS file: /cvs/util/tools/inc/tools/urlobj.hxx,v
 retrieving revision 1.3
 retrieving revision 1.2.118.3
-diff -u -p -u -p -B -r1.3 -r1.2.118.3
+diff -u -p -u -p -b -w -B -r1.3 -r1.2.118.3
 --- tools/inc/tools/urlobj.hxx	11 Apr 2008 13:35:46 -0000	1.3
 +++ tools/inc/tools/urlobj.hxx	2 Jun 2008 13:32:32 -0000	1.2.118.3
 @@ -141,9 +141,14 @@ enum INetProtocol
@@ -29,7 +29,7 @@
 RCS file: /cvs/util/tools/source/fsys/urlobj.cxx,v
 retrieving revision 1.63
 retrieving revision 1.61.26.4
-diff -u -p -u -p -B -r1.63 -r1.61.26.4
+diff -u -p -u -p -b -w -B -r1.63 -r1.61.26.4
 --- tools/source/fsys/urlobj.cxx	15 Apr 2008 11:52:18 -0000	1.63
 +++ tools/source/fsys/urlobj.cxx	2 Jun 2008 13:32:37 -0000	1.61.26.4
 @@ -374,21 +374,21 @@ static INetURLObject::SchemeInfo const a
@@ -80,18 +80,16 @@
  
  // static
  inline INetURLObject::SchemeInfo const &
-@@ -847,7 +857,10 @@ bool INetURLObject::setAbsURIRef(rtl::OU
+@@ -847,6 +857,9 @@ bool INetURLObject::setAbsURIRef(rtl::OU
              aSynScheme = parseScheme(&p1, pEnd, nFragmentDelimiter);
              if (aSynScheme.getLength() > 0)
              {
--                m_eScheme = INET_PROT_GENERIC;
 +                if (p1 != pEnd && *p1 == '/')
 +                    m_eScheme = INET_PROT_GENERIC_HIERARCHICAL;
 +                else
-+                    m_eScheme = INET_PROT_GENERIC;
+                 m_eScheme = INET_PROT_GENERIC;
                  pPos = p1;
              }
-         }
 @@ -864,7 +877,7 @@ bool INetURLObject::setAbsURIRef(rtl::OU
  			return false;
  		}
@@ -155,7 +153,7 @@
 RCS file: /cvs/util/tools/workben/urltest.cxx,v
 retrieving revision 1.39
 retrieving revision 1.37.82.2
-diff -u -p -u -p -B -r1.39 -r1.37.82.2
+diff -u -p -u -p -b -w -B -r1.39 -r1.37.82.2
 --- tools/workben/urltest.cxx	15 Apr 2008 11:53:38 -0000	1.39
 +++ tools/workben/urltest.cxx	2 Jun 2008 13:32:44 -0000	1.37.82.2
 @@ -1476,7 +1476,7 @@ main()

Modified: trunk/patches/dev300/cws-webdavandgvfslocking1-ucb.diff
==============================================================================
--- trunk/patches/dev300/cws-webdavandgvfslocking1-ucb.diff	(original)
+++ trunk/patches/dev300/cws-webdavandgvfslocking1-ucb.diff	Thu Aug 14 16:26:10 2008
@@ -1,12 +1,12 @@
 Index: ucb/source/ucp/file/filglob.cxx
 ===================================================================
 RCS file: /cvs/ucb/ucb/source/ucp/file/filglob.cxx,v
-retrieving revision 1.25
-retrieving revision 1.24.64.2
-diff -u -p -u -p -B -r1.25 -r1.24.64.2
---- ucb/source/ucp/file/filglob.cxx	10 Apr 2008 14:46:59 -0000	1.25
-+++ ucb/source/ucp/file/filglob.cxx	2 Jun 2008 13:28:28 -0000	1.24.64.2
-@@ -439,17 +439,13 @@ namespace fileaccess {
+retrieving revision 1.26
+retrieving revision 1.24.64.3
+diff -u -p -u -p -b -w -B -r1.26 -r1.24.64.3
+--- ucb/source/ucp/file/filglob.cxx	11 Jul 2008 18:40:28 -0000	1.26
++++ ucb/source/ucp/file/filglob.cxx	14 Aug 2008 15:36:33 -0000	1.24.64.3
+@@ -435,15 +435,11 @@ namespace fileaccess {
  					// not enough memory for allocating structures 
  					ioErrorCode = IOErrorCode_OUT_OF_MEMORY;
  					break;
@@ -16,25 +16,22 @@
 -					break;
 -                case FileBase::E_AGAIN:
 -					// Operation would block
+-					ioErrorCode = IOErrorCode_LOCKING_VIOLATION;
+-					break;
 +
 +				case FileBase::E_BUSY:  // Text file busy
 +				case FileBase::E_AGAIN: // Operation would block
-+				case FileBase::E_NOLCK: // No record locks available
+ 				case FileBase::E_NOLCK:  // No record locks available
 +				case FileBase::E_TXTBSY:// Text file busy
- 					ioErrorCode = IOErrorCode_LOCKING_VIOLATION;
- 					break;
--				case FileBase::E_NOLCK:  // No record locks available
--                    ioErrorCode = IOErrorCode_LOCKING_VIOLATION;
--                    break;
+                     ioErrorCode = IOErrorCode_LOCKING_VIOLATION;
+                     break;
  
- 				case FileBase::E_FAULT: // Bad address
- 				case FileBase::E_LOOP:	// Too many symbolic links encountered
 Index: ucb/source/ucp/webdav/DAVRequestEnvironment.hxx
 ===================================================================
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx,v
 retrieving revision 1.9
 retrieving revision 1.8.40.3
-diff -u -p -u -p -B -r1.9 -r1.8.40.3
+diff -u -p -u -p -b -w -B -r1.9 -r1.8.40.3
 --- ucb/source/ucp/webdav/DAVRequestEnvironment.hxx	10 Apr 2008 15:35:11 -0000	1.9
 +++ ucb/source/ucp/webdav/DAVRequestEnvironment.hxx	4 Jun 2008 13:06:23 -0000	1.8.40.3
 @@ -34,6 +34,8 @@
@@ -53,8 +50,7 @@
 -    uno::Reference< ucb::XCommandEnvironment > m_xEnv;
 +    com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > m_xEnv;
  
--DAVRequestEnvironment( const rtl::OUString & rRequestURI,
-+    DAVRequestEnvironment( const rtl::OUString & rRequestURI,
+ DAVRequestEnvironment( const rtl::OUString & rRequestURI,
                             const rtl::Reference< DAVAuthListener > & xListener,
                             const DAVRequestHeaders & rRequestHeaders,
 -                           const uno::Reference< ucb::XCommandEnvironment > & xEnv)
@@ -65,11 +61,11 @@
 Index: ucb/source/ucp/webdav/DAVResourceAccess.cxx
 ===================================================================
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/DAVResourceAccess.cxx,v
-retrieving revision 1.28
-retrieving revision 1.27.20.6
-diff -u -p -u -p -B -r1.28 -r1.27.20.6
---- ucb/source/ucp/webdav/DAVResourceAccess.cxx	10 Apr 2008 15:35:54 -0000	1.28
-+++ ucb/source/ucp/webdav/DAVResourceAccess.cxx	4 Jun 2008 13:09:51 -0000	1.27.20.6
+retrieving revision 1.29
+retrieving revision 1.27.20.7
+diff -u -p -u -p -b -w -B -r1.29 -r1.27.20.7
+--- ucb/source/ucp/webdav/DAVResourceAccess.cxx	11 Jul 2008 07:41:28 -0000	1.29
++++ ucb/source/ucp/webdav/DAVResourceAccess.cxx	14 Aug 2008 15:36:37 -0000	1.27.20.7
 @@ -42,6 +42,9 @@
  #include "DAVAuthListenerImpl.hxx"
  #include "DAVResourceAccess.hxx"
@@ -80,7 +76,7 @@
  using namespace webdav_ucp;
  using namespace com::sun::star;
  
-@@ -61,56 +64,53 @@ int DAVAuthListener_Impl::authenticate(
+@@ -61,12 +64,14 @@ int DAVAuthListener_Impl::authenticate(
      ::rtl::OUString & inoutUserName,
      ::rtl::OUString & outPassWord )
  {
@@ -92,96 +88,51 @@
 -            = m_xEnv->getInteractionHandler();
 -        if ( xIH.is() )
 -        {
--            // #102871# - Supply username and password from previous try.
--            // Password container service depends on this!
--            if ( inoutUserName.getLength() == 0 )
--                inoutUserName = m_aPrevUsername;
--
--            if ( outPassWord.getLength() == 0 )
--                outPassWord = m_aPrevPassword;
--
--            rtl::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest
--                = new ucbhelper::SimpleAuthenticationRequest( inHostName,
--                                                              inRealm,
--                                                              inoutUserName,
--                                                              outPassWord );
--            xIH->handle( xRequest.get() );
 +        xIH = m_xEnv->getInteractionHandler();
- 
--            rtl::Reference< ucbhelper::InteractionContinuation > xSelection
--				= xRequest->getSelection();
--            
++
++    if ( !xIH.is() )
++        return -1;
++
+             // #102871# - Supply username and password from previous try.
+             // Password container service depends on this!
+             if ( inoutUserName.getLength() == 0 )
+@@ -85,15 +90,16 @@ int DAVAuthListener_Impl::authenticate(
+             rtl::Reference< ucbhelper::InteractionContinuation > xSelection
+ 				= xRequest->getSelection();
+             
 -            if ( xSelection.is() )
 -            {
--                // Handler handled the request.
--                uno::Reference< task::XInteractionAbort > xAbort(
--                    xSelection.get(), uno::UNO_QUERY );
++    if ( !xSelection.is() )
++        return -1;
++
+                 // Handler handled the request.
+                 uno::Reference< task::XInteractionAbort > xAbort(
+                     xSelection.get(), uno::UNO_QUERY );
 -                if ( !xAbort.is() )
 -                {
 -                    const rtl::Reference<
 -                        ucbhelper::InteractionSupplyAuthentication > & xSupp
--                        = xRequest->getAuthenticationSupplier();
--
--                    inoutUserName = xSupp->getUserName();
--                    outPassWord   = xSupp->getPassword();
--		    
--                    // #102871# - Remember username and password.
--                    m_aPrevUsername = inoutUserName;
--                    m_aPrevPassword = outPassWord;
-+    if ( !xIH.is() )
++    if ( xAbort.is() )
 +        return -1;
++
++    const rtl::Reference< ucbhelper::InteractionSupplyAuthentication > & xSupp
+                         = xRequest->getAuthenticationSupplier();
  
--                    // go on.
--                    return 0;
--                }
+                     inoutUserName = xSupp->getUserName();
+@@ -106,12 +112,6 @@ int DAVAuthListener_Impl::authenticate(
+                     // go on.
+                     return 0;
+                 }
 -            }
 -        }
 -    }
 -    // Abort.
 -    return -1;
-+    // #102871# - Supply username and password from previous try.
-+    // Password container service depends on this!
-+    if ( inoutUserName.getLength() == 0 )
-+        inoutUserName = m_aPrevUsername;
-+
-+    if ( outPassWord.getLength() == 0 )
-+        outPassWord = m_aPrevPassword;
-+
-+    rtl::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest
-+        = new ucbhelper::SimpleAuthenticationRequest( inHostName,
-+                inRealm,
-+                inoutUserName,
-+                outPassWord );
-+    xIH->handle( xRequest.get() );
-+
-+    rtl::Reference< ucbhelper::InteractionContinuation > xSelection
-+        = xRequest->getSelection();
-+
-+    if ( !xSelection.is() )
-+        return -1;
-+
-+    // Handler handled the request.
-+    uno::Reference< task::XInteractionAbort > xAbort(
-+            xSelection.get(), uno::UNO_QUERY );
-+    if ( xAbort.is() )
-+        return -1;
-+
-+    const rtl::Reference< ucbhelper::InteractionSupplyAuthentication > & xSupp
-+        = xRequest->getAuthenticationSupplier();
-+
-+    inoutUserName = xSupp->getUserName();
-+    outPassWord   = xSupp->getPassword();
-+
-+    // #102871# - Remember username and password.
-+    m_aPrevUsername = inoutUserName;
-+    m_aPrevPassword = outPassWord;
-+
-+    // go on.
-+    return 0;
- }
+-}
  
  //=========================================================================
-@@ -430,15 +430,18 @@ void DAVResourceAccess::GET( 
+ //=========================================================================
+@@ -444,15 +444,18 @@ void DAVResourceAccess::GET( 
  }
  
  //=========================================================================
@@ -200,10 +151,10 @@
  
 -    uno::Reference< io::XInputStream > xStream;
 +    uno::Reference< io::XStream > xStream;
+ 	int errorCount = 0;
      bool bRetry;
      do
-     {
-@@ -457,7 +460,10 @@ uno::Reference< io::XInputStream > DAVRe
+@@ -472,7 +475,10 @@ uno::Reference< io::XInputStream > DAVRe
                                         DAVRequestEnvironment(
                                             getRequestURI(),
                                             new DAVAuthListener_Impl( xEnv ),
@@ -215,7 +166,7 @@
          }
          catch ( DAVException & e )
          {
-@@ -586,6 +592,43 @@ void DAVResourceAccess::PUT( 
+@@ -606,6 +612,43 @@ void DAVResourceAccess::PUT( 
  }
  
  //=========================================================================
@@ -259,7 +210,7 @@
  uno::Reference< io::XInputStream > DAVResourceAccess::POST(
  	const rtl::OUString & rContentType,
  	const rtl::OUString & rReferer,
-@@ -859,22 +902,44 @@ void DAVResourceAccess::DESTROY( 
+@@ -888,22 +931,44 @@ void DAVResourceAccess::DESTROY( 
  
  //=========================================================================
  void DAVResourceAccess::LOCK ( 
@@ -315,12 +266,12 @@
 Index: ucb/source/ucp/webdav/DAVResourceAccess.hxx
 ===================================================================
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/DAVResourceAccess.hxx,v
-retrieving revision 1.18
-retrieving revision 1.17.60.4
-diff -u -p -u -p -B -r1.18 -r1.17.60.4
---- ucb/source/ucp/webdav/DAVResourceAccess.hxx	10 Apr 2008 15:36:12 -0000	1.18
-+++ ucb/source/ucp/webdav/DAVResourceAccess.hxx	2 Jun 2008 13:29:00 -0000	1.17.60.4
-@@ -132,11 +132,14 @@ public:
+retrieving revision 1.19
+retrieving revision 1.17.60.5
+diff -u -p -u -p -b -w -B -r1.19 -r1.17.60.5
+--- ucb/source/ucp/webdav/DAVResourceAccess.hxx	11 Jul 2008 07:41:56 -0000	1.19
++++ ucb/source/ucp/webdav/DAVResourceAccess.hxx	14 Aug 2008 15:36:40 -0000	1.17.60.5
+@@ -134,11 +134,14 @@ public:
  	     com::sun::star::ucb::XCommandEnvironment > & xEnv )
          throw( DAVException );
  
@@ -337,7 +288,7 @@
          throw( DAVException );
  
      void
-@@ -155,6 +158,11 @@ public:
+@@ -157,6 +160,11 @@ public:
  	     com::sun::star::ucb::XCommandEnvironment > & xEnv )
  	throw( DAVException );
  
@@ -349,7 +300,7 @@
      com::sun::star::uno::Reference< com::sun::star::io::XInputStream >
      POST( const rtl::OUString & rContentType,
  	  const rtl::OUString & rReferer,
-@@ -202,13 +210,13 @@ public:
+@@ -204,13 +212,13 @@ public:
  	throw( DAVException );
  
      void
@@ -370,7 +321,7 @@
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/DAVSession.hxx,v
 retrieving revision 1.20
 retrieving revision 1.19.70.3
-diff -u -p -u -p -B -r1.20 -r1.19.70.3
+diff -u -p -u -p -b -w -B -r1.20 -r1.19.70.3
 --- ucb/source/ucp/webdav/DAVSession.hxx	10 Apr 2008 15:36:30 -0000	1.20
 +++ ucb/source/ucp/webdav/DAVSession.hxx	2 Jun 2008 13:29:03 -0000	1.19.70.3
 @@ -33,8 +33,12 @@
@@ -441,7 +392,7 @@
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/NeonInputStream.cxx,v
 retrieving revision 1.11
 retrieving revision 1.10.116.5
-diff -u -p -u -p -B -r1.11 -r1.10.116.5
+diff -u -p -u -p -b -w -B -r1.11 -r1.10.116.5
 --- ucb/source/ucp/webdav/NeonInputStream.cxx	10 Apr 2008 15:40:23 -0000	1.11
 +++ ucb/source/ucp/webdav/NeonInputStream.cxx	28 Jun 2008 01:20:47 -0000	1.10.116.5
 @@ -31,22 +31,149 @@
@@ -653,11 +604,10 @@
 +						throw( uno::RuntimeException )
  {
 -	Any aRet = ::cppu::queryInterface( type,
--									   static_cast< XInputStream * >( this ),
--									   static_cast< XSeekable * >( this ) );
 +    uno::Any aRet = ::cppu::queryInterface( type,
 +            static_cast< XStream * >( this ),
-+            static_cast< XInputStream * >( this ),
+ 									   static_cast< XInputStream * >( this ),
+-									   static_cast< XSeekable * >( this ) );
 +            static_cast< XOutputStream * >( this ),
 +            static_cast< XSeekable * >( this ),
 +            static_cast< XTruncate * >( this ) );
@@ -732,24 +682,17 @@
  }
  
  // -------------------------------------------------------------------
-@@ -168,12 +344,12 @@ void SAL_CALL NeonInputStream::seek( sal
- 			   ::com::sun::star::io::IOException,
- 			   ::com::sun::star::uno::RuntimeException )
- {
--	if ( location < 0 )
--		throw ::com::sun::star::lang::IllegalArgumentException();
-+    if ( location < 0 )
-+        throw ::com::sun::star::lang::IllegalArgumentException();
+@@ -171,8 +347,8 @@ void SAL_CALL NeonInputStream::seek( sal
+ 	if ( location < 0 )
+ 		throw ::com::sun::star::lang::IllegalArgumentException();
  
 -    if ( location <= mLen )
 -		mPos = location;
--	else
 +    if ( location <= m_nLen )
 +        m_nPos = location;
-+    else
+ 	else
          throw ::com::sun::star::lang::IllegalArgumentException();
  }
- 
 @@ -184,7 +360,7 @@ sal_Int64 SAL_CALL NeonInputStream::getP
  		throw( ::com::sun::star::io::IOException,
  			   ::com::sun::star::uno::RuntimeException )
@@ -930,7 +873,7 @@
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/NeonInputStream.hxx,v
 retrieving revision 1.8
 retrieving revision 1.7.136.4
-diff -u -p -u -p -B -r1.8 -r1.7.136.4
+diff -u -p -u -p -b -w -B -r1.8 -r1.7.136.4
 --- ucb/source/ucp/webdav/NeonInputStream.hxx	10 Apr 2008 15:40:39 -0000	1.8
 +++ ucb/source/ucp/webdav/NeonInputStream.hxx	27 Jun 2008 12:59:58 -0000	1.7.136.4
 @@ -31,11 +31,23 @@
@@ -957,7 +900,7 @@
  
  namespace webdav_ucp
  {
-@@ -45,21 +57,42 @@ namespace webdav_ucp
+@@ -45,22 +57,43 @@ namespace webdav_ucp
  // A simple XInputStream implementation provided specifically for use
  // by the DAVSession::GET method.
  // -------------------------------------------------------------------
@@ -969,15 +912,10 @@
 +                        public ::com::sun::star::io::XTruncate,
  						public ::cppu::OWeakObject
  {
--	private:
+ 	private:
 -		com::sun::star::uno::Sequence< sal_Int8 > mInputBuffer;
 -		sal_Int64 mLen;
 -		sal_Int64 mPos;
--
--	public:
--				 NeonInputStream( void );
--		virtual ~NeonInputStream();
-+private:
 +    com::sun::star::uno::Sequence< sal_Int8 > m_aInputBuffer;
 +    sal_Int64                  m_nLen; // cannot be just m_aInputBuffer.getLength() - the buffer can be bigger
 +    sal_Int64                  m_nPos;
@@ -992,25 +930,25 @@
 +
 +    com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
 +    com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > m_xEnv;
- 
--		// Add some data to the end of the stream
--		void AddToStream( const char * inBuf, sal_Int32 inLen );
-+    osl::Mutex                 m_aLock;
 +
-+public:
++    osl::Mutex                 m_aLock;
+ 
+ 	public:
+-				 NeonInputStream( void );
 +             NeonInputStream( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > &m_rMSF,
 +                              const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > &m_rEnv );
-+    virtual ~NeonInputStream();
-+
-+    // Add some data to the end of the stream
-+    void AddToStream( const char * inBuf, sal_Int32 inLen );
-+
+ 		virtual ~NeonInputStream();
+ 
+ 		// Add some data to the end of the stream
+ 		void AddToStream( const char * inBuf, sal_Int32 inLen );
+ 
 +    // Associate a lock with this stream
 +    void SetLock( const com::sun::star::ucb::Lock &rLock,
 +                  const rtl::OUString &rURL );
- 
++
  	// XInterface
  	virtual com::sun::star::uno::Any SAL_CALL queryInterface(
+ 										const ::com::sun::star::uno::Type & type )
 @@ -74,6 +107,12 @@ class NeonInputStream : public ::com::su
  							throw()
  								{ OWeakObject::release(); }
@@ -1071,10 +1009,10 @@
 ===================================================================
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/NeonSession.cxx,v
 retrieving revision 1.55
-retrieving revision 1.53.12.8
-diff -u -p -u -p -B -r1.55 -r1.53.12.8
+retrieving revision 1.53.12.9
+diff -u -p -u -p -b -w -B -r1.55 -r1.53.12.9
 --- ucb/source/ucp/webdav/NeonSession.cxx	4 Jun 2008 09:44:08 -0000	1.55
-+++ ucb/source/ucp/webdav/NeonSession.cxx	30 Jun 2008 09:01:24 -0000	1.53.12.8
++++ ucb/source/ucp/webdav/NeonSession.cxx	4 Jul 2008 11:33:47 -0000	1.53.12.9
 @@ -34,11 +34,13 @@
  #include <hash_map>
  #include <string.h>
@@ -1131,7 +1069,7 @@
  // -------------------------------------------------------------------
  struct NeonRequestContext
  {
-@@ -196,12 +199,13 @@ struct NeonRequestContext
+@@ -196,10 +199,11 @@ struct NeonRequestContext
  // -------------------------------------------------------------------
  
  #if NEON_VERSION >= 0x0250
@@ -1141,15 +1079,11 @@
 -extern "C" void NeonSession_ResponseBlockReader(void * inUserData, 
 +extern "C" void
  #endif
--                                               const char * inBuf, 
--                                               size_t inLen )
 +NeonSession_ResponseBlockReader(void * inUserData, 
-+                                       const char * inBuf, 
-+                                       size_t inLen )
+                                                const char * inBuf, 
+                                                size_t inLen )
  {
-     // neon calls this function with (inLen == 0)...
-     if ( inLen > 0 )
-@@ -226,12 +230,13 @@ extern "C" void NeonSession_ResponseBloc
+@@ -226,10 +230,11 @@ extern "C" void NeonSession_ResponseBloc
  // -------------------------------------------------------------------
  
  #if NEON_VERSION >= 0x0250
@@ -1159,14 +1093,10 @@
 -extern "C" void NeonSession_ResponseBlockWriter( void * inUserData, 
 +extern "C" void
  #endif
--                                                const char * inBuf, 
--                                                size_t inLen )
 +NeonSession_ResponseBlockWriter( void * inUserData, 
-+                                 const char * inBuf, 
-+                                 size_t inLen )
+                                                 const char * inBuf, 
+                                                 size_t inLen )
  {
-     // neon calls this function with (inLen == 0)...
-     if ( inLen > 0 )
 @@ -297,11 +302,10 @@ extern "C" int NeonSession_NeonAuth( voi
  
          try
@@ -1284,10 +1214,9 @@
                           NeonSession_ResponseBlockReader,
                           true,
                           &aCtx );
--    HandleError( theRetVal );
--    return uno::Reference< io::XInputStream >( xInputStream.get() );
 +    try {
-+        HandleError( theRetVal );
+     HandleError( theRetVal );
+-    return uno::Reference< io::XInputStream >( xInputStream.get() );
 +    }
 +    catch ( DAVException const & e )
 +    {
@@ -1398,19 +1327,17 @@
  
  // -------------------------------------------------------------------
  const ucbhelper::InternetProxyServer & NeonSession::getProxySettings() const
-@@ -1410,7 +1434,10 @@ void NeonSession::HandleError( int nErro
-         case NE_ERROR:        // Generic error
+@@ -1411,6 +1435,9 @@ void NeonSession::HandleError( int nErro
          {
              rtl::OUString aText = rtl::OUString::createFromAscii(
--		ne_get_error( m_pHttpSession ) );
-+                    ne_get_error( m_pHttpSession ) );
+ 		ne_get_error( m_pHttpSession ) );
 +#if OSL_DEBUG_LEVEL > 0
 +            fprintf( stderr, "WebDAV: got error '%s'\n", rtl::OUStringToOString( aText, RTL_TEXTENCODING_UTF8 ).getStr() );
 +#endif
              throw DAVException( DAVException::DAV_HTTP_ERROR,
                                  aText,
                                  makeStatusCode( aText ) );
-@@ -1467,77 +1494,125 @@ void NeonSession::HandleError( int nErro
+@@ -1467,77 +1494,151 @@ void NeonSession::HandleError( int nErro
      }
  }
  
@@ -1422,31 +1349,9 @@
  {
      osl::Guard< osl::Mutex > theGuard( m_aMutex );
  
--	// Create the neon lock
--	NeonLock * theLock = new NeonLock;
--	int theRetVal;
--
--	// Set the lock uri
--	NeonUri theUri( inLock.uri );
--	theLock->uri = const_cast< char * >
--        ( rtl::OUStringToOString(
--                theUri.GetPath(), RTL_TEXTENCODING_UTF8 ).getStr() );
 +    if ( !s_aNeonLockStore )
 +        throw DAVException( DAVException::DAV_INVALID_ARG );
- 
--	if ( inLockit )
--	{
--		// Set the lock depth
--		switch( inLock.depth )
--		{
--			case DAVZERO:
--			case DAVINFINITY:
--				theLock->depth = int ( inLock.depth );
--				break;
--			default:
--				throw DAVException( DAVException::DAV_INVALID_ARG );
--				break;
--		}
++
 +    ne_uri aUri;
 +    ne_uri_parse( rtl::OUStringToOString( m_aEnv.m_aRequestURI, RTL_TEXTENCODING_UTF8 ).getStr(),
 +            &aUri );
@@ -1458,21 +1363,10 @@
 +    aUri.port = aUri.port? aUri.port: m_nPort;
 +#undef FILLIN
 +#endif
- 
--		// Set the lock scope
--		switch ( inLock.scope )
--		{
--			case EXCLUSIVE:
--                theLock->scope = ne_lockscope_exclusive;
--				break;
--			case SHARED:
--                theLock->scope = ne_lockscope_shared;
--				break;
--			default:
--				throw DAVException( DAVException::DAV_INVALID_ARG );
--				break;
--		}
-+    // Create the neon lock
++
+ 	// Create the neon lock
+-	NeonLock * theLock = new NeonLock;
+-	int theRetVal;
 +    NeonLock * theLock = ne_lockstore_findbyuri( s_aNeonLockStore, &aUri );
 +    bool bAlreadyExists = false;
 +    if ( theLock )
@@ -1481,56 +1375,60 @@
 +    {
 +        theLock = ne_lock_create();
  
--		// Set the lock owner
--        const char * theOwner = rtl::OUStringToOString( inLock.owner,
--                                                        RTL_TEXTENCODING_UTF8 );
--		theLock->owner = const_cast< char * > ( theOwner );
--
--		// Set the lock timeout
--		// Note: Neon ignores the timeout
--		//theLock->timeout = inLock.timeout;
-+        // Set the lock uri
+ 	// Set the lock uri
+-	NeonUri theUri( inLock.uri );
+-	theLock->uri = const_cast< char * >
+-        ( rtl::OUStringToOString(
+-                theUri.GetPath(), RTL_TEXTENCODING_UTF8 ).getStr() );
 +        theLock->uri = aUri;
  
--        theRetVal = ne_lock( m_pHttpSession, theLock );
--	}
--	else
+-	if ( inLockit )
 -	{
-+        // Set the lock depth
+ 		// Set the lock depth
+-		switch( inLock.depth )
 +        switch( rLock.Depth )
-+        {
+ 		{
+-			case DAVZERO:
+-			case DAVINFINITY:
+-				theLock->depth = int ( inLock.depth );
+-				break;
 +            case ucb::LockDepth_ZERO:     theLock->depth = NE_DEPTH_ZERO;     break;
 +            case ucb::LockDepth_ONE:      theLock->depth = NE_DEPTH_ONE;      break;
 +            case ucb::LockDepth_INFINITY: theLock->depth = NE_DEPTH_INFINITE; break;
-+            default:
-+                                          throw DAVException( DAVException::DAV_INVALID_ARG );
-+        }
+ 			default:
+ 				throw DAVException( DAVException::DAV_INVALID_ARG );
+-				break;
+ 		}
  
--		// Set the lock token
--        rtl::OUString theToken = inLock.locktoken.getConstArray()[ 0 ];
--		theLock->token = const_cast< char * >
--            ( rtl::OUStringToOString(
--                    theToken, RTL_TEXTENCODING_UTF8 ).getStr() );
-+        // Set the lock scope
+ 		// Set the lock scope
+-		switch ( inLock.scope )
 +        switch ( rLock.Scope )
-+        {
+ 		{
+-			case EXCLUSIVE:
+-                theLock->scope = ne_lockscope_exclusive;
+-				break;
+-			case SHARED:
+-                theLock->scope = ne_lockscope_shared;
+-				break;
 +            case ucb::LockScope_EXCLUSIVE: theLock->scope = ne_lockscope_exclusive; break;
 +            case ucb::LockScope_SHARED:    theLock->scope = ne_lockscope_shared;    break;
-+            default:
-+                                           throw DAVException( DAVException::DAV_INVALID_ARG );
-+                                           break;
-+        }
+ 			default:
+ 				throw DAVException( DAVException::DAV_INVALID_ARG );
+ 				break;
+ 		}
  
--        theRetVal = ne_unlock( m_pHttpSession, theLock );
--	}
-+        // Set the lock owner
+ 		// Set the lock owner
+-        const char * theOwner = rtl::OUStringToOString( inLock.owner,
+-                                                        RTL_TEXTENCODING_UTF8 );
+-		theLock->owner = const_cast< char * > ( theOwner );
 +        rtl::OUString aValue;
 +        rLock.Owner >>= aValue;
- 
--	HandleError( theRetVal );
-+        theLock->owner = strdup( rtl::OUStringToOString( aValue, RTL_TEXTENCODING_UTF8 ).getStr() );
 +
-+        // Set the lock timeout
++        theLock->owner = strdup( rtl::OUStringToOString( aValue, RTL_TEXTENCODING_UTF8 ).getStr() );
+ 
+ 		// Set the lock timeout
+-		// Note: Neon ignores the timeout
+-		//theLock->timeout = inLock.timeout;
 +        // We re-new the lock while the stream is open
 +        theLock->timeout = rLock.Timeout;
 +    }
@@ -1549,15 +1447,49 @@
 +                uno::Sequence< rtl::OUString > aTokens( 1 );
 +                aTokens[0] = rtl::OUString::createFromAscii( theLock->token );
 +                rLock.LockTokens = aTokens;
-+
+ 
+-        theRetVal = ne_lock( m_pHttpSession, theLock );
 +#if OSL_DEBUG_LEVEL > 0
 +                fprintf( stderr, "WebDAV: locked the URL, the token is: %s\n", theLock->token );
 +#endif
 +            }
-+        }
-+        else
+ 	}
+ 	else
+ 	{
++#if NEON_VERSION >= 0x0260
 +            nRet = ne_lock_refresh( m_pHttpSession, theLock );
++#else
++            // workaround for a bug in neon 0.24
++            // we have to call with a bigger structure that is used internally
++            // and initialize parts of it
 +
++            struct lock_ctx
++            {
++                struct ne_lock active; /* activelock */
++                char *token; /* the token we're after. */
++                int found;
++                ne_buffer *cdata;
++            };
+ 
+-		// Set the lock token
+-        rtl::OUString theToken = inLock.locktoken.getConstArray()[ 0 ];
+-		theLock->token = const_cast< char * >
+-            ( rtl::OUStringToOString(
+-                    theToken, RTL_TEXTENCODING_UTF8 ).getStr() );
++            struct lock_ctx ctx;
++
++            memset( &ctx, 0, sizeof ctx );
++            ctx.cdata = ne_buffer_create();
+ 
+-        theRetVal = ne_unlock( m_pHttpSession, theLock );
++            memcpy( &ctx, theLock, sizeof( *theLock ) );
++            nRet = ne_lock_refresh( m_pHttpSession, reinterpret_cast<NeonLock*>( &ctx ) );
++
++            ne_buffer_destroy( ctx.cdata );
++#endif
+ 	}
+ 
+-	HandleError( theRetVal );
 +        if ( ( nRet == NE_ERROR ) && ( getStatusCode( m_pHttpSession ) == SC_LOCKED ) )
 +        {
 +            ucbhelper::cancelCommandExecution( ucb::IOErrorCode_LOCKING_VIOLATION,
@@ -1600,7 +1532,7 @@
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/NeonSession.hxx,v
 retrieving revision 1.31
 retrieving revision 1.29.40.4
-diff -u -p -u -p -B -r1.31 -r1.29.40.4
+diff -u -p -u -p -b -w -B -r1.31 -r1.29.40.4
 --- ucb/source/ucp/webdav/NeonSession.hxx	4 Jun 2008 09:44:25 -0000	1.31
 +++ ucb/source/ucp/webdav/NeonSession.hxx	30 Jun 2008 09:01:27 -0000	1.29.40.4
 @@ -57,6 +57,7 @@ class NeonSession : public DAVSession
@@ -1668,15 +1600,13 @@
 -		// Note: Uncomment the following if locking support is required
 -		/*
 -		virtual void LOCK (const Lock & inLock,
--                           const DAVRequestEnvironment & rEnv )
 +		virtual void LOCK ( com::sun::star::ucb::Lock & rLock,
-+                            const DAVRequestEnvironment & rEnv )
+                            const DAVRequestEnvironment & rEnv )
  			throw ( DAVException );
  
 -		virtual void UNLOCK (const Lock & inLock,
--                             const DAVRequestEnvironment & rEnv )
 +		virtual void UNLOCK ( com::sun::star::ucb::Lock & rLock,
-+                              const DAVRequestEnvironment & rEnv )
+                              const DAVRequestEnvironment & rEnv )
  			throw ( DAVException );
 -		*/
  
@@ -1699,7 +1629,7 @@
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/NeonTypes.hxx,v
 retrieving revision 1.13
 retrieving revision 1.12.150.3
-diff -u -p -u -p -B -r1.13 -r1.12.150.3
+diff -u -p -u -p -b -w -B -r1.13 -r1.12.150.3
 --- ucb/source/ucp/webdav/NeonTypes.hxx	10 Apr 2008 15:42:08 -0000	1.13
 +++ ucb/source/ucp/webdav/NeonTypes.hxx	17 Jun 2008 12:58:27 -0000	1.12.150.3
 @@ -36,6 +36,24 @@
@@ -1738,11 +1668,11 @@
 Index: ucb/source/ucp/webdav/webdavcontent.cxx
 ===================================================================
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/webdavcontent.cxx,v
-retrieving revision 1.63
-retrieving revision 1.59.16.6
-diff -u -p -u -p -B -r1.63 -r1.59.16.6
---- ucb/source/ucp/webdav/webdavcontent.cxx	4 Jun 2008 09:44:45 -0000	1.63
-+++ ucb/source/ucp/webdav/webdavcontent.cxx	27 Jun 2008 12:59:58 -0000	1.59.16.6
+retrieving revision 1.65
+retrieving revision 1.59.16.7
+diff -u -p -u -p -b -w -B -r1.65 -r1.59.16.7
+--- ucb/source/ucp/webdav/webdavcontent.cxx	25 Jul 2008 06:34:03 -0000	1.65
++++ ucb/source/ucp/webdav/webdavcontent.cxx	14 Aug 2008 15:36:44 -0000	1.59.16.7
 @@ -48,20 +48,17 @@
  #include <com/sun/star/beans/PropertySetInfoChangeEvent.hpp>
  #include <com/sun/star/beans/PropertyValue.hpp>
@@ -1808,28 +1738,31 @@
 +    fprintf( stderr, "\n" );
 +#endif
 +
+ 	const ResourceType & rType = getResourceType( xEnv );
      {
          osl::Guard< osl::Mutex > aGuard( m_aMutex );
- 
-@@ -1424,8 +1437,13 @@ uno::Reference< sdbc::XRow > Content::ge
+@@ -1463,6 +1476,10 @@ uno::Reference< sdbc::XRow > Content::ge
  
                          if ( !bNetworkAccessAllowed )
                          {
--                            cancelCommandExecution( e, xEnv );
--                            // unreachable
 +                            if ( e.getStatus() == SC_NOT_FOUND )
 +                                xProps.reset();
 +                            else
 +                            {
-+                                cancelCommandExecution( e, xEnv );
-+                                // unreachable
-+                            }
+                             cancelCommandExecution( e, xEnv );
+                             // unreachable
                          }
-                     }
- 
-@@ -1557,6 +1575,15 @@ uno::Reference< sdbc::XRow > Content::ge
+@@ -1470,6 +1487,7 @@ uno::Reference< sdbc::XRow > Content::ge
+                 }
+             }
          }
-     }
++        }
+ 		// might trigger HTTP redirect.
+ 		// Therefore, title must be upadated here.
+ 		NeonUri aUri( xResAccess->getURL() );
+@@ -1526,6 +1544,15 @@ uno::Reference< sdbc::XRow > Content::ge
+ 				                                 m_bCollection ) );
+ 	}
  
 +    // WebDAV supports XActiveDataStreamer
 +    xProps->addProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SupportsActiveStreaming" ) ),
@@ -1840,79 +1773,35 @@
 +        xProps->addProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" ) ),
 +                uno::makeAny( sal_True ), true );
 +
-     uno::Reference< sdbc::XRow > xResultRow
-         = getPropertyValues( xSMgr,
-                              rProperties,
-@@ -2042,61 +2069,108 @@ uno::Any Content::open(
+ 	// Add BaseURI property, if requested.
+ 	if ( !xProps->contains(
+ 			rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" ) ) ) )
+@@ -2023,8 +2051,9 @@ uno::Any Content::open(
          }
      }
  
 -    if ( rArg.Sink.is() )
 -    {
--        // Open document.
 +    if ( !rArg.Sink.is() )
 +        return aRet;
- 
--        if ( ( rArg.Mode == ucb::OpenMode::DOCUMENT_SHARE_DENY_NONE ) ||
--             ( rArg.Mode == ucb::OpenMode::DOCUMENT_SHARE_DENY_WRITE ) )
--        {
--            // Currently(?) unsupported.
--            ucbhelper::cancelCommandExecution(
-+    // Open document.
-+
-+    if ( ( rArg.Mode == ucb::OpenMode::DOCUMENT_SHARE_DENY_NONE ) ||
-+         ( rArg.Mode == ucb::OpenMode::DOCUMENT_SHARE_DENY_WRITE ) )
-+    {
-+        // Currently(?) unsupported.
-+        ucbhelper::cancelCommandExecution(
-                 uno::makeAny(
-                     ucb::UnsupportedOpenModeException(
--                            rtl::OUString(),
--                            static_cast< cppu::OWeakObject * >( this ),
--                            sal_Int16( rArg.Mode ) ) ),
-+                        rtl::OUString(),
-+                        static_cast< cppu::OWeakObject * >( this ),
-+                        sal_Int16( rArg.Mode ) ) ),
-                 xEnv );
-+        // Unreachable
-+    }
 +
-+    rtl::OUString aURL = m_xIdentifier->getContentIdentifier();
-+    uno::Reference< io::XOutputStream > xOut
-+        = uno::Reference< io::XOutputStream >( rArg.Sink, uno::UNO_QUERY );
-+    if ( xOut.is() )
-+    {
+         // Open document.
+ 
+         if ( ( rArg.Mode == ucb::OpenMode::DOCUMENT_SHARE_DENY_NONE ) ||
+@@ -2046,6 +2075,9 @@ uno::Any Content::open(
+             = uno::Reference< io::XOutputStream >( rArg.Sink, uno::UNO_QUERY );
+         if ( xOut.is() )
+         {
 +#if OSL_DEBUG_LEVEL > 0
 +        fprintf( stderr, "WebDAV: rArg.Sink is XOutputStream\n" );
 +#endif
-+        // PUSH: write data
-+        try
-+        {
-+            std::auto_ptr< DAVResourceAccess > xResAccess;
-+
-+            {
-+                osl::MutexGuard aGuard( m_aMutex );
-+
-+                // throw away previously cached headers.
-+                m_xCachedProps.reset();
-+
-+                xResAccess.reset(
-+                        new DAVResourceAccess( *m_xResAccess.get() ) );
-+            }
-+
-+            DAVResource aResource;
-+            std::vector< rtl::OUString > aHeaders;
-+            //                // Obtain list containing all HTTP headers that can
-+            //                // be mapped to UCB properties.
-+            //                ContentProperties::getMappableHTTPHeaders( aHeaders );
-+
-+            xResAccess->GET( xOut, aHeaders, aResource, xEnv );
-+
-+            {
-+                osl::MutexGuard aGuard( m_aMutex );
-+
-+                // cache headers.
-+                m_xCachedProps.reset( new ContentProperties( aResource ) );
+             // PUSH: write data
+             try
+             {
+@@ -2074,6 +2106,53 @@ uno::Any Content::open(
+ 
+                     // cache headers.
+ //                    m_xCachedProps.reset( new ContentProperties( aResource ) );
 +
 +                m_xResAccess.reset( 
 +                    new DAVResourceAccess( *xResAccess.get() ) );
@@ -1921,13 +1810,8 @@
 +        catch ( DAVException const & e )
 +        {
 +            cancelCommandExecution( e, xEnv );
-             // Unreachable
-         }
--
--        rtl::OUString aURL = m_xIdentifier->getContentIdentifier();
--        uno::Reference< io::XOutputStream > xOut
--            = uno::Reference< io::XOutputStream >( rArg.Sink, uno::UNO_QUERY );
--        if ( xOut.is() )
++            // Unreachable
++        }
 +    }
 +    else
 +    {
@@ -1935,67 +1819,62 @@
 +            = uno::Reference< io::XActiveDataSink >( rArg.Sink,
 +                    uno::UNO_QUERY );
 +        if ( xDataSink.is() )
-         {
--            // PUSH: write data
++        {
 +#if OSL_DEBUG_LEVEL > 0
 +            fprintf( stderr, "WebDAV: rArg.Sink is XActiveDataSink\n" );
 +#endif
 +            // PULL: wait for client read
-             try
-             {
--                std::auto_ptr< DAVResourceAccess > xResAccess;
--
-                 {
-                     osl::MutexGuard aGuard( m_aMutex );
- 
-                     // throw away previously cached headers.
-                     m_xCachedProps.reset();
--
--                    xResAccess.reset(
--                        new DAVResourceAccess( *m_xResAccess.get() ) );
-                 }
--
++            try
++            {
++                {
++                    osl::MutexGuard aGuard( m_aMutex );
++
++                    // throw away previously cached headers.
++//                    m_xCachedProps.reset();
++
++                    xResAccess.reset(
++                        new DAVResourceAccess( *m_xResAccess.get() ) );
++                }
 +                // fill inputsream sync; return if all data present
-                 DAVResource aResource;
-                 std::vector< rtl::OUString > aHeaders;
--//                // Obtain list containing all HTTP headers that can
--//                // be mapped to UCB properties.
--//                ContentProperties::getMappableHTTPHeaders( aHeaders );
--
--                xResAccess->GET( xOut, aHeaders, aResource, xEnv );
++                DAVResource aResource;
++                std::vector< rtl::OUString > aHeaders;
 +                //                        // Obtain list containing all HTTP headers that can
 +                //                        // be mapped to UCB properties.
 +                //                        ContentProperties::getMappableHTTPHeaders( aHeaders );
 +                uno::Reference< io::XInputStream > xIn
 +                    = m_xResAccess->GET( aHeaders, aResource, xEnv )->getInputStream();
++
++                {
++                    osl::MutexGuard aGuard( m_aMutex );
++
++                    // cache headers.
++//                    m_xCachedProps.reset( new ContentProperties( aResource ) );
+ 					std::vector< DAVPropertyValue >::const_iterator it = aResource.properties.begin();
+   					std::vector< DAVPropertyValue >::const_iterator end	= aResource.properties.end();
+ 				  	while ( it != end )
+@@ -2082,11 +2161,7 @@ uno::Any Content::open(
+ 						m_xCachedProps->addProperty( aProp.Name, aProp.Value, true);
+ 					}	
  
-                 {
-                     osl::MutexGuard aGuard( m_aMutex );
- 
--                    // cache headers.
--                    m_xCachedProps.reset( new ContentProperties( aResource ) );
+-
 -
 -                    m_xResAccess.reset( 
 -                        new DAVResourceAccess( *xResAccess.get() ) );
-+                    m_xCachedProps.reset(
-+                            new ContentProperties( aResource ) );
-                 }
-+
+-                }
 +                xDataSink->setInputStream( xIn );
              }
              catch ( DAVException const & e )
              {
-@@ -2106,11 +2180,20 @@ uno::Any Content::open(
+@@ -2096,11 +2171,20 @@ uno::Any Content::open(
          }
          else
          {
 -            uno::Reference< io::XActiveDataSink > xDataSink
 -                = uno::Reference< io::XActiveDataSink >( rArg.Sink,
--                                                         uno::UNO_QUERY );
--            if ( xDataSink.is() )
 +            uno::Reference< io::XActiveDataStreamer > xDataStreamer
 +                = uno::Reference< io::XActiveDataStreamer >( rArg.Sink,
-+                        uno::UNO_QUERY );
+                                                          uno::UNO_QUERY );
+-            if ( xDataSink.is() )
 +            if ( xDataStreamer.is() && !m_bForceReadOnly )
              {
 +#if OSL_DEBUG_LEVEL > 0
@@ -2010,16 +1889,9 @@
                  // PULL: wait for client read
                  try
                  {
-@@ -2128,43 +2211,66 @@ uno::Any Content::open(
-                     // fill inputsream sync; return if all data present
-                     DAVResource aResource;
-                     std::vector< rtl::OUString > aHeaders;
--//                        // Obtain list containing all HTTP headers that can
--//                        // be mapped to UCB properties.
--//                        ContentProperties::getMappableHTTPHeaders( aHeaders );
-+                    //                        // Obtain list containing all HTTP headers that can
-+                    //                        // be mapped to UCB properties.
-+                    //                        ContentProperties::getMappableHTTPHeaders( aHeaders );
+@@ -2122,10 +2206,27 @@ uno::Any Content::open(
+ //                        // be mapped to UCB properties.
+ //                        ContentProperties::getMappableHTTPHeaders( aHeaders );
  
 -                    uno::Reference< io::XInputStream > xIn
 -                        = xResAccess->GET( aHeaders, aResource, xEnv );
@@ -2045,12 +1917,9 @@
                      {
 +
                          osl::MutexGuard aGuard( m_aMutex );
-                         m_xCachedProps.reset(
--                            new ContentProperties( aResource ) );
-+                            	new ContentProperties( aResource ) );
- 
-                         m_xResAccess.reset( 
-                             new DAVResourceAccess( *xResAccess.get() ) );
+   //                      m_xCachedProps.reset(
+   //                          new ContentProperties( aResource ) );
+@@ -2135,16 +2236,22 @@ uno::Any Content::open(
  
                      }
  
@@ -2074,23 +1943,7 @@
                  // Note: aOpenCommand.Sink may contain an XStream
                  //       implementation. Support for this type of
                  //       sink is optional...
-                 ucbhelper::cancelCommandExecution(
--                    uno::makeAny(
--                        ucb::UnsupportedDataSinkException(
--                            rtl::OUString(),
--                            static_cast< cppu::OWeakObject * >( this ),
--                            rArg.Sink ) ),
--                    xEnv );
-+                        uno::makeAny(
-+                            ucb::UnsupportedDataSinkException(
-+                                rtl::OUString(),
-+                                static_cast< cppu::OWeakObject * >( this ),
-+                                rArg.Sink ) ),
-+                        xEnv );
-                 // Unreachable
-             }
-         }
-@@ -2182,6 +2288,9 @@ void Content::post(
+@@ -2172,6 +2279,9 @@ void Content::post(
      uno::Reference< io::XActiveDataSink > xSink( rArg.Sink, uno::UNO_QUERY );
      if ( xSink.is() )
      {
@@ -2100,7 +1953,7 @@
          try
          {
              std::auto_ptr< DAVResourceAccess > xResAccess;
-@@ -2216,6 +2325,9 @@ void Content::post(
+@@ -2206,6 +2316,9 @@ void Content::post(
          uno::Reference< io::XOutputStream > xResult( rArg.Sink, uno::UNO_QUERY );
          if ( xResult.is() )
          {
@@ -2110,7 +1963,7 @@
              try
              {
                  std::auto_ptr< DAVResourceAccess > xResAccess;
-@@ -2245,6 +2357,9 @@ void Content::post(
+@@ -2235,6 +2348,9 @@ void Content::post(
          }
          else
          {
@@ -2120,7 +1973,7 @@
              ucbhelper::cancelCommandExecution(
                  uno::makeAny(
                      ucb::UnsupportedDataSinkException(
-@@ -2585,19 +2700,19 @@ void Content::transfer(
+@@ -2575,19 +2691,19 @@ void Content::transfer(
          //
          const rtl::OUString aScheme = sourceURI.GetScheme().toAsciiLowerCase();
          if ( aScheme.equalsAsciiL(
@@ -2148,7 +2001,7 @@
          {
              sourceURI.SetScheme(
                  rtl::OUString::createFromAscii( HTTPS_URL_SCHEME ) );
-@@ -2621,13 +2736,23 @@ void Content::transfer(
+@@ -2611,13 +2727,23 @@ void Content::transfer(
          }
  
          if ( targetURI.GetScheme().toAsciiLowerCase().equalsAsciiL(
@@ -2180,7 +2033,7 @@
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/webdavcontent.hxx,v
 retrieving revision 1.23
 retrieving revision 1.22.20.2
-diff -u -p -u -p -B -r1.23 -r1.22.20.2
+diff -u -p -u -p -b -w -B -r1.23 -r1.22.20.2
 --- ucb/source/ucp/webdav/webdavcontent.hxx	10 Apr 2008 15:44:22 -0000	1.23
 +++ ucb/source/ucp/webdav/webdavcontent.hxx	2 Jun 2008 13:29:28 -0000	1.22.20.2
 @@ -90,6 +90,7 @@ class Content : public ::ucbhelper::Cont
@@ -2196,7 +2049,7 @@
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/webdavcontentcaps.cxx,v
 retrieving revision 1.21
 retrieving revision 1.20.70.2
-diff -u -p -u -p -B -r1.21 -r1.20.70.2
+diff -u -p -u -p -b -w -B -r1.21 -r1.20.70.2
 --- ucb/source/ucp/webdav/webdavcontentcaps.cxx	10 Apr 2008 15:44:38 -0000	1.21
 +++ ucb/source/ucp/webdav/webdavcontentcaps.cxx	2 Jun 2008 13:29:31 -0000	1.20.70.2
 @@ -263,6 +263,24 @@ bool ContentProvider::getProperty(
@@ -2229,7 +2082,7 @@
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/webdavprovider.cxx,v
 retrieving revision 1.21
 retrieving revision 1.18.70.3
-diff -u -p -u -p -B -r1.21 -r1.18.70.3
+diff -u -p -u -p -b -w -B -r1.21 -r1.18.70.3
 --- ucb/source/ucp/webdav/webdavprovider.cxx	4 Jun 2008 09:44:59 -0000	1.21
 +++ ucb/source/ucp/webdav/webdavprovider.cxx	30 Jun 2008 09:01:32 -0000	1.18.70.3
 @@ -36,6 +36,9 @@
@@ -2242,12 +2095,10 @@
  #include <ucbhelper/contentidentifier.hxx>
  #include "webdavprovider.hxx"
  #include "webdavcontent.hxx"
-@@ -138,7 +141,11 @@ ContentProvider::queryContent(
-             RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) &&
+@@ -139,6 +142,10 @@ ContentProvider::queryContent(
           !aScheme.equalsAsciiL(
              RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) &&
--          !aScheme.equalsAsciiL(
-+         !aScheme.equalsAsciiL(
+           !aScheme.equalsAsciiL(
 +            RTL_CONSTASCII_STRINGPARAM( PLAIN_WEBDAV_URL_SCHEME ) ) &&
 +         !aScheme.equalsAsciiL(
 +            RTL_CONSTASCII_STRINGPARAM( PLAIN_WEBDAVS_URL_SCHEME ) ) &&
@@ -2282,13 +2133,17 @@
 -    }
 -    else if ( aScheme.equalsAsciiL(
 -            RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) )
--    {
--        aURL = aURL.replaceAt( 0,
++        if ( aScheme.equalsAscii( pScheme->from ) )
+     {
+         aURL = aURL.replaceAt( 0,
 -                               DAV_URL_SCHEME_LENGTH,
 -                               rtl::OUString::createFromAscii(
 -                                                    HTTP_URL_SCHEME ) );
--        bNewId = true;
--    }
++                    strlen( pScheme->from ),
++                    rtl::OUString::createFromAscii( pScheme->to ) );
+         bNewId = true;
++            break;
+     }
 -    else if ( aScheme.equalsAsciiL(
 -            RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) )
 -    {
@@ -2297,14 +2152,6 @@
 -                               rtl::OUString::createFromAscii(
 -                                                    HTTPS_URL_SCHEME ) );
 -        bNewId = true;
-+        if ( aScheme.equalsAscii( pScheme->from ) )
-+        {
-+            aURL = aURL.replaceAt( 0,
-+                    strlen( pScheme->from ),
-+                    rtl::OUString::createFromAscii( pScheme->to ) );
-+            bNewId = true;
-+            break;
-+        }
      }
  
      sal_Int32 nPos = aURL.lastIndexOf( '/' );
@@ -2313,10 +2160,10 @@
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/webdavprovider.hxx,v
 retrieving revision 1.11
 retrieving revision 1.9.70.3
-diff -u -p -u -p -B -r1.11 -r1.9.70.3
+diff -u -p -u -p -b -w -B -r1.11 -r1.9.70.3
 --- ucb/source/ucp/webdav/webdavprovider.hxx	4 Jun 2008 09:45:13 -0000	1.11
 +++ ucb/source/ucp/webdav/webdavprovider.hxx	30 Jun 2008 09:01:35 -0000	1.9.70.3
-@@ -50,25 +50,18 @@ namespace webdav_ucp {
+@@ -50,23 +50,16 @@ namespace webdav_ucp {
  // URL scheme. This is the scheme the provider will be able to create
  // contents for. The UCB will select the provider ( i.e. in order to create
  // contents ) according to this scheme.
@@ -2325,28 +2172,21 @@
 -#define WEBDAV_URL_SCHEME_LENGTH	19
 +#define WEBDAV_URL_SCHEME        "vnd.sun.star.webdav"
  
--#define HTTP_URL_SCHEME 		"http"
+ #define HTTP_URL_SCHEME 		"http"
 -#define HTTP_URL_SCHEME_LENGTH	4
-+#define HTTP_URL_SCHEME          "http"
-+#define HTTPS_URL_SCHEME         "https"
- 
--#define HTTPS_URL_SCHEME 		"https"
+-
+ #define HTTPS_URL_SCHEME 		"https"
 -#define HTTPS_URL_SCHEME_LENGTH	5
-+#define DAV_URL_SCHEME           "dav"
-+#define DAVS_URL_SCHEME          "davs"
  
--#define DAV_URL_SCHEME			"dav"
+ #define DAV_URL_SCHEME			"dav"
 -#define DAV_URL_SCHEME_LENGTH	3	
+-
+ #define DAVS_URL_SCHEME		"davs"
+-#define DAVS_URL_SCHEME_LENGTH	4	 
+-
+ 
 +#define PLAIN_WEBDAV_URL_SCHEME  "webdav"
 +#define PLAIN_WEBDAVS_URL_SCHEME "webdavs"
  
--#define DAVS_URL_SCHEME		"davs"
--#define DAVS_URL_SCHEME_LENGTH	4	 
--
--
--
--#define FTP_URL_SCHEME "ftp"
-+#define FTP_URL_SCHEME           "ftp"
+ #define FTP_URL_SCHEME "ftp"
  
- #define HTTP_CONTENT_TYPE \
- 				"application/" HTTP_URL_SCHEME "-content"

Modified: trunk/patches/dev300/cws-webdavandgvfslocking1-unotools.diff
==============================================================================
--- trunk/patches/dev300/cws-webdavandgvfslocking1-unotools.diff	(original)
+++ trunk/patches/dev300/cws-webdavandgvfslocking1-unotools.diff	Thu Aug 14 16:26:10 2008
@@ -1,9 +1,65 @@
+Index: unotools/inc/unotools/ucbhelper.hxx
+===================================================================
+RCS file: /cvs/util/unotools/inc/unotools/ucbhelper.hxx,v
+retrieving revision 1.11
+retrieving revision 1.11.10.1
+diff -u -p -u -p -b -w -B -r1.11 -r1.11.10.1
+--- unotools/inc/unotools/ucbhelper.hxx	11 Apr 2008 13:18:03 -0000	1.11
++++ unotools/inc/unotools/ucbhelper.hxx	5 Aug 2008 14:44:00 -0000	1.11.10.1
+@@ -37,6 +37,7 @@
+ #include <com/sun/star/uno/Reference.hxx>
+ #include <com/sun/star/ucb/NameClash.hpp>
+ #include <com/sun/star/ucb/XContentProvider.hpp>
++#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+ 
+ #include <tools/string.hxx>
+ 
+@@ -55,6 +56,8 @@ namespace utl
+ 
+     public:
+         static sal_Bool             IsDocument( const String& rContent );
++        static sal_Bool             IsDocument( const String& rContent,
++                                                const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xComEnv );
+         static sal_Bool             IsFolder( const String& rContent );
+         static sal_Bool             GetTitle( const String& rContent, String& rTitle );
+         static sal_Bool             Kill( const String& rContent );
+Index: unotools/source/ucbhelper/ucbhelper.cxx
+===================================================================
+RCS file: /cvs/util/unotools/source/ucbhelper/ucbhelper.cxx,v
+retrieving revision 1.24
+retrieving revision 1.24.10.1
+diff -u -p -u -p -b -w -B -r1.24 -r1.24.10.1
+--- unotools/source/ucbhelper/ucbhelper.cxx	11 Apr 2008 13:35:38 -0000	1.24
++++ unotools/source/ucbhelper/ucbhelper.cxx	5 Aug 2008 14:44:00 -0000	1.24.10.1
+@@ -143,13 +143,21 @@ sal_Bool UCBContentHelper::Transfer_Impl
+ 
+ sal_Bool UCBContentHelper::IsDocument( const String& rContent )
+ {
++    // this method is here only to avoid the incompatible change, can be removed in future
++    return IsDocument( rContent, uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() );
++}
++
++// -----------------------------------------------------------------------
++
++sal_Bool UCBContentHelper::IsDocument( const String& rContent, const uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xComEnv )
++{
+ 	sal_Bool bRet = sal_False;
+     INetURLObject aObj( rContent );
+     DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
+ 
+ 	try
+ 	{
+-		Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
++		Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), xComEnv );
+ 		bRet = aCnt.isDocument();
+ 	}
+ 	catch( ::com::sun::star::ucb::CommandAbortedException& )
 Index: unotools/source/ucbhelper/ucblockbytes.cxx
 ===================================================================
 RCS file: /cvs/util/unotools/source/ucbhelper/ucblockbytes.cxx,v
 retrieving revision 1.60
 retrieving revision 1.58.22.2
-diff -u -p -u -p -B -r1.60 -r1.58.22.2
+diff -u -p -u -p -b -w -B -r1.60 -r1.58.22.2
 --- unotools/source/ucbhelper/ucblockbytes.cxx	22 Apr 2008 15:10:28 -0000	1.60
 +++ unotools/source/ucbhelper/ucblockbytes.cxx	2 Jun 2008 14:00:17 -0000	1.58.22.2
 @@ -964,6 +964,10 @@ static sal_Bool UCBOpenContentSync(
@@ -21,9 +77,8 @@
      Reference <XOutputStream > xOutputStream = getOutputStream_Impl();
      if ( !xOutputStream.is() )
          return ERRCODE_IO_CANTWRITE;
--    xOutputStream->flush();
 +    try {
-+        xOutputStream->flush();
+     xOutputStream->flush();
 +    }
 +    catch (...)
 +    {



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