From 3af0114a295d2a6c600117adb5bcd6689c0c787e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 12 Jun 2013 15:58:17 +0200 Subject: Introduce O[U]String::toUInt32 ...which has become necessary since bd60d41176da540b01d7583cfe00637431967f39 "Handle oveflow in O(U)String::toInt() functions" reduces values in the range (SAL_MAX_INT32 .. SAL_MAX_UINT32] to zero, but some calls of toInt32(16) relied on getting a correct (unsigned) value for the whole input range ["0" .. "FFFFFFFF"] (see libreoffice-4-1 commit 9bf6c83367cedb7be81bf67f30d2147d26c7a8c3 "Revert overflow checks in O[U]String::toInt{32,64} again"). Audited all uses of toInt32/64 with non-decimal radix. (There is still a TODO comment in oox/source/helper/attributelist.cxx, and stoc/source/typeconv/convert.cxx will still need some love and test code.) Change-Id: Iadaca1c0e41dab553687d0ce41c20c10cd657a95 --- i18npool/source/localedata/localedata.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'i18npool') diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index e4696343960b..c980d2af8faf 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -1422,7 +1422,7 @@ LocaleData::getOutlineNumberingLevels( const lang::Locale& rLocale ) throw(Runti case 0: level[j].sPrefix = tmp; break; case 1: level[j].nNumType = sal::static_int_cast(tmp.toInt32()); break; case 2: level[j].sSuffix = tmp; break; - case 3: level[j].cBulletChar = sal::static_int_cast(tmp.toInt32(16)); break; // base 16 + case 3: level[j].cBulletChar = sal::static_int_cast(tmp.toUInt32(16)); break; // base 16 case 4: level[j].sBulletFontName = U2C( tmp ); break; case 5: level[j].nParentNumbering = sal::static_int_cast(tmp.toInt32()); break; case 6: level[j].nLeftMargin = tmp.toInt32(); break; -- cgit v1.2.3