[Libreoffice-commits] core.git: codemaker/source

Stephan Bergmann sbergman at redhat.com
Tue Sep 3 02:08:34 PDT 2013


 codemaker/source/codemaker/global.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ea7ce8cf08521a7609d2ffc0969b1541fbbb9d0c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Sep 3 11:04:28 2013 +0200

    Write integers as signed sal_Int32
    
    ...this was a regression introduced with
    64b993e046f23baaacaff1572b7d2a816588b5ef "finish deprecation of
    O(U)String::valueOf()" and it caused e.g. the value -0x100 of the enum member
    css.i18n.TranliterationModules.IGNORE_MASK to be written as 4294967040 rather
    than as -256.  (Though the relevant code is dead ugly, for sure.)
    
    Change-Id: Icb3d3365135bc2a07e438317b70abdf9d74d6d7a

diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx
index 6516b17..17c6fec 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -355,7 +355,7 @@ bool FileStream::write(void const * buffer, sal_uInt64 size) {
 
 FileStream &operator<<(FileStream& o, sal_uInt32 i) {
     sal_uInt64 writtenBytes;
-    OString s = OString::number(i);
+    OString s = OString::number((sal_Int32)i);
     osl_writeFile(o.m_file, s.getStr(), s.getLength() * sizeof(sal_Char), &writtenBytes);
     return o;
 }


More information about the Libreoffice-commits mailing list