Bug 88999 - UI: Scientific format: unable to modify number of decimal places through Sidebar or Format > Cells
Summary: UI: Scientific format: unable to modify number of decimal places through Side...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Laurent BP
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-31 22:35 UTC by Laurent BP
Modified: 2015-02-04 17:32 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent BP 2015-01-31 22:35:37 UTC
Description: In Sidebar and UI Format > Cells > Numbers, "Decimal places" is grayed if scientific format is selected

Steps to reproduce:
1. Enter a scientific value such as 1e-2
2. View > Sidebar or Format > Cells > Numbers

Actual behavior:
In Sidebar, Properties > Number format, or in UI Format > Cells > Numbers, Decimal places is grayed. The only way to modify decimal places is to manually type a new format in UI (no solution with Sidebar), such as "0.000E+0"

Expected behavior:
Decimal places should be easily modified with up/down arrow like other formats such as number, percent, currency
Comment 1 Jean-Baptiste Faure 2015-01-31 22:48:37 UTC
Behavior reproducible.
I do not see any reason for current limitation in the scientific format --> status NEW.

Best regards. JBF
Comment 2 Laurent BP 2015-02-01 08:48:46 UTC
Bug confirmed with OOo 3.2.1 => I modified version accordingly
Comment 3 Julien Nabet 2015-02-01 16:08:23 UTC
LaurentBP: I took a look before realizing you assigned yourself this one.
Anyway, if interested, this seems to work:
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();
Comment 4 Julien Nabet 2015-02-01 16:09:09 UTC
Just synchronizing state of bugtracker with the fact that "Assigned to" isn't empty.
Comment 5 Julien Nabet 2015-02-01 16:51:35 UTC
For sidebar, I think this part should be changed:
http://opengrok.libreoffice.org/xref/core/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx#217
Comment 6 Laurent BP 2015-02-01 23:12:28 UTC
Thanks Julien for the links. I had found the first one. However it still need some improvement as switching on/off red for negative number corrupt the format.
I will try to find a solution in next days, or simply switch off this option if I can't.
Comment 7 Laurent BP 2015-02-04 17:32:50 UTC
FYI: Commit
https://gerrit.libreoffice.org/#/c/14293/
fixed the problem