Commit Graph
8383 Commits
Author SHA1 Message Date
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
Michael Weghorn f1f6a505a0 weld: Pass weld::TextWidget& in text change callback/handler
Switch the weld::Entry and weld::TextView handlers
that are called when the text changes due to user
interaction to pass a weld::TextWidget& param
instead of a weld::Entry& and weld::TextView&
one respectively.
Adjust related methods across the code base accordingly.

This unifies the behavior for both of these
weld::TextWidget subclasses and prepares for
deduplicating the logic and moving it to the
common base class in an upcoming commit.

That will also ensure they stay in sync.
(Change also motivated by the fact that their behavior was
differing before

    Change-Id: I03d2a13cd84d53d806eb9e363f49c4b6be28d938
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jul 9 13:08:58 2026 +0200

        tdf#130857 weld: Don't signal about programmatic TextView text change
.)

Change-Id: I5572fc88caf577fae9a23a39f1ec4f2179935a99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207936
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-10 18:17:27 +02:00
Devansh Varshney 09823632bd chart2: add histogram underflow/overflow bin model support
Add model properties for optional underflow and overflow bins on
histogram chart types, and expose them through the HistogramDiagram
wrapper.

Pass the new settings through the existing histogram pipeline:
HistogramChartType snapshots the properties, HistogramDataSequence keeps
that snapshot, and HistogramCalculator creates optional edge bins around
the normal bin range.

Generated category labels now distinguish special bins from normal ranges,
e.g. "<= 11", "(11-13]", and "> 14".

Add a model-level test that sets fixed bin width together with underflow
and overflow bins, then verifies that the generated bin labels are rebuilt
correctly.

Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Change-Id: I65eac9607daa4f4be6320304c9e9682549f479a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207151
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-29 14:35:14 +02:00
Devansh Varshney 48ef1cbacc chart2: update histogram bins after bin-count changes
HistogramDataSequence snapshots the histogram binning
settings when the calculated-y and category sequences
are created. Rebuild those sequences when BinWidth,
BinCount, or FrequencyType changes, so fixed-bin settings
take effect immediately.

For XLSX import, use the regenerated histogram series
categories as the X axis categories. Keeping the existing
axis categories can preserve stale bin labels, e.g. after
reloading a chart exported with cx:binCount.

Extend the histogram roundtrip test to verify that fixed
bin count creates the expected bin labels after ODF
and XLSX reload.

Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Change-Id: I718bbfe537d847de6c17ea7742a9c4d231b57b7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207007
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-29 14:28:58 +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
Stephan Bergmann e3c26324dd Silence some more bogus -Wrestrict
...that hit at least with GCC 17,

> In file included from ~/gcc/inst/include/c++/17.0.0/memory:71,
>                  from engine/include/sfx2/tabdlg.hxx:22,
>                  from engine/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx:21,
>                  from engine/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx:20:
> In function ‘constexpr _ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const int*, vector<int> >; _ForwardIterator = int*]’,
>     inlined from ‘constexpr _ForwardIterator std::__uninitialized_copy_a(_InputIterator, _Sentinel, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const int*, vector<int> >; _Sentinel = __gnu_cxx::__normal_iterator<const int*, vector<int> >; _ForwardIterator = int*; _Tp = int]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_uninitialized.h:659:32,
>     inlined from ‘constexpr std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::_Alloc_result std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::_M_allocate_and_copy(size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int> >; _Tp = int; _Alloc = std::allocator<int>]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_vector.h:1957:6,
>     inlined from ‘constexpr void std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::_M_replace_with(size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int> >; _Tp = int; _Alloc = std::allocator<int>]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_vector.h:1979:44,
>     inlined from ‘constexpr std::vector<_Tp, _Alloc>& std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::operator=(const std::vector< <template-parameter-1-1>, <template-parameter-1-2> >&) [with _Tp = int; _Alloc = std::allocator<int>]’ at ~/gcc/inst/include/c++/17.0.0/bits/vector.tcc:236:21,
>     inlined from ‘virtual void chart::SchOptionTabPage::Reset(const SfxItemSet*)’ at engine/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx:168:69:
> ~/gcc/inst/include/c++/17.0.0/bits/stl_uninitialized.h:294:31: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing between 9223372032559808516 and 9223372036854775804 bytes at offsets 0 and 0 overlaps 9223372028264841225 bytes at offset 4294967291 [-Werror=restrict]
>   294 |               __builtin_memcpy(std::__niter_base(__result),
>       |               ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   295 |                                std::__miter_base(std::__niter_base(__first)),
>       |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   296 |                                __n * sizeof(_ValT));
>       |                                ~~~~~~~~~~~~~~~~~~~~

