Commit Graph
22428 Commits
Author SHA1 Message Date
Michael Weghorn 7c7f950dd8 vcl: Drop NotebookBar::{m_pViewShell,m_rDisposeLink}
By now, NotebookBar::m_pViewShell is always null and
NotebookBar::m_rDisposeLink is unset.

The method NotebookBar::SetDisposeCallback which would
have set both members was dropped in

    commit 6f81bce807
    Date:   Wed Jun 3 12:34:28 2026 +0200

        loplugin:unusedmethods

, so drop the now pointless members altogether.

Change-Id: Ib6392c22094601ebcc2349938e553a845fe0be06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208273
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-21 07:10:55 +02:00
Michael Weghorn fbeacc3ca9 vcl: Drop NotebookBar::{m_xVclContentArea,m_bIsWelded}
NotebookBar::m_bIsWelded is always false and
NotebookBar::m_bIsWelded is always an empty reference
by now, see also previous commit

    Change-Id: Ic637b1e7026509b0736d877c88cf7bd6ca50b54c
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Jul 20 10:24:31 2026 +0200

        vcl: Drop obsolete LibreOfficeKit path in NotebookBar ctor

. Therefore, drop them and related logic altogether.

Change-Id: I2a4c21728759207158f8f62049fe9edd85fac239
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208271
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-21 07:10:46 +02:00
Michael Weghorn 27c2916b8f vcl: Drop obsolete LibreOfficeKit path in NotebookBar ctor
This is no longer used and e.g. the GetMainContainer
method that the comment refers to was dropped in the
meantime, see

    commit 8754a75d98
    Date:   Tue Jun 2 14:47:57 2026 +0200

        vcl: drop WeldedTabbedNotebookbar

        "WeldedToolbar" no longer exists after
        commit fd65cea59c
        Author: Xisco Fauli <xiscofauli@libreoffice.org>
        Date:   Mon Jun 1 17:14:35 2026 +0200

            drop notebookbar_online.ui

and

    commit 6f81bce807
    Date:   Wed Jun 3 12:34:28 2026 +0200

        loplugin:unusedmethods

(`git show --ignore-space-change` can help to see the
"actual change" more easily.)

Change-Id: Ic637b1e7026509b0736d877c88cf7bd6ca50b54c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208270
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-21 07:10:35 +02:00
Aya Jamal 92d2a4bec5 tdf#103680: Implement SupportsOpenTypeMath in outdev
Change-Id: I425735e91ce83c6c2225ad562c3549067b80f053
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207987
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-20 15:13:17 +02:00
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
Michael Weghorn 4e81fbaa3f vcl: Directly return vcl::WindowData in SalFrame::GetWindowState
So far, SalFrame::GetWindowState had a bool return value
and a vcl::WindowData* out param.

The comment said:

    // if this returns false the structure is uninitialised

However, all implementations always return true.
All callers pass the pointer to a newly default-constructed
vcl::WindowData.

Instead, drop the (always true) bool return value and out param
and instead directly return the vcl::WindowData as the methods
return value.

For macOS, add a new vcl::WindowData member to the
RuninmainResult union, so this can be used as a return
value with OSX_SALDATA_RUNINMAIN_UNION in
AquaSalFrame::GetWindowState.

Change-Id: Icc55685cae9991a93fea43963273753d8aa2420f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208169
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-19 19:30:22 +02:00
Michael Weghorn 370524907c vcl: Pass SalFrame::SetWindowState param by const ref
... instead of by pointer.
This makes clear it's non-null and allows to
drop some corresponding null checks.

Change-Id: I3e6c85c555ebcc0d949628e10fce891bc1c83fd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208162
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-19 19:30:11 +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
Christopher Sherlock 339f9b2a8e vcl: simplify LogicToDevicePixel() by delegating to CoordinateMapper API
The newly refactored CoordinateMapper::Logic[X|Y]ToDevicePixel()
methods act as the primary, state-aware public API for scalar
coordinate transformation.

Because these mapper methods already handle the IsMapModeEnabled()
state check internally, we can safely remove the manual branching
from the higher-level OutputDevice conversion methods. This
drastically simplifies the code, replacing massive blocks of inline
mathematical boilerplate with clean, 1-to-1 delegation calls.

- Simplified LogicToDevicePixel(const Point&) to delegate directly
  to the mapper.
- Removed redundant MapMode branching that is now safely handled
  by CoordinateMapper.

Change-Id: Ie7e3696f9cb2ec7098a3b8e6f5e500a366f8e72f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203653
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-07-15 23:19:06 +02:00
Michael Weghorn 5ab1494344 vcl: Don't negate 2 bools when checking equality
Negating both of them has no effect on the
result of the comparison, but makes the code
a bit less straightforward.

Change-Id: I500318ad0918c15a27e4de674ca3932d26f7e485
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208141
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-15 17:59:11 +02:00
Michael Weghorn ad4541a1cc vcl: Move SalFrame method implementations to own .cxx
SalFrame is the common base class for various platform
and toolkit specific subclasses.

It's defined in vcl/inc/salframe.hxx. Move method
definitions to an own source file matching the name
of the header instead of spreading them across two
other existing source files that are otherwise not
directly related to SalFrame.

This makes it easier to keep an overview.

Drop the obsolete

    // The only common SalFrame method

comment from above the SalFrame::GetGeometry
implementation.

Change-Id: Ifaa4a60f41d7d2e4620d492982ebd8341a433df6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208140
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-15 17:58:46 +02:00
Caolán McNamara 6d4bffb23a ofz#533311278 stay within limits
where the base passed in was just taken from getReadOfs() the
reassignment of mpReadPtr in the helper is a no-op

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I59566d4c1765dfd7c8906b465670a0f8bd815d50
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6645
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 9e537c46062b6bd15d47867b27ed2ad6c7e0e9b7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208136
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-15 17:44:20 +02:00
Michael Weghorn 2da5323873 vcl: Use Size return value for Salframe::GetClientSize instead of 2 out params
return the size instead of using 2 tools::Long& out
params for the width and height.

Change-Id: Ib5cefb504ee27b6aac977a2f9534c29bc53db72d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208067
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-15 14:47:32 +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
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 aa1e992c23 vcl: Scale stretched fonts relative to the height on Windows
The font width used to mean the average character width on Windows,
like GDI’s LOGFONT lfWidth. This complicates things cross-platform, and
also DirectWrite does not expose such info.

Drop the whole average character width nonsense and align Windows to
other platforms, keeping the already existing cross-platforms
workarounds for EMF/WMF that are now applied also to Windows.

Change-Id: I750d42ad090bb9d0f776e80609b7a67b8ac38aac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207990
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-14 00:16:49 +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 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 ea2543a570 ofz#532839163 Integer-overflow
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id43a56b3b7b84d490a2e1f083b985f53d3a6dc86
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6576
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 448d75b8ad849458cfe71fa968038b4a3e1177b8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207974
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-12 23:11:23 +02:00
Aya Jamal 14c70490f2 tdf#103680: Implement GetOpenTypeMathConstant using hb-ot-math in VCL
I implemented GetOpenTypeMathConstant using hb-ot-math for
wrapping "hb_ot_math_get_constant ()" to enable
using it through the StarMath module.

Change-Id: Ica4cf09d80c6fe036763ef1d9b52aaf789e756a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207652
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-12 22:05:03 +02:00
Michael Weghorn 5fe77dfe01 vcl: Use SVLIBRARY macro in VclBuilderPreload
Use the existing macro instead of reimplementing
the logic to concatenate the file name by prepending
SAL_DLLPREFIX and appending "so" and SAL_DLLEXTENSION to the
library name.

Change-Id: I2db83a3d647c38f2fbfdd11a049c3a0f49a1a578
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207940
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-10 19:44:45 +02:00
Michael Weghorn 92d1c39b82 vcl: Use OUString literals in VclBuilderPreload
... instead of creating OUString objects at runtime.

Change-Id: Ib78f1409eb41bbb0073bebf6f41ffb2fe364fb02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207939
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-10 19:44:37 +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 34ead435f4 vcl/roadmapwizard: remove unused maResponses and AddResponseButton()
Change-Id: I00b9951d1ac6ff18f4bfb0cc8c470d83db754567
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207237
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-10 13:32:27 +02:00
Caolán McNamara f21dc6f83d ofz: check buffer bounds before reading multi-byte CFF dict operators
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I434749e74e29f0aa3cda76746440af64cc2965dd
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2693
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 7263a6b61264ebf1bdfe01c27e2e6c53bee7687b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207732
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-08 11:20:02 +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
Caolán McNamara f62f3a2552 ofz: check for failure here too
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib48de81390607918e58d200a65b869b18c58e8b1
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3162
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 51fa2756479e99d1fc8d804d50bfd969d582ebdd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207731
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-08 09:04:19 +02:00
Aya Jamal fde61d7fe2 tdf#103680: Implement HasOpenTypeMathTable using hb-ot-math in VCL
Change-Id: I119b9c33e93fa1e67cd35f8fc7f4b8a6437077af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207577
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-08 00:41:26 +02:00
Christopher Sherlock b367260243 vcl: use LogicToOffsetLogic helpers in map.cxx conversions
Replaces the manual addition of mapping offsets (GetMapping[X|Y]Offset)
with the encapsulated LogicToOffsetLogic[X|Y] helpers introduced
recently in CoordinateMapper.

This continues the ongoing architectural cleanup by standardizing how
absolute logical coordinates are transitioned into view-relative
logical space before being scaled to device pixels.

- Updated LogicToDevicePixel overloads (Point, Rectangle, Polygon,
  B2DPolygon).
- Updated LogicToPixel overloads (Point, Rectangle, Polygon).
- Updated LogicToDeviceSubPixel.

Change-Id: Ie0a6fc40ada9127860a244f3f93e02d9cc658f72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203652
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-07-07 18:09:49 +02:00
Christopher Sherlock eb277028a4 vcl: access DeviceOrigin directly via CoordinateMapper in map.cxx
Following the migration of the device origin state into
CoordinateMapper, this commit updates the complex coordinate
transformation methods in map.cxx to query the origin directly
from the mapper.

Bypassing the OutputDevice wrappers (GetDeviceOriginX/Y) makes it
explicitly clear that the mapper owns this physical window offset.
This reduces internal reliance on the OutputDevice god-class API
and sets the stage to potentially remove these wrappers entirely.

- Updated LogicToDevicePixel overloads (Point, Rectangle).
- Updated ImplLogicToDevicePixel overloads (Polygon, B2DPolygon,
  PolyPolygon).
- Updated ImplDevicePixelToLogic (Rectangle) and
  ImplPixelToDevicePixel (Region).

Change-Id: I1b5915f27bf6117a0fd303c7f30603a67ca181a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203651
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-07-07 18:09:39 +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
Caolán McNamara 99f5d81441 ofz: check buffer bounds before reading offsets in CFF seekIndexData
Same pattern as:

commit 304208502164c07df8eb5a3677cb445ab0965f0e
Date:   Fri May 15 08:38:40 2026 +0100

    ofz#513301090 UNKNOWN READ

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I841619bc2f6eb2cb1a599f8eee2be9a75c68d2ca
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2695
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 7c237925e474326f3c8dea179264b60d835145d7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207724
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-07 17:33:00 +02:00
Caolán McNamara 3d487485bd ofz#506472785 Integer-overflow
vcl/source/outdev/ImplMapRes.cxx:115:70: runtime error: signed integer overflow: -9223372036854775808 + -57089 cannot be represented in type 'long long'
    #0 0x592c9880de2d in operator() vcl/source/outdev/ImplMapRes.cxx:115:70
    #1 0x592c9880de2d in ImplMapRes::CalcMapResolution(MapMode const&, long, long) vcl/source/outdev/ImplMapRes.cxx:119:9
    #2 0x592c9819827c in OutputDevice::SetMapMode(MapMode const&) vcl/source/outdev/map.cxx:519:18
    #3 0x592c9830750e in GDIMetaFile::Play(OutputDevice&, unsigned long) vcl/source/gdi/gdimtf.cxx:365:26
    #4 0x592c978beda6 in TestImportSVM vcl/source/filter/svm/SvmConverter.cxx:1281:22

This seems to have appeared since:

commit 64c6a8c44b7730d1f703f260e7359642e8af9288
Date:   Sun Mar 22 15:09:35 2026 +0200

    Fraction->double in MapMode

Clamp the divided value to sal_Int32 range to explicitly restore the
limits that BigInt path incidentally.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I3c8061a72e447e4bdcad07ace3075076d09285be
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1891
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit b1dd07307b7a00e73996975616efa113940fdf37)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207723
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-07 16:00:44 +02:00
Christopher Sherlock 9347ba1ccb vcl: encapsulate final device pixel math in CoordinateMapper
Completes the logical-to-device transformation pipeline by moving
the final physical offset calculations into CoordinateMapper.
OutputDevice no longer needs to manually assemble the view pixels,
device origins, and pixel offsets.

- Added LogicToDevicePixelX() and LogicToDevicePixelY() to
  CoordinateMapper to handle the final transformation from view
  space to physical device space.
- Simplified ImplLogicXToDevicePixel() and ImplLogicYToDevicePixel()
  in map.cxx to directly delegate to these new mapper methods.
- Added comments in CoordinateMapper to clearly delineate the
  Viewport (view space) and Physical window (device space) methods.
- Updated the unmapped branches in map.cxx to fetch the device
  origin directly from mpMapper.

Change-Id: If7dbcf3fe9ed70fabc6c24d3b4a426cdde7d438c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203649
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-07-07 15:00:03 +02:00
Christopher Sherlock ce6e702832 vcl: use lcl_ prefix for static sub-pixel coordinate helpers
These functions are declared as file-local static helpers in map.cxx,
so they should follow the standard lcl_ naming convention rather
than the Impl prefix, which is generally reserved for private
class methods.

- Renamed ImplLogicToSubPixel() to lcl_logicToSubPixel().
- Renamed ImplSubPixelToLogic() to lcl_subPixelToLogic().
- Updated all call sites in SubPixelToLogic(), LogicWidthToDeviceSubPixel(),
  LogicHeightToDeviceSubPixel(), and LogicToDeviceSubPixel().

Change-Id: I01e64f41b153526c13f15856e1182d3bea6802f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203648
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-07-07 14:58:45 +02:00
Caolán McNamara 7fe12adeec ofz#513301090 UNKNOWN READ
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8d9dde7634b770cb7642bed42c85b36527921f4b
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2653
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ac65c3fae20b6c207ef8ebb12ab66b5e035c6a03)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207721
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-07 14:33:07 +02:00
Caolán McNamara 49360f34f5 ofz: cff, track the charstring output capacity
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I0bd22e737fb9700108d616a1ba4a69f6bd95691d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6165
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 0b090eff6ca18e3f2bacc7311b746d2a15ed1247)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207718
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-07 14:29:57 +02:00
Caolán McNamara 073913a2cc ofz#513277199 Integer-overflow
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8a07f47f382502ab24670a270e8cd23a888f1ba4
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2656
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 6eb214dbe24ac7c1cde3fe8a6ce242f2d7e24151)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207713
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-07 14:29:51 +02:00
Christopher Sherlock 3d55850014 vcl: encapsulate pixel scaling math in LogicToViewPixel helpers
Continues the encapsulation of coordinate mapping logic by moving
the intermediate logical-to-pixel calculation into CoordinateMapper.
This removes the need for OutputDevice to query the mapper for
individual scaling and DPI components just to do the math itself.

- Added LogicToViewPixelX() and LogicToViewPixelY() to CoordinateMapper
  to handle the multiplication of the offset logical coordinate, map
  resolution scale, and DPI.
- Simplified OutputDevice::ImplLogic[X|Y]ToDevicePixel() to delegate
  directly to these new helpers instead of relying on lcl_logicToPixel.
- Included minor formatting cleanup in LogicToLogic.

Change-Id: Iabf90dd129e3f51102c05e27fe11af1bb6d946a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203647
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-07-07 14:25:45 +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
Caolán McNamara 1db305f340 ofz: wmf, check record against max allowed size
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I3c0a155bdf0922771694fc500a24eb09ec8abc27
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6116
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 9b412f7cda30a4e1b820e51249fa7b3c36a812d3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207658
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-06 13:20:38 +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 50040ef1d6 tdf#172651 Revert "vcl: strip alpha in Bitmap::Convert(N24Bit) ...
... for 32-bit-with-alpha sources"

The commit broke (e.g. toolbar and menu) icons for at least
the gtk3 and qt6 vcl plugins when scaling is enabled
(s. tdf#172651).

The commit message suggests that it is primarily relevant
for Collabora Online, which doesn't use this repo anymore,
so no negative consequences of reverting it again are known.

(When testing, broken icons were sometimes still shown
with the revert in place unless starting with a fresh
user profile, probably due to icons being cached in the
user profile.)

This reverts commit 7b5ddd9311.

Change-Id: Iad735af3f41229a2263a8ce3de1c2c168ce9cecb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207560
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-03 22:25:43 +02:00
Heiko Tietze 08f5d410a4 Related tdf#121174 - Make module-specific colos non-configurable
Colors were introduced as ThemeColors since they are not entirely application
colors (but also not really UI-related) and because svtools:: is not accessiblke
in vcl. This patch makes the colors hard-coded therefore, still allowing to
disable it but only via expert setting NotebookbarColorTransparency.
It also enables the colors on macOS following the positive feedback.

Change-Id: Iece63d440349b0c42ea6dbc1dad36f0b1e7120a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207476
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-06-30 10:04:33 +02:00
Caolán McNamara d89e2655f9 crashtesting: reuse a cached glyph subset only where it is safe to concatenate
The glyph layout cache builds the layout for a substring by cutting it out
of the cached whole-string layout and reusing those glyphs without reshaping.
That is only correct at a cluster boundary that HarfBuzz reports as safe to
concatenate.

The previously checked unsafe-to-break flag is a smaller set and does not
cover boundaries where the surrounding text changes the glyphs, for example
which fallback font a run resolves to, so a subset could be cut where a fresh
layout of the substring would differ.

Ask HarfBuzz to produce the unsafe-to-concat flag and guard the subset with
it instead.

seen loading sd-cre-hea-ar-7e49187f4be1eb63.docx

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8ff201a4af6c1c9e283a87267b47749a8ce717e6
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5516
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 573d06f6ce4b5123ac7b0d55ae3e846c0a07cbf1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207395
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-29 13:52:35 +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