Drop ValueSet forward declarations from headers
not actually using the class.
Forward-declare the class in cui/source/inc/numpages.hxx
which actually uses it, but didn't forward-declare it
or include the header yet, but previously got the forward-declaration
from an included header.
Change-Id: I8876ad47eb362f581aa41ee4a61a85c4093a1dd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211881
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Commit the results of running
for a in `git ls-files "*.ui"`; do bin/ui-rules-enforcer.py $a; done
Change-Id: I7a97f75773b9e5750dcce848d730960a8561916b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211850
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
In the same way that
Change-Id: I188f812f2d03fa8cbd97ffaaab3081094809887e
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Oct 1 10:29:15 2026 +0200
chart2: Port "Chart Type" dialog from ValueSet to weld::IconView
had done for the "Chart Type" dialog, also port the chart
sidebar from using the custom ValueSet widget to weld::IconView.
This helps to be more consistent with other platform/toolkit
widgets and reduces custom logic.
It can be triggered like this:
* start Writer
* insert a chart using "Insert" -> "Chart..."
* while the chart is still selected, open the "Properties"
sidebar deck
Change-Id: I858dda4b9d5bf62291ee3b0c76b13ee92221f9e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211660
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.
See
commit 02692566ad
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Oct 24 17:43:35 2024 +0200
tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order
for more background.
The dialog can e.g. be triggered like this:
* start Writer
* insert a chart using "Insert" -> "Chart..."
* right-click on one of the bars in the chart to open
the context menu
* activate the "Chart Type..." menu item
The Python script mentioned in the commit message of
commit 327679b2fb
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Jul 8 15:50:59 2026 +0200
tdf#130857 Define widgets in Calc "General" options page in order
was used to reorder the GtkGrid children automatically.
Change-Id: Iafe15ceba9e7c8b7651114e538b9ca20915c2367
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211659
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Port the widget to select the chart subtype in the "Chart Type"
dialog from using a ValueSet widget to using weld::IconView.
This helps to be more consistent with other platform/toolkit
widgets and reduces custom logic.
Adjust indices used to account for the fact that
weld::IconView indices are 0-based while the ValueSet ones
are 1-based.
The dialog can be triggered like this:
* start Writer
* insert a chart using "Insert" -> "Chart..."
* right-click on one of the bars in the chart to open
the context menu
* activate the "Chart Type..." menu item
The chart sidebar (ChartTypePanel) will also be ported
in an upcoming commit.
Change-Id: I188f812f2d03fa8cbd97ffaaab3081094809887e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211658
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
So far, ChartTypeDialogController::fillSubTypeList
(and its overrides) was clearing all existing
entries of the passed ValueSet widget and inserting
items for the chart types it handles.
Change the logic to return a vector of entries for
the corresponding chart types instead and let the
callers handle clearing the ValueSet and inserting
the entries instead.
This way, the ChartTypeDialogControllers don't have
to know/rely on the implementation detail what exact widget
is used to display the chart types.
This can simplify porting away from the use of the
custom ValueSet widget in the future, e.g. to
weld::IconView.
Change-Id: I98b32dee7d67b2a9e8c8474c464cacebb21b717e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211557
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
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
Register BarOfPieDiagram and PieOfPieDiagram and map them to the
existing chart2 BarOfPie/PieOfPie templates used by the chart type
dialog.
Change-Id: Id5ba30d7547d290826bb360b2ccb3713fdb95a42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211460
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
The character to indicate a mnemonic with VCL widgets is ~, not _. I
didn’t notice this because it was working fine with the GTK plugin,
presumably because it ends up accepting either character internally. The
previous string was copied from a UI file where the mnemonic character
does need to be _. Now that the string has changed I’ve changed the
context too because it will end up as a new string for translators now
anyway.
Change-Id: I5e52926ea4cdfd50bed6dda5d4cd6a5a5f550b4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211226
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
If the selected range is too small when Insert->Chart is used then most
of the controls in the “Data Series” tab are disabled. Additionally,
nothing was updating the “Range for %VALUETYPE” label defined in the UI
file so it would be left with this stub visible in the UI. This patch
makes the default label instead just be “Range”. The previous string is
now defined in strings.hrc instead of reading from the label value when
creating the dialog so that it can be updated when a valid range is
selected.
Change-Id: Ib926383825f32042dc0c6d33a115d139a50c5aa6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211102
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
No need for an `else branch` as the `if` branch throws
an exception.
Also stop intermediate assignment to local variable
and return the result directly instead.
Change-Id: Ib442f72510302acffb0336e56df3efd6d93c4d83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210609
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
OAccessible returns itself in its XAccessible::getAccessibleContext
implementation and implements the XAccessibleComponent interface itself,
so there is no need to call the method and query for that interface.
Change-Id: I232d86a3c972a8313a6dc62a1b6c799c6b1a9d81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210603
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Switch AccessibleChartView::m_xParent from a weak
reference of the abstract XAccessible interface to
a weak reference of the more concrete OAccessible class.
Change-Id: Iba9f410979c079735b6c41723206b2ac76c1dc1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210602
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Switch to using the more concrete OAccessible instead
of the abstract XAccessible UNO interface.
Change-Id: I5ef11c3880788320dda6750409f36a04fcf40a06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210601
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Qt plugin automatically orders buttons for each platform based on
the button's role, which we derive from the Gtk .ui file's
action-widget response code. But to do that conversion from response
code to Qt button role, we need a standard response.
Without a standard response, the button has no role, and gets ordered
to the right of OK/Cancel buttons on Mac. With the correct role, it
is correctly placed far-left along with the Help button.
Change-Id: I16d3126d4999649e7aa6e72ec5e7b1a25f48c2a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210223
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
ODF has no name for this chart type, so the file says two things at once, the
way a histogram already does: chart:class names the scatter chart, which is the
nearest a reader that knows nothing of correlation circles can make of it, and
coext:class beside it names the type itself. A reader that knows the coext name
gets the chart back as it was saved.
The series need no new shape in the file. The feature column is the range of
the series and the two dimension columns are a domain each, which is where a
bubble chart already keeps its x and y values, so both the reading and the
writing of them follows the bubble path rather than a new logic.
The schema the tests validate against lists the values coext:class may take, so
the new one is added there beside the histogram.
The test document is one block of five columns: three features and then the two
dimensions, the shape the wizard asks for. The test checks after a round trip
that the chart type came back, that the file carries both class names, and that
every series still holds its feature column beside the two dimension columns.
Change-Id: Iac73ff357c7490b4f38a4390c63948cf148d8585
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8106
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 4e59ea1c83e61b8dc2647f9a915884f9d461165d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210498
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
as part of the process of merging the Outliner code into the normal EditEngine paths.
So instead of keeping a bunch of information "on the side" and then having to merge information
from multiple sources, it all lives where it logically belongs.
Also take the chance to rename the depth/getdepth/setdepth
fields and methods to NumberingDepth, which makes the purpose
more obvious.
Change-Id: I314673ee1b9efa14f178ac34a122995a554cd788
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10551
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 284bbe0af12b96844976f30bb35ade3a327ea76d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210503
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
A correlation circle plot reads the ends of its range differently from every
other chart type: the last two columns are the dimensions its points are placed
against and the columns before them are the features. One range holds the lot,
so nothing about the entry gives that away, and a reader who does not already
know it has no way to work it out.
Display a information label under the range input saying the last two
columns of it are component dimensions and the columns before that are
features.
Change-Id: Ib7d27aad189f12be188f61b1fc317dd1e718b803
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8105
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 2cbf62e18df956ed23c77932cd5e38424e7baa1f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210470
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
The entry sits next to the bubble chart, under the same switch that keeps the
chart types wanting free x values out of the list where they do not belong. It
has one sub type, no three dimensional look and no stacking.
The two images are placeholders: a circle with a cross and a few arrows
out of the middle. They need a designer's hand before this ships.
A test drives the wizard the way a user would: it picks the type, types one
range whose last two columns hold the dimensions, and checks that every column
before them became a series holding that column beside the two dimension
columns. A second test reopens the ranges of that chart and checks the range
comes back as it was given.
Change-Id: If8b5275244a2456a22235a6ce2d3d51fcff6cb94
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8104
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 7a7fc603047e065ebbc20f8bc5dc814d6079e082)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210469
Reviewed-by: Xisco Fauli <xiscofauli@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
Use the more concrete OAccessible instead of the
abstract XAccessible UNO interface.
Change-Id: I18fd3378abe7c6f81a0244f7901eb0bedc9f0d32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210381
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
A bin width much smaller than the data range asks for a bin count
with no upper bound. Over a range of 1000 a width of a millionth
resolves to a billion bins. The conversion from double to sal_Int32
had no range check either, so it could overflow.
Cap the count at MAX_HISTOGRAM_BINS. The division stays in double
and saturates at the cap, and a fixed count from a document is
clamped the same way.
A capped count no longer spans the range with the requested width,
so the range is divided evenly instead. Scott's rule gets the same
treatment when it yields no width at all.
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ib59ee462edade94799cc58e503b843696743ecfe
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10257
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 93a9df897a14ec12457aa40d328616eb071a9175)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210337
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Histogram bin-property changes regenerated the category sequence stored
on the data series, while the X axis continued referencing the previous
sequence. This left the chart bars updated but displayed stale bin
labels.
Keep the category sequence produced by HistogramDataInterpreter on both
the diagram axis and data series. Update its binning parameters in place
when histogram properties change, allowing existing listeners to
recalculate and redraw the axis labels.
Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Change-Id: Ibd6679bddf29de5fa1fd903af9274259b2e9c243
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9282
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 0103afa2a6a746ce54a0e3e4297e1fa60698ef03)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209218
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Do not export transient Scott's-rule width as cx:binSize for automatic
histograms. An explicit binSize is imported as fixed-width
binning, so ODS-to-XLSX roundtrip changed FrequencyType from automatic
to fixed width.
Leave cx:binning without binSize or binCount for automatic mode and add
a regression test verifying that FrequencyType remains automatic after
XLSX export and reload.
Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Change-Id: Icac1a0a032213dd5a6d5581a72d7453e8147d391
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7985
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 9b4ab82c920ae20bc82f6d68031b1f853dbc65c6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209217
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>