From ba4ccba7cd01507560871926d3997726eceaf553 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Mon, 24 Jun 2013 11:47:55 +0100 Subject: 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 Tested-by: Fridrich Strba --- sc/source/filter/excel/xecontent.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sc') diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 63a4e907ffb0..59d604d2d0f5 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 ) { -- cgit v1.2.3