and

> In file included from ~/gcc/inst/include/c++/17.0.0/memory:71,
>                  from engine/include/rtl/stringconcat.hxx:20,
>                  from engine/include/rtl/string.hxx:44,
>                  from engine/include/rtl/ustring.hxx:39,
>                  from engine/include/com/sun/star/uno/Type.h:25,
>                  from engine/include/com/sun/star/uno/Sequence.h:25,
>                  from engine/include/com/sun/star/uno/Sequence.hxx:32,
>                  from engine/include/filter/msfilter/mscodec.hxx:22,
>                  from engine/filter/source/msfilter/mscodec.cxx:20:
> In function ‘constexpr _ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const unsigned char*, vector<unsigned char> >; _ForwardIterator = unsigned char*]’,
>     inlined from ‘constexpr _ForwardIterator std::__uninitialized_copy_a(_InputIterator, _Sentinel, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const unsigned char*, vector<unsigned char> >; _Sentinel = __gnu_cxx::__normal_iterator<const unsigned char*, vector<unsigned char> >; _ForwardIterator = unsigned char*; _Tp = unsigned char]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_uninitialized.h:659:32,
>     inlined from ‘constexpr std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::vector(const std::vector< <template-parameter-1-1>, <template-parameter-1-2> >&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_vector.h:678:31,
>     inlined from ‘virtual bool msfilter::MSCodec_CryptoAPI::InitCipher(sal_uInt32)’ at engine/filter/source/msfilter/mscodec.cxx:471:51:
> ~/gcc/inst/include/c++/17.0.0/bits/stl_uninitialized.h:294:31: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372032559808513 or more bytes at offsets 0 and 0 overlaps 9223372028264841219 bytes at offset 4294967294 [-Werror=restrict]
>   294 |               __builtin_memcpy(std::__niter_base(__result),
>       |               ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   295 |                                std::__miter_base(std::__niter_base(__first)),
>       |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   296 |                                __n * sizeof(_ValT));
>       |                                ~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: Ic7474db25c2c88c8796c44a110bdfecca0fa42fa
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4852
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit cf408bbc72fc2cd5d97ea767804f941770f3740c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207167
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-23 12:17:51 +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
Samuel Mehrbrodt fb8ad3985d Prevent warnings "found no inner property set to map to"
The ODF chart export (SchXMLExport::exportTable) and import
(SchXMLTableContext) both read/write "DisableDataTableDialog" on the
chart document, but the wrapper only exposed the inverse
"EnableDataTableDialog". Every access fell through to the
"found no inner property set to map to" warning in WrappedPropertySet
and the table-protected state was silently dropped.

Register "DisableDataTableDialog" as a WrappedIgnoreProperty, matching
the existing treatment of EnableDataTableDialog. Behavior is unchanged
(the flag was already being discarded) but the spurious warnings on
chart save are gone.

Change-Id: I93be0d19872ebbe68994dd88a190c4bf85ef5a78
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1449
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 27ccb0ce32081549f14f51166a4459a8828acd47)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207071
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-06-21 22:13:41 +02:00
Samuel Mehrbrodt 9cb4023fae Downgrade this warning to info
Does not hint at a real bug - still it shows up > 100 times
when saving a writer doc with chart. Silence this.

Change-Id: I6d1d3ce7071a1cdf1474e20db7cbc413521f4272
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1450
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 4d0eb2e9f7f6bf63db2daf7eaa57b16ad29b991c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207072
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-06-21 21:40:13 +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
Arnaud Versini a94bce360d chart2 : use frozen::unordered_map to avoid allocations
Change-Id: I920ed50880c11cf516448fc4197cb86722d5e2f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205674
Tested-by: Jenkins
Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
2026-06-08 08:53:05 +02:00
Devansh Varshney 807f9f4ad6 chart2: Add histogram to UI only in experimental mode
Based on work by Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>.

Change-Id: Iadf124cb82a6952fce3538324528ad56aa273f0d
(cherry picked from commit eb186113209b8012179d2b5c6eac5729876bf61f)
Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1883
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 5bec82ff130a79508b8e205e46085dfa43052d2e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205557
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-05 21:53:33 +02:00
Kurt Nordback 1403eb3621 tdf#165742 Step 5.10a: Only export non-default dataLabels
Don't always output series dataLabels element for chartex. Only output it if
necessary, meaning a non-default value.

Change-Id: Ie47b956cde0337bb82b268725c77d511da981d41
Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2966
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 38af704dc0a8feab90007fbf3cd5388e0efd8294)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206025
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-05 12:02:22 +02:00
Michael Weghorn f26084217a weld: Move weld::Button to own header/Rename weld.hxx
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses.

By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when one class changes.

By now, only weld::Button is left in weld.hxx.
Rename the header to Button.hxx.
Drop weld.hxx includes and instead add Button.hxx
includes (or weld::Button forward declarations) where
weld::Button is used.
(Don't simply replace all weld.hxx includes with
Button.hxx ones, since many of them were for the
use of other widgets that have since been moved
to their own headers.)

Add further includes where needed now that the
(direct or transitive) includes of weld.hxx were removed.

Change-Id: I8ea6201446a418d5e38b46337059dcd517ee29d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-05 07:58:07 +02:00
Michael Weghorn 8b5a46a0e0 weld: Move weld::toId and weld::fromId to weldutils.hxx
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses,
as well as a few helpers.

By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when anything in weld.hxx
changes.

Move the weld::toId and weld::fromId helpers from
weld.hxx to weldutils.hxx, in preparation of getting
rid of weld.hxx altogether in an upcomcing commit.

Change-Id: I408fe20a74ff104cbfe07bde3105317a1922ff61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205936
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-04 14:37:13 +02:00
Michael Weghorn 7c6d496a71 weld: Move weld::TransportAsXWindow to own header/source
This makes it easier to keep an overview and reduces
what needs to be recompiled if the class changes in
the future.

Change-Id: Ie8d0aad9bca3e990f78d4ffc006a04b0a8086fd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205935
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-04 14:36:59 +02:00
Michael Weghorn 8f7cf9c32c weld: Move weld::CheckButton to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Add missing includes/forward declarations in places
previously depending on transitive includes that
are now dropped.

Change-Id: I3215b358e0fa45ffce08756218c386e1a4d7ebc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205928
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-04 08:39:19 +02:00
Michael Weghorn ba7331747f weld: Drop not directly used includes/fwd-decls from weld.hxx
These are not needed inside weld.hxx itself. Instead
add the required includes/forward-declarations to those
files actually needing them, instead of relying on the
now dropped ones.

Change-Id: I5e4cea030867d14057b2bdcc2a2a4cd98843651d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205906
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-04 05:57:14 +02:00
Michael Weghorn da1c7a5459 weld: Move weld::RadioButton to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I34876c5bef75e30e758029b0fe5afeecc92d509d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205903
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-03 23:19:54 +02:00
Michael Weghorn 0bcb591b0c weld: Move weld::TriStateEnabled to own header/source
Move the class definition and implementation out of weld.hxx
and weldutils.cxx into its own header and source file, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I97768bf75dac492e32e1d387853d123481aa643a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205902
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-03 23:19:47 +02:00
Michael Weghorn 243bb112ec weld: Move weld::Container to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Adjust includes in files that were implicitly depending
on transitive includes that are no longer present because
the more specific include/weld/Container.hxx is included
further down now instead of include/weld/weld.hxx.

Change-Id: I04e6bb72ce446b746dfdf88b45c7df9d0ccda473
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205899
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-03 23:19:22 +02:00
Xisco Fauli f436c1cd89 drop isLOKMobilePhone
follow-up of
commit 8b90f2cd18
Author: Heiko Tietze <tietze.heiko@gmail.com>
Date:   Thu May 28 09:05:55 2026 +0200

    Remove wordcount-mobile dialog

This commit also reverts
commit 5eec86d6c4
Author: Caolán McNamara <caolan.mcnamara@collabora.com>
Date:   Tue May 6 16:38:57 2025 +0100

    no searchicon (or searchbox) in mobile version of search dialog

Change-Id: I7dd37f5e6575f2f1b7748ce6c1bd6ddadb8c3e77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205826
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-29 13:38:32 +02:00
Andras Timar 1e14048f3c Fix SIGSEGV in ChartTypeTabPage::stateChanged with null diagram
m_xChartModel->getFirstChartDiagram() can return null; the sibling
code path at line 254 already guards xDiagram before calling
detectScheme() / getPropertyValue(), but stateChanged() at line 179
dereferenced it unconditionally.

Change-Id: I1e6a6ec255b307d829f880f41088fc10d6aeb053
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/2458
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 51d79f2d691f736e5307661c8e3897e1742ffda2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205784
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-28 10:57:06 +02:00
Michael Weghorn 336f70f966 weld: Move weld::Label to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: Ide86f35543468a88288a068cc9f89eaf381ac52f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205763
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-27 22:24:37 +02:00
Kurt Nordback a16459fc63 tdf#165742 Step 5.10: Don't export default shape props
Don't export a series shape properties (spPr) for chartex charts if none was
present on input. Also a basic test for this.

Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2961
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 32886b30c0539bfe1443434beeb1b3b27c93a4a7)
Change-Id: I5daf1d49762fe3b32c1c9254e0792b9eb34494e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205699
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-26 19:48:18 +02:00
Mike Kaganski 79ec708230 Fix --enable-werror gcc build on Linux
... after changes that introduced and used OPropertyContainerHelper.

In file included from /home/mk/core/include/comphelper/propcontainerimplhelper.hxx:18,
                 from /home/mk/core/sc/inc/chartuno.hxx:34,
                 from /home/mk/core/sc/source/ui/unoobj/cellsuno.cxx:83:
/home/mk/core/include/comphelper/propcontainerimplhelper.hxx: In instantiation of ‘class comphelper::OPropertyContainerImplHelper<comphelper::WeakComponentImplHelper<com::sun::star::table::XTableChart, com::sun::star::document::XEmbeddedObjectSupplier, com::sun::star::container::XNamed, com::sun::star::lang::XServiceInfo>, ScChartObj>’:
/home/mk/core/sc/inc/chartuno.hxx:98:14:   required from here
   98 |       public SfxListener
      |              ^~~~~~~~~~~
/home/mk/core/include/comphelper/propimplhelper.hxx:499:1: error: ‘com::sun::star::uno::Any comphelper::OPropertyImplHelper<BaseClass, Ifc>::getFastPropertyValue(sal_Int32) [with BaseClass = comphelper::WeakComponentImplHelper<com::sun::star::table::XTableChart, com::sun::star::document::XEmbeddedObjectSupplier, com::sun::star::container::XNamed, com::sun::star::lang::XServiceInfo>; Ifc = {}; sal_Int32 = int]’ was hidden [-Werror=overloaded-virtual=]
  499 | OPropertyImplHelper<BaseClass, Ifc...>::getFastPropertyValue(sal_Int32 nHandle)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mk/core/include/comphelper/propcontainerimplhelper.hxx:66:10: note:   by ‘void comphelper::OPropertyContainerImplHelper<BaseClass, Derived, Ifc>::getFastPropertyValue(std::unique_lock<std::mutex>&, com::sun::star::uno::Any&, sal_Int32) const [with BaseClass = comphelper::WeakComponentImplHelper<com::sun::star::table::XTableChart, com::sun::star::document::XEmbeddedObjectSupplier, com::sun::star::container::XNamed, com::sun::star::lang::XServiceInfo>; Derived = ScChartObj; Ifc = {}; sal_Int32 = int]’
   66 |     void getFastPropertyValue(std::unique_lock<std::mutex>&, css::uno::Any& rValue,
      |          ^~~~~~~~~~~~~~~~~~~~

and

/home/mk/core/chart2/source/tools/CachedDataSequence.cxx: In copy constructor ‘chart::CachedDataSequence::CachedDataSequence(const chart::CachedDataSequence&)’:
/home/mk/core/chart2/source/tools/CachedDataSequence.cxx:70:51: error: expected class-name before ‘(’ token
   70 |         : comphelper::OPropertyContainerImplHelper(),
      |                                                   ^
/home/mk/core/chart2/source/tools/CachedDataSequence.cxx:69:1: error: base class ‘class comphelper::OPropertyContainerImplHelper<comphelper::WeakComponentImplHelper<com::sun::star::chart2::data::XDataSequence, com::sun::star::chart2::data::XNumericalDataSequence, com::sun::star::chart2::data::XTextualDataSequence, com::sun::star::util::XCloneable, com::sun::star::util::XModifyBroadcaster, com::sun::star::lang::XInitialization, com::sun::star::lang::XServiceInfo>, chart::CachedDataSequence>’ should be explicitly initialized in the copy constructor [-Werror=extra]
   69 | CachedDataSequence::CachedDataSequence( const CachedDataSequence & rSource )
      | ^~~~~~~~~~~~~~~~~~

and similar.

Change-Id: I913e139744a452ea992d9f574997353a760f4722
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/642
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 3917b082b9f4530d305cd947ab47658f6883c4f1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205669
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-25 14:34:21 +02:00
Mike Kaganski f138be4686 Move UncachedDataSequence to use OPropertyContainerImplHelper
Simplifies the implementation, removing boilerplate.

Change-Id: I6746c75ac6a884db525defeb25557d4e8d6f3d03
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/236
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit a0ff800a69ccb7898043c294ba9a13016f176a58)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205659
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-25 14:32:53 +02:00
Mike Kaganski 31fecb70d0 Introduce OPropertyContainerImplHelper as replacement for OPropertyContainer2
Combines OPropertyImplHelper with OPropertyContainerHelper and
OPropertyArrayUsageHelper. Derived classes only need to implement
createArrayHelper() and call registerProperty().

Migrate CachedDataSequence to use it.

Change-Id: I7c9077f412303ab3ba4d2541c2b6673813193d5a
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/235
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 480f2837def56b24b0c3b50dcd559dc785b59631)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205658
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-25 14:32:47 +02:00
Kurt Nordback 0fcb8f99b7 tdf#165742 Step 5.9f: Improve <cx:chartData> handling
Replace some temporary chartex parse and export code to handle chartData more
properly. This now round-trips at least some <cx:f> and <cx:nf> content,
and handles the various *DimensionType values.

Change-Id: Ie91ac845a911c5be1f7ad5d8ed872d091bd6a623
Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2644
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 1d58d04fb96b9bd73affeaecf9d6dee35d6357b5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205578
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-24 01:00:06 +02:00
Devansh Varshney a83694c6ca xmloff: support histogram ODF import and export
Export histogram charts as chart:bar with coext:class="histogram"
and write histogram properties.

Import the histogram class and configuration again recreate the
HistogramChartType, and trigger the histogram template once chart
import is complete so calculated bins, categories, and frequencies
are rebuilt from the preserved raw values-y data.

Change-Id: I202d5666315d4f26da2bf4b3650b4388a9e4fb50
(cherry picked from commit 5fb2f5f2c2676743b823640dbaa02762308d6a54)
Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1880
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit a54fc185d3d73f765bd37cc98df92cac81e01572)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203814
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-23 00:09:47 +02:00
Devansh Varshney 6829e82577 chart2: Implement Scott's Rule and Histogram Data Interpreter
This commit introduces the mathematical backend and data interpreter for
the Histogram chart, replacing the temporary raw value rendering.

- Adds HistogramCalculator, utilizing Scott's Rule to calculate optimal
bin widths and frequencies from raw data.
- Introduces HistogramDataSequence that listens to spreadsheet data
changes and automatically regenerates bin categories and frequencies
- Implements HistogramDataInterpreter to intercept raw values-y input,
and output the results into the calculated-y data sequence.

Change-Id: Iaf29ddd0b0824bd3f0808ffc91321cad9d5b877e
(cherry picked from commit 1ef619a998aba626d0ea7a9541109a7c9e145518)
Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1879
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit df68284255ccac4bd86583555986d9f7cbdddf9a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203747
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-23 00:09:41 +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
Michael Weghorn 9752a52fd3 weld: Move weld::Box to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I0cc1e0f3aa60d3457af0f0f30ec8fe74cb5ce6a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205489
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-22 21:56:54 +02:00
Michael Weghorn 1a3d6d5cdf weld: Move weld::Frame to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: Ia7bc570fcd463d9adcbcdad070250cec5bc3b949
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205488
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-22 21:56:45 +02:00
Michael Weghorn ee7e1d968b weld: Move weld::Scale to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I2e42a2992c08311922451bb01062683bd81954fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205486
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-22 21:56:27 +02:00
Michael Weghorn b2ce99c623 weld: Move weld::Image to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I2eb564b2483b052f01d4af55fd4feb00b5ed6031
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205472
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-22 21:55:53 +02:00
Xisco Fauli fb28678005 loplugin:unusedmethods
Change-Id: If3dae53e3cf16df2d0c505a898138dfa6fe6c0f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205442
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-22 09:32:38 +02:00
Michael Weghorn 3f1fb9d4b0 weld: Move weld::Window to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: If7cb4403f1861c465f44a1cae4065b0bf8dfad48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205323
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-19 09:10:43 +02:00
Kurt Nordback 8bf5b36ce1 tdf#165742 Step 5.9e: Store enumerated geography parameters as enums
The projection type and region type are described in the OOXML spec as
enumerated values. Store them internally as such, converting from string on
input and to string on output.

Change-Id: I5ee9b6996362bf8cc8db28fc921f3b95bfb7ff46
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2065
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 00cb914655c1250656f81eed96ffd9df198387fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204761
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-14 12:54:34 +02:00
Xisco Fauli af909764db cid#1692493: Improper use of negative value
This commit reverts
commit 247b6db3e6
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Wed May 6 12:51:30 2026 +0200

    cid#1692493: Improper use of negative value

Change-Id: I5f5b0b11c95936f4cb688e019925479105012357
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205112
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-12 22:21:12 +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
Andras Timar b8459392b3 chart2: fix crash in ControllerLockGuardUNO with null ChartModel
Many callers pass the result of Chart2ModelContact::getDocumentModel()
which resolves a WeakReference<ChartModel> and can return null if the
model has been destroyed. Add null checks matching the existing pattern
in ControllerLockHelper::lockControllers/unlockControllers.

The crash was caused by a race condition where the ChartModel weak
reference (held in Chart2ModelContact) had expired by the time the
chart wrapper code tried to lock controllers during a Copy operation.
The fix gracefully handles the null case instead of dereferencing
a null pointer.

Change-Id: I43294de12b84cefb062ada12e8a570ad3b7ea571
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200268
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit e819e77fe79e8eb48bb3e977fadaffa9e99786f2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204885
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-08 10:19:43 +02:00
Xisco Fauli 247b6db3e6 cid#1692493: Improper use of negative value
Change-Id: I4881b8afb728b4ce5db0697b67808cd25515e494
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204869
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-08 09:42:46 +02:00
Muhammad Naeem 71aa55e61a tdf#145538: Use range-based loops for palette and range fills
Replace index-only loops where we copy from containers into UNO or
diagram structures using an explicit sequence index / output pointer:

- BasicColorConfig: vector of property keys into Sequence OUString.
- ChartColorScheme: palette colors into uno color sequence buffer.
- RangeHighlighter: HighlightedRange list from OUString vectors.

Verified: make -j4 basctl chart2
Change-Id: If4a4a8747fadc772329d3ccc3f03778406b140ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204659
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-05-06 18:15:36 +02:00
Andras Timar 2911c8099d Fix SIGSEGV in ChartTypeDialogController with null ChartTypeManager
The crash occurs in getCurrentTemplate() when xTemplateManager is null
and xTemplateManager->createTemplate() dereferences it at address 0x40
(the offset of m_xContext within the ChartTypeManager object).

The ChartTypeManager can be null in two scenarios:

1. The ChartModel copy constructor has never initialized
   m_xChartTypeManager - even before commit aa06241b9c (2022,
   "use more concrete types in chart2, ChartTypeManager"), the old
   CreateRefClone returned null because ChartTypeManager does not
   implement XCloneable.

2. More importantly for this crash: the ChartModel may have been
   disposed (which clears m_xChartTypeManager) while the chart type
   wizard dialog is still active. In the LOK/COOL async dialog
   environment, rapid InsertObjectChart commands can race, disposing
   the first chart's model while its wizard still holds a reference.

Add a null guard on xTemplateManager before dereferencing.  The caller
commitToModel() already handles a null return from getCurrentTemplate()
via its if(!xTemplate.is()) return check.

Change-Id: I3f8e8e91a4d77c12a3c05a5e09b12a4a9e028f65
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/942
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1444
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 77f8b95d0af914f54a42206e567a50f09bee0f67)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204806
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-06 09:39:14 +02:00
Andras Timar 490e58d977 Fix SIGSEGV in ChartController::getFirstDiagram with null model
getFirstDiagram() unconditionally dereferences getChartModel()
without checking for null. In a multi-view LOKit scenario, the chart
model can be detached while an async dialog (e.g. InsertRemoveAxes)
is open. When the dialog callback fires, getChartModel() returns null
and the subsequent ->getFirstChartDiagram() dereferences it,
crashing at offset 0x280.

Add a null check for the model before dereferencing.

Change-Id: Iabd7efd1d752c28cdcc9182669797b863a7a5306
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200726
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 5322a8522224ef4432754e9004ed64257794883a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204807
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-05 22:54:37 +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