tdf#88999 Modify number of decimal for scientific also (UI and Sidebar)
Scientific format was excluded from being able to increase/decrease number of decimals, red for negative or thousand separator in UI Format > Cells > Numbers and Sidebar > Number Format Change-Id: I56b175a26fc5ba46b9964390f9c098d5d93c73dc Reviewed-on: https://gerrit.libreoffice.org/14293 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
parent
ea34266c45
commit
07cf8750cd
3 changed files with 6 additions and 3 deletions
|
@ -963,6 +963,7 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa
|
|||
case CAT_NUMBER:
|
||||
case CAT_PERCENT:
|
||||
case CAT_CURRENCY:
|
||||
case CAT_SCIENTIFIC:
|
||||
m_pFtOptions->Enable();
|
||||
m_pFtDecimals->Enable();
|
||||
m_pEdDecimals->Enable();
|
||||
|
@ -982,7 +983,6 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa
|
|||
case CAT_DATE:
|
||||
case CAT_TIME:
|
||||
case CAT_BOOLEAN:
|
||||
case CAT_SCIENTIFIC:
|
||||
case CAT_FRACTION:
|
||||
default:
|
||||
m_pFtOptions->Disable();
|
||||
|
|
|
@ -222,7 +222,8 @@ void NumberFormatPropertyPanel::NotifyItemUpdate(
|
|||
sal_uInt16 nVal = pItem->GetValue();
|
||||
mnCategorySelected = nVal;
|
||||
mpLbCategory->SelectEntryPos(nVal);
|
||||
if( nVal < 4 )
|
||||
if( nVal < 4 || // General, Number, Percent and Currency
|
||||
nVal == 6 ) // scientific also
|
||||
{
|
||||
mpBtnThousand->Enable();
|
||||
mpBtnNegRed->Enable();
|
||||
|
|
|
@ -1112,7 +1112,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
|
|||
eType = pEntry->GetType();
|
||||
}
|
||||
|
||||
//Just use eType to judge whether the command is fired for NUMBER/PERCENT/CURRENCY
|
||||
//Just use eType to judge whether the command is fired for NUMBER/PERCENT/CURRENCY/SCIENTIFIC
|
||||
//In sidebar, users can fire SID_NUMBER_FORMAT command by operating the related UI controls before they are disable
|
||||
switch(eType)
|
||||
{
|
||||
|
@ -1123,6 +1123,8 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
|
|||
case NUMBERFORMAT_PERCENT| NUMBERFORMAT_DEFINED:
|
||||
case NUMBERFORMAT_CURRENCY:
|
||||
case NUMBERFORMAT_CURRENCY|NUMBERFORMAT_DEFINED:
|
||||
case NUMBERFORMAT_SCIENTIFIC:
|
||||
case NUMBERFORMAT_SCIENTIFIC|NUMBERFORMAT_DEFINED:
|
||||
eType = 0;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue