rpms/openoffice.org/F-12 workspace.fwk132.patch,1.1,1.2

Caolan McNamara caolanm at fedoraproject.org
Tue Dec 15 14:22:53 UTC 2009


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25150/F-12

Modified Files:
	workspace.fwk132.patch 
Log Message:
Resolves: rhbz#547176 bah, code moved around a bit

workspace.fwk132.patch:
 file.cxx |   96 ++++++++++++++++++++++++++-------------------------------------
 1 file changed, 40 insertions(+), 56 deletions(-)

Index: workspace.fwk132.patch
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/F-12/workspace.fwk132.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- workspace.fwk132.patch	15 Dec 2009 13:07:02 -0000	1.1
+++ workspace.fwk132.patch	15 Dec 2009 14:22:53 -0000	1.2
@@ -1,24 +1,24 @@
 diff -r a4be016d908d sal/osl/unx/file_misc.cxx
---- a/sal/osl/unx/file_misc.cxx	Wed Dec 09 12:25:54 2009 +0100
-+++ b/sal/osl/unx/file_misc.cxx	Tue Dec 15 12:55:26 2009 +0000
-@@ -29,6 +29,7 @@
+--- a/sal/osl/unx/file.cxx	Wed Dec 09 12:25:54 2009 +0100
++++ b/sal/osl/unx/file.cxx	Tue Dec 15 12:55:26 2009 +0000
+@@ -56,6 +56,7 @@
  
- #include "osl/diagnose.h"
- #include "osl/thread.h"
+ #include <sal/types.h>
+ #include <osl/thread.h>
 +#include <osl/signal.h>
- #include "rtl/alloc.h"
+ #include <osl/diagnose.h>
+ #include "file_error_transl.h"
+ #include <osl/time.h>
+@@ -70,6 +71,8 @@
  
- #include "system.h"
-@@ -48,6 +49,8 @@
- #include <sys/stat.h>
  #include <sys/mman.h>
  
 +#include <algorithm>
 +
- /************************************************************************
-  *   ToDo
-  *
-@@ -1002,7 +1005,6 @@
+ #ifdef HAVE_STATFS_H
+ #undef HAVE_STATFS_H
+ #endif
+@@ -2189,7 +2192,6 @@
      int SourceFileFD=0;
      int DestFileFD=0;
      int nRet=0;
@@ -26,18 +26,15 @@ diff -r a4be016d908d sal/osl/unx/file_mi
  
      SourceFileFD=open(pszSourceFileName,O_RDONLY);
      if ( SourceFileFD < 0 )
-@@ -1010,9 +1012,8 @@
-         nRet=errno;
-         return nRet;
+@@ -2199,7 +2201,6 @@
      }
--    
-+ 
+     
      DestFileFD=open(pszDestFileName, O_WRONLY | O_CREAT, mode);
 -		
      if ( DestFileFD < 0 )
      {
          nRet=errno;
-@@ -1020,65 +1021,49 @@
+@@ -2207,67 +2208,50 @@
          return nRet;
      }
  
@@ -79,9 +76,9 @@ diff -r a4be016d908d sal/osl/unx/file_mi
 -        if (nRet < 0)
 +    size_t nWritten = 0;
 +    size_t nRemains = nSourceSize;
-+   
++
 +    if ( nRemains )
-+    {	
++    {
 +        char pBuffer[32000];
 +        size_t nRead = 0;
 +
@@ -113,7 +110,7 @@ diff -r a4be016d908d sal/osl/unx/file_mi
 -        close(DestFileFD);
 -        munmap((char*)pSourceFile,nSourceSize);
 -        return nRet;
-     }
+-    }
 -    
 -    nRet = munmap((char*)pSourceFile,nSourceSize);
 -    if ( nRet < 0 )
@@ -122,7 +119,7 @@ diff -r a4be016d908d sal/osl/unx/file_mi
 -        close(SourceFileFD);
 -        close(DestFileFD);
 -        return nRet;
--    }
+     }
 -    
 -    close(SourceFileFD);
 -    
@@ -140,95 +137,5 @@ diff -r a4be016d908d sal/osl/unx/file_mi
 +
 +    return nRet;
  }
-+
-diff -r a4be016d908d sfx2/source/doc/docfile.cxx
---- a/sfx2/source/doc/docfile.cxx	Wed Dec 09 12:25:54 2009 +0100
-+++ b/sfx2/source/doc/docfile.cxx	Tue Dec 15 12:55:26 2009 +0000
-@@ -3433,13 +3433,14 @@
- 
-     if ( !( nStorOpenMode & STREAM_TRUNC ) )
-     {
-+        sal_Bool bTransferSuccess = sal_False;
-+
-         if ( GetContent().is()
-           && ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) )
-           && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) )
-         {
-             // if there is already such a document, we should copy it
-             // if it is a file system use OS copy process
--            sal_Bool bTransferSuccess = sal_False;
-             try
-             {
-                 uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > xComEnv;
-@@ -3460,16 +3461,14 @@
-             catch( uno::Exception& )
-             {}
- 
--            if ( !bTransferSuccess )
-+            if ( bTransferSuccess )
-             {
--                SetError( ERRCODE_IO_CANTWRITE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
--                return;
-+                CloseOutStream();
-+                CloseInStream();
-             }
--
--            CloseOutStream();
--            CloseInStream();
-         }
--        else if ( pInStream )
-+
-+        if ( !bTransferSuccess && pInStream )
-         {
-             // the case when there is no URL-access available or this is a remote protocoll
-             // but there is an input stream
-@@ -3489,13 +3488,25 @@
-                     pOutStream->Write( pBuf, nRead );
-                 }
- 
-+                bTransferSuccess = sal_True;
-                 delete[] pBuf;
-                 CloseInStream();
-             }
-             CloseOutStream_Impl();
-         }
-         else
-+        {
-+            // Quite strange design, but currently it is expected that in this case no transfer happens
-+            // TODO/LATER: get rid of this inconsistent part of the call design
-+            bTransferSuccess = sal_True;
-             CloseInStream();
-+        }
-+
-+        if ( !bTransferSuccess )
-+        {
-+            SetError( ERRCODE_IO_CANTWRITE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
-+            return;
-+        }
-     }
  
-     CloseStorage();
-diff -r a4be016d908d sfx2/source/doc/objstor.cxx
---- a/sfx2/source/doc/objstor.cxx	Wed Dec 09 12:25:54 2009 +0100
-+++ b/sfx2/source/doc/objstor.cxx	Tue Dec 15 12:55:26 2009 +0000
-@@ -1872,7 +1872,19 @@
- 		{
- 			uno::Reference< embed::XOptimizedStorage > xOptStorage( xStorage, uno::UNO_QUERY_THROW );
- 			::rtl::OUString aBackupURL = rTargetMedium.GetBackup_Impl();
--			if ( aBackupURL.getLength() )
-+			if ( !aBackupURL.getLength() )
-+            {
-+                // the backup could not be created, try to disconnect the storage and close the source SfxMedium
-+                // in this case the optimization is not possible, connect storage to a temporary file
-+                rTargetMedium.ResetError();
-+                xOptStorage->writeAndAttachToStream( uno::Reference< io::XStream >() );
-+				rSrcMedium.CanDisposeStorage_Impl( sal_False );
-+                rSrcMedium.Close();
-+
-+                // now try to create the backup
-+                rTargetMedium.GetBackup_Impl();
-+            }
-+            else
- 			{
- 				// the following call will only compare stream sizes
- 				// TODO/LATER: this is a very risky part, since if the URL contents are different from the storage
+ /*****************************************




More information about the fedora-extras-commits mailing list