Kaydet (Commit) 63885c86 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#42747 limits need to multiplied by num of decimal places

NumericFormatter limits need to multiplied by num of decimal places because
the arg is a long so to retain decimal places its got to be raised up by
the num of places

Change-Id: Idbc49a9b1dde5fe176e5170d3be605a998050da5
üst e6486afa
...@@ -2085,6 +2085,13 @@ void DbCurrencyField::implAdjustGenericFieldSetting( const Reference< XPropertyS ...@@ -2085,6 +2085,13 @@ void DbCurrencyField::implAdjustGenericFieldSetting( const Reference< XPropertyS
bool bThousand = getBOOL( _rxModel->getPropertyValue( FM_PROP_SHOWTHOUSANDSEP ) ); bool bThousand = getBOOL( _rxModel->getPropertyValue( FM_PROP_SHOWTHOUSANDSEP ) );
OUString aStr( getString( _rxModel->getPropertyValue(FM_PROP_CURRENCYSYMBOL ) ) ); OUString aStr( getString( _rxModel->getPropertyValue(FM_PROP_CURRENCYSYMBOL ) ) );
//fdo#42747 the min/max/first/last of vcl NumericFormatters needs to be
//multiplied by the no of decimal places. See also
//VclBuilder::mungeAdjustment
int nMul = rtl_math_pow10Exp(1, m_nScale);
nMin *= nMul;
nMax *= nMul;
static_cast< LongCurrencyField* >( m_pWindow )->SetUseThousandSep( bThousand ); static_cast< LongCurrencyField* >( m_pWindow )->SetUseThousandSep( bThousand );
static_cast< LongCurrencyField* >( m_pWindow )->SetDecimalDigits( m_nScale ); static_cast< LongCurrencyField* >( m_pWindow )->SetDecimalDigits( m_nScale );
static_cast< LongCurrencyField* >( m_pWindow )->SetCurrencySymbol( aStr ); static_cast< LongCurrencyField* >( m_pWindow )->SetCurrencySymbol( aStr );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment