diff options
author | Laurent BP <laurent.balland-poirier@laposte.net> | 2020-05-24 22:30:41 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2020-06-15 19:37:12 +0200 |
commit | 1861363d623963461905f42aa0b9dc2301f2eaaa (patch) | |
tree | d728c2e2c8f66dcb9cedc00bdcbabe646803c905 /cui | |
parent | e542b622aeb70230365971cab4838dbe0b6e0a93 (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>
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); |