Commit Graph
25830 Commits
Author SHA1 Message Date
Michael Weghorn 0d237be3f8 vcl: Merge the two SystemWindow::GetWindowState variants
After previous commit

    Change-Id: Iea0a2d64a552ff27ff5f8595f6d4379b6b224f94
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 15 21:50:13 2026 +0200

        vcl: Consolidate SystemWindow::GetWindowState callers

, only the variant directly returning the vcl::WindowData
is used outside of the class.

Cosolidate the two methods by merging them.

Change-Id: I0fb094a8ed583a9700ff64e34ebce86826320aa4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208172
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-19 19:30:51 +02:00
Michael Weghorn 3471de2f73 vcl: Consolidate SystemWindow::GetWindowState callers
Switch/Simplify the 2 remaining callers of the variant with the
vcl::WindowData in/out param to use the one that takes the mask
and returns the vcl::WindowData.

Make the other variant private as it's by now only used
inside of the SystemWindow class itself.

Change-Id: Iea0a2d64a552ff27ff5f8595f6d4379b6b224f94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208171
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-19 19:30:44 +02:00
Christopher Sherlock 9a3ad0812d vcl: simplify B2DPolygon scaling and fix asymmetric DPI issues
Simplifies OutputDevice::ImplLogicToDevicePixel for B2DPolygons by
delegating coordinate transformation to the CoordinateMapper. By using
LogicToDevicePixelX and LogicToDevicePixelY, we eliminate redundant
if/else branching and ensure that window and pixel offsets are
consistently applied across both axes.

This refactoring also addresses systemic X/Y scaling mix-ups where the
horizontal scaler was being used for vertical coordinates, a bug
identified through failures in PDF export integration tests.

Changes:
* Simplified B2DPolygon transformation loop in map.cxx.
* Removed private visibility (SAL_DLLPRIVATE) from the B2DPolyPolygon
  overload of LogicToPixel to allow for external unit testing.
* Added a new unit test fixture 'testB2DPolygonAsymmetricDPI' in
  vclmaptest.cxx to verify scaling accuracy on asymmetric displays
  (e.g., 100x200 DPI) and prevent future axis-specific regressions.

Change-Id: I718df9af8e5d8b2a446be74223047bdaa20ed148
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207555
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-07-16 13:47:42 +02:00
Dan Williams 8976d67f50 vcl/osx: work around "UInt" name conflict between macOS and Qt6
qdebug.h defines UInt but so do some Mac kernel headers.

Change-Id: I9f2885035129c47f77c3a6c61250026f000135bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207982
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-07-15 20:54:52 +02:00
Dan Williams ddfc4058cf vcl/qt: enable Qt6 plugin for Mac
Change-Id: Ia42b606681c70e1bd7426a830e6a063acd32c826
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207980
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-07-15 16:51:07 +02:00
Michael Weghorn fdaffd9aa6 vcl: Make WindowData ctor taking string explicit
Usually, vcl::WindowData should be used directly
now, see also previous commit

    Change-Id: I5bc4caeb49d0ab2bbc4fa597a5ef19d86d3aac2c
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Jul 14 21:23:36 2026 +0200

        Use vcl::WindowData instead of string for window state in more places

. For those cases where a WindowData object shall be created
from a string object, don't implicitly do it, but require to
call the ctor explicitly.

(Nothing is currently implicitly doing it anyway.)

Change-Id: Iac18cda2c8674757a8be724fad80e6ae55101e39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208126
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-15 14:46:06 +02:00
Michael Weghorn c8c367b31a Use vcl::WindowData instead of string for window state in more places
vcl::WindowData is used to manage/store various state
information for windows. It can be (de)serialized to/from string.

So far, both the weld::Window API to get/set window state
as well as the SvtViewOptions API were based on the string
representation.

Switch those and various related places to using vcl::WindowData
instead to use a stronger/more specific type than just OUString
in various places across the code base.

Do the string (de)serialization where necessary, but otherwise
prefer to use vcl::WindowData directly.

Calling weld::Window::set_window_state with a WindowData
param that doesn't indicate that anything should be set
(i.e. whose mask is vcl::WindowDataMask::NONE) should
have no effect, so drop extra checks that were previously
checking whether the string representation was empty
and skipping the call to weld::Window::set_window_state in
that case.

No change in user-observable behavior intended or
seen in a quick test.

Change-Id: I5bc4caeb49d0ab2bbc4fa597a5ef19d86d3aac2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208125
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-15 14:45:49 +02:00
Michael Weghorn 312aac710b Move SvtViewOptions from unotools to svtools
The SvtViewOptions class is used to store the state
of windows/dialogs.

So far, SvtViewOptions::SetWindowState and
SvtViewOptions::GetWindowState are string-based
and the callers are responsible for (de)serializing
the vcl::WindowData to/from string.

This will be changed to become the responsibility
of SvtViewOptions in an upcoming commit.

Since unotools is below vcl in the module
dependency chain, it cannot make use of vcl,
i.e. vcl::WindowData couldn't be used there.

Therefore, move SvtViewOptions from unotools
to svtools, which is above vcl in the module
dependencies.
(svtools/README.md summarizes the purpose of the
module as "Tools on the Top of VCL", which seems
an appropriate place for helper code to manage
the state/options for dialogs, tab pages,...)

Change-Id: If849224c35c7ac895659ddb7c17e6d17061d61a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208124
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-15 14:45:41 +02:00
Michael Weghorn 85d059629c unotools: Use #pragma once in viewoptions.hxx
Change-Id: Ibceaed7015209f37a45b6574e620e1d26b1053b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208123
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-15 14:45:32 +02:00
Michael Weghorn b64dfb0408 sfx2: Prefix SfxChildWindow members with "m_"
Use the usual "m_" naming prefix for class members,
to distinguish them from local variables.

Change-Id: I4bdf9e274d43a87e93c558dda3c942fe0c7d707f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208120
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-15 14:45:24 +02:00
Michael Weghorn 674699caea sfx2: Drop leftover comment for removed SfxChildWindow member
This looks like the second half of the comment for the
SfxChildWindow::pContext member removed in commit

    commit feb8164afa
    Date:   Tue Mar 9 20:22:37 2021 +0000

        drop newly unused code and macros

Drop the obsolete comment as well.

Change-Id: I350f8f331cfc0b85eaa4da91bdb983be653090aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208119
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-15 14:45:16 +02:00
Michael Weghorn 6427a84e90 sfx2: Prefix SfxDockingWindow members with "m_"
Use the usual naming prefix for class members,
to distinguish them from local variables.

Change-Id: I7f2ab60cb32d7166c3e05ad34bb5820363c98066
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208118
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-15 14:45:08 +02:00
Michael Weghorn 008d353453 sfx2: Pass SfxChildWindow::CreateChildWindow bindings param by ref
The only caller passes non-null SfxBindings.
Switch the param from pointer to ref, which
allows to drop some logic handling the null case.

Change-Id: I05fa77dafcbeac804dd0b70d2fd28bb25a83dadf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208117
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-15 14:44:59 +02:00
Neil Roberts 2365c64aa3 comphelper: Add helpers for accessing duck-typed methods of XBrowseNode
Implementations of XBrowseNode have a bunch of extra methods which are
accessed by using XPropertySet::getPropertyValue to determine if the
action is possible and then XInvocation::invoke to invoke it. This patch
adds wrappers around checking and invoking these methods. The idea is to
abstract away the actual implementation so that the approach can be
changed in a later patch.

Change-Id: I117ab848391dbb1277f9331d6a93f71c2cb556ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207343
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-07-15 09:05:13 +02:00
ApurvR20 3ee90bca13 tdf#143148: Use pragma once instead of include guards
Change-Id: If630c4e4c66cebb05751bd857ec948fc6f2a5a6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208035
Reviewed-by: Roman Kuznetsov <antilibreoffice@gmail.com>
Tested-by: Jenkins
2026-07-14 13:34:07 +02:00
Caolán McNamara 95045fb7d5 put links in form imagecontrols under link management
Change-Id: I265f889bcfdcf1b214cde02e9e5799081ec6aa42
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2396
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 01a314d398a497e01d0b9e4b575f3b7c842b8622)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206343
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-14 13:26:15 +02:00
Khaled Hosny ef3c39851d vcl: Rename Font::Set/GetAverageFontWidth to Set/GetFontWidth
It is a misnomer now, so return to the original name.

Also drop the redundant private Font::GetAverageFontSize().

Change-Id: I67495fa675091b459a4e90ac09665489cc61fdd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207991
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-14 00:16:59 +02:00
Khaled Hosny ed9e0a730e tdf#172647: Respect when building embedded font URL
Without that, subfamilies that has the same weight and italic will get
the same file URL.

Change-Id: If698b137d0f9ce478bed99bbc091963b02b82619
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207553
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-14 00:16:00 +02:00
Khaled Hosny b99991ff8d tdf#172647: Store font’s typographic name in the editeng model
Rewrite font family and subfamily to use typographic names if they are
using legacy names, so we can elsewhere always assume typographic names
are used.

Change-Id: I8db2d4cf801c50794ff38b7d9e6d8419e66f5680
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207547
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-14 00:14:45 +02:00
Khaled Hosny 2ce2aafc65 tdf#172647: Resolve and match fonts by their typographic names
Identify a font by its typographic family (name ID 16) and subfamily
(name ID 17), falling back to legacy names (name ID 1 and 2), so we can
interoperate with systems that use legacy names, while using typographic
names internally.

Change-Id: Ie51c8c14fe91e7e314d9a4b4808485ea4483b524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207546
Tested-by: Khaled Hosny <khaled@libreoffice.org>
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-14 00:14:34 +02:00
Caolán McNamara 0500f647f3 crashtesting: fix ScLet/ScLambda crashes on a non-name parameter token
ScLet and ScLambda read the parameter-name token's string without checking
GetType() first, so a token that isn't a string name faults on load, e.g.
forums/xlsx/forum-mso-en4-789942.xlsx:

  #0  rtl::str::acquire (pThis=0x20d) at sal/rtl/strtmpl.hxx:735
  #6  std::vector<OUString>::push_back
  #8  ScInterpreter::ScLet at sc/source/core/tool/interpr1.cxx:10938
  #9  ScInterpreter::DispatchOpCode (eOp=ocLet)
  #13 ScFormulaCell::MaybeInterpret
  #15 ScCellFormat::GetString
  #17 ScColumn::GetRangeScriptType
  #24 GetOptimalHeightsInColumn

ScLet used to have this check until it was rewritten, the new ScLambda
never had it, since:

commit 6ad6aebb83305608788c878909cd77c29b298271
Date:   Sat Jun 20 23:50:39 2026 -0400

    Implemented LAMBDA and ISOMITTED for Calc

use the same fix as:

commit 4f5764a223f86ceea1eca70cbec55eb8aebea1f3
Date:   Tue May 5 11:45:29 2026 +0100

    crashtesting: fix ScLet/ScMatch/IterateParametersIf[s] crashes

Add a GetStringNameToken() helper for this and use it in ScLet, ScLambda
and the dynamic_cast calls in callable.cxx.

see also:

commit 65da502b7b40bd3bcad0cfd146716e815c72d48d
Date:   Thu Apr 16 12:31:01 2026 +0200

    reduce virtual calling in String*Token

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I7ce591bf5e53538aa947fafa9607b7339d715aaa
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6107
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 8b1f9cc417d914d72ea223815e8306bcb07299ec)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207977
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-12 17:52:48 +02:00
Tomaž Vajngerl d9241ddd7a Import optional LAMBDA parameters written with the _xlop. prefix
The OOXML format marks an optional LAMBDA parameter with the _xlop.
prefix in the parameter list, while the body refers to the same
parameter through the _xlpm. prefix. Calc recognised only _xlpm., so an
optional parameter kept its prefix, did not match the bare name used in
the body, and lost the mark that made it optional. It failed to bind,
and a call that left it out reported an error.

Recognise _xlop. as a parameter marker and strip it to the bare name, so
the declaration and the body references match. Carry the optional mark
onto the parameter token so the compiled code treats it the same way as
the native square-bracket form.

Write an optional parameter back with the marker the grammar uses: the
_xlop. prefix in OOXML and square brackets in the native grammars.

Add a test that imports an optional parameter in the OOXML form and
checks that ISOMITTED sees it as omitted and that concatenating it
yields the other operand.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ia1df0fa6ca498f4c607507b3a865b3b367e5c11a
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5782
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit f198d7a984654aabd5e988d3c327da5552bc68e0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207891
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-12 14:24:34 +02:00
Ben Urban 97b180f071 tdf#138749: Implemented support for optional parameters for LAMBDA
LAMBDA now supports optional parameters with the [name] syntax; all
such parameters must appear after all required parameters in the
parameter list.

Optional parameters use svMissing, for compatibility with ISOMITTED.

Change-Id: Ice026eeb6937dadd3b1ffd8c07e0d3ce88de9afc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207392
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-12 14:23:51 +02:00
Michael Weghorn 359132df0f weld: Unify/deduplicate Entry/TextView text change signalling
weld::Entry and weld::TextView are implementing the
same logic for calling a callback/handler when the
text changes.

Now that

    Change-Id: I5572fc88caf577fae9a23a39f1ec4f2179935a99
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jul 9 14:04:00 2026 +0200

        weld: Pass weld::TextWidget& in text change callback/handler

has prepared for that step, deduplicate the logic by
moving it to the shared weld::TextWidget base class,
which will also make sure the logic stays in sync
for both classes.

Change-Id: I69d4b85923fea05383c78f9145fee72b2bd62684
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-10 18:17:36 +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
Michael Weghorn 33f87e112a tdf#130857 weld: Don't signal about programmatic TextView text change
As is the case in other weld methods, signals about
the change of the weld::TextView text are not supposed to be
emitted when the change happens programatically and not by manual
user interaction.

Therefore, check in weld::TextView::signal_changed
whether notifications are currently disabled, and only
call the callback if that's not the case.

This aligns the behavior of the Qt implementation
with the other ones. (For example for the gtk implementation,
the call to GtkInstanceEditable::disable_notify_events
in GtkInstanceEditable::do_set_text would already
prevent signals from being emitted when the text is
set programmatically.)

This also matches the implementation for weld::Entry::signal_changed.

Without this commit in place, the user list treeview in
the Calc "Sort Lists" option page would be disabled/greyed out in
a WIP branch with the qt6 vcl plugin where support for using native
Qt widgets is enabled, while that's not the case for gtk3 or the
gen vcl plugin.

The tab page can be triggered like this:

* start Calc
* insert something into cells A1:B2
* select cells A1:B2
* "Tools" -> "Options..."
* "LibreOfficeDev Calc" -> "Sort Lists"

Backtrace showing how setting the text (frame 35)
previously resulted in the signal getting emitted
(frame 5) for that case and how that would result
in the treeview being set to disabled (frame 1):

    1 QtInstanceWidget::set_sensitive QtInstanceWidget.cxx 47 0x7f9c33f3cfd0
    2 ScTpUserLists::EdEntriesModHdl tpusrlst.cxx 711 0x7f9b4302aa5b
    3 ScTpUserLists::LinkStubEdEntriesModHdl tpusrlst.cxx 688 0x7f9b4302659d
    4 Link<weld::TextView&, void>::Call link.hxx 105 0x7f9c33eff711
->  5 weld::TextView::signal_changed TextView.hxx 25 0x7f9c33eff3bc
    6 QtInstanceTextView::handleTextChanged QtInstanceTextView.cxx 206 0x7f9c33ef994d
    7 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceTextView:: *)()>::call(void (QtInstanceTextView:: *)(), QtInstanceTextView *, void * *)::{lambda()#1}::operator()() const qobjectdefs_impl.h 128 0x7f9c33effb31
    8 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceTextView:: *)()>::call(void (QtInstanceTextView:: *)(), QtInstanceTextView *, void * *)::{lambda()#1}>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceTextView:: *)()>::call(void (QtInstanceTextView:: *)(), QtInstanceTextView *, void * *)::{lambda()#1}&&) qobjectdefs_impl.h 66 0x7f9c33effa69
    9 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceTextView:: *)()>::call(void (QtInstanceTextView:: *)(), QtInstanceTextView *, void * *) qobjectdefs_impl.h 127 0x7f9c33eff99b
    10 QtPrivate::FunctionPointer<void (QtInstanceTextView:: *)()>::call<QtPrivate::List<>, void>(void (QtInstanceTextView:: *)(), QtInstanceTextView *, void * *) qobjectdefs_impl.h 175 0x7f9c33eff91d
    11 QtPrivate::QCallableObject<void (QtInstanceTextView:: *)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *) qobjectdefs_impl.h 546 0x7f9c33eff846
    12 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 462 0x7f9c32cefc02
    13 doActivate<false> qobject.cpp 4406 0x7f9c32f23d2c
    14 QMetaObject::activate qobject.cpp 4467 0x7f9c32f19cd3
    15 QPlainTextEdit::textChanged moc_qplaintextedit.cpp 371 0x7f9c311ef4d6
    16 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QPlainTextEdit:: *)()>::call(void (QPlainTextEdit:: *)(), QPlainTextEdit *, void * *)::{lambda()#1}::operator()() const qobjectdefs_impl.h 128 0x7f9c311fa5e5
    17 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QPlainTextEdit:: *)()>::call(void (QPlainTextEdit:: *)(), QPlainTextEdit *, void * *)::{lambda()#1}>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QPlainTextEdit:: *)()>::call(void (QPlainTextEdit:: *)(), QPlainTextEdit *, void * *)::{lambda()#1}&&) qobjectdefs_impl.h 66 0x7f9c311fa56d
    18 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QPlainTextEdit:: *)()>::call(void (QPlainTextEdit:: *)(), QPlainTextEdit *, void * *) qobjectdefs_impl.h 127 0x7f9c311fa52f
    19 QtPrivate::FunctionPointer<void (QPlainTextEdit:: *)()>::call<QtPrivate::List<>, void>(void (QPlainTextEdit:: *)(), QPlainTextEdit *, void * *) qobjectdefs_impl.h 175 0x7f9c311fa4a1
    20 QtPrivate::QCallableObject<void (QPlainTextEdit:: *)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *) qobjectdefs_impl.h 546 0x7f9c311fa3cb
    21 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 462 0x7f9c32cefc02
    22 doActivate<false> qobject.cpp 4406 0x7f9c32f23d2c
    23 QMetaObject::activate qobject.cpp 4467 0x7f9c32f19cd3
    24 QWidgetTextControl::textChanged moc_qwidgettextcontrol_p.cpp 406 0x7f9c312456f6
    25 QWidgetTextControlPrivate::setContent qwidgettextcontrol.cpp 485 0x7f9c31245136
    26 QWidgetTextControl::setPlainText qwidgettextcontrol.cpp 1189 0x7f9c3124ca04
    27 QPlainTextEdit::setPlainText qplaintextedit.cpp 1621 0x7f9c311f1005
    28 QtInstanceTextView::do_set_text(rtl::OUString const&)::$_0::operator()() const QtInstanceTextView.cxx 39 0x7f9c33efbde6
    29 std::__invoke_impl<void, QtInstanceTextView::do_set_text(rtl::OUString const&)::$_0&>(std::__invoke_other, QtInstanceTextView::do_set_text(rtl::OUString const&)::$_0&) invoke.h 63 0x7f9c33efbd95
    30 std::__invoke_r<void, QtInstanceTextView::do_set_text(rtl::OUString const&)::$_0&>(QtInstanceTextView::do_set_text(rtl::OUString const&)::$_0&) invoke.h 113 0x7f9c33efbd45
    31 std::_Function_handler<void(), QtInstanceTextView::do_set_text(rtl::OUString const&)::$_0>::_M_invoke std_function.h 292 0x7f9c33efbc5d
    32 std::function<void()>::operator() std_function.h 593 0x7f9c33e30bae
    33 QtInstance::RunInMainThread QtInstance.cxx 216 0x7f9c33e2836f
    34 QtInstanceTextView::do_set_text QtInstanceTextView.cxx 39 0x7f9c33efa26a
->  35 weld::TextWidget::set_text TextWidget.cxx 27 0x7f9c3d8ea1a1
    36 ScTpUserLists::UpdateEntries tpusrlst.cxx 289 0x7f9b430270c3
    37 ScTpUserLists::LbSelectHdl tpusrlst.cxx 461 0x7f9b4302a7b3
    38 ScTpUserLists::LinkStubLbSelectHdl tpusrlst.cxx 443 0x7f9b4302653d
    39 Link<weld::ItemView&, void>::Call link.hxx 105 0x7f9c3d8e6f01
    40 weld::ItemView::signal_selection_changed ItemView.cxx 25 0x7f9c3d8e6578
    41 QtInstanceItemView::handleSelectionChanged QtInstanceItemView.cxx 266 0x7f9c33eb376d
    42 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceItemView:: *)()>::call(void (QtInstanceItemView:: *)(), QtInstanceItemView *, void * *)::{lambda()#1}::operator()() const qobjectdefs_impl.h 128 0x7f9c33eba8c1
    43 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceItemView:: *)()>::call(void (QtInstanceItemView:: *)(), QtInstanceItemView *, void * *)::{lambda()#1}>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceItemView:: *)()>::call(void (QtInstanceItemView:: *)(), QtInstanceItemView *, void * *)::{lambda()#1}&&) qobjectdefs_impl.h 66 0x7f9c33eba859
    44 QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtInstanceItemView:: *)()>::call(void (QtInstanceItemView:: *)(), QtInstanceItemView *, void * *) qobjectdefs_impl.h 127 0x7f9c33eba81b
    45 QtPrivate::FunctionPointer<void (QtInstanceItemView:: *)()>::call<QtPrivate::List<>, void>(void (QtInstanceItemView:: *)(), QtInstanceItemView *, void * *) qobjectdefs_impl.h 175 0x7f9c33eba79d
    46 QtPrivate::QCallableObject<void (QtInstanceItemView:: *)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *) qobjectdefs_impl.h 546 0x7f9c33eba6c6
    47 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 462 0x7f9c32cefc02
    48 doActivate<false> qobject.cpp 4406 0x7f9c32f23d2c
    49 QMetaObject::activate qobject.cpp 4467 0x7f9c32f19cd3
    50 QMetaObject::activate<void, QItemSelection, QItemSelection> qobjectdefs.h 320 0x7f9c3340a2b5
    51 QItemSelectionModel::selectionChanged moc_qitemselectionmodel.cpp 389 0x7f9c333fd106
    52 QItemSelectionModel::emitSelectionChanged qitemselectionmodel.cpp 2034 0x7f9c333fefbf
    53 QItemSelectionModel::select qitemselectionmodel.cpp 1380 0x7f9c333fe889
    54 QTreeViewPrivate::select qtreeview.cpp 4039 0x7f9c3146d62c
    55 QTreeView::setSelection qtreeview.cpp 2430 0x7f9c3146cdee
    56 QAbstractItemView::mousePressEvent qabstractitemview.cpp 1886 0x7f9c3134de3a
    57 QTreeView::mousePressEvent qtreeview.cpp 2009 0x7f9c314696dc
    58 QWidget::event qwidget.cpp 8989 0x7f9c30e75b91
    59 QFrame::event qframe.cpp 522 0x7f9c30f2ed98
    60 QAbstractScrollArea::viewportEvent qabstractscrollarea.cpp 1068 0x7f9c30f28c77
    61 QAbstractItemView::viewportEvent qabstractitemview.cpp 1826 0x7f9c3134d7a5
    62 QTreeView::viewportEvent qtreeview.cpp 1339 0x7f9c314650ef
    63 QAbstractScrollAreaPrivate::viewportEvent qabstractscrollarea_p.h 75 0x7f9c30f2bf0d
    64 QAbstractScrollAreaFilter::eventFilter qabstractscrollarea_p.h 88 0x7f9c30f2ab92
    65 QCoreApplicationPrivate::sendThroughObjectEventFilters qcoreapplication.cpp 1266 0x7f9c32e3c82d
    66 QApplicationPrivate::notify_helper qapplication.cpp 3258 0x7f9c30db3e9e
    67 QApplication::notify qapplication.cpp 2744 0x7f9c30db5b5c
    68 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1129 0x7f9c32e3c329
    69 QCoreApplication::sendSpontaneousEvent qcoreapplication.cpp 1588 0x7f9c32e3d029
    70 QApplicationPrivate::sendMouseEvent qapplication.cpp 2343 0x7f9c30db47e3
    71 QWidgetWindow::handleMouseEvent qwidgetwindow.cpp 696 0x7f9c30eb5afd
    72 QWidgetWindow::event qwidgetwindow.cpp 301 0x7f9c30eb4167
    73 QApplicationPrivate::notify_helper qapplication.cpp 3264 0x7f9c30db3ec0
    74 QApplication::notify qapplication.cpp 3214 0x7f9c30db7dbf
    75 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1129 0x7f9c32e3c329
    76 QCoreApplication::sendSpontaneousEvent qcoreapplication.cpp 1588 0x7f9c32e3d029
    77 QGuiApplicationPrivate::processMouseEvent qguiapplication.cpp 2513 0x7f9c31c7a4f7
    78 QGuiApplicationPrivate::processWindowSystemEvent qguiapplication.cpp 2237 0x7f9c31c79631
    79 QWindowSystemInterface::sendWindowSystemEvents qwindowsysteminterface.cpp 1112 0x7f9c31d67d8d
    80 userEventSourceDispatch qeventdispatcher_glib.cpp 39 0x7f9c325d210b
    81 g_main_dispatch gdb 0x7f9c377065ce
    82 g_main_context_iterate_unlocked.isra gdb 0x7f9c3770995f
    83 g_main_context_iteration gdb 0x7f9c3770a0f0
    84 QEventDispatcherGlib::processEvents qeventdispatcher_glib.cpp 402 0x7f9c334d8f6b
    85 QPAEventDispatcherGlib::processEvents qeventdispatcher_glib.cpp 90 0x7f9c325d1f08
    86 QEventLoop::processEvents qeventloop.cpp 109 0x7f9c32e57600
    87 QEventLoop::exec qeventloop.cpp 198 0x7f9c32e57853
    88 QDialog::exec qdialog.cpp 588 0x7f9c31279640
    89 QtInstanceDialog::run QtInstanceDialog.cxx 152 0x7f9c33e88644
    90 weld::DialogController::run DialogController.cxx 18 0x7f9c3d8e384e
    91 OfaTreeOptionsDialog::run treeopt.cxx 2499 0x7f9b43bef7e7
    92 vcl::AbstractDialogImpl_BASE<VclAbstractDialog, OfaTreeOptionsDialog, std::unique_ptr, false>::Execute abstdlgimpl.hxx 46 0x7f9b43a54e21
    93 SfxApplication::OfaExec_Impl appserv.cxx 1672 0x7f9c42a948df
    94 SfxStubSfxApplicationOfaExec_Impl sfxslots.hxx 1316 0x7f9c42a6c365
    95 SfxDispatcher::Call_Impl dispatch.cxx 258 0x7f9c42bc48ee
    96 SfxDispatcher::Execute_ dispatch.cxx 757 0x7f9c42bc8fb6
    97 SfxBindings::Execute_Impl bindings.cxx 1047 0x7f9c42bb0e6e
    98 SfxDispatchController_Impl::dispatch unoctitm.cxx 737 0x7f9c42c8d07d
    99 SfxOfficeDispatch::dispatch unoctitm.cxx 256 0x7f9c42c8bb34
    100 framework::(anonymous namespace)::AsyncMenuExecute menubarmanager.cxx 793 0x7f9c44154fe4
    101 Link<void *, void>::Call link.hxx 105 0x7f9c3ceaaf91
    102 ImplHandleUserEvent winproc.cxx 2314 0x7f9c3cea68d1
    103 ImplWindowFrameProc winproc.cxx 2871 0x7f9c3cea37ff
    104 SalFrame::CallCallback salframe.hxx 311 0x7f9c33e094ec
    105 QtInstance::ProcessEvent QtInstance.cxx 562 0x7f9c33e2b1cf
    106 SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const salusereventlist.cxx 119 0x7f9c3d479cfd
    107 SalUserEventList::DispatchUserEvents salusereventlist.cxx 120 0x7f9c3d479bd4
    108 QtInstance::ImplYield QtInstance.cxx 456 0x7f9c33e27b31
    109 QtInstance::DoYield QtInstance.cxx 478 0x7f9c33e2ad91
    110 InnerYield svapp.cxx 389 0x7f9c3d545b76
    111 Application::Yield svapp.cxx 502 0x7f9c3d5453ff
    112 Application::Execute svapp.cxx 364 0x7f9c3d5451e0
    113 desktop::Desktop::Main app.cxx 1679 0x7f9c46f1f0f5
    114 ImplSVMainRun svmain.cxx 234 0x7f9c3d56ed5c
    115 SalInstance::SVMainRun salinst.hxx 108 0x7f9c33e33281
    116 ImplSVMain svmain.cxx 221 0x7f9c3d56e282
    117 SVMain svmain.cxx 252 0x7f9c3d56fe19
    118 soffice_main sofficemain.cxx 122 0x7f9c46f9916a
    119 sal_main main.c 51 0x55e2df71b9fd
    120 main main.c 49 0x55e2df71b9d7

With this commit in place, the issue is gone and the
treeview can be interacted with as expected also for
the case of qt6 with native Qt widgets.

Change-Id: I03d2a13cd84d53d806eb9e363f49c4b6be28d938
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207926
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-10 14:26:26 +02:00
Dan Williams c595016047 Remove unused Reset buttons from various dialogs
These dialogs hide the standard Reset button that SfxTabDialogController
adds to dialogs. Instead of doing that, let's just not create a button
that has to be hidden in the first place.

Dialogs can be accessed via:

New Base doc -> Edit -> Database -> Advanced Settings...
New Base doc -> Tools -> User Administration...
New Base doc -> Edit -> Database -> Properties...
New <any> doc -> Export as... -> Export as PDF...
New Writer doc -> Insert -> Footnote and Endnote -> Footnote
  then right-click in the footnote area -> Footnote/Endnote Settings...

Change-Id: I06ed3ff8f70db9eb081e654d2f73deda480c3322
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207236
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-10 13:32:14 +02:00
Tomaž Vajngerl 6612d4f785 sc: add the # postfix operator for spilled-range references
A1# is the postfix counterpart of the @ prefix. When A1 is
the origin of a dynamic-array formula spilled into A1:A4, A1#
refers to the whole spill range, so SUM(A1#) totals the four
values and ROWS(A1#) returns 4.

The new opcode ocSpill sits in the unary-operator range. The
tokenizer produces it from a bare # after a reference or
value. Otherwise # stays the start of a #REF! or #NAME!
token. The compiler routes it through PostOpLine so it
follows its operand in the RPN.

ScSpilledRange pushes the spill range as an ScMatrixRangeToken
so aggregating functions see the whole range, and ISREF
reports it as a reference. A master yields its matrix. A
plain number, string, or non-master matrix slot yields the
the cell value.

A freshly typed =A1# counts as an array result, so it
promotes to a dynamic-array master and spills again. A cell
that does not promote collapses the range by implicit
intersection to the row-aligned value, or #VALUE! outside the
range, keeping that cell's number format.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Idf2752af3f7575f6bc95b940344aa365415e4a2f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5785
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 9b97b0fc91bce4b8726ea210347e8ea84270e148)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207904
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-10 01:08:46 +02:00
Ben Urban 76c9c81b02 Implemented functions which rely on callables
Add BYCOL(tdf#164508), BYROW(tdf#164509), MAKEARRAY(tdf#164511),
MAP(tdf#164512), REDUCE(tdf#164513), SCAN(tdf#161428) formula
functions, which are usually used together with LAMBDA and are
important for interoperability with other Office suites.

Change-Id: I7eb5a992a113638fdadf0cf61592c082094fb44f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205979
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-09 08:44:48 +02:00
Ben Urban 331e346fb1 Implemented LAMBDA and ISOMITTED for Calc
Added LAMBDA (tdf#138749) function
Added ISOMITTED (tdf#164510) function
Rewrote LET to work with the new LAMBDA

Change-Id: I45dbf18c43e56c788848f60cd8380dd8d7c476b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206265
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-09 08:43:28 +02:00
Ben Urban 3bdd856e9f Implemented callables as first-class objects in Calc formulas
Three types of callables are available:

* Built-in functions (tdf#164507)

* External functions

* Macro functions

Change-Id: I6311c9412db650cfeb1100497e4ccdc39662c350
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206264
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-09 08:42:21 +02:00
Tomaž Vajngerl 0522c17c22 sc: round-trip the @ operator through XLSX as _xlfn.SINGLE
The OOXML spec writes =@(expr) as =_xlfn.SINGLE(expr). Calc
emitted the bare @ glyph on save and dropped the wrapper on
load, so =@(F3:F5+0) fell back to a non-array context after a
round trip and lost the authored value.

Map "_xlfn.SINGLE" to ocSingleValue in the OOXML symbol
table. The regular exporter walk now spells ocSingleValue as
"_xlfn.SINGLE" and the import compiler recognises the
wrapper, so a parenthesised operand round-trips with no
further work. A small exporter branch wraps bare and
function-call operands in the wrapper's own parentheses.

OOXML files in the wild put the @ operand inside a redundant
parenthesis pair, _xlfn.SINGLE((expr)). A post-compile pass
on import drops the inner pair so the cell reads back as
=@(expr). The helper takes a trigger-opcode list for reuse.

testSingleOperatorXlsxRoundTrip covers the export path,
testIntersectionOperatorXlsxRoundTrip covers the import strip
from a fixture file.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I2648da125945295fd8548842aba9c82978d96aa9
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5573
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 5ac9db1f563bbde01f9e24fc9bbb8c3599eb0c06)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207789
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-08 23:47:16 +02:00
Andreas Heinisch ba9f142eb9 tdf#163785 - Embed the color picker content inline without any popup
Change-Id: If036458b7eb14482be2e05a3ebb099dc6f12e4c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207756
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-07-08 22:59:26 +02:00
Stephan Bergmann 1df02d7afa Fix heap-buffer-overflow in formula::FormulaTokenArray::Add
ScTokenArray::Clone and CloneValue have always allocated the parse-token array
pCode to hold exactly nLen entries, but unlike Assign they left mbFinalized at
false.  And FormulaTokenArray::Add assumes that a non-finalized pCode has room
for at least MAX_FAST_TOKENS entries.  Which now started to break with
a21f6a3a0eae72fef90576d249d96dc00beeb2c5 "sc: round-trip dynamic-array masters
and @ through ODF",

> ==611420==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7befc900e420 at pc 0x7b8f762c6d53 bp 0x7ffdf0776f90 sp 0x7ffdf0776f88
> WRITE of size 8 at 0x7befc900e420 thread T0
>  #0 in formula::FormulaTokenArray::Add(formula::FormulaToken*) at engine/formula/source/core/api/token.cxx:772:25
>  #1 in ScTokenArray::AddRawToken(ScRawToken const&) at engine/sc/source/core/tool/token.cxx:2004:12
>  #2 in ScTokenArray::AddOpCode(OpCode) at engine/sc/source/core/tool/token.cxx:2224:12
>  #3 in (anonymous namespace)::prependImplicitIntersection(ScTokenArray&) at engine/sc/source/core/data/formulacell.cxx:1654:49
>  #4 in ScFormulaCell::ResolveImplicitIntersection(ScTokenArray&, ScDocument&, ScAddress const&) at engine/sc/source/core/data/formulacell.cxx:2716:9
>  #5 in ImportExcel::Formula(XclAddress const&, unsigned short, unsigned short, double, bool) at engine/sc/source/filter/excel/excform.cxx:127:17
>  #6 in ImportExcel::Formula25() at engine/sc/source/filter/excel/excform.cxx:72:5
>  #7 in ImportExcel8::Read() at engine/sc/source/filter/excel/read.cxx:1184:49
>  #8 in ScFormatFilterPluginImpl::ScImportExcel(SfxMedium&, ScDocument*, EXCIMPFORMAT) at engine/sc/source/filter/excel/excel.cxx:255:35
>  #9 in ScDocShell::ConvertFrom(SfxMedium&) at engine/sc/source/ui/docshell/docsh.cxx:1329:52
>  #10 in SfxObjectShell::DoLoad(SfxMedium*) at engine/sfx2/source/doc/objstor.cxx:777:27
>  #11 in ScFilterTestBase::loadDoc(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, int) at engine/sc/qa/unit/helper/scfiltertestbase.cxx:40:21
>  #12 in ScFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at engine/sc/qa/unit/filters-test.cxx:68:31
>  #13 in non-virtual thunk to ScFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at engine/sc/qa/unit/filters-test.cxx
>  #14 in test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at engine/unotest/source/cpp/filters-test.cxx:132:20
>  #15 in test::FiltersTest::testDir(rtl::OUString const&, std::basic_string_view<char16_t, std::char_traits<char16_t>>, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at engine/unotest/source/cpp/filters-test.cxx:157:5
>  #16 in ScFiltersTest::testCVEs() at engine/sc/qa/unit/filters-test.cxx:91:5
>
> 0x7befc900e420 is located 0 bytes after 64-byte region [0x7befc900e3e0,0x7befc900e420)
> allocated by thread T0 here:
>  #0 in operator new[](unsigned long) at /home/sberg/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:111:37
>  #1 in ScTokenArray::Clone() const at engine/sc/source/core/tool/token.cxx:1901:24
>  #2 in ImportExcel::Formula(XclAddress const&, unsigned short, unsigned short, double, bool) at engine/sc/source/filter/excel/excform.cxx:126:70
>  #3 in ImportExcel::Formula25() at engine/sc/source/filter/excel/excform.cxx:72:5

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I2ce67e89c24fee8e1bdfa7baf40ce02783637254
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4962
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit e4161389322e3f096e3b1537058a94e0636eaeaa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207469
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-08 18:00:08 +02:00
Julien Nabet b887afe9f8 Fix collision 96 (SID_ZOOM_TOOLBOX and SID_ATTR_TRANSFORM_DELTA_ANGLE)
Found with:
python3 bin/check-sid-slots.py SID_SVX_START

Change-Id: I0fc734a61721158e1b81aed03531c7ba65b6b4bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207746
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-07-08 10:59:44 +02:00
Neil Roberts 64df8d7617 tdf#172670 TreeView: Make iter_n_children return 0 with children on demand
On at least the GTK and gen plugins, iter_n_children was returning 1
when the node has children on demand but then iter_children will return
false in order to ignore the dummy node. This was causing an infinite
recursion when iter_previous is called and the previous node has
on-demand children because that uses the result of iter_n_children to
determine if the node has children and then uses iter_children to move
to a child node without checking the return value. That meant the
iterator wouldn’t move and it would keep searching from the same place
forever.

This patch fixes it by making iter_n_children non-virtual and making it
bail out early with 0 if the node has children on demand. Otherwise it
will ask the backend via a virtual function which has been renamed to
do_iter_n_children so that it is similar to how do_iter_children works.

Change-Id: Ie9a3d5d51c9eae0789048fa5240441663642595d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207589
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-08 09:48:49 +02:00
Andreas Heinisch 5d686928d8 tdf#38742 - Draw a separator line between the pinned/unpinned items
Change-Id: Ie67da6bc2113ca9922e8e3b2c6fe426a1ac6e5c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207722
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
2026-07-07 21:35:54 +02:00
Christopher Sherlock 079ead79bf vcl: migrate scalar Logic-to-Device pixel mapping to CoordinateMapper
This commit finalizes the migration of the core scalar coordinate
transformations by moving the logic out of OutputDevice and entirely
into CoordinateMapper.

To clearly separate the public API (which handles MapMode state
branching) from the internal math engine (which unconditionally
applies offsets and scaling), the mapping operations have been
explicitly split.

- Removed ImplLogicXToDevicePixel() and ImplLogicYToDevicePixel()
  from OutputDevice.
- Added LogicToDevicePixelX() and LogicToDevicePixelY() to
  CoordinateMapper to act as the primary state-checking API.
- Added ImplCalcDevicePixelX() and ImplCalcDevicePixelY() to
  CoordinateMapper to isolate the raw transformation math.
- Updated all scalar call sites across vcl (bitmap, map, mask,
  outdev, pixel, rect) to route their math through the mpMapper
  instance.

Change-Id: Ibb23aec54dd6eab6e3a753c2a61f8e023aa03883
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203650
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-07-07 18:09:18 +02:00
Christopher Sherlock c928d5bc07 vcl: Rename Y-axis origin methods to Get/SetDeviceOriginY
Completes the deprecation of legacy coordinate subsystem naming by
renaming GetOutOffYPixel() and SetOutOffYPixel() to
GetDeviceOriginY() and SetDeviceOriginY() across OutputDevice,
Window, and CoordinateMapper.

This unifies axis naming conventions following previous X-axis
refactoring passes, clarifying that these fields represent the
physical origin offsets of the device rendering canvas.

This patch also moves view transformation logic inline from outdev/map
to CoordinateMapper, and wraps sprawling multi-line logic formulas
across mapping routines to clean up formatting boundaries.

Key changes:
* include/vcl/outdev.hxx / window.hxx: Updated public declarations
  to replace GetOutOffYPixel with GetDeviceOriginY.
* vcl/inc/CoordinateMapper.hxx: Migrated view transformation cache State
  members and mapping calculation methods into the mapper object.
* Global adjustments: Patched all related coordinate offset reads
  and tracking writes throughout desktop, editeng, sc, svx, and vcl.

Change-Id: I28fec54a7f3312cc41ada2de38b26351c0a65527
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203646
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-07-07 14:22:05 +02:00
Christopher Sherlock 90951d958c vcl: rename X-axis origin methods to Get/SetDeviceOriginX
Rename GetOutOffXPixel() and SetOutOffXPixel() to GetDeviceOriginX()
and SetDeviceOriginX() across OutputDevice, Window, and CoordinateMapper.

The legacy "OutOff" naming convention obscured the difference between
system-level window positioning offsets and internal content scrolling
(SetPixelOffset). The new nomenclature explicitly communicates that
these metrics strictly govern the device coordinate space origin.

This patch focuses strictly on the X-axis coordinate reads and cleans
up duplicated formatting signatures inside the CoordinateMapper header.

Impacted modules:
* include/vcl: Update public declarations in outdev.hxx and window.hxx.
* vcl/inc: Clean up CoordinateMapper.hxx whitespace and scaling hooks.
* Global: Patch dependent pixel coordinate reads across desktop, editeng,
  sc, sfx2, svx, and vcl.

Change-Id: I546e1d255887e3b280ff15caca2e27ef10de52d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206509
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-07-07 14:14:50 +02:00
Julien Nabet 27c25a69c6 Fix 1711/1731/1732/1736 collisions in include/sfx2/sfxsids.hrc
Change-Id: I653caf765016086c76461e5a4e9ff4f22226f027
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207716
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-07-07 13:52:01 +02:00
Julien Nabet 4bded290f4 Fix 594/598/805 collisions in include/sfx2/sfxsids.hrc
Change-Id: Ia94ca9eb130b437600915b10ad6d8279d1f011c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207717
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-07-07 13:47:00 +02:00
Julien Nabet 9a56d3e117 Fix SID_SHOW_LICENSE collision in include/sfx2/sfxsids.hrc
It collided with SID_REPAIRPACKAGE
both were defined in b9337e22ce (in 2013)

Change-Id: Id0eab9c5aecf9594d7d70c53e1c110b104acccb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207708
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-07-07 13:09:00 +02:00
Julien Nabet 304019c8b7 Fix SID_QUICKFIND collision in include/sfx2/sfxsids.hrc
Since 20088bd544
Detach QuickFindPanel
in July 2025

Change-Id: I43eb494a594ae2b75e883189be072bb2ab5b40df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207707
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-07-07 11:54:14 +02:00
Julien Nabet 0582e6880c Related tdf#162120: fix SvxTabStopItem expected message
Just launch Writer for example and notice this log on console:
warn:svx.dialog:651266:651266:svx/source/dialog/rlrcitem.cxx:75: SvxTabStopItem expected

Pb is SID_SVX_START + 946 is already used in include/svx/svxids.hrc with SID_ATTR_TABSTOP_VERTICAL
So use another free slot, SID_SVX_START + 1069
(which was indeed free contrary to what the comment said in include/svx/svxids.hrc)

Like this I suppose since 69e902d085
tdf#162120 Implement style:writing-mode-automatic (end of 2025)

Change-Id: I65c766ec1b8574fe7db5eca35bfd2c91735f3e2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207697
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-07-07 10:40:56 +02:00
Yoon6 d43fe70f9f tdf#143148 toolkit: use #pragma once in diagnose_ex.hxx
Change-Id: I721ef55002adf6af4db29e082b56d2eed81080a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204668
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-07-07 10:04:11 +02:00
Justin Luth 8624e67503 tdf#128419 srchdlg: stop losing user's 'replace backwards' choice
Every time the user called a different command (find/findprev/findall)
the 'replace backwards' checkbox was being reset
to some seemingly random state.

That random state was 'whatever the checkbox was
the last time that "Replace" was called'.

Instead, it should retain the last state that the user provided.
[Fortunately, I found a couple of examples to guide me.
 since m_pSearchOpt isn't reliable
 as the 'Find Previous' button can also SetBackward.]

With this patch, the user's selection is:
-the sole controller of the checkbox
-saved and restored between sessions (wasn't restored earlier)
  [ClickHdl_Impl calls SaveToModule_Impl - so immediately saved]

Change-Id: I1364c97f6a853989cb9b2706ec4a03a5e4c0ca13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207696
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-07-06 23:51:07 +02:00
László Németh 5da16bdc79 tdf#172674 offapi cui sw xmloff: add hyphenation slider feature
To solve the trade-off between better spacing and less hyphenation,
support hyphenation level and its user interface, the hyphenation
slider, like DTP software do.

Add new paragraph property com::sun::star::text::ParaHyphenationLevel

The hyphenation slider is the basic interface of DTP software to adjust
single (or all) paragraphs using better word spacing (i.e. more
hyphenation) or less hyphenation (i.e. worse word spacing). It allows 1)
to choose the best from the near equally good layouts and 2) to solve an
extreme bad layout (caused by words without hyphenation or other corner
cases).

– 50% hyphenation level means disabled hyphenation, if minimum
  and maximum word spacing settings allow to break the line within
  words (default interoperability value).

– 100% hyphenation level means using extra hyphenation only if that
  results better word spacing in the line, than breaking within words.

– Between 50% and 100% hyphenation level, use extra hyphenation only if
  its weighted word spacing is better, than breaking the line between
  words (weighting grows with the hyphenation level).

– Between 0% and 50% hyphenation level it means disabled hyphenation
  with increased desired and maximum word spacing, depending on the
  hyphenation level. At %0, the desired word spacing is enlarged to the
  original maximum word spacing, while maximum word spacing is enlarged
  by a single space.

For example, the original 4-page unit test document with the default 50%
hyphenation level contains 14 hyphenations. 100% hyphenation level
results in 22 hyphenations, while 0% only results in 8 hyphenations.

– sw/qa/extras/layout/data/tdf167648_minimum.fodt,
  sw/qa/extras/layout/data/tdf169168_minimum.fodt: set maximum
  word-spacing to 100% from 101% to limit the original unit test only
  for minimum letter spacing.

More information: LO/COOL Book & Typography projects:

https://www.numbertext.org/typography/

https://www.numbertext.org/book/

Follow-up to commit cf104be5cb "tdf#119908
tdf#166113 cool#15973 sw smart justify: fix DOCX hyphenation",
commit d572576dd6
"tdf#119908 cool#15973 sw smart justify: fix "smart" hyphenation",
commit 529755f091
"tdf#166113 sw smart justify: adjust algorithm for interoperability" and
commit 7d08767b89 "tdf#130088 tdf#119908
smart justify: fix DOCX line count + compat opt."

Change-Id: I84b3893ea6c5cd4eff74a73514722285e7071392
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207545
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins
2026-07-04 17:11:37 +02:00
Michael Weghorn 2dca1c0f02 weld: Rename TreeView *_column_clicked methods to *_column_header_clicked
Rename weld::TreeView::connect_column_clicked
and weld::TreeView::signal_column_clicked to make
clear that they are not about a click anywhere in a
column, but about the column *header* being clicked.

The GTK 4 doc for the corresponding
GtkTreeViewColumn::clicked signal [1] by which the API
was apparently inspired is clear about this:

> Emitted when the column’s header has been clicked.

[1] https://docs.gtk.org/gtk4/signal.TreeViewColumn.clicked.html

Change-Id: I0b4b337b5ca938bb1526d9857ed2b0b244daf23c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207591
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-03 22:26:00 +02:00
Michael Weghorn b78cca5278 sfx2: Pass ThumbnailViewItem::addTextPrimitives attr param by ref
Change-Id: I7bdb9f5099e95925267eb5a960c6fd7720008381
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207574
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-02 23:18:06 +02:00