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



Author: jholesovsky
Date: Fri Aug 15 08:49:35 2008
New Revision: 13587
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13587&view=rev

Log:
2008-08-15  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: Better version, builds now ;-)


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	Fri Aug 15 08:49:35 2008
@@ -304,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	Fri Aug 15 08:49:35 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 -w -B -r1.20 -r1.17.86.3
+diff -u -p -u -p -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,23 +139,26 @@
  #include <com/sun/star/ucb/PostCommandArgument2.hpp>
  #include <ucbhelper/interceptedinteraction.hxx>
  #include <ucbhelper/content.hxx>
-@@ -93,10 +60,8 @@
+@@ -93,9 +60,7 @@
  #include <comphelper/processfactory.hxx>
  
  #if OSL_DEBUG_LEVEL>0
 -    #ifndef _RTL_USTRBUF_HXX_
      #include <rtl/ustrbuf.hxx>
-     #endif
--#endif
+-    #endif
+ #endif
  
  //_______________________________________________
- // namespace
-@@ -628,18 +593,7 @@ sal_Bool MediaDescriptor::impl_openStrea
+@@ -628,109 +593,97 @@ 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;
@@ -166,46 +169,173 @@
 -
 -    public:
 -		StillReadWriteInteraction(const css::uno::Reference< css::task::XInteractionHandler >& xHandler)
-+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);
- 		}
+-			: 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);
  
 -		void resetInterceptions()
-+void StillReadWriteInteraction::resetInterceptions()
- 		{
- 			setInterceptions(::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest >());
- 		}
+-		{
+-			setInterceptions(::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest >());
+-		}
++    setInterceptedHandler(xHandler);
++    setInterceptions(lInterceptions);
++}
  
 -		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;
- 		}
++{
++    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;
  
 -        sal_Bool wasWriteError()
-+sal_Bool StillReadWriteInteraction::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:
          {
-             return (m_bUsed && m_bHandledByMySelf);
+-            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 )
++                    );
          }
++        break;
  
 -    private:
 -		virtual ucbhelper::InterceptedInteraction::EInterceptionState intercepted(const ::ucbhelper::InterceptedInteraction::InterceptedRequest&                         aRequest,
-+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;
- 		}
+-																				  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;
+-		}
 -};
