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



Author: jholesovsky
Date: Wed Jul  9 15:55:04 2008
New Revision: 13126
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13126&view=rev

Log:
2008-07-09  Jan Holesovsky  <kendy suse cz>

        * patches/dev300/tools-urlobj-smb-scheme-patch-relative-links.diff:
          Bin, split the patch into the following two.
        * patches/dev300/sw-hyperlinks-relative.diff: What is supposed to go
          up-stream,
        * patches/dev300/tools-urlobj-smb-scheme-patch.diff: the
          smb://-related part,
        * patches/dev300/apply: and the apply-related changes.


Added:
   trunk/patches/dev300/sw-hyperlinks-relative.diff
Removed:
   trunk/patches/dev300/tools-urlobj-smb-scheme-patch-relative-links.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply
   trunk/patches/dev300/tools-urlobj-smb-scheme-patch.diff

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Wed Jul  9 15:55:04 2008
@@ -448,15 +448,17 @@
 # fix that allows OOo to work with a standard (unpatched) libjpeg,
 jpegc.c.diff, i#80674, n#272574, flr
 
+# When there's no scheme in the hyperlink, it's probably a file
+sw-hyperlinks-without-scheme.diff, n#376389, i#91105, jholesov
+
+# handle hyperlinks to files better
+sw-hyperlinks-relative.diff, n#405712, i#91522, jholesov
+
 # process relative SMB paths (in hyperlinks) correctly
 tools-urlobj-smb-scheme-patch.diff, n#261623, flr
-tools-urlobj-smb-scheme-patch-relative-links.diff, n#405712, jholesov
 samba-hyperlinks-sc-sd.diff, n#382718, jholesov
 tools-qa-urlobj-unittest.diff, n#261623, flr
 
-# When there's no scheme in the hyperlink, it's probably a file
-sw-hyperlinks-without-scheme.diff, n#376389, i#91105, jholesov
-
 # try autodetection if it is allowed and the current java has been removed
 jvmfwk-detect-removed-java.diff, i#83140, n#336242, pmladek
 # allow to overwrite broken java configuration; it is related

Added: trunk/patches/dev300/sw-hyperlinks-relative.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/sw-hyperlinks-relative.diff	Wed Jul  9 15:55:04 2008
@@ -0,0 +1,35 @@
+--- sw/source/filter/ww8/ww8par5.cxx	2008-07-07 18:23:57.000000000 +0200
++++ sw/source/filter/ww8/ww8par5.cxx	2008-07-07 18:24:02.000000000 +0200
+@@ -527,6 +527,7 @@ void SwWW8ImplReader::ConvertFFileName( 
+ {
+     rName = rOrg;
+     rName.SearchAndReplaceAllAscii( "\\\\", String( '\\' ));
++    rName.SearchAndReplaceAllAscii( "%20", String( ' ' ));
+ 
+     // ggfs. anhaengende Anfuehrungszeichen entfernen
+     if( rName.Len() &&  '"' == rName.GetChar( rName.Len()-1 ))
+--- sw/source/filter/ww8/wrtw8nds.cxx	26 Jun 2007 10:44:02 -0000	1.100
++++ sw/source/filter/ww8/wrtw8nds.cxx	8 Oct 2007 10:18:08 -0000
+@@ -1036,7 +1036,21 @@
+             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+         };
+ 
+-        sURL = aURL.PathToFileName();
++        // save the links to files as relative
++        sURL = URIHelper::simpleNormalizedMakeRelative( rWrt.GetBaseURL(), sURL );
++        if ( sURL.EqualsAscii( "/", 0, 1 ) )
++            sURL = aURL.PathToFileName();
++
++        // special case for the absolute windows names
++        // (convert '/c:/foo/bar.doc' into 'c:\foo\bar.doc')
++        sal_Unicode aDrive = ( sURL.Len() > 1 )? sURL.GetChar( 1 ): 0;
++        if ( sURL.EqualsAscii( "/", 0, 1 ) &&
++             ( ( aDrive >= 'A' && aDrive <= 'Z' ) || ( aDrive >= 'a' && aDrive <= 'z' ) ) &&
++             sURL.EqualsAscii( ":", 2, 1 ) )
++        {
++            sURL.Erase( 0, 1 );
++            sURL.SearchAndReplaceAll( '/', '\\' );
++        }
+ 
+         rWrt.pDataStrm->Write( MAGIC_C, sizeof(MAGIC_C) );
+         SwWW8Writer::WriteLong( *rWrt.pDataStrm, sURL.Len()+1 );

Modified: trunk/patches/dev300/tools-urlobj-smb-scheme-patch.diff
==============================================================================
--- trunk/patches/dev300/tools-urlobj-smb-scheme-patch.diff	(original)
+++ trunk/patches/dev300/tools-urlobj-smb-scheme-patch.diff	Wed Jul  9 15:55:04 2008
@@ -63,7 +63,7 @@
  									INetURLObject & rTheAbsURIRef,
 --- sw/source/filter/ww8/wrtw8nds.cxx	26 Jun 2007 10:44:02 -0000	1.100
 +++ sw/source/filter/ww8/wrtw8nds.cxx	8 Oct 2007 10:18:08 -0000
-@@ -1020,7 +1020,7 @@
+@@ -913,7 +913,7 @@
      SwWW8Writer::WriteLong( *rWrt.pDataStrm, nFlag );
  
      INetProtocol eProto = aURL.GetProtocol();
@@ -72,20 +72,28 @@
      {
  // version 1 (for a document)
  
-@@ -1036,7 +1036,15 @@
-             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-         };
+@@ -931,7 +931,7 @@
  
--        sURL = aURL.PathToFileName();
-+        if (eProto == INET_PROT_SMB)
+         // save the links to files as relative
+         sURL = URIHelper::simpleNormalizedMakeRelative( rWrt.GetBaseURL(), sURL );
+-        if ( sURL.EqualsAscii( "/", 0, 1 ) )
++        if ( eProto == INET_PROT_FILE && sURL.EqualsAscii( "/", 0, 1 ) )
+             sURL = aURL.PathToFileName();
+ 
+         // special case for the absolute windows names
+@@ -945,6 +945,15 @@
+             sURL.SearchAndReplaceAll( '/', '\\' );
+         }
+ 
++        // n#261623 convert smb notation to '\\'
++        const char pSmb[] = "smb://";
++        if ( eProto == INET_PROT_SMB &&
++             sURL.EqualsAscii( pSmb, 0, sizeof( pSmb ) - 1 ) )
 +        {
-+            // #n261623# Convert smb notation to '\\'
-+            sURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
-+            sURL = String( sURL.GetBuffer()+strlen("smb:") );
++            sURL.Erase( 0, sizeof( pSmb ) - 3 );
 +            sURL.SearchAndReplaceAll( '/', '\\' );
 +        }
-+        else
-+            sURL = aURL.PathToFileName();
- 
++
          rWrt.pDataStrm->Write( MAGIC_C, sizeof(MAGIC_C) );
          SwWW8Writer::WriteLong( *rWrt.pDataStrm, sURL.Len()+1 );
+         SwWW8Writer::WriteString8( *rWrt.pDataStrm, sURL, true,



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