diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2015-07-30 20:49:46 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-20 14:13:53 +0200 |
commit | 6dcd1577a55ebafc5bf6850283dedaf20a721f08 (patch) | |
tree | a86fae53e9857331a813d76a40ef79213d4c2943 /cui | |
parent | c8546fa47f35203ea1cb8fc20ad95026051ed822 (diff) |
tdf#44399 Do not display 0 decimal for General format
For General (Standard) format, "0" is not the number of decimal places
Replaced by an empty string in dialog UI and Sidebar.
(cherry picked from commit 0db37d785311aa2294f60b750fce4dadff6c75e0)
Change-Id: Ia367b491b71fa7b4480cdd03408c0c0315425dc8
Reviewed-on: https://gerrit.libreoffice.org/17771
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 197ca95d3dfa..09bb1a641fa1 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -984,7 +984,10 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa m_pEdLeadZeroes->Enable(); m_pBtnNegRed->Enable(); m_pBtnThousand->Enable(); - m_pEdDecimals->SetText( OUString::number( nDecimals ) ); + if ( nCategory == CAT_NUMBER && m_pLbFormat->GetSelectEntryPos() == 0 ) + m_pEdDecimals->SetText( "" ); //General format tdf#44399 + else + m_pEdDecimals->SetText( OUString::number( nDecimals ) ); m_pEdLeadZeroes->SetText( OUString::number( nZeroes ) ); m_pBtnNegRed->Check( bNegRed ); m_pBtnThousand->Check( bThousand ); @@ -1571,6 +1574,10 @@ IMPL_LINK( SvxNumberFormatTabPage, OptHdl_Impl, void *, pOptCtrl ) sal_uInt16 nLeadZeroes = (m_pEdLeadZeroes->IsEnabled()) ? (sal_uInt16)m_pEdLeadZeroes->GetValue() : (sal_uInt16)0; + if ( pNumFmtShell->GetStandardName() == m_pEdFormat->GetText() ) + { + m_pEdDecimals->SetValue( nPrecision ); + } pNumFmtShell->MakeFormat( aFormat, bThousand, bNegRed, |