diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-27 17:13:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-30 08:33:39 +0100 |
commit | 1ecdddcc32ce2b003fca43ac2c5ef0668afef8dd (patch) | |
tree | 40d202cc79977e5f4f4aa9a010d55dc72a4a3d1f /vcl/source/control/longcurr.cxx | |
parent | dd9c17ae211a8171a7dc84acd9c9dc17cc5b8c48 (diff) |
loplugin:constantparam in vcl
Change-Id: Ic32e4098dcdae5ca5d7fe2749badedabda86a90d
Reviewed-on: https://gerrit.libreoffice.org/44043
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control/longcurr.cxx')
-rw-r--r-- | vcl/source/control/longcurr.cxx | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index 805da72f1eea..0b538747f1c9 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -92,28 +92,6 @@ OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt return aTemplate.makeStringAndClear(); } -bool ImplNumericProcessKeyInput( const KeyEvent& rKEvt, - bool bStrictFormat, bool bThousandSep, - const LocaleDataWrapper& rLocaleDataWrapper ) -{ - if ( !bStrictFormat ) - return false; - else - { - sal_Unicode cChar = rKEvt.GetCharCode(); - sal_uInt16 nGroup = rKEvt.GetKeyCode().GetGroup(); - - return !((nGroup == KEYGROUP_FKEYS) || - (nGroup == KEYGROUP_CURSOR) || - (nGroup == KEYGROUP_MISC) || - ((cChar >= '0') && (cChar <= '9')) || - (bThousandSep && string::equals(rLocaleDataWrapper.getNumThousandSep(), cChar)) || - (string::equals(rLocaleDataWrapper.getNumDecimalSep(), cChar) ) || - (string::equals(rLocaleDataWrapper.getNumDecimalSepAlt(), cChar) ) || - (cChar == '-')); - } -} - bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue, sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper, bool bCurrency ) @@ -240,13 +218,6 @@ bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue, return true; } -bool ImplLongCurrencyProcessKeyInput( const KeyEvent& rKEvt, - bool bUseThousandSep, const LocaleDataWrapper& rLocaleDataWrapper ) -{ - // There's no StrictFormat that makes sense here, thus allow all chars - return ImplNumericProcessKeyInput( rKEvt, false, bUseThousandSep, rLocaleDataWrapper ); -} - } // namespace inline bool ImplLongCurrencyGetValue( const OUString& rStr, BigInt& rValue, @@ -447,16 +418,6 @@ LongCurrencyField::LongCurrencyField( vcl::Window* pParent, WinBits nWinStyle ) Reformat(); } -bool LongCurrencyField::PreNotify( NotifyEvent& rNEvt ) -{ - if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) - { - if ( ImplLongCurrencyProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), GetLocaleDataWrapper() ) ) - return true; - } - return SpinField::PreNotify( rNEvt ); -} - bool LongCurrencyField::EventNotify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) @@ -521,16 +482,6 @@ LongCurrencyBox::LongCurrencyBox( vcl::Window* pParent, WinBits nWinStyle ) : Reformat(); } -bool LongCurrencyBox::PreNotify( NotifyEvent& rNEvt ) -{ - if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) - { - if ( ImplLongCurrencyProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), GetLocaleDataWrapper() ) ) - return true; - } - return ComboBox::PreNotify( rNEvt ); -} - bool LongCurrencyBox::EventNotify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) |