diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2015-02-03 08:41:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-03 09:45:27 +0000 |
commit | 07cf8750cd094269513c5cec7bee518bbc0e5d81 (patch) | |
tree | e3b85a7fb92c538d9c4d1c689a2b3c74c601e51d /sc | |
parent | ea34266c454c642d5c80e3137090330f3a817a5d (diff) |
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>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index 29ac19b0c4cd..b9d5fdce94dc 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 b7fc0da086b4..48a4a27022a6 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: |