diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-09 14:26:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-09 21:40:21 +0200 |
commit | f717b7b5fb6c00aee127f94aba3b8f7e25160134 (patch) | |
tree | 4313b4ec9b824601141b84ae063f9bf25a937f91 /vcl | |
parent | 9479e5c63f7ce9e46093eebde2ac5a89518e8c04 (diff) |
ImplNumericReformat always returns true
Change-Id: Icfb555a59d0a221bdbdcf17601440fda43680d4b
Reviewed-on: https://gerrit.libreoffice.org/54032
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/field.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 706a56a93a93..b2bd446fe521 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -474,17 +474,13 @@ bool FormatterBase::IsEmptyFieldValue() const return (!mpField || mpField->GetText().isEmpty()); } -bool NumericFormatter::ImplNumericReformat( const OUString& rStr, sal_Int64& rValue, +void NumericFormatter::ImplNumericReformat( const OUString& rStr, sal_Int64& rValue, OUString& rOutStr ) { - if ( !ImplNumericGetValue( rStr, rValue, GetDecimalDigits(), ImplGetLocaleDataWrapper() ) ) - return true; - else + if (ImplNumericGetValue(rStr, rValue, GetDecimalDigits(), ImplGetLocaleDataWrapper())) { sal_Int64 nTempVal = ClipAgainstMinMax(rValue); - rOutStr = CreateFieldText( nTempVal ); - return true; } } @@ -650,10 +646,8 @@ void NumericFormatter::Reformat() OUString aStr; sal_Int64 nTemp = mnLastValue; - bool bOK = ImplNumericReformat( GetField()->GetText(), nTemp, aStr ); + ImplNumericReformat(GetField()->GetText(), nTemp, aStr); mnLastValue = nTemp; - if ( !bOK ) - return; if ( !aStr.isEmpty() ) ImplSetText( aStr ); |