diff options
author | Laurent BP <laurent.balland-poirier@laposte.net> | 2020-05-24 22:30:41 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-06-16 13:36:11 +0200 |
commit | 82365fe69c15c65589f709d539ed8e9c4f86a48e (patch) | |
tree | f6b0eb089a221aa4d1e02a60cc970646e26d98db /cui | |
parent | e0ba88a08c9c16fd805e13956ac9676f4ddfd377 (diff) |
tdf#103414 Add/Delete decimal for 100th second
Use Add/Delete decimal to change precision of time and duration
Apply only to 100th second
Change-Id: I2ff1b01db7ee67645511fcf7ea6bf65055e92a8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94765
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 1861363d623963461905f42aa0b9dc2301f2eaaa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96349
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 109c9ef8982f..4297cd52241e 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -920,6 +920,7 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa case CAT_PERCENT: case CAT_CURRENCY: case CAT_FRACTION: + case CAT_TIME: m_xFtOptions->set_sensitive(true); if ( nCategory == CAT_FRACTION ) { @@ -931,8 +932,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa m_xFtDecimals->set_sensitive(true); m_xEdDecimals->set_sensitive(true); } - m_xFtLeadZeroes->set_sensitive(true); - m_xEdLeadZeroes->set_sensitive(true); + m_xFtLeadZeroes->set_sensitive( nCategory != CAT_TIME ); + m_xEdLeadZeroes->set_sensitive( nCategory != CAT_TIME ); m_xBtnNegRed->set_sensitive(true); if ( nCategory == CAT_NUMBER && m_xLbFormat->get_selected_index() == 0 ) m_xEdDecimals->set_text( "" ); //General format tdf#44399 @@ -941,12 +942,13 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa m_xEdDenominator->set_value( nDecimals ); else m_xEdDecimals->set_value( nDecimals ); - m_xEdLeadZeroes->set_value( nZeroes ); + if ( nCategory != CAT_TIME ) + m_xEdLeadZeroes->set_value( nZeroes ); m_xBtnNegRed->set_active( bNegRed ); if ( nCategory != CAT_SCIENTIFIC ) { - m_xBtnThousand->set_sensitive(true); - m_xBtnThousand->set_active( bThousand ); + m_xBtnThousand->set_sensitive( nCategory != CAT_TIME ); + m_xBtnThousand->set_active( bThousand && nCategory != CAT_TIME ); } break; @@ -954,7 +956,6 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa case CAT_USERDEFINED: case CAT_TEXT: case CAT_DATE: - case CAT_TIME: case CAT_BOOLEAN: default: m_xFtOptions->set_sensitive(false); |