1443 Commits
Author SHA1 Message Date
Michael Weghorn ec99b899d4 vcl: Pass SvLBoxItem::Paint's SvVieweDataEntry param by ref
... instead of by pointer.

This makes clear it's always non-null.

Change-Id: Iea22c33171572eec0533550293a793372d889ee9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211569
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-29 19:40:29 +02:00
Michael Weghorn e4f1a48967 toolkit: Rename TableControl header/source to match new class name
Following

    Change-Id: I54e578098684a027c9bf2f192a5af3fecb4e65d7
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Sep 18 15:44:17 2026 +0200

        toolkit: Rename TableControl_Impl to TableControl

, also rename the header and source file to match
with the new class name.
(See that commit's commit message for more background.)

Change-Id: I5d7c4251902689718b9b2f3217671cad5b071201
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211163
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:19:11 +02:00
Michael Weghorn b580576a4d toolkit: Rename TableControl_Impl to TableControl
As mentioned in previous commit

    Change-Id: I82c89866e90f4d29964626d483872e0eafbc4dbe
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Sep 18 15:30:10 2026 +0200

        toolkit: Merge TableControl into TableControl_Impl

, rename TableControl_Impl to simply TableControl,
now that the two classes were merged.

The header and source
file will also be renamed accordingly.
Do it as a separate step to keep the diff of the
single commits clearer.

Change-Id: I54e578098684a027c9bf2f192a5af3fecb4e65d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211162
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:18:55 +02:00
Michael Weghorn 39749ff5b4 toolkit: Merge TableControl into TableControl_Impl
So far, most of the logic for the TableControl
widget was implemented in the TableControl_Impl
implementation class that was held by the
TableControl via a std::shared_ptr
(TableControl::m_pImpl member).

However, other classes were also using the
TableControl_Impl directly.

Stop that separation and simplify code by merging
TableControl into TableControl_Impl. As mentioned,
the latter already implemented most of the logic,
so it is easier to merge the remaining logic into
that class than the other way around.

Move the remaining TableControl logic into
TableControl_Impl, in particular make TableControl_Impl
a Control subclass and move the vcl::Window/Control
overrides to TableControl_Impl.

Now that TableControl_Impl is a vcl::Window subclass,
VclPtr is the appropriate way for handling shared
ownership and no longer std::shared_ptr.
Therefore, switch to using VclPtr instead of shared_ptr
in the corresponding ITableModel methods
(ITableModel::addTableModelListener and
ITableModel::removeTableModelListener) and corresponding
data structures used in the subclasses.
See also commit message of previous commit

    Change-Id: I74b9b29f03d03571709d1c8a7b416b0a6a12319a
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Sep 18 11:07:29 2026 +0200

        toolkit: Use TableControl_Impl directly instead of ITableModelListener

that was already preparing for that change.

No change in behavior intended.

Now that there is no more TableControl that owns it,
it makes sense to rename TableControl_Impl to TableControl.
That will happen in a separate upcoming commit, to keep
the diff clearer/more manageable.

Change-Id: I82c89866e90f4d29964626d483872e0eafbc4dbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211161
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:18:34 +02:00
Michael Weghorn 9ae0be402d toolkit: Switch TableFunctionSet::m_pTableControl to reference
Switch from pointer to reference, which makes clear that
it's always non-null. Rename accordingly.

Change-Id: If8a3597d1fb42f7714bbdafd1dde2826d6f46824
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211160
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:17:23 +02:00
Michael Weghorn aba6f04a71 toolkit: Align TableControl_Impl method names with TableControl
In most of its methods, TableControl simply calls a corresponding
method in TableControl_Impl. Most of them have the same name
in both classes, but start with an upper case letter in TableControl
and a lower case letter in TableControl_Impl.

Align the names to match, mostly by switching the TableControl_Impl
variants to also start with an upper case letter, and renaming a few
others that had different names.

This is in preparation of merging TableControl into TableControl_Impl,
so that the callers of the methods don't need to be adjusted to
use the (so far) differing method names.

Change-Id: Ie554a6f889f8993b37e494d2e66f3e4d88d503eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211158
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-19 16:16:27 +02:00
Michael Weghorn 4a61a11f0c toolkit: Drop RowPos and ColPos typedefs for sal_Int32
Those are partially used in TableControl_Impl and elsewhere.
On the other hand, TableControl uses sal_Int32 directly,
i.e. the TableControl methods using sal_Int32 call the
TableControl_Impl equivalents using the typedefs.

Unify this to consistently use sal_Int32 directly.

This will also make merging TableControl and
TableControl_Impl more straightforward, which
is planned for an upcoming commit.

Change-Id: I96c83bcd69ad84012194865f19ad0fc507f11e1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211157
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:15:41 +02:00
Michael Weghorn bf6891fefa toolkit: Use TableControl_Impl directly instead of ITableModelListener
TableControl_Impl is the only class implementing/subclassing the
ITableModelListener interface/base class.

Switch to using TableControl_Impl directly instead of the
abstract base class. This also requires that TableControl_Impl
now needs to subclass std::enable_shared_from_this instead
of ITableModelListener doing so.

This commmit prepares for merging TableControl and TableControl_Impl
in an upcoming commit, at which point the std::shared_ptr will
be replaced by a VclPtr as TableControl is a vcl::Window subclass.

Change-Id: I74b9b29f03d03571709d1c8a7b416b0a6a12319a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211156
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:15:14 +02:00
Michael Weghorn 3636f27982 toolkit: Move TableControl::Select{Row,AllRows} logic to its impl
Most of the TableControl logic is already implemented
in its implementation class, TableControl_Impl and
most TableControl methods just forward to the
corresponding TableControl_Impl ones.

This commit is part of a series to implement that approach
for more methods by moving the logic to TableControl_Impl,
to make the handling more consistent and prepare for merging
TableControl and TableControl_Impl in an upcoming commit.

Change-Id: I19e2c30d9b6c09a1621fd9097ab394e80c9821b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211155
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-19 16:14:46 +02:00
Michael Weghorn 8705275e1e toolkit: Move TableControl a11y logic to its impl
Most of the TableControl logic is already implemented
in its implementation class, TableControl_Impl and
most TableControl methods just forward to the
corresponding TableControl_Impl ones.

This commit is part of a series to implement that approach
for more methods by moving the logic to TableControl_Impl,
to make the handling more consistent and prepare for merging
TableControl and TableControl_Impl in an upcoming commit.

Change-Id: I9540a25c008d003b24c52309255b9009e01d09eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211154
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:14:15 +02:00
Michael Weghorn c3a108217d toolkit: Move TableControl::ConvertPointToCellAddress logic to its impl
Most of the TableControl logic is already implemented
in its implementation class, TableControl_Impl and
most TableControl methods just forward to the
corresponding TableControl_Impl ones.

This commit is part of a series to implement that approach
for more methods by moving the logic to TableControl_Impl,
to make the handling more consistent and prepare for merging
TableControl and TableControl_Impl in an upcoming commit.

Change-Id: Ibf26eebf0506d6cfc5448064075eae9412ff1fc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211153
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:13:54 +02:00
Michael Weghorn f94f2a46ac toolkit: Move TableControl::Get{Row,Column}Count logic to its impl
Most of the TableControl logic is already implemented
in its implementation class, TableControl_Impl and
most TableControl methods just forward to the
corresponding TableControl_Impl ones.

Implement that approach for more methods by moving the
logic to TableControl_Impl, to make the handling more
consistent and prepare for merging TableControl and
TableControl_Impl in an upcoming commit.

Change-Id: Ic551ed5e3a0298744602dd0c0abbaa9e1662fc9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211152
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-19 16:13:28 +02:00
Michael Weghorn 94d5d4d422 toolkit: Drop TableControl::GoTo
It does the same as TableControl::GoToCell, so replace the
only call to the former with a call to the latter.

Change-Id: I85905afb0e56a4b00686723a7e80a12f1519bdd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211151
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-19 16:13:04 +02:00
Michael Weghorn c28005e6d0 toolkit: Move more TableControl logic to its TableControl_Impl
Most of the TableControl logic is already implemented
in its implementation class, TableControl_Impl and
most TableControl methods just forward to the
corresponding TableControl_Impl ones.

Implement that approach for more methods by moving the
logic to TableControl_Impl, to make the handling more
consistent and prepare for merging TableControl and
TableControl_Impl in an upcoming commit.

Change-Id: If2b911371aad21a28f396d473f9e0dd7e5b33fde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211094
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:12:41 +02:00
Michael Weghorn b272ab71b3 toolkit: Drop unnecessary call of std::shared_ptr<ITableModel> ctor
SVTXGridControl::m_xTableModel is a
std::shared_ptr<svt::table::UnoControlTableModel> and
svt::table::UnoControlTableModel is a ITableModel subclass,
so can be passed as is, without the need to explicitly
construct a std::shared_ptr<ITableModel>.

Change-Id: Ifecbc38634ff747d3b28077338114d6437e6ebc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211093
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-19 16:12:21 +02:00
Michael Weghorn a37a55a60a toolkit a11y: Use 'r' instead of 'a' prefix for reference
Adhere to naming conventions to make clear this is a
reference.

Change-Id: I4d5fe59c86e24a1cccb3bbe6a208f9f427c2ce5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211092
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-19 16:12:02 +02:00
Michael Weghorn 3907b7f22f toolkit: Move TableFunctionSet to its own header/source
Move the TableFunctionSet class definition and implementation out of the
header/source used for TableControl_Impl to an own/separate one.

This is in preparation of merging TableControl_Impl with
TableControl in an upcoming commit.

Change-Id: I9a0f9cd37db5763e8cd9deea727f2fe036b9375f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211091
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-19 16:11:48 +02:00
Michael Weghorn c0d5df0390 toolkit: clang-format UnoControlTableModel code
This in particular also gets rid of an extra level
of indentation.

Change-Id: I154e017e604fcab8026d34ea9580f33a1f7c7e5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211086
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:11:32 +02:00
Michael Weghorn 594a6f6d06 toolkit: Use concrete TableControl_Impl instead of abstract base class
Switch members/params from the abstract ITableControl to the
concrete TableControl_Impl that is the only actual implementation/
subclass of ITableControl.

This is in preparation of Dropping ITableControl completely in
an upcoming commit.

Change-Id: I1b3bcb87f771f64dd7bf07f1047279524de432fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211084
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:10:44 +02:00
Michael Weghorn f5615d0811 toolkit: Move TableControl_Impl header to toolkit-internal inc dir
Make the header a bit more widely available inside the
toolkit module.

This is in preparation of merging TableControl_Impl with
its abstract ITableControl base class/interface and
merging TableControl with TableControl_Impl in upcoming
commits.

Change-Id: Id38183ac369f9d90571904816b1f3fbce1e12fa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211083
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:10:26 +02:00
Michael Weghorn fd18ac0dbd toolkit: Make FunctionResult an enum class
Change-Id: I873a28cb00e536b830b623baa691de4ba81b1370
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211082
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:09:59 +02:00
Michael Weghorn e094407cae toolkit: clang-format svt::table::MouseFunction subclasses code
This in particular also gets rid of an extra level of indentation
in toolkit/source/controls/table/mousefunction.cxx.

Change-Id: I1e5f8db7b281fb1d68d7819c5d99efae13c0cea4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211081
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:09:32 +02:00
Michael Weghorn d3a3a0a739 toolkit: clang-format svt::table::DefaultInputHandler code
This in particular also gets rid of an extra level of indentation.

Change-Id: I4b2c60f6c40ba81a622e7e286ffe6978d41c708a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211080
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-19 16:09:17 +02:00
Michael Weghorn c94c18341e toolkit a11y: Switch AccessibleGridControlBase::m_xParent to OAccessible
Switch from the abstract XAccessible UNO interface to the
more concrete OAccessible for AccessibleGridControlBase::m_xParent
and rename accordingly.

Drop now no longer needed method calls and UNO queries
to get the XAccessibleContext and XAccessibleComponent interfaces,
because OAccessible directly implements those interfaces
itself as well.

Change-Id: I39e8453f087568c78c2f7de6634d87bde2717956
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210633
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-10 18:34:27 +02:00
Michael Weghorn e341b072d3 toolkit a11y: Pass OAccessible for AccessibleGridControlBase parent
The parent is always an OAccessible subclass.
Pass that more concrete type for the parent param instead
of the abstract XAccessible UNO interface.

Change-Id: I4880448db03dcc89076dc72d45902c0bf2f16d83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210632
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-10 18:34:19 +02:00
Michael Weghorn 14c4068c8e toolkit a11y: Pass OAccessible for AccessibleGridControl parent
The parent is always an OAccessible subclass.
Pass that more concrete type for the parent param instead
of the abstract XAccessible UNO interface.

Change-Id: Id2c3cb8c9095f338c5c1072bf86486bbf9260a79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210631
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-10 18:34:11 +02:00
Michael Weghorn 067915ecb3 toolkit a11y: Switch TableControl_Impl::getAccessible param to OAccessible
Pass a more concrete OAccessible instead of the abstract
XAccessible UNO interface for the parent param.

Change-Id: I0a363d3174b304f019f7005cc5d7f219d0e150b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210630
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-10 18:34:03 +02:00
Michael Weghorn 7c130f7f93 toolkit: clang-format TableControl_Impl code
This in particular also gets rid of an extra level
of indentation.

Change-Id: Iceace592edb15bdbadce55e86b2e460d71fb771d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210629
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-10 18:33:55 +02:00
Michael Weghorn 075aa89667 toolkit: clang-format TableControl code
This in particular also gets rid of an extra level
of indentation.

Change-Id: I57f636a694a99910d2a04a037a6cda0a8f385e61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210628
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-10 18:33:45 +02:00
Michael Weghorn 332d2279b6 toolkit a11y: Use OAccessible in TableControl::CreateAccessible
Switch the local variable from the abstract XAccessible UNO
interface to the more concrete OAccessible base class.

This also prepares for more upcoming changes.

Change-Id: I8f33c4bea80052ebfc0d2ec21889f865e0cc5d6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210627
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-10 18:33:37 +02:00
Michael Weghorn c3b1f8a6e1 toolkit a11y: Pass OAccessible for AccessibleGridControlCell parent
The parent is always an OAccessible subclass.
Pass that more concrete type for the parent param instead
of the abstract XAccessible UNO interface.

Change-Id: If072062b295195b9599ad20af72d4fbf3eb6fc8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210626
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-10 18:33:29 +02:00
Michael Weghorn 77e6c95623 toolkit a11y: Pass AccessibleGridControlTable for its cell parent
The parent of a AccessibleGridControlTableCell is always the
AccessibleGridControlTable it belongs to.

Pass that concrete type to the ctor instead of the abstract
XAccessible UNO interface.

Change-Id: I3ff1c0f9f1a9bd81d07b8ff825b11d763c3863cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210625
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-10 18:33:20 +02:00
Michael Weghorn 44635146f6 toolkit a11y: Pass AccessibleGridControlHeader for its cell parent
The parent of a AccessibleGridControlHeaderCell is always the
AccessibleGridControlHeader it belongs to.

Pass that concrete type to the ctor instead of the abstract
XAccessible UNO interface.

Change-Id: I17069674b5bd853e07b6b1551f291994f21c7eb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210624
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-10 18:33:02 +02:00
Michael Weghorn f568c64948 toolkit a11y: Pass OAccessible for AccessibleGridControlTableBase parent
The parent is always an OAccessible subclass, so use that
more concrete type for the parent param of the ctor
instead of the abstract XAccessible UNO interface.

Change-Id: I938d73cef38385a562b516758bdbb7bb8d7dc5bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210623
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-10 18:32:54 +02:00
Michael Weghorn b0777def2f toolkit a11y: Pass OAccessible for AccessibleGridControlTable parent
The parent is always an OAccessible subclass, so use that
more concrete type for the parent param of the ctor
instead of the abstract XAccessible UNO interface.

Change-Id: Icaeca70a28b87c2b2f9e5b07581777f0dd4cec3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210622
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-10 18:32:46 +02:00
Michael Weghorn 28876ba49f toolkit a11y: Pass OAccessible for AccessibleGridControlHeader parent
The parent is always an OAccessible subclass, so use that
more concrete type for the parent param of the
AccessibleGridControlHeader ctor instead of the
abstract XAccessible UNO interface.

Change-Id: Ib0575f725f553b8345bd3f02085fa073a500cd92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210621
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-10 18:32:38 +02:00
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
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