--- tools/inc/tools/urlobj.hxx	2006-07-20 18:09:51.000000000 +0200
+++ tools/inc/tools/urlobj.hxx	2007-06-14 11:36:58.000000000 +0200
@@ -1557,6 +1557,9 @@ private:
 
     TOOLS_DLLPRIVATE static bool scanIPv6reference(
         sal_Unicode const *& rBegin, sal_Unicode const * pEnd);
+
+private:
+    void changeScheme(INetProtocol eTargetScheme);
 };
 
 // static
--- tools/source/fsys/urlobj.cxx.old	2006-09-17 02:54:24.000000000 +0200
+++ tools/source/fsys/urlobj.cxx	2007-06-14 11:36:58.000000000 +0200
@@ -1460,10 +1460,48 @@ bool INetURLObject::setAbsURIRef(rtl::OU
 
 	m_aAbsURIRef = aSynAbsURIRef;
 
+	// At this point references of type "\\server\paths" have
+	// been converted to file:://server/path".
+#ifdef LINUX
+	if (m_eScheme==INET_PROT_FILE && !m_aHost.isEmpty()) {
+	    // Change "file:://server/path" URIs to "smb:://server/path" on
+	    // Linux
+	    // Leave "file::path" URIs unchanged.
+	    changeScheme(INET_PROT_SMB);	   
+	}
+#endif
+
+#ifdef WIN
+	if (m_eScheme==INET_PROT_SMB) {
+	    // Change "smb://server/path" URIs to "file://server/path"
+	    // URIs on Windows, since Windows doesn't understand the
+	    // SMB scheme.
+	    changeScheme(INET_PROT_FILE);
+	}
+#endif
+
 	return true;
 }
 
 //============================================================================
+void INetURLObject::changeScheme(INetProtocol eTargetScheme) {
+    ::rtl::OUString aTmpStr=m_aAbsURIRef.makeStringAndClear();
+    int oldSchemeLen=strlen(getSchemeInfo().m_pScheme);
+    m_eScheme=eTargetScheme;	   	   
+    int newSchemeLen=strlen(getSchemeInfo().m_pScheme);
+    m_aAbsURIRef.appendAscii(getSchemeInfo().m_pScheme);
+    m_aAbsURIRef.append(aTmpStr.getStr()+oldSchemeLen);
+    int delta=newSchemeLen-oldSchemeLen;
+    m_aUser+=delta;
+    m_aAuth+=delta;
+    m_aHost+=delta;
+    m_aPort+=delta;
+    m_aPath+=delta;
+    m_aQuery+=delta;
+    m_aFragment+=delta;
+}
+
+//============================================================================
 bool INetURLObject::convertRelToAbs(rtl::OUString const & rTheRelURIRef,
 									bool bOctets,
 									INetURLObject & rTheAbsURIRef,
--- sw/source/filter/ww8/wrtw8nds.cxx	26 Jun 2007 10:44:02 -0000	1.100
+++ sw/source/filter/ww8/wrtw8nds.cxx	8 Oct 2007 10:18:08 -0000
@@ -1020,7 +1020,7 @@
     SwWW8Writer::WriteLong( *rWrt.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)
 
@@ -1036,7 +1036,13 @@
             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
         };
 
-        sURL = aURL.PathToFileName();
+	if (eProto == INET_PROT_SMB) { // #n261623# Convert smb notation to \\
+	    sURL = aURL.GetMainURL(INetURLObject::NO_DECODE);
+	    sURL = String(sURL.GetBuffer()+strlen("smb:"));
+	    sURL.SearchAndReplaceAll('/', '\\');
+	} else {
+	    sURL = aURL.PathToFileName();
+	}
 
         rWrt.pDataStrm->Write( MAGIC_C, sizeof(MAGIC_C) );
         SwWW8Writer::WriteLong( *rWrt.pDataStrm, sURL.Len()+1 );
