[Libreoffice-commits] .: svx/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jun 21 09:24:13 PDT 2011


 svx/source/dialog/sendreportunx.cxx |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit c4ad26a90e286f98c29116beeaf0e0e48eca4a51
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 21 11:10:07 2011 +0100

    WaE: fwrite return

diff --git a/svx/source/dialog/sendreportunx.cxx b/svx/source/dialog/sendreportunx.cxx
index 2362cc3..19961be 100644
--- a/svx/source/dialog/sendreportunx.cxx
+++ b/svx/source/dialog/sendreportunx.cxx
@@ -227,17 +227,18 @@ namespace svx{
 
             if ( fp )
             {
-                ByteString	strUTF8( GetUsing(), RTL_TEXTENCODING_UTF8 );
+                ByteString strUTF8( GetUsing(), RTL_TEXTENCODING_UTF8 );
 
-                fwrite( strUTF8.GetBuffer(), 1, strUTF8.Len(), fp );
+                size_t nWritten = fwrite(strUTF8.GetBuffer(), 1, strUTF8.Len(), fp);
+                OSL_VERIFY(nWritten == strUTF8.Len());
                 fclose( fp );
 #if defined( LINUX ) || defined (MACOSX)
-                setenv( "ERRORREPORT_BODYFILE", szBodyFile, 1 );
+                setenv("ERRORREPORT_BODYFILE", szBodyFile, 1);
 #else
-            static ::rtl::OString	strEnvBodyFile = "ERRORREPORT_BODYFILE";
-            strEnvBodyFile += "=";
-            strEnvBodyFile += szBodyFile;
-            putenv( (char *)strEnvBodyFile.getStr() );
+                static ::rtl::OString strEnvBodyFile = "ERRORREPORT_BODYFILE";
+                strEnvBodyFile += "=";
+                strEnvBodyFile += szBodyFile;
+                putenv((char *)strEnvBodyFile.getStr());
 #endif
             }
 


More information about the Libreoffice-commits mailing list