summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-06-24 11:47:55 +0100
committerFridrich Strba <fridrich@documentfoundation.org>2013-06-28 08:02:11 +0000
commitba4ccba7cd01507560871926d3997726eceaf553 (patch)
treed7f7e0f842406009d8aee1da6830b56ad7924f2a
parentc1dcb685db2f489da2aff65fb910bbcc298e91bd (diff)
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@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
-rw-r--r--sc/source/filter/excel/xecontent.cxx6
1 files changed, 6 insertions, 0 deletions
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 )
{