++    // 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	Fri Aug 15 08:49:35 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 -w -B -r1.13 -r1.10.112.3
+diff -u -p -u -p -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	Fri Aug 15 08:49:35 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 -w -B -r1.34 -r1.32.32.2
+diff -u -p -u -p -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 {
@@ -19,7 +19,7 @@
 RCS file: /cvs/porting/sal/inc/osl/file.hxx,v
 retrieving revision 1.39
 retrieving revision 1.36.32.3
-diff -u -p -u -p -b -w -B -r1.39 -r1.36.32.3
+diff -u -p -u -p -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:
@@ -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 -w -B -r1.5 -r1.4.232.2
+diff -u -p -u -p -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	Fri Aug 15 08:49:35 2008
@@ -3,7 +3,7 @@
 RCS file: /cvs/sc/sc/source/ui/docshell/docsh.cxx,v
 retrieving revision 1.103
 retrieving revision 1.98.32.3
-diff -u -p -u -p -b -w -B -r1.103 -r1.98.32.3
+diff -u -p -u -p -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

Modified: trunk/patches/dev300/cws-webdavandgvfslocking1-sfx2.diff
==============================================================================
--- trunk/patches/dev300/cws-webdavandgvfslocking1-sfx2.diff	(original)
+++ trunk/patches/dev300/cws-webdavandgvfslocking1-sfx2.diff	Fri Aug 15 08:49:35 2008
@@ -3,7 +3,7 @@
 RCS file: /cvs/framework/sfx2/inc/sfx2/docfile.hxx,v
 retrieving revision 1.8
 retrieving revision 1.6.22.3
-diff -u -p -u -p -b -w -B -r1.8 -r1.6.22.3
+diff -u -p -u -p -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	5 Aug 2008 14:43:31 -0000	1.6.22.3
 @@ -153,6 +153,7 @@ public:
@@ -37,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 -w -B -r1.30 -r1.29.234.2
+diff -u -p -u -p -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
@@ -73,7 +73,7 @@
 RCS file: /cvs/framework/sfx2/source/dialog/dinfdlg.cxx,v
 retrieving revision 1.46
 retrieving revision 1.43.38.4
-diff -u -p -u -p -b -w -B -r1.46 -r1.43.38.4
+diff -u -p -u -p -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
@@ -93,7 +93,7 @@
 RCS file: /cvs/framework/sfx2/source/doc/docfile.cxx,v
 retrieving revision 1.203
 retrieving revision 1.198.22.7
-diff -u -p -u -p -b -w -B -r1.203 -r1.198.22.7
+diff -u -p -u -p -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;
@@ -165,9 +165,10 @@
 +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
@@ -221,6 +222,15 @@
  	{
  		DoInternalBackup_Impl( aOriginalContent );
  		if( !pImp->m_aBackupURL.getLength() )
+@@ -892,7 +882,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 +1155,7 @@ uno::Reference < embed::XStorage > SfxMe
  
              try
@@ -378,7 +388,7 @@
 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
+diff -u -p -u -p -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
@@ -413,7 +423,7 @@
 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 -w -B -r1.9 -r1.8.726.2
+diff -u -p -u -p -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:
@@ -430,7 +440,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 -w -B -r1.136 -r1.133.70.2
+diff -u -p -u -p -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	Fri Aug 15 08:49:35 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 -w -B -r1.3 -r1.2.118.3
+diff -u -p -u -p -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 -w -B -r1.63 -r1.61.26.4
+diff -u -p -u -p -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,16 +80,18 @@
  
  // static
  inline INetURLObject::SchemeInfo const &
-@@ -847,6 +857,9 @@ bool INetURLObject::setAbsURIRef(rtl::OU
+@@ -847,7 +857,10 @@ 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;
  		}
@@ -153,7 +155,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 -w -B -r1.39 -r1.37.82.2
+diff -u -p -u -p -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	Fri Aug 15 08:49:35 2008
@@ -3,10 +3,10 @@
 RCS file: /cvs/ucb/ucb/source/ucp/file/filglob.cxx,v
 retrieving revision 1.26
 retrieving revision 1.24.64.3
-diff -u -p -u -p -b -w -B -r1.26 -r1.24.64.3
+diff -u -p -u -p -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 {
+@@ -435,17 +435,13 @@ namespace fileaccess {
  					// not enough memory for allocating structures 
  					ioErrorCode = IOErrorCode_OUT_OF_MEMORY;
  					break;
@@ -16,22 +16,25 @@
 -					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;
+ 					ioErrorCode = IOErrorCode_LOCKING_VIOLATION;
+ 					break;
+-				case FileBase::E_NOLCK:  // No record locks available
+-                    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 -w -B -r1.9 -r1.8.40.3
+diff -u -p -u -p -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 @@
@@ -50,7 +53,8 @@
 -    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)
@@ -62,10 +66,10 @@
 ===================================================================
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/DAVResourceAccess.cxx,v
 retrieving revision 1.29
-retrieving revision 1.27.20.7
-diff -u -p -u -p -b -w -B -r1.29 -r1.27.20.7
+retrieving revision 1.27.20.8
+diff -u -p -u -p -B -r1.29 -r1.27.20.8
 --- 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
++++ ucb/source/ucp/webdav/DAVResourceAccess.cxx	15 Aug 2008 07:17:29 -0000	1.27.20.8
 @@ -42,6 +42,9 @@
  #include "DAVAuthListenerImpl.hxx"
  #include "DAVResourceAccess.hxx"
@@ -76,7 +80,7 @@
  using namespace webdav_ucp;
  using namespace com::sun::star;
  
-@@ -61,12 +64,14 @@ int DAVAuthListener_Impl::authenticate(
+@@ -61,56 +64,53 @@ int DAVAuthListener_Impl::authenticate(
      ::rtl::OUString & inoutUserName,
      ::rtl::OUString & outPassWord )
  {
@@ -88,50 +92,95 @@
 -            = 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();
-+
-+    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();
-             
+ 
+-            rtl::Reference< ucbhelper::InteractionContinuation > xSelection
+-				= xRequest->getSelection();
+-            
 -            if ( xSelection.is() )
 -            {
-+    if ( !xSelection.is() )
-+        return -1;
-+
-                 // Handler handled the request.
-                 uno::Reference< task::XInteractionAbort > xAbort(
-                     xSelection.get(), uno::UNO_QUERY );
+-                // Handler handled the request.
+-                uno::Reference< task::XInteractionAbort > xAbort(
+-                    xSelection.get(), uno::UNO_QUERY );
 -                if ( !xAbort.is() )
 -                {
 -                    const rtl::Reference<
 -                        ucbhelper::InteractionSupplyAuthentication > & xSupp
-+    if ( xAbort.is() )
+-                        = xRequest->getAuthenticationSupplier();
+-
+-                    inoutUserName = xSupp->getUserName();
+-                    outPassWord   = xSupp->getPassword();
+-		    
+-                    // #102871# - Remember username and password.
+-                    m_aPrevUsername = inoutUserName;
+-                    m_aPrevPassword = outPassWord;
++    if ( !xIH.is() )
 +        return -1;
-+
-+    const rtl::Reference< ucbhelper::InteractionSupplyAuthentication > & xSupp
-                         = xRequest->getAuthenticationSupplier();
  
-                     inoutUserName = xSupp->getUserName();
-@@ -106,12 +112,6 @@ int DAVAuthListener_Impl::authenticate(
-                     // go on.
-                     return 0;
-                 }
+-                    // 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;
+ }
  
  //=========================================================================
- //=========================================================================
 @@ -444,15 +444,18 @@ void DAVResourceAccess::GET( 
  }
  
@@ -166,7 +215,7 @@
          }
          catch ( DAVException & e )
          {
-@@ -606,6 +612,43 @@ void DAVResourceAccess::PUT( 
+@@ -606,6 +612,45 @@ void DAVResourceAccess::PUT( 
  }
  
  //=========================================================================
@@ -177,6 +226,7 @@
 +{
 +    initialize();
 +
++    int errorCount = 0;
 +    bool bRetry = false;
 +    do
 +    {
@@ -198,7 +248,8 @@
 +        }
 +        catch ( DAVException & e )
 +        {
-+            bRetry = handleException( e );
++            errorCount++;
++            bRetry = handleException( e, errorCount );
 +            if ( !bRetry )
 +                throw;
 +        }
@@ -210,7 +261,7 @@
  uno::Reference< io::XInputStream > DAVResourceAccess::POST(
  	const rtl::OUString & rContentType,
  	const rtl::OUString & rReferer,
-@@ -888,22 +931,44 @@ void DAVResourceAccess::DESTROY( 
+@@ -888,22 +933,44 @@ void DAVResourceAccess::DESTROY( 
  
  //=========================================================================
  void DAVResourceAccess::LOCK ( 
@@ -268,7 +319,7 @@
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/DAVResourceAccess.hxx,v
 retrieving revision 1.19
 retrieving revision 1.17.60.5
-diff -u -p -u -p -b -w -B -r1.19 -r1.17.60.5
+diff -u -p -u -p -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:
@@ -321,7 +372,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 -w -B -r1.20 -r1.19.70.3
+diff -u -p -u -p -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 @@
@@ -392,7 +443,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 -w -B -r1.11 -r1.10.116.5
+diff -u -p -u -p -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 @@
@@ -604,10 +655,11 @@
 +						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< XSeekable * >( this ) );
++            static_cast< XInputStream * >( this ),
 +            static_cast< XOutputStream * >( this ),
 +            static_cast< XSeekable * >( this ),
 +            static_cast< XTruncate * >( this ) );
@@ -682,17 +734,24 @@
  }
  
  // -------------------------------------------------------------------
-@@ -171,8 +347,8 @@ void SAL_CALL NeonInputStream::seek( sal
- 	if ( location < 0 )
- 		throw ::com::sun::star::lang::IllegalArgumentException();
+@@ -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();
  
 -    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 )
@@ -873,7 +932,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 -w -B -r1.8 -r1.7.136.4
+diff -u -p -u -p -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 @@
@@ -900,7 +959,7 @@
  
  namespace webdav_ucp
  {
-@@ -45,22 +57,43 @@ namespace webdav_ucp
+@@ -45,21 +57,42 @@ namespace webdav_ucp
  // A simple XInputStream implementation provided specifically for use
  // by the DAVSession::GET method.
  // -------------------------------------------------------------------
@@ -912,10 +971,15 @@
 +                        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;
@@ -930,25 +994,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;
-+
-+    osl::Mutex                 m_aLock;
  
- 	public:
--				 NeonInputStream( void );
+-		// Add some data to the end of the stream
+-		void AddToStream( const char * inBuf, sal_Int32 inLen );
++    osl::Mutex                 m_aLock;
++
++public:
 +             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(); }
@@ -1010,7 +1074,7 @@
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/NeonSession.cxx,v
 retrieving revision 1.55
 retrieving revision 1.53.12.9
-diff -u -p -u -p -b -w -B -r1.55 -r1.53.12.9
+diff -u -p -u -p -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	4 Jul 2008 11:33:47 -0000	1.53.12.9
 @@ -34,11 +34,13 @@
@@ -1069,7 +1133,7 @@
  // -------------------------------------------------------------------
  struct NeonRequestContext
  {
-@@ -196,10 +199,11 @@ struct NeonRequestContext
+@@ -196,12 +199,13 @@ struct NeonRequestContext
  // -------------------------------------------------------------------
  
  #if NEON_VERSION >= 0x0250
@@ -1079,11 +1143,15 @@
 -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 )
  {
-@@ -226,10 +230,11 @@ extern "C" void NeonSession_ResponseBloc
+     // neon calls this function with (inLen == 0)...
+     if ( inLen > 0 )
+@@ -226,12 +230,13 @@ extern "C" void NeonSession_ResponseBloc
  // -------------------------------------------------------------------
  
  #if NEON_VERSION >= 0x0250
@@ -1093,10 +1161,14 @@
 -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
@@ -1214,9 +1286,10 @@
                           NeonSession_ResponseBlockReader,
                           true,
                           &aCtx );
-+    try {
-     HandleError( theRetVal );
+-    HandleError( theRetVal );
 -    return uno::Reference< io::XInputStream >( xInputStream.get() );
++    try {
++        HandleError( theRetVal );
 +    }
 +    catch ( DAVException const & e )
 +    {
@@ -1327,10 +1400,12 @@
  
  // -------------------------------------------------------------------
  const ucbhelper::InternetProxyServer & NeonSession::getProxySettings() const
-@@ -1411,6 +1435,9 @@ void NeonSession::HandleError( int nErro
+@@ -1410,7 +1434,10 @@ void NeonSession::HandleError( int nErro
+         case NE_ERROR:        // Generic error
          {
              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
@@ -1349,9 +1424,31 @@
  {
      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 );
@@ -1363,10 +1460,21 @@
 +    aUri.port = aUri.port? aUri.port: m_nPort;
 +#undef FILLIN
 +#endif
-+
- 	// Create the neon lock
--	NeonLock * theLock = new NeonLock;
--	int theRetVal;
+ 
+-		// 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
 +    NeonLock * theLock = ne_lockstore_findbyuri( s_aNeonLockStore, &aUri );
 +    bool bAlreadyExists = false;
 +    if ( theLock )
@@ -1375,60 +1483,56 @@
 +    {
 +        theLock = ne_lock_create();
  
- 	// Set the lock uri
--	NeonUri theUri( inLock.uri );
--	theLock->uri = const_cast< char * >
--        ( rtl::OUStringToOString(
--                theUri.GetPath(), RTL_TEXTENCODING_UTF8 ).getStr() );
+-		// 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
 +        theLock->uri = aUri;
  
--	if ( inLockit )
+-        theRetVal = ne_lock( m_pHttpSession, theLock );
+-	}
+-	else
 -	{
- 		// Set the lock depth
--		switch( inLock.depth )
++        // Set the lock 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 );
--				break;
- 		}
++            default:
++                                          throw DAVException( DAVException::DAV_INVALID_ARG );
++        }
  
- 		// Set the lock scope
--		switch ( inLock.scope )
+-		// 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
 +        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;
++        }
  
- 		// Set the lock owner
--        const char * theOwner = rtl::OUStringToOString( inLock.owner,
--                                                        RTL_TEXTENCODING_UTF8 );
--		theLock->owner = const_cast< char * > ( theOwner );
+-        theRetVal = ne_unlock( m_pHttpSession, theLock );
+-	}
++        // Set the lock owner
 +        rtl::OUString aValue;
 +        rLock.Owner >>= aValue;
-+
-+        theLock->owner = strdup( rtl::OUStringToOString( aValue, RTL_TEXTENCODING_UTF8 ).getStr() );
  
- 		// Set the lock timeout
--		// Note: Neon ignores the timeout
--		//theLock->timeout = inLock.timeout;
+-	HandleError( theRetVal );
++        theLock->owner = strdup( rtl::OUStringToOString( aValue, RTL_TEXTENCODING_UTF8 ).getStr() );
++
++        // Set the lock timeout
 +        // We re-new the lock while the stream is open
 +        theLock->timeout = rLock.Timeout;
 +    }
@@ -1447,15 +1551,14 @@
 +                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
@@ -1470,26 +1573,19 @@
 +                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,
@@ -1532,7 +1628,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 -w -B -r1.31 -r1.29.40.4
+diff -u -p -u -p -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
@@ -1600,13 +1696,15 @@
 -		// 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 );
 -		*/
  
@@ -1629,7 +1727,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 -w -B -r1.13 -r1.12.150.3
+diff -u -p -u -p -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 @@
@@ -1669,10 +1767,10 @@
 ===================================================================
 RCS file: /cvs/ucb/ucb/source/ucp/webdav/webdavcontent.cxx,v
 retrieving revision 1.65
-retrieving revision 1.59.16.7
-diff -u -p -u -p -b -w -B -r1.65 -r1.59.16.7
+retrieving revision 1.59.16.8
+diff -u -p -u -p -B -r1.65 -r1.59.16.8
 --- 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
++++ ucb/source/ucp/webdav/webdavcontent.cxx	15 Aug 2008 07:17:29 -0000	1.59.16.8
 @@ -48,20 +48,17 @@
  #include <com/sun/star/beans/PropertySetInfoChangeEvent.hpp>
  #include <com/sun/star/beans/PropertyValue.hpp>
@@ -1741,25 +1839,22 @@
  	const ResourceType & rType = getResourceType( xEnv );
      {
          osl::Guard< osl::Mutex > aGuard( m_aMutex );
-@@ -1463,6 +1476,10 @@ uno::Reference< sdbc::XRow > Content::ge
+@@ -1463,8 +1476,13 @@ 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
++                            }
                          }
-@@ -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 ) );
  	}
@@ -1776,32 +1871,83 @@
  	// Add BaseURI property, if requested.
  	if ( !xProps->contains(
  			rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" ) ) ) )
-@@ -2023,8 +2051,9 @@ uno::Any Content::open(
+@@ -2023,30 +2051,90 @@ uno::Any Content::open(
          }
      }
  
 -    if ( rArg.Sink.is() )
 -    {
+-        // Open document.
 +    if ( !rArg.Sink.is() )
 +        return aRet;
-+
-         // 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 ( ( 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() )
++    {
 +#if OSL_DEBUG_LEVEL > 0
 +        fprintf( stderr, "WebDAV: rArg.Sink is XOutputStream\n" );
 +#endif
-             // PUSH: write data
-             try
-             {
-@@ -2074,6 +2106,53 @@ uno::Any Content::open(
- 
-                     // cache headers.
- //                    m_xCachedProps.reset( new ContentProperties( aResource ) );
++        // 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 ) );
++                std::vector< DAVPropertyValue >::const_iterator it = aResource.properties.begin();
++                std::vector< DAVPropertyValue >::const_iterator end = aResource.properties.end();
++                while ( it != end )
++                {
++                    DAVPropertyValue aProp = (*it++);
++                    m_xCachedProps->addProperty( aProp.Name, aProp.Value, true);
++                }
 +
 +                m_xResAccess.reset( 
 +                    new DAVResourceAccess( *xResAccess.get() ) );
@@ -1810,8 +1956,13 @@
 +        catch ( DAVException const & e )
 +        {
 +            cancelCommandExecution( e, xEnv );
-+            // Unreachable
-+        }
+             // Unreachable
+         }
+-
+-        rtl::OUString aURL = m_xIdentifier->getContentIdentifier();
+-        uno::Reference< io::XOutputStream > xOut
+-            = uno::Reference< io::XOutputStream >( rArg.Sink, uno::UNO_QUERY );
+-        if ( xOut.is() )
 +    }
 +    else
 +    {
@@ -1819,62 +1970,73 @@
 +            = 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
-+            {
-+                {
-+                    osl::MutexGuard aGuard( m_aMutex );
-+
-+                    // throw away previously cached headers.
-+//                    m_xCachedProps.reset();
-+
-+                    xResAccess.reset(
-+                        new DAVResourceAccess( *m_xResAccess.get() ) );
-+                }
+             try
+             {
+                 std::auto_ptr< DAVResourceAccess > xResAccess;
+@@ -2060,29 +2148,20 @@ uno::Any Content::open(
+                     xResAccess.reset(
+                         new DAVResourceAccess( *m_xResAccess.get() ) );
+                 }
+-
 +                // fill inputsream sync; return if all data present
-+                DAVResource aResource;
-+                std::vector< rtl::OUString > aHeaders;
+                 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 );
 +                //                        // 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);
- 					}	
++                    = 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 )
+-  					{
+-						DAVPropertyValue aProp = (*it++);
+-						m_xCachedProps->addProperty( aProp.Name, aProp.Value, true);
+-					}	
 -
 -
--                    m_xResAccess.reset( 
--                        new DAVResourceAccess( *xResAccess.get() ) );
--                }
+ 
+                     m_xResAccess.reset( 
+                         new DAVResourceAccess( *xResAccess.get() ) );
+@@ -2086,7 +2165,10 @@ uno::Any Content::open(
+ 
+                     m_xResAccess.reset( 
+                         new DAVResourceAccess( *xResAccess.get() ) );
++
+                 }
++
 +                xDataSink->setInputStream( xIn );
              }
              catch ( DAVException const & e )
              {
-@@ -2096,11 +2171,20 @@ uno::Any Content::open(
+@@ -2096,15 +2178,24 @@ 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 );
--            if ( xDataSink.is() )
++                        uno::UNO_QUERY );
 +            if ( xDataStreamer.is() && !m_bForceReadOnly )
              {
 +#if OSL_DEBUG_LEVEL > 0
@@ -1887,16 +2049,26 @@
 +                aLock.Timeout = 3*60; // 3 minutes
 +
                  // PULL: wait for client read
++                std::auto_ptr< DAVResourceAccess > xResAccess;
                  try
                  {
-@@ -2122,10 +2206,27 @@ uno::Any Content::open(
- //                        // be mapped to UCB properties.
- //                        ContentProperties::getMappableHTTPHeaders( aHeaders );
+-                    std::auto_ptr< DAVResourceAccess > xResAccess;
+                     {
+                         osl::MutexGuard aGuard( m_aMutex );
  
--                    uno::Reference< io::XInputStream > xIn
--                        = xResAccess->GET( aHeaders, aResource, xEnv );
+@@ -2118,43 +2209,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 );
++
 +                    try {
-+                        m_xResAccess->LOCK( aLock, xEnv );
++                        xResAccess->LOCK( aLock, xEnv );
 +                    }
 +                    catch ( ucb::CommandFailedException const &e )
 +                    {
@@ -1910,16 +2082,22 @@
 +
 +                        throw;
 +                    }
-+
+ 
+-                    uno::Reference< io::XInputStream > xIn
+-                        = xResAccess->GET( aHeaders, aResource, xEnv );
 +                    uno::Reference< io::XStream > xStream
-+                        = xResAccess->GET( aHeaders, aResource, xEnv, sal_True, &aLock, m_xResAccess->getURL() );
++                        = xResAccess->GET( aHeaders, aResource, xEnv, sal_True, &aLock, xResAccess->getURL() );
  
                      {
 +
                          osl::MutexGuard aGuard( m_aMutex );
-   //                      m_xCachedProps.reset(
-   //                          new ContentProperties( aResource ) );
-@@ -2135,16 +2236,22 @@ uno::Any Content::open(
+-  //                      m_xCachedProps.reset(
+-  //                          new ContentProperties( aResource ) );
++//                        m_xCachedProps.reset(
++//                            new ContentProperties( aResource ) );
+ 
+                         m_xResAccess.reset( 
+                             new DAVResourceAccess( *xResAccess.get() ) );
  
                      }
  
@@ -1928,7 +2106,7 @@
                  }
                  catch ( DAVException const & e )
                  {
-+                    m_xResAccess->UNLOCK( aLock, xEnv );
++                    xResAccess->UNLOCK( aLock, xEnv );
 +                    m_bForceReadOnly = sal_False;
 +
                      cancelCommandExecution( e, xEnv );
@@ -1943,7 +2121,23 @@
                  // Note: aOpenCommand.Sink may contain an XStream
                  //       implementation. Support for this type of
                  //       sink is optional...
-@@ -2172,6 +2279,9 @@ void Content::post(
+                 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
+             }
+         }
+@@ -2172,6 +2286,9 @@ void Content::post(
      uno::Reference< io::XActiveDataSink > xSink( rArg.Sink, uno::UNO_QUERY );
      if ( xSink.is() )
      {
@@ -1953,7 +2147,7 @@
          try
          {
              std::auto_ptr< DAVResourceAccess > xResAccess;
-@@ -2206,6 +2316,9 @@ void Content::post(
+@@ -2206,6 +2323,9 @@ void Content::post(
          uno::Reference< io::XOutputStream > xResult( rArg.Sink, uno::UNO_QUERY );
          if ( xResult.is() )
          {
@@ -1963,7 +2157,7 @@
              try
              {
                  std::auto_ptr< DAVResourceAccess > xResAccess;
-@@ -2235,6 +2348,9 @@ void Content::post(
+@@ -2235,6 +2355,9 @@ void Content::post(
          }
          else
          {
@@ -1973,17 +2167,11 @@
              ucbhelper::cancelCommandExecution(
                  uno::makeAny(
                      ucb::UnsupportedDataSinkException(
-@@ -2575,19 +2691,19 @@ void Content::transfer(
+@@ -2575,19 +2698,19 @@ void Content::transfer(
          //
          const rtl::OUString aScheme = sourceURI.GetScheme().toAsciiLowerCase();
          if ( aScheme.equalsAsciiL(
 -                RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) )
--        {
--            sourceURI.SetScheme(
--                rtl::OUString::createFromAscii( HTTP_URL_SCHEME ) );
--        }
--        else if ( aScheme.equalsAsciiL(
--                RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) )
 +                RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) ||
 +             aScheme.equalsAsciiL(
 +                RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) ||
@@ -1994,6 +2182,12 @@
                  rtl::OUString::createFromAscii( HTTP_URL_SCHEME ) );
          }
          else if ( aScheme.equalsAsciiL(
+-                RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) )
+-        {
+-            sourceURI.SetScheme(
+-                rtl::OUString::createFromAscii( HTTP_URL_SCHEME ) );
+-        }
+-        else if ( aScheme.equalsAsciiL(
 -                RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) )
 +                     RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) ||
 +                  aScheme.equalsAsciiL(
@@ -2001,7 +2195,7 @@
          {
              sourceURI.SetScheme(
                  rtl::OUString::createFromAscii( HTTPS_URL_SCHEME ) );
-@@ -2611,13 +2727,23 @@ void Content::transfer(
+@@ -2611,13 +2734,23 @@ void Content::transfer(
          }
  
          if ( targetURI.GetScheme().toAsciiLowerCase().equalsAsciiL(
@@ -2033,7 +2227,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 -w -B -r1.23 -r1.22.20.2
+diff -u -p -u -p -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
@@ -2049,7 +2243,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 -w -B -r1.21 -r1.20.70.2
+diff -u -p -u -p -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(
@@ -2082,7 +2276,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 -w -B -r1.21 -r1.18.70.3
+diff -u -p -u -p -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 @@
@@ -2095,10 +2289,12 @@
  #include <ucbhelper/contentidentifier.hxx>
  #include "webdavprovider.hxx"
  #include "webdavcontent.hxx"
-@@ -139,6 +142,10 @@ ContentProvider::queryContent(
+@@ -138,7 +141,11 @@ ContentProvider::queryContent(
+             RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) &&
           !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 ) ) &&
@@ -2133,17 +2329,13 @@
 -    }
 -    else if ( aScheme.equalsAsciiL(
 -            RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) )
-+        if ( aScheme.equalsAscii( pScheme->from ) )
-     {
-         aURL = aURL.replaceAt( 0,
+-    {
+-        aURL = aURL.replaceAt( 0,
 -                               DAV_URL_SCHEME_LENGTH,
 -                               rtl::OUString::createFromAscii(
 -                                                    HTTP_URL_SCHEME ) );
-+                    strlen( pScheme->from ),
-+                    rtl::OUString::createFromAscii( pScheme->to ) );
-         bNewId = true;
-+            break;
-     }
+-        bNewId = true;
+-    }
 -    else if ( aScheme.equalsAsciiL(
 -            RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) )
 -    {
@@ -2152,6 +2344,14 @@
 -                               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( '/' );
@@ -2160,10 +2360,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 -w -B -r1.11 -r1.9.70.3
+diff -u -p -u -p -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,23 +50,16 @@ namespace webdav_ucp {
+@@ -50,25 +50,18 @@ 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.
@@ -2172,21 +2372,28 @@
 -#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 HTTPS_URL_SCHEME 		"https"
++#define HTTP_URL_SCHEME          "http"
++#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 FTP_URL_SCHEME "ftp"
+-#define DAVS_URL_SCHEME		"davs"
+-#define DAVS_URL_SCHEME_LENGTH	4	 
+-
+-
+-
+-#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	Fri Aug 15 08:49:35 2008
@@ -3,7 +3,7 @@
 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
+diff -u -p -u -p -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 @@
@@ -28,7 +28,7 @@
 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
+diff -u -p -u -p -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
@@ -59,7 +59,7 @@
 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 -w -B -r1.60 -r1.58.22.2
+diff -u -p -u -p -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(
@@ -77,8 +77,9 @@
      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]