Commit Graph
2967 Commits
Author SHA1 Message Date
Andrea Gelmini e8fa15e0d6 Fix typos in code and comments
Change-Id: I48caad6ed035a1e46e434a685fc40376e0276fe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210576
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-10 16:27:50 +02:00
Michael Weghorn 720a9455a6 a11y: Get UnoControl accessible without implementing XAccessible
By now, almost all a11y implementations implement both,
the XAccessible and XAccessibleContext interfaces themselves,
and they do so via the OAccessible base class.

One remaining case that only implements the XAccessible interface
directly is UnoControl. XAccessible::getAccessibleContext
is used from within AccessibleControlShape::Init to get the
accessible context. That accessible context however
is an OAccessible and implements both, the XAccessible
and XAccessibleContext interfaces again.

Stop requiring that UnoControl implements XAccessible
by instead adding a dedicated new method UnoControl::getAccessible
to directly get the OAccessible without relying on
the XAccessible interface being implemented by UnoControl.

In AccessibleControlShape::Init, cast to UnoControl
instead of querying for the XAccessible interface
and call the new method directly.

Stop implementing the XAccessible interface in
UnoControl as it is no longer needed now.

This aligns the UnoControl a11y logic more with how
a11y is implemented elsewhere across the code base.

Sample steps to trigger the modified code
when using the gtk3 vcl plugin on Linux:

* start the Orca screen reader
* start Writer
* insert a few push button controls using
  "Form" -> "Push Button" and then clicking into
  the document and dragging to insert
* disable design mode using "Form" -> "Design Mode"
* focus one of the controls by clicking on it
* press the Tab key to move focus between the controls

No differences in behavior were observed when
doing this with or without this change in place.

Side note: Announcement of the controls when they
receive focus didn't work (reliably) when opening an
existing document containing form controls instead of
inserting them into a new one, but that is preexisting
and unrelated to this commit.

Also adjust test AccessibleFixedTextTest::testFixedText
of the CppunitTest_toolkit_a11y test suite
accordingly that was assuming that it can
query the XAccessible interface directly
from the UNO control.

Change-Id: I8cc3902a8de725eda3d810920f1da2d390c06f73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210464
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-05 10:43:42 +02:00
Michael Weghorn ef182d04d5 toolkit a11y: Pass OAccessible to UnoControl::DisposeAccessibleContext
Pass the more concrete OAccessible instead of a reference
to the abstract XComponent UNO interface.

Change-Id: Idcbf5c1eb09cc1380a85410b76d8b1e2df022b6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210460
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-04 08:16:28 +02:00
Michael Weghorn 0ee559bf34 toolkit a11y: Use WeakRef to more concrete OAccessible in UnoControl
Switch from using a weak reference (css::uno::WeakReferenceHelper)
to the abstract XAccessibleContext UNO interface to a weak
reference (unotools::WeakReference) of the more concrete
OAccessible class in UnoControl.

This makes clear that the accessible is always an OAccessible
subclass and allows dropping some UNO-querying for the
wanted UNO interfaces.

Change-Id: Ib1ea66c83da9bbf76891c492d84aa57c396f2f44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210459
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-04 08:15:05 +02:00
Michael Weghorn bd60022def toolkit a11y: Stop declaring support for AccessibleContext service
The com.sun.star.accessibility.AccessibleContext UNO service
is unnecessary and not really used for implementing a11y support,
apart from some a11y implementations declaring support for it.
What is relevant is the com.sun.star.accessibility.XAccessibleContext
interface instead.

Stop declaring support for the com.sun.star.accessibility.AccessibleContext
service in AccessibleGridControlBase (and drop related
XServiceInfo::getImplementationName overrides in subclasses),
in preparation of dropping the service altogether in an upcoming
commit.

Change-Id: I66e6390ad77e3ff0febfb335c312954815c6581c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210400
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-03 09:20:35 +02:00
Andrea Gelmini aeac8192da Fix typos
Change-Id: I5f686165b8e4f971faa762e052c5b85bef94fee7

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209794
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-26 09:17:29 +02:00
ApurvR20 855b66846b tdf#163738 : use insert function instead of for loop
Change-Id: Id107b224c7182e3706f5265e91a1c35d956d9848
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208284
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2026-07-23 11:11:56 +02:00
Michael Weghorn 32ec401003 vcl: Drop SvLBoxContextBmp::m_bExpanded
Together with the expanded state, SvLBoxContextBmp::m_bExpanded
is used in SvLBoxContextBmp::Paint to decide which image
(SvLBoxContextBmp::m_aImage1 or SvLBoxContextBmp::m_aImage2)
to draw.

There are 2 actual scenarios used for that member:

1) The member is set to true, with (potentially) different images
  set. (Used in ImplContextGraphicItem.)
2) The member is set to false, with the same image
  set for both images. (Used in SalInstanceTreeView
  and SalInstanceIconView).

For 2), it doesn't matter which of the two images is used,
as they are the same anyway.

For 1), the

    const Image& rImage = pView->IsExpanded() != m_bExpanded ? m_aImage1 : m_aImage2;

can be simplified to just

    const Image& rImage = !pView->IsExpanded() ? m_aImage1 : m_aImage2;

to make more obvious that SvLBoxContextBmp::m_aImage1 is
used for the case where the entry is not expanded and
SvLBoxContextBmp::m_aImage2 is used when the entry is expanded.

Drop SvLBoxContextBmp::m_bExpanded to simplify this accordingly.

Change-Id: I94b06ef87f002a1f35591021225d1858631afb44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206969
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 22:23:14 +02:00
Michael Weghorn fa08175637 vcl: Pass SvTreeListBox::GetViewDataItem entry param by ref
It's always non-null.

Change-Id: I3f8f657a6a35ddd5b593366be2e4bd923087ff56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206965
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-20 22:22:44 +02:00
Michael Weghorn 469f96ce18 vcl: Pass SvLBoxItem::GetWidth entry param by ref
It's always non-null.

Change-Id: Iff2780f77a57e9109f1d7555c53e1419ddd073cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206964
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-20 22:22:36 +02:00
Michael Weghorn 6649bdfb80 vcl: Pass SvLBoxItem::GetHeight entry param by ref
It's always non-null.

Change-Id: Idb5be3f643bc515fd21e64de9dcc1b65f1cb2f23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206812
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 22:22:11 +02:00
Michael Weghorn aba65f6ba6 toolkit: Drop UnoTreeListBoxImpl::insert, use base class method
Use SvTreeListBox::Insert directly, which is perfectly fine
with a null parent param (at least) with previous changes
up to

    Change-Id: I07e12a6f3b3e9c96df79129e19f9331a64588830
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jun 17 10:25:17 2026 +0200

        vcl: Consolidate to one SvTreeListBox::Insert

in place.

Change-Id: I6c4a68a23b36df66635ef8836ffc45c7a751ef29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206791
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 22:19:09 +02:00
Michael Weghorn 39c1fd1c70 vcl: Switch order of SvTreeList::Insert params to prepare for default arg
Change the order of the 2nd and 3rd parameter
of SvTreeList::Insert and SvTreeListBox::Insert.

This prepares for providing a default value of
nullptr for the third parameter in
SvTreeListBox::Insert and dropping the
SvTreeListBox::Insert variant that only takes
2 params.

Change-Id: Ibea425c37a856cbece484fc2f7fbcd12b42ea235
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206788
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 00:51:14 +02:00
Michael Weghorn a346db6129 vcl: Use existing SvTreeListBox::InvalidateEntry
That one already gets the model to call
SvTreeList::InvalidateEntry, so no need to
do that manually in more places.

Change-Id: I52c8b883353b8eec19c642ff7a00ddb3fbd01802
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206748
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 00:50:08 +02:00
Michael Weghorn deb7aeea1b vcl: Pass SvTreeList::InvalidateEntry entry param by ref
It's always non-null.

Change-Id: I92d82e6b5e8e89549b487e38c1deea284991ca78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206746
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-20 00:49:50 +02:00
Michael Weghorn 4a4fa030e3 toolkit: Pass TreeControlPeer::updateEntry entry param by ref
The passed entry is always non-null.

Change-Id: Iac495b886eeb92f780ca2dba2c3b0b92375af0cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206745
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 00:49:42 +02:00
Michael Weghorn edf75efdad vcl/toolkit: Use existing SvTreeListBox::RemoveEntry
Use the existing SvTreeListBox method that removes
the entry from the model instead of manually
removing from the model directly.

This requires to pass a non-const SvTreeListBox
to TreeControlPeer::updateChildNodes.

Change-Id: Idefc7f25a5d22bcba765541c73101e888d42e225
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206741
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-19 18:13:41 +02:00
Michael Weghorn 6455e513a3 vcl: Pass SvTreeListBox::RequestingChildren entry param by ref
This makes clear that it's always non-null.

Change-Id: I2ac3b32ef4bb438bca09225dddd8cb6d5cf1b0b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206724
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-19 18:10:58 +02:00
Michael Weghorn b21adb27bf vcl: Pass SvTreeListBox::Expand entry param by ref
This makes clear that this is always non-null.
The method implementation unconditionally dereferences
the argument.

Change-Id: I5c0e2576b3abf4347cd18349b79656ab73bae5d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206723
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-19 18:10:51 +02:00
Michael Weghorn 8a9ca4fb6a toolkit: Drop always true bExpanded param for ImplContextGraphicItem
Just hard-code passing true to the base class ctor as the
ImplContextGraphicItem ctor is always called with a value
of true.

Change-Id: I5437e049daf570d693445a7431ed61f17b6dfffa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206397
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-17 06:09:32 +02:00
Michael Weghorn b702d3c634 vcl: Pass SvLBoxItem::InitViewData entry param by ref
This makes clear that it's always non-null.

Change-Id: I1da8eb71a9941d414c890686f0eac0263a93de7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206394
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-16 19:17:17 +02:00
Michael Weghorn 1d261e4885 vcl: Pass SvTreeListBox::Set{Expanded,Collapsed}EntryBmp entry param by ref
This makes clear that the param is always
non-null.

Change-Id: I3ade03e24097ba239c67c0e23e7e8f32715b3ced
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206391
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-16 19:16:59 +02:00
Michael Weghorn 13b3fe799e toolkit: Flatten TreeControlPeer::createEntry
Return early if mpTreeImpl is null, which allows
to get rid of one nesting level further down.

Change-Id: I75fa1d7838bb83fe1340935f2f3db09f86a45253
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206311
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-11 21:43:00 +02:00
Michael Weghorn 7b68bd0779 vcl: Pass Window::Draw outdev param by ref
This makes clear that it is always non-null.

Change-Id: Id29efa073dae8ce01657ec28493d5f63a564d0ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205350
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-20 00:38:47 +02:00
Michael Weghorn d1245f5ca9 vcl: Pass Window::PaintToDevice outdev param by ref
This makes clear that this is always non-null.

Change-Id: I4452fa69ac5869b1654771b8a38781e57fe89194
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205348
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-20 00:38:26 +02:00
Khaled Hosny 6e73dd431b tdf#152206: Add FontVariations UNO service
Expose font variation axis info to scripting and extensions via a new
com.sun.star.awt.FontVariations service. From Basic:

  oInfo = createUnoService("com.sun.star.awt.FontVariations")
  aAxes = oInfo.getFontVariationAxes("Reem Kufi")

The intent is to allow extensions to build a UI for setting font
variations, by querying the axes for an arbitrary font family and then
setting CharFontVariations property.

Change-Id: I4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205070
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-05-11 23:20:46 +02:00
Muhammad Naeem 884db13b71 tdf#147021: Use std::size() instead of SAL_N_ELEMENTS in several modules
Verified: make Library_tk Library_lng CppunitTest_sax_xmlimport Library_PresentationMinimizer Executable_xpdfimport
Change-Id: I1b7c30fda2b72cdc3fe1cf6bf802f15624aee148
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204771
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-05-11 15:31:06 +02:00
Michael Weghorn 059f3dc5f6 toolkit: Merge TreeControlPeer::updateNode into only caller
Change-Id: I1f69073cc8924d4a0a23f41cbd32db6619f92ad5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204924
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-11 09:27:03 +02:00
Michael Weghorn 8a0d5e9e30 toolkit: Drop logic conditional on empty Sequence having element
`Nodes` is created with the default Sequence ctor, i.e.
as an empty Sequence. Since no element is inserted afterwards,
it is still empty and has no element, so there is no point
in checking whether it has any.

Drop the corresponding logic altogether.

