[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svx/source
Caolán McNamara
caolanm at redhat.com
Wed Jul 2 14:47:42 PDT 2014
svx/source/fmcomp/gridcell.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit faa00db418db8a2885973306e5ad10f6b5307ca0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jul 1 13:29:03 2014 +0100
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
(cherry picked from commit 63885c86f866411f01f1b6fceaa07f054a5a3550)
Reviewed-on: https://gerrit.libreoffice.org/10015
Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index b47d510..2ded750 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2090,6 +2090,13 @@ void DbCurrencyField::implAdjustGenericFieldSetting( const Reference< XPropertyS
sal_Bool bThousand = getBOOL( _rxModel->getPropertyValue( FM_PROP_SHOWTHOUSANDSEP ) );
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 )->SetDecimalDigits( m_nScale );
static_cast< LongCurrencyField* >( m_pWindow )->SetCurrencySymbol( aStr );
More information about the Libreoffice-commits
mailing list