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
This commit is contained in:
Stephan Bergmann 2013-09-03 11:04:28 +02:00
parent 3073c015e3
commit ea7ce8cf08

View File

@ -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;
}