[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sc/source

Noel Power noel.power at suse.com
Fri Jun 28 01:02:31 PDT 2013


 sc/source/filter/excel/xecontent.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit ba4ccba7cd01507560871926d3997726eceaf553
Author: Noel Power <noel.power at suse.com>
Date:   Mon Jun 24 11:47:55 2013 +0100

    fix for bnc#823935
    
    window network drive urls on import get internall converted to SMB
    (so it appears anyway) when exported the file:/// that was on
    the target ( in the relId ) for the hyperlink is dropped. Apparently
    the scheme isn't necessary for the binary import. If one of these
    strange 'detected as smb' window shares are exported make sure we
    add the file:///
    (cherry picked from commit 8e33e95500c2f5edc91e853024a5c0fff285fcce)
    
    Change-Id: Id62e1f4845bfbc610f73499881dc33d3d955923b
    (cherry picked from commit 732640c353b39cff7a9d5b5906f8975102cbed11)
    Reviewed-on: https://gerrit.libreoffice.org/4484
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 63a4e90..59d604d 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -391,6 +391,12 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
             mxRepr.reset( new String( aFileName ) );
 
         msTarget = XclXmlUtils::ToOUString( aLink );
+        if( eProtocol == INET_PROT_SMB )
+        {
+            // ooxml expects the file:/// part appended ( or at least
+            // ms2007 does, ms2010 is more tolerant )
+            msTarget = "file:///" + msTarget;
+        }
     }
     else if( eProtocol != INET_PROT_NOT_VALID )
     {


More information about the Libreoffice-commits mailing list