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: VERIFIED 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 Balland
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-31 22:35 UTC by Laurent Balland
Modified: 2019-12-07 19:15 UTC (History)
3 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 Balland 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 Balland 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 Balland 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 Balland 2015-02-04 17:32:50 UTC
FYI: Commit
https://gerrit.libreoffice.org/#/c/14293/
fixed the problem
Comment 8 Commit Notification 2018-05-11 05:23:31 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4374f8b621dbefcb0a78a8005db48eb25675bf3c

uitest for bug tdf#88999

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 raal 2019-12-07 19:15:00 UTC
The test exist, set status to Verified.