[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - chart2/source

Caolán McNamara caolanm at redhat.com
Wed Jun 21 17:20:57 UTC 2017


 chart2/source/controller/dialogs/res_ErrorBar.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit cc5703885ad52526e484d8172e08406b2925faf6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 16 10:08:47 2017 +0100

    only some languages put a space between number and %
    
    Change-Id: Ifdd2f2c02738fc9e9b3fd4cbf97b211b29856df1
    Reviewed-on: https://gerrit.libreoffice.org/38870
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit e89e3ca2a6ab1773a7221eac11cb60812c002005)
    Reviewed-on: https://gerrit.libreoffice.org/39020
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index 03e24cc512ce..998d57862f3c 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -258,11 +258,11 @@ void ErrorBarResources::UpdateControlStates()
         ( m_pRbFunction->IsChecked()) &&
         ( m_pLbFunction->GetSelectEntryPos() == CHART_LB_FUNCTION_ERROR_MARGIN ));
     bool bIsPercentage( m_pRbPercent->IsChecked() || bIsErrorMargin );
-    OUString aCustomUnit;
+    FieldUnit eFieldUnit = FUNIT_NONE;
 
     if( bIsPercentage )
     {
-        aCustomUnit = " %";
+        eFieldUnit = FUNIT_PERCENT;
         m_pMfPositive->SetDecimalDigits( 1 );
         m_pMfPositive->SetSpinSize( 10 );
         m_pMfNegative->SetDecimalDigits( 1 );
@@ -282,8 +282,8 @@ void ErrorBarResources::UpdateControlStates()
     m_pMfPositive->SetValue( nPlusValue );
     m_pMfNegative->SetValue( nMinusValue );
 
-    m_pMfPositive->SetCustomUnitText( aCustomUnit );
-    m_pMfNegative->SetCustomUnitText( aCustomUnit );
+    m_pMfPositive->SetUnit(eFieldUnit);
+    m_pMfNegative->SetUnit(eFieldUnit);
 
     // positive and negative value fields
     bool bPosEnabled = ( m_pRbPositive->IsChecked() || m_pRbBoth->IsChecked());


More information about the Libreoffice-commits mailing list