summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 907a408e43..eea153d284 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -923,7 +923,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, nFlag );
INetProtocol eProto = aURL.GetProtocol();
- if ( eProto == INET_PROT_FILE )
+ if ( eProto == INET_PROT_FILE || eProto == INET_PROT_SMB )
{
// version 1 (for a document)
@@ -941,7 +941,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
// save the links to files as relative
sURL = URIHelper::simpleNormalizedMakeRelative( m_rWW8Export.GetWriter().GetBaseURL(), sURL );
- if ( sURL.EqualsAscii( "/", 0, 1 ) )
+ if ( eProto == INET_PROT_FILE && sURL.EqualsAscii( "/", 0, 1 ) )
sURL = aURL.PathToFileName();
// special case for the absolute windows names
@@ -955,6 +955,15 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
sURL.SearchAndReplaceAll( '/', '\\' );
}
+ // n#261623 convert smb notation to '\\'
+ const char pSmb[] = "smb://";
+ if ( eProto == INET_PROT_SMB &&
+ sURL.EqualsAscii( pSmb, 0, sizeof( pSmb ) - 1 ) )
+ {
+ sURL.Erase( 0, sizeof( pSmb ) - 3 );
+ sURL.SearchAndReplaceAll( '/', '\\' );
+ }
+
m_rWW8Export.pDataStrm->Write( MAGIC_C, sizeof(MAGIC_C) );
SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, sURL.Len()+1 );
SwWW8Writer::WriteString8( *m_rWW8Export.pDataStrm, sURL, true,