[Libreoffice-commits] .: sc/source
Fridrich Strba
fridrich at kemper.freedesktop.org
Fri Nov 26 05:47:16 PST 2010
sc/source/filter/excel/xecontent.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 65a2ab2044201300f4eb7d5f9daf641d7c737b7e
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri Nov 26 14:41:57 2010 +0100
samba-hyperlinks-sc-sd.diff: migrated
process relative SMB paths (in hyperlinks) correctly
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index d7a7f3c..b2bacb7 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;
More information about the Libreoffice-commits
mailing list