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.. Thanks for catching! Eike -- LibreOffice Calc developer. Number formatter stricken i18n transpositionizer. New GnuPG key 0x65632D3A : 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Old GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD Support the FSFE, care about Free Software! https://fsfe.org/support/?erack
pgpYLBzP_kKhk.pgp
Description: PGP signature
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice