Hi Eike,
Am 06.02.2013 13:38, schrieb Eike Rathke:
Hi Christina,
On Wednesday, 2013-02-06 12:36:33 +0100, Christina Roßmanith wrote:
- for (xub_StrLen i = (xub_StrLen)(aStr.Len()-1); i > 0; i++ )
+ for (sal_Int32 i = aStr.getLength()-1; i > 0; i++ )
{
- if ( (aStr.GetChar( i ) >= '0') && (aStr.GetChar( i ) <= '9') )
+ if ( (aStr[i] >= '0') && (aStr[i] <= '9') )
break;
- else if ( aStr.GetChar( i ) == '-' )
+ else if ( aStr[i] == '-' )
{
bNegative = sal_True;
break;
In
for (sal_Int32 i = aStr.getLength()-1; i > 0; i++ )
i starts with at least -1 is tested to be non negative and
incremented. Is this code ever used??? Or am I failing to see the
magic behind the scenes?
No, that code doesn't make sense and to me looks it should be
for (sal_Int32 i = aStr.getLength()-1; i > 0; --i)
Awkward guessing of negative currency formats anyway..
Do you think it is ever used? It would be an endless loop, wouldn't
it?!? The question is modify to --i or remove some code.
Well there are lots of formats for negativ currencies:
- if ( (nFormat == 3) || (nFormat == 6) ||
- (nFormat == 7) || (nFormat == 10) )
+ if ( (nFormat == 3) || (nFormat == 6) || // $1- || 1-$
+ (nFormat == 7) || (nFormat == 10) ) // 1$- || 1 $-
I've added them as a comment because the numerical codes for the various
formats are quite non intuitive.
Christina
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.