From 7fe1706d431d8a4e366a2999726d75fc641d05b0 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Fri, 26 Nov 2010 14:41:57 +0100 Subject: samba-hyperlinks-sc-sd.diff: migrated process relative SMB paths (in hyperlinks) correctly --- sc/source/filter/excel/xecontent.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 6d2ea63416c7..0ddbe3a191f5 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -410,12 +410,20 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU } // file link or URL - if( eProtocol == INET_PROT_FILE ) + if( eProtocol == INET_PROT_FILE || eProtocol == INET_PROT_SMB ) { sal_uInt16 nLevel; bool bRel; String aFileName( BuildFileName( nLevel, bRel, rUrl, rRoot ) ); + if( eProtocol == INET_PROT_SMB ) + { + // #n382718# (and #n261623#) Convert smb notation to '\\' + aFileName = aUrlObj.GetMainURL( INetURLObject::NO_DECODE ); + aFileName = String( aFileName.GetBuffer() + 4 ); // skip the 'smb:' part + aFileName.SearchAndReplaceAll( '/', '\\' ); + } + if( !bRel ) mnFlags |= EXC_HLINK_ABS; mnFlags |= EXC_HLINK_BODY; -- cgit v1.2.3