summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2010-11-26 14:41:57 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2010-11-26 14:41:57 +0100
commit7fe1706d431d8a4e366a2999726d75fc641d05b0 (patch)
treed3894c1fe12529d9580ed3879238c120af44afdd
parent79e7254bbc282de461d1ff4da18fdc17f7a978aa (diff)
samba-hyperlinks-sc-sd.diff: migrated
process relative SMB paths (in hyperlinks) correctly
-rw-r--r--sc/source/filter/excel/xecontent.cxx10
1 files changed, 9 insertions, 1 deletions
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;