[Libreoffice-commits] .: i18npool/source
Tor Lillqvist
tml at kemper.freedesktop.org
Mon Oct 3 22:24:41 PDT 2011
i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit e0c40b71a9e1dcf6f17a6c2ff1d403e7dca46d8b
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Mon Oct 3 16:44:30 2011 +0300
WaE: possible loss of data, assignment within conditional expression
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index a082b02..4541048 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -404,7 +404,7 @@ void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult )
throw( IllegalArgumentException, RuntimeException )
{
OUStringBuffer aTemp(64);
- unsigned char nDigit;
+ unsigned int nDigit;
sal_Unicode asPersianWord_conjunction_data[] = {0x20,0x0648,0x20,0};
OUString asPersianWord_conjunction( asPersianWord_conjunction_data );
unsigned char nSection = 0;
@@ -426,13 +426,13 @@ void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult )
}
else
{
- if ((nDigit = nPart % 10))
+ if ((nDigit = nPart % 10) != 0)
{
if (aTemp.getLength())
aTemp.insert( 0, asPersianWord_conjunction);
aTemp.insert( 0, table_PersianWord_decade1[nDigit]);
}
- if ((nDigit = (nPart / 10) % 10))
+ if ((nDigit = (nPart / 10) % 10) != 0)
{
if (aTemp.getLength())
aTemp.insert( 0, asPersianWord_conjunction);
@@ -440,7 +440,7 @@ void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult )
}
}
- if ((nDigit = nPart / 100))
+ if ((nDigit = nPart / 100) != 0)
{
if (aTemp.getLength())
aTemp.insert( 0, asPersianWord_conjunction);
More information about the Libreoffice-commits
mailing list