Change-Id: I3c5e83c950d383251f713fd6ddb20554e7ad2a97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204923
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-11 09:26:55 +02:00
Michael Weghorn e020b6054c toolkit: Move check into TreeControlPeer::updateTree
All 4 callers check whether TreeControlPeer::mnEditLock
is non-zero and return early in that case. Deduplicate
that by moving the check into TreeControlPeer::updateTree
itself.

Change-Id: I650e2a9e2d256a609290e288ba850f490d071929
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204922
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-11 09:26:47 +02:00
Michael Weghorn d32784ead8 toolkit: Switch broadcast_type to enum class
Also use more usual camel case for the names.

Change-Id: Idedae71a077626093e0a7ed875aeed39418ee7f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204921
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-11 09:26:33 +02:00
Michael Weghorn 0d1b56cadf toolkit: Use actual UNO iface name in comment
The methods overriden here are from the
css::awt::tree::XTreeDataModelListener UNO interface.

Clarify the comment in the header, and drop the
duplicate comment in the source file.

Change-Id: I0481202df14601935601f69b38099f58db5d80d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204920
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-11 09:26:08 +02:00
Michael Weghorn dbac00de0b vcl: Pass SvTreeListBox::EditedEntry item param by ref
Change-Id: I6568e29a17b2710c2a14819e8665f9ba21ddeb79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204538
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-29 20:38:42 +02:00
Michael Weghorn 80a876c9e3 vcl: Pass SvTreeListBox::GetViewDataItem item param by ref
Change-Id: I7e391bdca8ecdc6bbd8614b7cd67f396212999d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204536
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-29 20:38:27 +02:00
Michael Weghorn b6dc3ce75d vcl: Also pass the item in treeview callback when entry edited
So far, the callback called when a SvTreeListBox
entry was edited contained the SvTreeListEntry
and the new text of the entry.

Pass also the entry's item (SvLBoxItem) in addition,
so the handler can take that into account.

This will be used in an upcoming commit to extend
weld::TreeView::signal_editing_done to also pass
the index of the edited column.

Change-Id: Iad2866d8fcc710d82f4f0dc0661a3b1f0bebaeab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204303
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-26 18:09:18 +02:00
Michael Weghorn 504d1aa22e vcl: Use SvTreeListEntry reference instead of ptr in IterString
Switch SvTreeListBox::EditedEntry to take a reference instead
of pointer param and also use a reference in IterString.

Change-Id: I9597ff94978c4f25440d1b41b8c99985928258e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204295
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-04-26 18:09:10 +02:00
Michael Weghorn b0ff66bbb7 vcl: Return ref in SvTreeListBox::GetViewDataItem (II)
Similar to previous commit

    Change-Id: Id39e551d54f4dc20ab7d7e33d52ed5cea308e1ce
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Apr 24 12:12:01 2026 +0200

        vcl: Return ref in SvTreeListBox::GetViewDataItem

, also switch the non-const variant to return a reference
instead of a pointer.

Change-Id: I31bef6a251c873c220171e17db1dfd4a82ddadbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204292
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-26 18:08:44 +02:00
Robert Marcano 2d20c7f496 tdf#143148 Use pragma once instead of include guards
Change-Id: Iad316b8ca0f443c545b341c62ab30bbe22fca380
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203250
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-04-07 08:37:24 +02:00
Andrea Gelmini ac3f25a2b2 Fix typo "then"->"than" + "its" -> "it's"
Change-Id: I3b258d33b9b18d3ea3ed1d9f30c821798802ce70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202918
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-03-29 09:49:42 +02:00
Michael Weghorn 1e14da903b vcl: Pass SvLBoxItem::InitViewData's first param by ref
... instead of by pointer.
This also allows to drop one superfluous null check
in SvLBoxButton::InitViewData.

Change-Id: Iefbfc4c701effefbc618f2eaa0b101edbd6ee176
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202346
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-03-24 08:07:04 +01:00
Michael Weghorn 441584ea53 vcl: Pass SvLBoxItem::Get{Width,Height}'s SvTreeListBox param by ref
... instead of by pointer.

Change-Id: I077dfed17bf2dad6e503d2e5c69cf670b089c4de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202344
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-03-24 08:06:25 +01:00
Noel Grandin 6ead4fad33 Fraction->double in vcl::Window
Change-Id: I5628be6ae9f3c37c6b96dbfa8c029bffa51dc471
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202311
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-22 20:20:15 +01:00
Mike Kaganski 114eaf82fd tdf#170961: unlock guard during UnoControl::createPeer
A deadlock seen with the following call stacks.

Main thread is trying to paint in a timer event, and is waiting for
the UnoControl's mutex:

  ntdll.dll!NtWaitForAlertByThreadId()
  ntdll.dll!RtlpWaitOnCriticalSection()
  ntdll.dll!RtlpEnterCriticalSectionContended()
  ntdll.dll!RtlEnterCriticalSection()
  sal3.dll!osl_acquireMutex(_oslMutexImpl * Mutex) Line 65
  tklo.dll!osl::Mutex::acquire() Line 63
  tklo.dll!osl::Guard<osl::Mutex>::Guard<osl::Mutex>(osl::Mutex & t) Line 144
• tklo.dll!UnoControl::getPosSize() Line 745
  tklo.dll!UnoDialogControl::getPosSize() Line 104
  svxcorelo.dll!sdr::contact::`anonymous namespace'::ControlHolder::getPosSize() Line 234
  svxcorelo.dll!sdr::contact::`anonymous namespace'::ControlHolder::setPosSize(const tools::Rectangle & _rPosSize) Line 220
  svxcorelo.dll!sdr::contact::UnoControlContactHelper::adjustControlGeometry_throw(const sdr::contact::`anonymous-namespace'::ControlHolder & _rControl, const tools::Rectangle & _rLogicBoundingRect, const basegfx::B2DHomMatrix & _rViewTransformation, const basegfx::B2DHomMatrix & _rZoomLevelNormalization) Line 316
  svxcorelo.dll!sdr::contact::ViewObjectContactOfUnoControl_Impl::positionAndZoomControl(const basegfx::B2DHomMatrix & _rViewTransformation) Line 940
  svxcorelo.dll!sdr::contact::ViewObjectContactOfUnoControl::isPrimitiveVisible(const sdr::contact::DisplayInfo & _rDisplayInfo) Line 1717
  svxcorelo.dll!sdr::contact::ViewObjectContact::getPrimitive2DSequenceHierarchy(sdr::contact::DisplayInfo & rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor & rVisitor) Line 559
  svxcorelo.dll!sdr::contact::ViewContact::getPrimitive2DSequenceHierarchyOfIndex(unsigned long a, sdr::contact::DisplayInfo & rDisplayInfo, sdr::contact::ObjectContact & rObjectContact, drawinglayer::primitive2d::Primitive2DDecompositionVisitor & rVisitor) Line 324
  svxcorelo.dll!sdr::contact::ViewObjectContact::getPrimitive2DSequenceSubHierarchy(sdr::contact::DisplayInfo & rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor & rVisitor) Line 594
  svxcorelo.dll!sdr::contact::ViewObjectContactOfPageHierarchy::getPrimitive2DSequenceHierarchy(sdr::contact::DisplayInfo & rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor & rVisitor) Line 371
  svxcorelo.dll!sdr::contact::ViewContact::getPrimitive2DSequenceHierarchyOfIndex(unsigned long a, sdr::contact::DisplayInfo & rDisplayInfo, sdr::contact::ObjectContact & rObjectContact, drawinglayer::primitive2d::Primitive2DDecompositionVisitor & rVisitor) Line 324
  svxcorelo.dll!sdr::contact::ViewObjectContact::getPrimitive2DSequenceSubHierarchy(sdr::contact::DisplayInfo & rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor & rVisitor) Line 594
  svxcorelo.dll!sdr::contact::ViewObjectContactOfSdrPage::getPrimitive2DSequenceHierarchy(sdr::contact::DisplayInfo & rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor & rVisitor) Line 569
  svxcorelo.dll!sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo & rDisplayInfo) Line 252
  svxcorelo.dll!sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo & rDisplayInfo) Line 128
  svxcorelo.dll!SdrPageWindow::RedrawLayer(const o3tl::strong_int<short,SdrLayerIDTag> * pId, sdr::contact::ViewObjectContactRedirector * pRedirector, const basegfx::B2IRange * pPageFrame) Line 422
  svxcorelo.dll!SdrPageView::DrawLayer(o3tl::strong_int<short,SdrLayerIDTag> nID, OutputDevice * pGivenTarget, sdr::contact::ViewObjectContactRedirector * pRedirector, const tools::Rectangle & rRect, const basegfx::B2IRange * pPageFrame) Line 304
  svxcorelo.dll!SdrPaintView::ImpFormLayerDrawing(SdrPaintWindow & rPaintWindow, sdr::contact::ViewObjectContactRedirector * pRedirector) Line 798
  svxcorelo.dll!SdrPaintView::EndCompleteRedraw(SdrPaintWindow & rPaintWindow, bool bPaintFormLayer, sdr::contact::ViewObjectContactRedirector * pRedirector) Line 653
  svxcorelo.dll!SdrPaintView::EndDrawLayers(SdrPaintWindow & rPaintWindow, bool bPaintFormLayer, sdr::contact::ViewObjectContactRedirector * pRedirector) Line 726
  basctllo.dll!basctl::DlgEditor::Paint(OutputDevice & rRenderContext, const tools::Rectangle & rRect) Line 564
  basctllo.dll!basctl::DialogWindow::Paint(OutputDevice & rRenderContext, const tools::Rectangle & rRect) Line 124
  vcllo.dll!PaintHelper::DoPaint(const vcl::Region * pRegion) Line 316
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 618
  vcllo.dll!PaintHelper::~PaintHelper() Line 553
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 624
  vcllo.dll!PaintHelper::~PaintHelper() Line 553
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 624
  vcllo.dll!PaintHelper::~PaintHelper() Line 553
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 624
  vcllo.dll!PaintHelper::~PaintHelper() Line 553
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 624
  vcllo.dll!PaintHelper::~PaintHelper() Line 553
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 624
  vcllo.dll!PaintHelper::~PaintHelper() Line 553
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, ImplPaintFlags nPaintFlags) Line 624
  vcllo.dll!vcl::Window::ImplCallOverlapPaint() Line 645
  vcllo.dll!vcl::Window::ImplHandlePaintHdl(Timer * __formal) Line 668
  vcllo.dll!vcl::Window::LinkStubImplHandlePaintHdl(void * instance, Timer * data) Line 649
  vcllo.dll!Link<Timer *,void>::Call(Timer * data) Line 105
  vcllo.dll!Timer::Invoke() Line 75
  vcllo.dll!Scheduler::CallbackTaskScheduling() Line 615
  vcllo.dll!SalTimer::CallCallback() Line 53
  vclplug_winlo.dll!WinSalTimer::ImplHandleElapsedTimer() Line 169
  vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 443
  vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 499
  vcllo.dll!InnerYield(bool i_bWait, bool i_bAllEvents) Line 389
  vcllo.dll!Application::Yield() Line 502
  vcllo.dll!Application::Execute() Line 365
  sofficeapp.dll!desktop::Desktop::Main() Line 1681
  vcllo.dll!ImplSVMain() Line 230
  vcllo.dll!SVMain() Line 249
  sofficeapp.dll!soffice_main() Line 122
  soffice.bin!sal_main() Line 51
  soffice.bin!main(int argc, char * * argv) Line 49
  soffice.bin!invoke_main() Line 79
  soffice.bin!__scrt_common_main_seh() Line 288
  soffice.bin!__scrt_common_main() Line 331
  soffice.bin!mainCRTStartup(void * __formal) Line 17
  kernel32.dll!BaseThreadInitThunk()
  ntdll.dll!RtlUserThreadStart()

while the worker thread is in UnoControl::createPeer, holding the mutex
(and its calling UnoControlContainer::createPeer is holding the same
mutex), and is sending a message to the main thread synchronously:

  win32u.dll!NtUserMessageCall()
  user32.dll!SendMessageWorker()
  user32.dll!SendMessageInternal(struct HWND__ *,unsigned int,unsigned __int64,__int64,int)
  user32.dll!SendMessageW()
  vclplug_winlo.dll!WinSalInstance::SendWndMessage_impl(HWND__ * hWnd, unsigned int Msg, unsigned __int64 wParam, __int64 lParam) Line 689
  vclplug_winlo.dll!WinSalInstance::SendComWndMessage(unsigned int Msg, unsigned __int64 wParam, __int64 lParam) Line 700
  vclplug_winlo.dll!WinSalFrame::AcquireGraphics() Line 1015
  vcllo.dll!vcl::WindowOutputDevice::AcquireGraphics() Line 838
  vcllo.dll!OutputDevice::IsNativeControlSupported(ControlType nType, ControlPart nPart) Line 140
  vcllo.dll!vcl::Window::IsNativeControlSupported(ControlType nType, ControlPart nPart) Line 78
  vcllo.dll!Dialog::ImplInitSettings() Line 526
  vcllo.dll!Dialog::ImplInitDialog(vcl::Window * pParent, __int64 nStyle, Dialog::InitFlag eFlag) Line 497
  vcllo.dll!Dialog::Dialog(vcl::Window * pParent, __int64 nStyle, Dialog::InitFlag eFlag) Line 588
  tklo.dll!toolkit::ScrollableDialog::ScrollableDialog(vcl::Window * pParent, __int64 nStyle, Dialog::InitFlag eFlag) Line 33
  tklo.dll!VclPtr<toolkit::ScrollableDialog>::Create<vcl::Window * &,__int64 &>(vcl::Window * & <arg_0>, __int64 & <arg_1>) Line 153
  tklo.dll!`anonymous namespace'::VCLXToolkit::ImplCreateWindow(rtl::Reference<VCLXWindow> * ppNewComp, const com::sun::star::awt::WindowDescriptor & rDescriptor, vcl::Window * pParent, __int64 nWinBits, MessBoxStyle nMessBoxStyle) Line 1501
  tklo.dll!`anonymous namespace'::VCLXToolkit::ImplCreateWindow(const com::sun::star::awt::WindowDescriptor & rDescriptor, MessBoxStyle nForceMessBoxStyle) Line 1822
  tklo.dll!`anonymous namespace'::VCLXToolkit::createWindow(const com::sun::star::awt::WindowDescriptor & rDescriptor) Line 965
• tklo.dll!UnoControl::createPeer(const com::sun::star::uno::Reference<com::sun::star::awt::XToolkit> & rxToolkit, const com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> & rParentPeer) Line 1262
  tklo.dll!UnoControlContainer::createPeer(const com::sun::star::uno::Reference<com::sun::star::awt::XToolkit> & rxToolkit, const com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> & rParent) Line 727
  tklo.dll!UnoDialogControl::createPeer(const com::sun::star::uno::Reference<com::sun::star::awt::XToolkit> & rxToolkit, const com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> & rParentPeer) Line 357
  tklo.dll!UnoControl::ImplModelPropertiesChanged(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyChangeEvent> & rEvents) Line 610
  tklo.dll!ControlContainerBase::ImplModelPropertiesChanged(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyChangeEvent> & rEvents) Line 1567
  tklo.dll!UnoDialogControl::ImplModelPropertiesChanged(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyChangeEvent> & rEvents) Line 650
  tklo.dll!UnoControl::propertiesChange(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyChangeEvent> & rEvents) Line 420
  cppuhelper3MSC.dll!cppu::OPropertySetHelper::fire(long * pnHandles, const com::sun::star::uno::Any * pNewValues, const com::sun::star::uno::Any * pOldValues, long nHandles, unsigned char bVetoable) Line 779
  comphelper.dll!comphelper::OPropertySetAggregationHelper::propertiesChange(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyChangeEvent> & _rEvents) Line 398
  comphelper.dll!comphelper::OPropertySetHelper::fire(std::unique_lock<std::mutex> & rGuard, const long * pnHandles, const com::sun::star::uno::Any * pNewValues, const com::sun::star::uno::Any * pOldValues, long nHandles, bool bVetoable) Line 594
  comphelper.dll!comphelper::OPropertySetHelper::impl_fireAll(std::unique_lock<std::mutex> & rGuard, long * i_handles, const com::sun::star::uno::Any * i_newValues, const com::sun::star::uno::Any * i_oldValues, long i_count) Line 487
  comphelper.dll!comphelper::OPropertySetHelper::setFastPropertyValues(std::unique_lock<std::mutex> & rGuard, long nSeqLen, long * pHandles, const com::sun::star::uno::Any * pValues, long nHitCount) Line 748
  tklo.dll!UnoControlModel::setFastPropertyValueImpl(std::unique_lock<std::mutex> & rGuard, long nPropId, const com::sun::star::uno::Any & rValue) Line 1247
  comphelper.dll!comphelper::OPropertySetHelper::setFastPropertyValue(long nHandle, const com::sun::star::uno::Any & rValue) Line 393
  comphelper.dll!comphelper::OPropertySetAggregationHelper::setFastPropertyValue(long _nHandle, const com::sun::star::uno::Any & _rValue) Line 528
  cppuhelper3MSC.dll!cppu::OPropertySetHelper::setPropertyValue(const rtl::OUString & rPropertyName, const com::sun::star::uno::Any & rValue) Line 264
  pcrlo.dll!pcr::EditPropertyHandler::setPropertyValue(const rtl::OUString & _rPropertyName, const com::sun::star::uno::Any & _rValue) Line 147
  pcrlo.dll!pcr::OPropertyBrowserController::Commit(const rtl::OUString & rName, const com::sun::star::uno::Any & _rValue) Line 1326
  pcrlo.dll!pcr::OBrowserListBox::valueChanged(const com::sun::star::uno::Reference<com::sun::star::inspection::XPropertyControl> & _rxControl) Line 637
  pcrlo.dll!pcr::PropertyControlContext_Impl::impl_processEvent_throw(const comphelper::AnyEvent & _rEvent) Line 291
  pcrlo.dll!pcr::PropertyControlContext_Impl::processEvent(const comphelper::AnyEvent & _rEvent) Line 272
  comphelper.dll!comphelper::AsyncEventNotifierBase::execute() Line 138
  comphelper.dll!comphelper::AsyncEventNotifier::execute() Line 155
  salhelper3MSC.dll!salhelper::Thread::run() Line 40
  salhelper3MSC.dll!threadFunc(void * param) Line 190
  sal3.dll!oslWorkerWrapperFunction(void * pData) Line 67
  ucrtbased.dll!thread_start<unsigned int (__cdecl*)(void *),1>(void * const parameter) Line 97
  kernel32.dll!BaseThreadInitThunk()
  ntdll.dll!RtlUserThreadStart()

Change-Id: Ie36fe63b7de9cd04570a3ca625ff5ffa13806d91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202298
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-03-22 11:59:02 +01:00
Michael Weghorn 5159ca63d3 toolkit: Use GetSystemClipboard() in VCLXToolkit
... instead of manually calling the SystemClipboard
service ctor.

Change-Id: Ic0b2943d7b06199303d34ea46c6863b8165aca6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200655
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-02-28 16:31:44 +01:00
Samuel Mehrbrodt ea43b6506e Add missing BASEPROPERTY_REFERER default
Fixes warnings like:
  warn:legacy.osl:1638172:1638172:toolkit/source/controls/unocontrolmodel.cxx:376: ImplGetDefaultValue - unknown Property

Change-Id: I4118c01770fc3404c064b58deeba94655d83e670
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200061
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
Tested-by: Jenkins
2026-02-26 07:46:58 +01:00
Swarnadeep Paul 42d6a8c3ab tdf#114441 Replace sal_uLong in svx
These were all comments removed for consistency.

Change-Id: I9a95f22959ac7a969662d748327485ec5773899d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199921
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2026-02-25 18:45:54 +01:00
Gabor Kelemen 94d987edc2 tdf#146619 Use more forward declarations in include/toolkit
Change-Id: I46b4f8c398662b2826f7e4bf90f43750e3569667
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198240
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-07 00:41:15 +01:00
Gabor Kelemen 76eb42c5aa tdf#146619 Use more forward declarations in include/svl
This shaves off some 40M of input

Change-Id: I89411ee8d94963ec6bc16fe155c885d2c78ee3a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198233
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-31 16:36:16 +01:00
Gabor Kelemen f8dad0daf9 tdf#146619 Use more forward declarations in include/vcl/svapp.hxx
this was skipped in previous runs, since it contains some code behind #if

After inspecting these, it seems like the removals should not cause trouble.

Change-Id: If1e3e3c7c0fc14ed6e8b51174a0e7f1220fdbc8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197496
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-25 13:31:57 +01:00
Gabor Kelemen 49cb3077fb tdf#146619 Use more forward declarations in include/vcl/outdev.hxx
these were skipped in previous runs, since they contain some code behind #if

After inspecting these, it seems like the removals should not cause trouble.

This also shaves off some 140M input

Change-Id: Ie1f57174dd6fec3ba5b0b91eb0688acdc1a8143d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197494
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-23 21:27:08 +01:00