This change reduces the cognitive complexity of the
CalculateBSplines function by moving some of the linear
algebra code into a new function and then calling
the function. No changes are made to external code behavior.
Change-Id: I4116d24b30e922a2f3777aa8dcd926ee690b8243
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205231
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
Each series gives one arrow, from the origin to the point whose
1. x-coordinate value is the correlation of that series' feature column
with the first dimension column.
2. y-coordinate value is the correlation of that series' feature column
with the second dimension column.
A symbol marks the tip and the feature name sits beside it. The circle
of radius one and the two lines through the origin are drawn behind the
arrows, and both axes are held at minus one to one on a square plot
area, so a length in the picture means the same in both directions and
the circle stays round.
The correlations are worked out while the shapes are made rather than kept
anywhere, so they follow the cells they come from. Working them out needs the
whole of the three columns.
The correlation coefficient code itself is in a small header of its own
with a test beside it. It leaves out the instances where either side is
missing, and it has no answer for a feature that does not vary or for
fewer than two instances. A feature without an answer gets no arrow,
as there is no direction to point in.
Error bars, trend lines and area properties are turned off for this chart
type, since a point stands for a worked out pair rather than for a value in a
cell, and symbols are turned on because the tip of each arrow carries one. The
arrows take the line colour and width of their series, and the template asks
for thin ones, which is what keeps a crowd of them apart. The legend hands out
the same symbol as the arrow tip, so a key can be matched to an arrow.
Grids are turned off by default for this chart as the user is more
interested in the direction/angles and the magnitude of the "rays" from
the origin.
Change-Id: I2d8b3aa6ef7d66bd9deb1f63a647767a1b62ac90
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8103
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit e096bfee9c85a22e8b8155944a63ee9d6f72f75a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210465
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
A correlation circle plot shows how each feature of a table relates to the
first two dimensions of a decomposition of that table, which a user can now
work out in a spreadsheet with MSVD. One point per feature sits at the
correlation of that feature with the first dimension across and with the
second dimension up, inside a circle of radius one.
The data arrives as one series per feature. Each series holds its own feature
column under the new role values-feature, together with the two dimension
columns under values-x and values-y, which every series shares the way the
bubble chart shares its x column. Keeping the dimensions on the x and y roles
means the point count, the axis scaling and the label machinery need no
special case, and the series label comes from the feature column header, so
the legend and the point labels read as feature names.
The interpreter reads a flat list of columns as a feature table followed by
two dimension columns: the last two are the dimensions and every column before
them is a feature. One range holds the lot, which is what the wizard hands
over, and it is also the order the list comes in when a chart of another type
is turned into this one. A first column of instance names is kept out of the
features when the range says it has them, as it is for a bubble chart.
Both dimensions are numbers running from minus one to one, so the chart type
joins the scatter and the bubble chart in asking for a numeric axis across.
That answer is also what turns the axis of names back into a numeric one when
a chart of another type becomes this one, since the coordinate system the
other type left behind is kept and reused.
Change-Id: Id17d3a2a235c849c3dab9768159ddf1608da6d05
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8102
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit b30d992bba26428941f47f952baf338df3763065)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209379
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
When a chart shows a data table, it is drawn as a strip at the bottom of
the diagram, so the plot-area-plus-axes rectangle grows to include it. The
vertical axis title was centered on that rectangle and thus ended up shifted
downwards compared to MS Office, which centers it on the plot area alone.
Center the left- and right-aligned axis titles on the plot area rectangle
(which already excludes the data table) instead of on the plot area plus
axes, so the title stays centered on the axis.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: If21ba0938cea16abc382e686b9c4e2b84caf2dca
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6978
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 48953636f24d522426d5f5e4ed9f0fc5ec6f30f5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208241
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This commit introduces the structural foundation and user interface for
the new Histogram chart type. The rendering engine gracefully falls
back to plotting the raw values-y input data directly. As a result, the
chart currently renders identically to a standard bar/column chart.
- Adds UI entries in the Chart Type dialog.
- Adds HistogramChart to the view layer, inheriting from BarChart and
forcing a 0-gap width.
Change-Id: Ica5b15e9b7428d6c908e1b978259367fe8ff7aab
(cherry picked from commit 14a4a09b62fc283f9b629a2a317156efa6509054)
Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1878
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 508c3456e85a88771ac5e264cee9460274685a22)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203741
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
crash on saving forum-mso-en4-640039.xlsx (round-trip)
soffice.bin: engine/tools/source/datetime/ttime.cxx:224:
static void tools::Time::GetClock(...): Assertion `fSeconds < 1.0' failed.
#4 tools::Time::GetClock (fTimeInDays=nan(0x8000000000000), ...)
at engine/tools/source/datetime/ttime.cxx:224
#5 SvNumberformat::ImpGetTimeOutput at engine/svl/source/numbers/zformat.cxx:3161
... SvNumberFormatter::GetOutputString
#9 chart::NumberFormatterWrapper::getFormattedString
at engine/chart2/source/tools/NumberFormatterWrapper.cxx:130
#10 chart::VSeriesPlotter::getLabelTextForValue (fValue=nan)
at engine/chart2/source/view/charttypes/VSeriesPlotter.cxx:371
#11 chart::DataTableView::initializeValues
at engine/chart2/source/view/main/DataTableView.cxx:574
The chart's data series carries a NaN at this point (missing data /
formula error). DataTableView::initializeValues iterates every point
unconditionally and feeds the value to the number formatter, if the
point's number format is a date/time/datetime format then that NaN
triggers an assert in Time::GetClock.
The other getLabelTextForValue callers filter missing data earlier, so
skip non-finite values at the data-table-view source.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I99327e590133f3ba52fc6db9bfc153df620b87dd
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2059
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 2054a2128fff8028951669aad1f743bc6cff1e83)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204951
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Since 51ea035a6f "tdf#151876 speedup editing large
chart", PerXMinMaxCalculator::getTotalRange and PerXMinMaxCalculator::setValue
used std::numeric_limits<double>::min() to initialize maximum accumulators. But
which yields the smallest positive normal value (~2.2e-308), not the most
negative value that is apparently asked for here: When all Y values in a chart
are zero, the accumulated max (0.0) never exceeded that initial sentinel, so the
Y axis maximum stayed at ~2.2e-308. This near-zero range then caused division
to produce infinity in the coordinate transformation matrix
(FIXED_SIZE_FOR_3D_CHART_VOLUME / 2.2e-308), and the subsequent 0 * inf
multiplication produced NaN. Which happened to trigger UBSan
float-cast-overflow now in a recently introduced test, where
sc/qa/unit/data/ods/fdo67682-2.ods contains a chart with all-zero Y values on a
date axis (see the comment at
<https://gerrit.libreoffice.org/c/core/+/202711/2#message-c97f2d62213a38df4ed8a5610ae6a699a902af3b>
"XLSX: merge standalone locale prefix with currency bracket" for details).
Change-Id: I3042f589e7aed08fec17588045572fa7abe4b98e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203038
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit db3a1e9323cd8f81d9296835d2d139232bc3c150)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204961
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Add clearer handling for chartex types whose rendering is not currently
supported. Previously, unsupported types defaulted to being rendered as
line charts, which could lead to confusion. With this commit, we instead
display a message stating that the chart type is not supported, and do
not attempt to render it.
Note that at this time, the message is hard-coded only in English
language text. In the short term it should be internationalised, though
in the longer term, the intent is that all chart types will be properly
rendered.
Change-Id: I66eecb3368abaf228d80c21ab664a1eb2b45ae32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197128
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Creating a SvxShapeText (and inserting it into the model) will call
SetEditSource with a newly created SvxTextEditSource; and that one
will register its impl as a listener to underlying SdrObject.
Saving the document, the SvxTextEditSource will be queried for the
properties of the text, when generating autostyles. Therefore, it
is important that the properties known to SvxTextEditSource match
the properties applied to the SdrObject.
The problem was, that the notifications to the listeners were not
sent, when the model was locked; and when it was unlocked, there
was no mechanism to re-send notifications at this time. This meant
that SvxTextEditSource was unaware of e.g. weight changes applied
to SdrObject inside lockControllers ... unlockControllers pair.
This change introduces a list where objects can register for a
postponed change notification.
The unit test is implemented as UITest; trying to do that in a
CppunitTest failed (the test succeeded even without the fix, maybe
because the CppunitTest has no UI, and so the mechanics of using
SvxTextEditSource differ).
There already was a case that relied on dropping the notifications,
specifically ScDrawLayer::SetPageSize, which can move / resize
objects as a result of underlying page size change (like hiding
columns), but doesn't want the objects to update their anchoring
information. That was addressed by adding a flag to ignore adding
deferred notifications.
Change-Id: I3aac61bf91a2461b024b26ad7e7c199cc7def37b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198187
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
which reduces the save time from >200s to 34s.
Of course, this being svx, changing the ordering of setting
properties results in some small layout changes in the unit tests,
none of which look to be significant.
Change-Id: Iccd568a9d61715cadd7812b8375496def8f8be52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197741
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This adds ComplexColor to many of the color properties that are
available in charts. It also handles some import code in oox, so
the complex colors are set correctly to the chart elements if an
OOXML document is loaded. This doesn't yet handle export and if
a theme is changed, as well if a color is changed manually in
the chart.
Change the tests so they now assert the scheme color like it is
defined in the source document and not the calculated derived
color.
In addition change the WriteRunProperties to have a struct as
an input instead a number of parameters, which in most cases don't
need to be filled out and are using the default value.
This was needed for the new parameter bUseTextSchemeColors, which
is used for charts, so the text colors use tx1 and tx2 elements
instead dk1 and dk2, which are usually used in Impress.
Change-Id: Iaebbaea983c5232c51233c1a02bd8fe1da24d551
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194939
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
and
cid#1659699 Overflowed return value
cid#1659759 Overflowed return value
cid#1659922 Overflowed return value
cid#1660190 Overflowed return value
cid#1660286 Overflowed return value
cid#1660457 Overflowed return value
Change-Id: Ie9fffe4994b10ed3d4feb14eaf7950e3f01714ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189927
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
in spreadsheet related code, similar to runtime cases of
bin/sanitize-excludelist.txt but probably more dubious.
also:
cid#1660554 Division or modulo by float zero
cid#1660545 Division or modulo by float zero
cid#1660527 Division or modulo by float zero
cid#1660501 Division or modulo by float zero
cid#1660485 Division or modulo by float zero
cid#1660442 Division or modulo by float zero
cid#1660396 Division or modulo by float zero
cid#1660241 Division or modulo by float zero
cid#1660134 Division or modulo by float zero
cid#1660066 Division or modulo by float zero
cid#1659994 Division or modulo by float zero
cid#1659979 Division or modulo by float zero
cid#1659964 Division or modulo by float zero
cid#1659940 Division or modulo by float zero
cid#1659913 Division or modulo by float zero
cid#1659893 Division or modulo by float zero
cid#1659890 Division or modulo by float zero
cid#1659868 Division or modulo by float zero
cid#1659745 Division or modulo by float zero
cid#1659721 Division or modulo by float zero
cid#1659711 Division or modulo by float zero
cid#1659611 Division or modulo by float zero
cid#1659814 Division or modulo by float zero
Change-Id: I29830cad3170e5e45348f7bd4e08f028d21a4543
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189823
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
and
cid#1662041 Variable copied when it could be moved
cid#1662040 Variable copied when it could be moved
cid#1662038 Variable copied when it could be moved
cid#1660211 Variable copied when it could be moved
cid#1660147 Variable copied when it could be moved
cid#1660117 Variable copied when it could be moved
cid#1660071 Variable copied when it could be moved
cid#1660046 Variable copied when it could be moved
cid#1660046 Variable copied when it could be moved
cid#1659985 Variable copied when it could be moved
Change-Id: I34627585e593f9de6bfa195ee0617848d9ed6135
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189157
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
and
cid#1660225 Variable copied when it could be moved
cid#1660211 Variable copied when it could be moved
cid#1660185 Variable copied when it could be moved
cid#1660173 Variable copied when it could be moved
cid#1660168 Variable copied when it could be moved
cid#1660166 Variable copied when it could be moved
cid#1660165 Variable copied when it could be moved
cid#1660163 Variable copied when it could be moved
cid#1660152 Variable copied when it could be moved
cid#1660149 Variable copied when it could be moved
cid#1660147 Variable copied when it could be moved
cid#1660145 Variable copied when it could be moved
cid#1660142 Variable copied when it could be moved
cid#1660140 Variable copied when it could be moved
cid#1660137 Variable copied when it could be moved
cid#1660136 Variable copied when it could be moved
cid#1660135 Variable copied when it could be moved
cid#1660128 Variable copied when it could be moved
cid#1660124 Variable copied when it could be moved
cid#1660122 Variable copied when it could be moved
cid#1660117 Variable copied when it could be moved
cid#1660114 Variable copied when it could be moved
cid#1660110 Variable copied when it could be moved
cid#1660109 Variable copied when it could be moved
cid#1660105 Variable copied when it could be moved
cid#1660104 Variable copied when it could be moved
cid#1660102 Variable copied when it could be moved
cid#1660100 Variable copied when it could be moved
cid#1660098 Variable copied when it could be moved
cid#1660080 Variable copied when it could be moved
cid#1660079 Variable copied when it could be moved
cid#1660078 Variable copied when it could be moved
cid#1660075 Variable copied when it could be moved
cid#1660071 Variable copied when it could be moved
cid#1660070 Variable copied when it could be moved
cid#1660064 Variable copied when it could be moved
cid#1660063 Variable copied when it could be moved
cid#1660060 Variable copied when it could be moved
cid#1660058 Variable copied when it could be moved
cid#1660053 Variable copied when it could be moved
cid#1660050 Variable copied when it could be moved
cid#1660049 Variable copied when it could be moved
cid#1660046 Variable copied when it could be moved
cid#1660042 Variable copied when it could be moved
cid#1660028 Variable copied when it could be moved
cid#1660023 Variable copied when it could be moved
cid#1660022 Variable copied when it could be moved
cid#1660021 Variable copied when it could be moved
cid#1660020 Variable copied when it could be moved
cid#1660017 Variable copied when it could be moved
cid#1660013 Variable copied when it could be moved
cid#1660005 Variable copied when it could be moved
cid#1660003 Variable copied when it could be moved
cid#1659999 Variable copied when it could be moved
cid#1659998 Variable copied when it could be moved
cid#1659995 Variable copied when it could be moved
cid#1659993 Variable copied when it could be moved
cid#1659989 Variable copied when it could be moved
cid#1659988 Variable copied when it could be moved
Change-Id: I2a30c8a2ac8785050d49b98635b0b406535b185a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189056
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins