3005 Commits
Author SHA1 Message Date
Xisco Fauli 7003eb6fc6 fix headers
Change-Id: Ia2732cc041367bc113654bc424ea6621f3961e9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211724
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-05 08:52:04 +02:00
Jason Whitmore 94f01698f5 tdf#155628 split upper triangular code into new function and call
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
2026-09-26 10:05:54 +02:00
Andrea Gelmini 8ee79ac196 Fix typos
Change-Id: Ic7a97a5219d8a0d30b1753c2502995ea4c2cd32f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210563
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-09-10 16:22:54 +02:00
Jason Whitmore a73823a4c1 chart2: Add unit tests for CalculateBSplines
Change-Id: I46af0b5c72ef96c42ea0eb60a5c8b6383a556cdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208265
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-09 09:33:05 +02:00
Dennis Francis 84129dd550 chart2: draw the correlation circle plot
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>
2026-09-03 19:32:19 +02:00
Dennis Francis b0b4bad01f chart2: add a correlation circle chart type
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
2026-09-03 17:07:43 +02:00
Devansh Varshney ad77e91af6 chart2: expose histogram bin settings in axis dialog
Add histogram binning controls to the Scale page of the primary
X-axis dialog.

Allow selecting automatic binning, fixed bin width, or a fixed
number of bins, together with optional underflow and overflow bins
and validate invalid combinations.

Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Change-Id: Ia1efb0ea64249f0297f00c29f0bee8a4803ca803
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7984
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit f55a6867e1c2b67069d85611dcf25dbed25b85bd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209216
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-01 14:00:30 +02:00
Andrea Gelmini 6bbb5da94b Fix typos
Change-Id: I8c4a063b7a60841db384cd6dfc11f830d371fd00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210153
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-28 17:11:01 +02:00
Andrea Gelmini 824c8c356e Fix typos
Change-Id: I68e74c81e3d53ca83ecb13f916aafdcdde989a02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210044
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-27 20:46:37 +02:00
Kurt Nordback 6d1c73240b Basic fix for funnel chart rendering
Make funnel chart rendering basically correct, with the bars centred and the
correct size. Various details may still be wrong.

Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Change-Id: I9717675366c7449b634358bc05677dd739ab2af3
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7906
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit edac298e6a8f887fa90817331e5a58c84e294316)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209740
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-25 16:46:33 +02:00
Andrea Gelmini 7d28386f54 Fix typos
Change-Id: I2156c901502b3f021d920dbad1e210dc0579fa0b

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209777
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 15:50:42 +02:00
Andrea Gelmini 55033b5609 Fix typos
Change-Id: I79e5658a41993ec00df392cdeb6ef56d9277a04e

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209778
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 15:42:16 +02:00
Kurt Nordback 160014f44b Initial implementation of rendering for funnel charts
Framework for funnel chart rendering. For now this just renders them as
horizontal bar charts: that is, not properly centred as a funnel. UI
functionality is untested and probably broken.

Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Change-Id: I3a0e923b801c840138c90dcf3609253a467d23d1
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7905
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 172e4233b70f1d73ca942876f3f47458843ffa36)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209739
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-25 08:52:54 +02:00
Xisco Fauli 0c91381485 loplugin:unusedmethods
Change-Id: I17586b49f970be17c5f6d2823d4a973521b2ed62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209407
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-21 09:31:35 +02:00
Kurt Nordback f201337f3b tdf#165742 Step 5.11: Don't output empty tick mark tags in chartex
Chartex has different tick mark defaults from old-style charts. Don't
output <cx:majorTickmarks> or <cx:minorTickmarks> when no tick marks are
intended, including if there were no such tags on input.

Change-Id: Ib6caecaca917204ddc99208cbece8f6adff8f5ca
Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3067
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 5353e467dea04ba6b12b616b90e269f0a096375a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208843
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-30 17:13:30 +02:00
Mike Kaganski f7421e4df0 tdf#159450 Keep axis title centered on plot area with data table
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
2026-07-19 02:08:32 +02:00
Xisco Fauli 00aebb5e88 loplugin:unusedmethods
Change-Id: I5eec1b68efc285995db3b5825699c07fa006cb35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207375
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-29 10:16:53 +02:00
Xisco Fauli 667fe200a9 Revert "[API CHANGE] remove deprecated XSpell1 and XSupportedLanguages"
This reverts commit bce4b4af9d.

Reason for revert: Revert it for now until there is a policy
for removal of published APIs

Change-Id: Ia1cbcfcd6b953be48a60d8ef67333b1e3265e563
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207150
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-23 10:58:29 +02:00
Noel Grandin bce4b4af9d [API CHANGE] remove deprecated XSpell1 and XSupportedLanguages
in favour of their replacements XSpell and XSupportedLocales

Change-Id: I3ad20d0c6c3bf0a00d7ef3947705059027a1ff6f
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4228
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 35842d441f2e82204ce77ba8c53735be3f18dc78)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206467
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 14:55:20 +02:00
Caolán McNamara 761f114b87 chart2: include ChartModel.hxx without the leading ../
so an incremental rebuild can fail to resolve it with relative dependency paths

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I796d1ed4fb0c56b71691a43eea6d7f49d5a4ad9f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3989
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit f0bc3a68a2570eb3219371eef3dcd2a35c6d2570)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206199
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-08 11:30:48 +02:00
Devansh Varshney 048b35b49d chart2: Add UI and basic rendering for Histogram chart
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>
2026-05-23 00:09:33 +02:00
Devansh Varshney 2049356d4f chart2: avoid overwriting values-y
Implements a new calculated-y data structure which will be
useful in new chart types like histogram charts where the
axes are modified and hence have to preserve original raw
input values.

Change-Id: I339211d700501f263201a977741206cdb73e1cea
(cherry picked from commit 7bcf35bc40a3d0bb7452cff56c88d8b86c4b2d79)
Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1877
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 48a8b3165c543d1b46b92c1cf4941adc40fc11cd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203687
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-23 00:09:26 +02:00
Caolán McNamara 4f2ea978af crashtesting: skip non-finite values in chart data table view
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
2026-05-09 17:37:53 +02:00
Stephan Bergmann f072c00d6f Fix numeric_limits::min() used as max initial value
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>
2026-05-09 14:17:48 +02:00
Xisco Fauli cfd3309a5d loplugin:unusedmethods
Check existing ones that can be removed

Change-Id: I6ee6fc1772c620ac5d12fea915681b094b7c3bfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204583
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 08:54:45 +02:00
Noel Grandin 4b10710e09 loplugin:passstuffbyref
Change-Id: I559d246b25c99e5cb7a28ba94e04a2acedd3e720
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200943
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-04 19:22:19 +01:00
Tomaž Vajngerl a78b1824a7 chart2: rename SplineCalculater to SplineCalculator
Change-Id: I3745ebcf16c930f4f0aad1ac94af6f615812dcb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199594
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
2026-02-19 14:40:41 +01:00
Noel Grandin 55d8d9f907 tdf#168647 speed up copy of DataTable chart cells
Apply properties in bulk, rather than one at a time.

Takes the copy time from 12s to 8s for me.

Change-Id: Ie341a4a7e84ac3672b220ab846ae453352fd0d71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199623
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-02-19 07:00:49 +01:00
Kurt Nordback ef9c1d57ad tdf#165742 Step 5.4: Add 'unsupported chart type' message
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>
2026-02-12 16:11:54 +01:00
Gabor Kelemen 76eb42c5aa tdf#146619 Use more forward declarations in include/svl
This shaves off some 40M of input

Change-Id: I89411ee8d94963ec6bc16fe155c885d2c78ee3a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198233
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-31 16:36:16 +01:00
Mike Kaganski 3f87466d6d tdf#170386: Delay broadcasting object changes, not drop it
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>
2026-01-28 10:35:53 +01:00
Stephan Bergmann 53e932da93 -Werror,-Wunused-variable
...after 0e7de7e614 "tdf#167883 use
appendTextPortion to construct svx text object"

Change-Id: I3882d6a3852b4e4d30e3406ea5f0b2703afa8f8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198112
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-01-26 08:13:55 +01:00
Noel Grandin 1c7472f60b tdf#167883 use setPropertyValues to set props in bulk
instead of one at a time, which reduces the save time from 34s to 16s.

Change-Id: I3b4cd0afc6851310b20c9333afb2354801fc1290
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197793
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-01-23 08:20:17 +01:00
Noel Grandin 0e7de7e614 tdf#167883 use appendTextPortion to construct svx text object
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>
2026-01-23 08:20:06 +01:00
Noel Grandin e3d0a4c07b rearrange ShapeFactory::createText a little
to simplify and extract common code

Change-Id: I783c9256272253d60c8409338134d422771c2188
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197715
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-01-21 19:15:16 +01:00
Noel Grandin 386e7a4fff tdf#167883 avoid some throw/catch work
which is expensive in high volumes. shaves 5% off save time.

Change-Id: I512e3b0ecf8c8f27dfc549ec9d2c2ad7f5873561
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197708
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-01-21 12:26:41 +01:00
Tomaž Vajngerl f15e0583c2 chart2: Add ComplexColor to many properties of chart elements
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>
2025-12-04 08:21:07 +01:00
Nicu 0f627ec0f0 tdf#163738 Use insert() to add multiple values in containers instead of
a loop

Signed-off-by: Nicu <nicu.coscodan2003@gmail.com>
Change-Id: I484cabfe59e5896e9163120666191e6404647fce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194805
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-11-29 10:21:50 +01:00
Noel Grandin 1bd04a5413 [API CHANGE] remove XPivotTableDataProvider
in favor of a regular C++ interface class, since this is purely used internally to LO

Change-Id: I84991efb1b0c8829e2175dc083b0f8627fcb1712
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194512
Code-Style: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-11-26 10:06:23 +01:00
Tomaž Vajngerl 58d2a68530 tdf#164593 Revert "tdf#82716 Add initial implementation of the His.."
This reverts commit 07ae0e5ada.

As discussed in https://lists.freedesktop.org/archives/libreoffice/2025-November/093988.html

(cherry picked from commit 9693f1461c7d78c7461f8bbd7f421ba8c3f8452b)

Change-Id: Ifd4008d62f9816d995f97104ba432ebc8be89c97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186407
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193983
2025-11-14 08:44:54 +01:00
Sergey Anisimov ea2ecf0406 tdf#145614 - Convert #define to enum or constexpr
Change-Id: Ica8f4afdbb40adb3d26bfc56f4bfc91c110001ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191983
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2025-10-31 17:45:16 +01:00
Noel Grandin 423f95aa13 tdf#168191 Incorrect labels of X-Axis in chart
revert
    commit eeb8ca44ac
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Fri Apr 4 10:02:06 2025 +0200
    tdf#147874 slow sheet switching with large chart2 (2)

Change-Id: I67dcea417be01982b769dd2bea387b4d29f0e732
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190520
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-02 15:46:41 +02:00
Caolán McNamara 248ff6232d crashtesting: fix assert
nNumer is > 0 but isn't less than 8, thinko of mine there

Change-Id: I6e0c5a1f3862b2b0f440092eb39f639e5c70cb18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190145
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-25 00:15:21 +02:00
Caolán McNamara be6015e3c4 cid#1659971 silence Overflowed return value
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
2025-08-20 15:08:44 +02:00
Caolán McNamara eb9056a854 cid#1660249 silence Division or modulo by float zero
Change-Id: Iee59ecdb3bde87efa05257c03d78ef0f77afcff9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189928
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-19 22:31:14 +02:00
Gabor Kelemen 85f88d7196 tdf#146619 Run IWYU on chart2/
Change-Id: I2f0920df37ba14918e1325983309f9b77c8792cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188751
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-08-18 20:19:39 +02:00
Caolán McNamara 23f77eb0e2 cid#1660546 suppress Division or modulo by float zero
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>
2025-08-17 15:34:28 +02:00
Caolán McNamara fc6d103827 cid#1662042 Variable copied when it could be moved
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
2025-08-08 12:35:37 +02:00
Caolán McNamara b1ec05b4b1 cid#1662031 Variable copied when it could be moved
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
2025-08-07 20:51:26 +02:00
Noel Grandin 9b79ae1161 loplugin:blockblock
found with a modified copy of this plugin

Change-Id: Ib2ca97c7479abdf1a375e2700f9c947e1101f0e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188065
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-07-19 19:11:16 +02:00