diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-31 12:40:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-31 13:17:54 +0000 |
commit | 06babf60ce9edd17e02930e60b9afdc12b40b553 (patch) | |
tree | bfb4b8c397d99b7aa6f1fb8670d3b48f4074d242 /svl | |
parent | c8b09c0024cc8fb5444ca422d2ddf729a5117d1d (diff) |
loplugin:oncevar in svl..svx
Change-Id: I80b11a7b698de4b84d7a2f4c7dc62b2e4fd8bb01
Reviewed-on: https://gerrit.libreoffice.org/30438
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zforfind.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 7fc7f8c079fd..e04272a847b8 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -616,11 +616,6 @@ short ImpSvNumberInputScan::GetLogical( const OUString& rString ) */ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos ) { - // #102136# The correct English form of month September abbreviated is - // SEPT, but almost every data contains SEP instead. - static const char aSeptCorrect[] = "SEPT"; - static const char aSepShortened[] = "SEP"; - short res = 0; // no month found if (rString.getLength() > nPos) // only if needed @@ -668,10 +663,11 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos ) res = sal::static_int_cast< short >(-(i+1)); // negative break; // for } - else if ( i == 8 && pUpperAbbrevMonthText[i] == aSeptCorrect && - StringContainsWord( aSepShortened, rString, nPos ) ) - { // #102136# SEPT/SEP - nPos = nPos + strlen(aSepShortened); + else if ( i == 8 && pUpperAbbrevMonthText[i] == "SEPT" && + StringContainsWord( "SEP", rString, nPos ) ) + { // #102136# The correct English form of month September abbreviated is + // SEPT, but almost every data contains SEP instead. + nPos = nPos + 3; res = sal::static_int_cast< short >(-(i+1)); // negative break; // for } |