cui/source/tabpages/numfmt.cxx | 2 +- sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 3 ++- sc/source/ui/view/formatsh.cxx | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-)
New commits: commit 07cf8750cd094269513c5cec7bee518bbc0e5d81 Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net> Date: Tue Feb 3 08:41:10 2015 +0100 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 <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 169f898..57d5861 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -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(); diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index 29ac19b..b9d5fdc 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -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(); diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index b7fc0da..48a4a27 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -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:
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits