summaryrefslogtreecommitdiff
path: root/patches/OOO_1_1/win32-gw-send-mail.diff
blob: ae9322ac97ef0c51507ff0e5791a1ddfb27d0547 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- shell/source/win32/simplemail/smplmailclient.cxx
+++ shell/source/win32/simplemail/smplmailclient.cxx
@@ -452,14 +452,19 @@
                 static_cast< XSimpleMailClient* >( this ), 
                 1 );
 
-        m_AttchmtsSysPathList.push_back( 
-            OString( 
-                aSysPath.getStr( ), 
-                aSysPath.getLength( ), 
-                osl_getThreadTextEncoding( ) ) );
-       
+	OString aFullPath = ::rtl::OUStringToOString( aSysPath,
+					       osl_getThreadTextEncoding() );
+	sal_Int32 nLastSlash = aFullPath.lastIndexOf('\\');
+	OString aFileName = aFullPath.copy( nLastSlash + 1 );
+
+        m_AttchmtsSysPathList.push_back( aFullPath );
         m_AttachementList[i].lpszPathName = const_cast< LPSTR >(
             m_AttchmtsSysPathList.back( ).getStr( ) );  
+
+        m_AttchmtsSysPathList.push_back( aFileName );
+        m_AttachementList[i].lpszFileName = const_cast< LPSTR >(
+            m_AttchmtsSysPathList.back( ).getStr( ) );  
+
         m_AttachementList[i].nPosition = -1;               
     }
 }