summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Balland-Poirier <laurent.balland-poirier@laposte.net>2015-02-03 08:41:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-02-03 09:45:27 +0000
commit07cf8750cd094269513c5cec7bee518bbc0e5d81 (patch)
treee3b85a7fb92c538d9c4d1c689a2b3c74c601e51d
parentea34266c454c642d5c80e3137090330f3a817a5d (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>
-rw-r--r--cui/source/tabpages/numfmt.cxx2
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx3
-rw-r--r--sc/source/ui/view/formatsh.cxx4
3 files changed, 6 insertions, 3 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 169f898f6946..57d586122507 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 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: