https://bugs.documentfoundation.org/show_bug.cgi?id=165619
Bug ID: 165619
Summary: ROUND function in Data Provider numeric transformation
is ineffective
Product: LibreOffice
Version: 25.8.0.0 alpha0+
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Blocks: 120219
Created attachment 199671
--> https://bugs.documentfoundation.org/attachment.cgi?id=199671&action=edit
sample data to show issue
The ROUND function found in Data Provider Numeric Transformation is
ineffective.
Step to reproduce
0) in an empty sheet
1) define a database range
2) open Data Provider, select the database range above, select CSV (default)
3) Select the CSV attached
4) Choose Numeric transformation
5) Select Round function on a column with decimals
6) Press Apply
7) inspect the Preview window
Expected results:
The columns selected should be truncated (only integer part)
Actual results
Nothing happens
Note: ROUNDUP and ROUNDDOWN works, no extra param needed.
Inspecting the source code at line 414 of
https://opengrok.libreoffice.org/xref/core/sc/source/ui/dataprovider/datatransformation.cxx
and line 143 of
https://opengrok.libreoffice.org/xref/core/sc/source/ui/inc/datatransformation.hxx
We see that the numeric transformations has 2 signatures
NumberTransformation(std::set<SCCOL>&& nCol, const NUMBER_TRANSFORM_TYPE
rType);
NumberTransformation(std::set<SCCOL>&& nCol, const NUMBER_TRANSFORM_TYPE rType,
int nPrecision);
The ROUND function uses the second signature as indicated in line 435 and 445
of
https://opengrok.libreoffice.org/xref/core/sc/source/ui/dataprovider/datatransformation.cxx
However the dialog does not have an entry for the second signature and the
argument nPrecision is not defined.
The dialog is
https://opengrok.libreoffice.org/xref/core/sc/uiconfig/scalc/ui/numbertransformationentry.ui
Referenced Bugs:
https://bugs.documentfoundation.org/show_bug.cgi?id=120219
[Bug 120219] [META] Data provider bugs and enhancements
--
You are receiving this mail because:
You are the assignee for the bug.