Commit Graph
100 Commits
Author SHA1 Message Date
Michael Weghorn a19da3e1cd [API CHANGE] Pass XAccessible to XAccessibleGroupPosition::getGroupPosition
Instead of passing an XAccessibleContext wrapped in a uno::Any,
pass the XAccessible. This drops an extra level of
wrapping/unwrapping.

The same will be done for XAccessibleGroupPosition::getObjectLink
in an upcoming commit.

Since the XAccessibleGroupPosition interface
(and the UNO a11y API in general) is unpublished
and meant for internal use only, changing it should
be unproblematic.

Change-Id: I5db3a99bb8d78099e3b136cbcd402fe2ae49d49c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211216
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:23:52 +02:00
Michael Weghorn c9aadb8a2e svx a11y: Return directly in SvxRectCtlAccessibleContext::getAccessibleAtPoint
Return result directly, without assigning to a local XAccessible
var first.

Change-Id: If9418dcb474d5e87c13d6219f1ea877aff579ec3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211222
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:22:42 +02:00
Michael Weghorn d2a4355fd9 svtools a11y: Return directly in ValueItemAcc::getAccessibleAtPoint
Drop local variable and simply return the empty
reference right-away.

Change-Id: I85dd3db8bdf3190dfb5634d62c687900969c5651
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211221
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:22:20 +02:00
Michael Weghorn f59c0bbdf9 svtools a11y: Return result without assigning to local var first
Return result directly, without assigning to a local XAccessible
var first.

Change-Id: Iae083481d969e3266b79c124bda5230f71dd9641
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211220
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:22:02 +02:00
Michael Weghorn 0dd55d48d8 svtools a11y: Drop local var in AccessibleTabBarPageList::getAccessibleParent
Return result directly, without assigning to a local XAccessible
var first.

Change-Id: Iaec2859b75c5959600b1ceda74dbe0086147e4c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211219
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:21:36 +02:00
Michael Weghorn 4bec79c9d1 svtools a11y: Switch AccessibleTabBarPage::m_xParent to OAccessible
Use the more concrete OAccessible instead of the abstract
XAccessible UNO interface for AccessibleTabBarPage::m_xParent,
to make clear the parent is always a subclass of that class.

Change-Id: If70401a3403a9c2a6e2205a82bc7fe705d4be510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211218
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:21:13 +02:00
Michael Weghorn 6b81401b71 sd a11y: Switch AccessibleObject::mxParentAccessible to OAccessible
Use the more concrete OAccessible instead of the abstract XAccessible
UNO interface for that member.

Drop now unnecessary querying for the XAccessibleContext UNO
interface, as OAccessible implements that interface itself
as well.

Change-Id: I689af3c6b72f442967ab7fe4c39d438fc68b09fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211215
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:20:48 +02:00
Michael Weghorn b5113cdb5c sd a11y: Pass OAccessible to AccessibleObject::SetAccessibleParent
Use the more concrete OAccessible for the parent param
instead of the abstract XAccessible UNO interface, to
make clear that the parent is always an OAccessible subclass.

Change-Id: I6447f6131e809baddc24a4b413fe4d4748aa7a7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211214
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:20:11 +02:00
Michael Weghorn 958481f2e2 sd a11y: Switch PresenterAccessible::mxAccessibleParent to OAccessible
Use the more concrete OAccessible instead of the
abstract XAccessible UNO interface for that member.

Change-Id: Id811da24db3e48baefa22343d999541cd31546af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211213
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:19:44 +02:00
Michael Weghorn 153e3af7b4 sc a11y: Pass OAccessible to ScAccessibleDocument::RemoveChild
Pass param by the more concrete OAccessible instead
of using the abstract XAccessible UNO interface.

Change-Id: I8f7a2b22328da38e4d0d62b8c91bc45354a1bef9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211212
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:19:24 +02:00
Michael Weghorn f0581dd8da sc a11y: Return directly in ScAccessibleTableBase methods
Return a default-constructed empty reference directly
instead of first assigning it to a local XAccessible variable.

Change-Id: I8cfb0a22f189eb82643a2b865ccc3bf065cacf9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211211
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:18:55 +02:00
Michael Weghorn a638e417c2 sc a11y: Use OAccessible in ScAccessiblePreviewTable::getAccessibleCellAt
Use more concrete type instead of the abstract
XAccessible UNO interface for the local variable.

Change-Id: I17149ff7a1be1e3ebf76d2a40f16df564d43437b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211210
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:18:38 +02:00
Michael Weghorn 9d8f019f2e sc a11y: Drop redundant OAccessible::getAccessibleContext call
It returns a reference to itself, so is not needed here.

Change-Id: If474740c54f50084ad6f32fde6727ef6df076a9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211209
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:18:21 +02:00
Michael Weghorn 70003dfd3e a11y: Use OAccessible in ScAccessibleDocumentPagePreview::getAccessibleAtPoint
Use the more concrete OAccessible for the local variable
in ScAccessibleDocumentPagePreview::getAccessibleAtPoint instead
of the abstract XAccessible UNO interface.

Change-Id: I4a0df2d86fea83cb9524b61242781c8ae01fed2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211208
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:18:03 +02:00
Michael Weghorn 36f1906093 sc a11y: Use OAccessible in ScAccessibleDocumentPagePreview::getAccessibleChild
Use the more concrete OAccessible for the local variable
in ScAccessibleDocumentPagePreview::getAccessibleChild instead
of the abstract XAccessible UNO interface.

Change-Id: If70ea4a5c3d2a8e038131899a068790e8956e008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211207
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:17:44 +02:00
Michael Weghorn a7592df3d1 sc a11y: Return OAccessible in ScNotesChildren::Get{At,Child}
Return the more concrete OAccessible instead of the
abstract XAccessible UNO interface.

Change-Id: Iac67e2d64bf6cbfcba97d9c41e953ea3f5a1e823
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211206
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:17:27 +02:00
Michael Weghorn 11f46b5535 sc a11y: Use concrete type in ScAccessibleCsvRuler::getAccessibleRelationSet
... for the local variable instead of a reference to the abstract
XAccessible UNO interface.

Change-Id: I8237c5f2020f5cfd265a9587cbbed2db9f150fa4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211205
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:17:08 +02:00
Michael Weghorn d844d94a43 sc a11y: Hold reference to concrete class
... instead of one to the abstract XAccessibleContext UNO interface.

Change-Id: Ia4ca74e903bbaa510ead8661727f938898825b77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211204
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:16:36 +02:00
Michael Weghorn d09b0d2b2d sc a11y: Use concrete type, drop redundant UNO query
Use a local variable of the specific ScAccessibleSpreadsheet
type instead of the abstract XAccessible UNO interface.
This drops the need to explicitly query for the
XAccessibleTable interface, as ScAccessibleSpreadsheet
is known to implement it.

Change-Id: I2c7ab68c699f22d919f75d12758cc0b062de4750
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211203
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:16:19 +02:00
Michael Weghorn 4dd19a1fb8 sc a11y: Don't make overrides of public a11y API methods private
In ScAccessibleSpreadsheet, keep the overrides of methods
defined in UNO accessibility interfaces public.

Otherwise, this would make it impossible to call them
when holding an object by an rtl::Reference<ScAccessibleSpreadsheet>,
while it would work when held e.g. as a
uno::Reference<XAccessibleTable>.

Change-Id: Ia3393b240ef1e0aa1b79b4a99cc6fac803537573
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211202
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:15:58 +02:00
Michael Weghorn dd4e8c4854 sc a11y: Use concrete type for local variable
Use the concrete type instead of the abstract XAccessible
UNO interface.

Change-Id: Ie8df5eb084c18048952ab4f291597540dac708f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211201
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:15:37 +02:00
Michael Weghorn c3c1734b3d UNO API doc: Don't mention a11y in XExtendedToolkit doc
By now, XExtendedToolkit isn't used to implement
accessibility-related logic, so don't claim so in that
UNO interface's documentation.

Interestingly, the doc already mentions that the interface is deprecated:

> @deprecated
>     This interface was only implemented in an intermediate developer
>     release anyway.

Change-Id: I599941d2411daa57a75a78e9ca9d0cdcbb4fa811
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211200
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:15:16 +02:00
Michael Weghorn 3859d524a9 [API CHANGE] Dont mention optional XAccessible iface for UnoControl
The XAccessible UNO interface is unpublished. It exists
as an implementation detail of the current internal
a11y logic. That may change at any point in time.

Don't mention this unpublished interface as an optional
interface to be implemented by the published UnoControl service.

Since

    commit 720a9455a6
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Sep 3 15:55:32 2026 +0200

        a11y: Get UnoControl accessible without implementing XAccessible

, UnoControl doesn't implement the XAccessible interface
any more.

(Since it was already optional before, that didn't break
any guarantee previously given by the service documentation,
but clean that up now.)

Change-Id: Ia3ff7f2e57e7c9b3dd0a3753e57a6c315df09311
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211199
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:14:52 +02:00
Michael Weghorn 26a50065fd vcl a11y: Switch OSL_ENSURE to assert
m_xAccessible is unconditionally dereferenced, so assert
it's non-null instead of just printing a warning if it
isn't.

Change-Id: I323e65b93943b9f42f0c0d4152275645594b2c12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211198
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:14:26 +02:00
Michael Weghorn e3a42b2277 vcl a11y: Directly return result in SvHeaderTabListBox::CreateAccessibleCell
Return the result directly, without assigning it to a local variable
first.

Change-Id: I54f40e0c63643d5ed0d130704f20f58f102eb810
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211197
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:14:03 +02:00
Michael Weghorn c75ab63fdf editeng a11y: Use OWeakObject::getXWeak to disambiguate XInterface inheritance
Change-Id: I82be83663ca690de2ff4be37a95914803880ce67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211196
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:13:33 +02:00
Michael Weghorn dfe90ea98f svx a11y: Pass OAccessible for SvxRectCtlChildAccessibleContext parent
Pass the more concrete OAccessible for the parent instead of the
abstract XAccessible UNO interface, as the parent is known to be
an OAccessible subclass.

Change-Id: If32d481b35b1de8efd54b2523047822de084f5a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211187
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:13:16 +02:00
Michael Weghorn 9a9fdf2ff6 svx a11y: Avoid querying for XComponent iface
In SvxGraphCtrlAccessibleContext::disposing, use a reference
to the concrete accessibility::AccessibleShape instead of
the abstract XAccessible UNO interface from the start, which
drops the need to explicitly query for the XComponent interface.

Change-Id: I943c03ecbf801b3fff0592996ce3d0af352cd3d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211186
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:12:56 +02:00
Michael Weghorn 0052f68196 svtools a11y: Switch SvtRulerAccessible::mxParent to OAccessible
Use the more concrete OAccessible instead of the abstract
XAccessible UNO interface.

Change-Id: Ia5fa91df519662b3ac254369b464f6b60a534748
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211185
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:12:34 +02:00
Michael Weghorn d5d51180a5 svtools a11y: Pass OAccessible for SvtRulerAccessible parent
The parent is known to be an OAccessible subclass, so pass
that more specific type instead of the abstract XAccessible
UNO interface.

Change-Id: Ib7b91301cc77046bf9fb4abb24e43cff7e64690e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211184
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:12:19 +02:00
Michael Weghorn 0c205b7fb8 svtools a11y: Use OAccessible in Ruler::CreateAccessible
Use the more concrete OAccessible for the local variable
instead of the abstract XAccessible UNO interface.

Change-Id: I2ae5f37e473220040379b8096b4e5259394aa076
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211183
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:12:00 +02:00
Michael Weghorn c408a9cfe6 sd a11y: Use concrete type in AccessibleSlideSorterView
Use the concrete known type for the local var instead
of the abstract XAccessible UNO interface in
AccessibleSlideSorterView::getSelectedAccessibleChild.

Change-Id: I7253df538dd0aa2e9003575a33b4572353e852b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211182
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:11:44 +02:00
Michael Weghorn 797c4961a3 sd a11y: Use concrete type in AccessibleSlideSorterView::getAccessibleAtPoint
Use the concrete known type for the local var instead of the
abstract UNO XAccessible interface.

Change-Id: I2dfb9f5367d45bed768097f4be73182a2defc598
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211181
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:11:28 +02:00
Michael Weghorn 796861ec7b sd a11y: Drop local var in AccessibleSlideSorterView::getAccessibleParent
Return the result right away instead of first assigning
it to a local XAccessible variable.

Change-Id: I3451890a155c7791ec6f08cada34f3fbbc317ea3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211180
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:11:11 +02:00
Michael Weghorn 1bed5288c2 sd a11y: Return Reference in AccessibleSlideSorterView::...::GetAccessibleChild
Return an rtl::Reference in AccessibleSlideSorterView::Implementation::GetAccessibleChild
and related methods instead of a plain pointer.

Change-Id: I7ecf8c21ca8220408d1633aa2243fdbda987aadb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211179
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:10:36 +02:00
Michael Weghorn 289bf323bf sc a11y: Use concrete type for local vars in AccessiblePageHeader
Use the concrete type the children have for local variables
in 2 AccessiblePageHeader methods instead of the abstract
XAccessible UNO interface.

Change-Id: I592bea748c35559b9e6e56df343617aa41f3a8af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211178
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-20 22:10:15 +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 a9ee6cd19a toolkit a11y: Move enum class AccessibleTableControlObjType to own header
Move the enum class to its own header, to avoid having
to include the header definining the TableControl class
in order to use AccessibleTableControlObjType.

This is in preparation of merging the TableControl
class into the TableControl_Impl one.

Change-Id: Idc4e970e9d63352df3a177cda716acb65cbd76ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211159
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:16:51 +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 947eddac07 toolkit: Drop abstract ITableControl base class/interface
It's only subclassed/implemented by TableControl_Impl
and that one is used directly everywhere now.

Drop ITableControl altogether.
Take over comments/documentation for its (previously
virtual) methods to the corresponding TableControl_Impl methods
and no longer mark those as virtual.

Change-Id: I2d02bd7de8d6b037765e4c04a8f65ad509ffdf05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211085
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-19 16:11:16 +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 10d73b6d54 toolkit: Document why TableControl holds its impl by shared, not unique pointer
TableControl_Impl subclasses ITableModelListener
which in turn subclasses
std::enable_shared_from_this<ITableModelListener>
and TableControl_Impl uses
std::enable_shared_from_this<ITableModelListener>::shared_from_this
(in TableControl_Impl::setModel) to generate additional
shared_ptr instances sharing the ownership.
(See also std::enable_shared_from_this doc at [1].)

Therefore, it needs to be held by std::shared_ptr itself.
Document that, as it wasn't initially obvious to me.
(A failed attempt to switch to std::unique_ptr caused
JunitTest_toolkit_complex to fail and reveal the issue.)

[1] https://en.cppreference.com/cpp/memory/enable_shared_from_this

Change-Id: Idf446067d7d4f86809e34872d2d41ff7f4ac7424
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211079
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-19 16:09:05 +02:00
Michael Weghorn 692482b522 sfx2: Pass SfxPrinterController's SfxViewShell by ref
Switch the SSfxViewShell param for the SfxPrinterController
from pointer to reference to make clear it's always non-null.

This allows to drop now superfluous null-checks.

Change-Id: I49862b6eeffbf7db388520e801a50557205631a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211074
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-18 07:55:43 +02:00
Michael Weghorn 73be0d8033 sw mailmerge: Drop unnecessary cast to PrintMonitor
There is no need to do that in order to call base class method
DialogController::set_title.

Change-Id: I40e06983e73c75d8a5004db19154e42430a49857
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211073
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-18 07:55:36 +02:00
Michael Weghorn 52e8ee78b6 sfx2: Use SFX_TITLE_FILENAME constant instead of magic number
This constant is explicitly mentioned in the
SfxObjectShell::GetTitle doc, so use it instead
of a hard-coded 1.

Change-Id: Ifba43b860732c2879086d216a9b166d4dbb3f32d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211072
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-18 07:55:27 +02:00
Michael Weghorn 1514ad1134 sfx2: Use existing SFX_TITLE_TITLE constant
Like the other values with a special meaning
when passed to SfxObjectShell::GetTitle use
predefined constants, also use the already
defined SFX_TITLE_TITLE constant for the
value of 0, and document accordingly.

Change-Id: I7c4d10ee50b4f79fe004761c62d24a4b1e5a750f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211071
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-18 07:55:19 +02:00
Michael Weghorn 9d255d3d85 sw mailmerge: Use existing SFX_TITLE_FULLNAME constant
... instead of a hard-coded 2 in the call to
SfxObjectShell::GetTitle whose doc documents that
SFX_TITLE_FULLNAME as one of those with a "magic meaning".

Change-Id: I6a9ce70933b78275296c9db425f95c26acdd1fa6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211061
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-17 14:52:13 +02:00
Michael Weghorn d660fa8f21 sw mailmerge: Use XRowSet for SwMailMergeConfigItem_Impl::m_xResultSet
Use the more specific XRowSet UNO interface type for
SwMailMergeConfigItem_Impl::m_xResultSet instead of only
its XResultSet base interface.

This also drops the need to query for the XRowSet interface
in SwMailMergeConfigItem::SetFilter.

Change-Id: I23b1be878bd32749bd238f33d58d258e0dc97ed7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211057
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-17 14:52:05 +02:00
Michael Weghorn 1c4fd74282 sw: Use SwXTextDocument directly in SwBaseShell::Execute
Call SwDocShell::GetBaseModel instead of SfxObjectShell::GetModel
to get a reference to the concrete SwXTextDocument
instead of to the abstract XModel interface.

This allows calling its `NotifyRefreshListeners` method directly
without having to retrieve the SwXTextDocument in another separate
step first.

Change-Id: Iec42cb51200b538f47a946e3aa38e3b64120cd78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211056
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-17 14:51:56 +02:00
Michael Weghorn 79514c6d03 sw mailmerge: Use SwXTextDocument directly, avoid UNO querying
Call SwDocShell::GetBaseModel instead of SfxObjectShell::GetModel
to get a reference to the concrete SwXTextDocument
instead of to the abstract XModel3 interface.

This allows calling its `storeToUrl` method directly, without
having to explicitly query for the XStorable interface
first.

Change-Id: I276a70c4766a2baa14a86f80fdafa529f68ceed4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211055
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-17 14:51:47 +02:00
Michael Weghorn 59de16fb1c sw mailmerge: Use SfxBaseModel directly, avoid UNO querying
Use the more concrete SfxBaseModel directly that is returned
from SfxObjectShell::GetBaseModel since previous commit

    Change-Id: I05ad3a4bccfb080ccbee3af956451def3bcc94fc
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Sep 16 17:10:09 2026 +0200

        sfx2: Return concrete type in SfxObjectShell::GetBaseModel

This removes the need to query for the XStorable interface,
as the method can be called directly via the SfxBaseModel
now.

Change-Id: I4328413c819e728214c3d0d218e6713c2cc1c5ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211054
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-17 14:51:39 +02:00
Michael Weghorn dd26d06b7c sfx2: Return concrete type in SfxObjectShell::GetBaseModel
Instead of returning a reference to the abstract
XModel3 interface, return the more concrete
SfxBaseModel.

Drop some now unnecessary casting/UNO querying in callers.

More simplification to avoid UNO querying elsewhere
will follow in upcoming commits.

Change-Id: I05ad3a4bccfb080ccbee3af956451def3bcc94fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211053
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-17 14:51:31 +02:00
Michael Weghorn 2647004df6 sc: Pass XModel3 to ScUnoAddInCall::SetCaller
Switch the method param to the XModel3 interface
from the very basic XInterface type. This drops
the need to explicitly cast/query to avoid
ambiguity in the callers where the passed object
multi-inherits the XInterface interface/base class.

This also prepares for switching the return type
of SfxObjectShell::GetBaseModel to a reference of
the concrete SfxBaseModel in an upcoming commit (without
introducing ambiguity due to multi-inheritance from
XInterface in places using only an XInterface
reference).

Change-Id: I97e060136b02f3eb1e652cff4021e57a85677e19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211052
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-17 14:51:23 +02:00
Michael Weghorn 83d27161f4 sfx2: Use XModel3 for DevelopmentToolDockingWindow::mxRoot
Use the XModel3 interface instead of only the very
basic XInterface interface for that member, as the
object in use is known to support that.

This also prepares for switching the return type
of SfxObjectShell::GetBaseModel to a reference of
the concrete SfxBaseModel in an upcoming commit (without
introducing ambiguity due to multi-inheritance from
XInterface in places using only an XInterface
reference).

Change-Id: Ie97eed9dec382ff0da0d3e5ed16ce8401985495b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211051
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-17 14:51:16 +02:00
Michael Weghorn a92113ba34 sfx2 devtools: Switch DocumentModelTreeHandler::mxDocument to XModel3
Use the XModel3 interface instead of only the very
basic XInterface base interface for the document
as the object that is passed is known to implement
this more specific interface.

The DevelopmentToolDockingWindow ctor passes the
result of calling SfxObjectShell::GetBaseModel
(which returns XModel3) for the param.

This also prepares for switching the return type
of SfxObjectShell::GetBaseModel to a reference of
the concrete SfxBaseModel in an upcoming commit (without
introducing ambiguity due to multi-inheritance from
XInterface in places using only an XInterface
reference).

Change-Id: I61f531caea266286fe51b5231c13f56e5b9d82b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211050
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-17 14:51:07 +02:00
Michael Weghorn d81664bb1b sfx2: Simplify by dropping intermediate reassignment to local var
Instead of assigning a different value to `nMaxLength`,
simply treat those 2 values for which that was done the
same as SFX_TITLE_FULLNAME right away.

This is equivalent because the value of `nMaxLength`
isn't used any more for anything else afterwards.

Change-Id: I3913c03ee3a14e0f685d7b3a5f898067229a2297
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211040
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 22:28:07 +02:00
Michael Weghorn 1c0a4c9ed7 sfx2: Simplify condition by moving into existing block
Avoid the duplicate check for INetProtocol::File
by moving the check into the existing block in
which the protocol is known to be something else.

Further simplification will follow.

Change-Id: I7c06e475b3518a6d422df41b2fce5f165166a247
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211039
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 22:28:01 +02:00
Michael Weghorn 1f172e053a sfx2: Skip assignment of then unused value
The

    nMaxLength = 32;

path is only reached when `aURL.GetProtocol() == INetProtocol::File`
and the previous value of `nMaxLength` is SFX_TITLE_PICKLIST or
SFX_TITLE_HISTORY.

However, in that case, assigning 32 to that local variable has no
effect, because the following block only compares `nMaxLength`
to specific values which `nMaxLength` is known to not have even
without reassigning a new value:

    if ( aURL.GetProtocol() == INetProtocol::File )
    {
        if ( nMaxLength == SFX_TITLE_FULLNAME )
            return aURL.HasMark() ? INetURLObject( aURL.GetURLNoMark() ).PathToFileName() : aURL.PathToFileName();
        if ( nMaxLength == SFX_TITLE_FILENAME )
            return aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset);
        if ( pImpl->aTitle.isEmpty() )
            pImpl->aTitle = aURL.getBase( INetURLObject::LAST_SEGMENT,
                                         true, INetURLObject::DecodeMechanism::WithCharset );
    }

Therefore, drop the superfluous reassignment altogether.

Furthe simplification will be done in a separate commit.

Change-Id: I468a9c4ce6e885f8a562c68fa6fbce7eff395a87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211038
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 22:27:55 +02:00
Michael Weghorn 4eacf45ece sfx2: Drop 'aTitleMap_Impl' with unused and duplicate entries
The map is only used for the SFX_TITLE_PICKLIST
and SFX_TITLE_HISTORY cases.
That means that the first entry is irrelevant/unused
and for the other two, the same values are assigned.

Simplify that by dropping `aTitleMap_Impl` altogether
and just assigning the relevant values directly.

Change-Id: Ia3039c6337b4f8c8a3d93c67dc9c68ba981ad041
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211037
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 22:27:48 +02:00
Michael Weghorn e6c451d7ef sfx2: Make condition in SfxObjectShell::GetTitle clearer
From include/sfx2/objsh.hxx:

    #define SFX_TITLE_CAPTION  5
    #define SFX_TITLE_PICKLIST 6
    #define SFX_TITLE_HISTORY  7

That means that

    if ( nMaxLength > SFX_TITLE_CAPTION && nMaxLength <= SFX_TITLE_HISTORY )

is met exactly when nMaxLength is one of
SFX_TITLE_PICKLIST or SFX_TITLE_HISTORY.

Explicitly check for that, to make the code
more readable/straight-forward.

This also prepares for further simplification.

Change-Id: Iade2f499597e6a7f97dd84395a2e697460dee47c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211036
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 22:27:42 +02:00
Michael Weghorn 59935510a2 sc a11y: Use OAccessible in ScAccessibleDocument::getSelectedAccessibleChild
Use more concrete OAccessible instead of the abstract
XAccessible UNO interface for local variable
in ScAccessibleDocument::getSelectedAccessibleChild.

Change-Id: If775e27f4e139f482a3793a60ef30443ba474f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211009
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 18:38:55 +02:00
Michael Weghorn a8f049bf19 sc a11y: Use OAccessible in ScAccessibleDocument::getAccessibleChild
Use the more concrete OAccessible instead of the
abstract XAccessible UNO interface for the local
variable in ScAccessibleDocument::getAccessibleChild.

Change-Id: I43cf2ed8edf3a8da08aa7319cdf9d01e2bc15f7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210976
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 18:38:49 +02:00
Michael Weghorn 1d7ee2a2b9 sc a11y: Use OAccessible in ScAccessibleDocument::getAccessibleAtPoint
Use the more concrete OAccessible instead of the
abstract XAccessible UNO interface.

Change-Id: I2104876188a271db69d739c930a23b935c152af5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210975
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 18:38:43 +02:00
Michael Weghorn 53a9d84795 sc a11y: Call OAccessible::getBounds directly
OAccessible implements the XAccessibleContext and
XAccessibleComponent UNO interfaces itself, so just
call the method directly instead of first explicitly
retrieving references to those interfaces from the OAccessible.

Change-Id: I5695880e28bd7061014135790fabb30bb7970cff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210974
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 18:38:37 +02:00
Michael Weghorn a5e8197fdd sc a11y: Switch AccessibleDocument::mxTempAcc to OAccessible
Use the more concrete OAccessible type instead
of the abstract XAccessible UNO interface.

Change-Id: I088f65cd79338eca2bfa5893149108f95cde8df3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210973
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 18:38:30 +02:00
Michael Weghorn 4974dac79c sc a11y: Pass OAccessible to ScAccessibleDocument::AddChild
Switch the ScAccessibleDocument::AddChild param from the
abstract XAccessible UNO interface to the more concrete
OAccessible.

Adjusting ScAccessibleDocument::RemoveChild accordingly
will happen separately as it requires some more preparatory
work to make (clear) all callers pass an OAccessible (subclass).

Change-Id: I3ea3cced60895ef5aa022b14ab767ab7beef6797
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210972
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 18:38:23 +02:00
Michael Weghorn 28c78efba7 sc a11y: Use concrete type in ScAccessibleDocument::PreInit
Use a reference to the concrete ScAccessibleEditObject instead
of one to the abstract XAccessible UNO interface.

Change-Id: I4bf93cace1ce7d002de2bd00421fcde17824316a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210971
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 18:38:15 +02:00
Michael Weghorn 8c8c17c57f vcl a11y: Use concrete type for AccessibleIconChoiceCtrlEntry::m_xParent
Use the concrete AccessibleIconChoiceCtrl type for that
member as the parent is always of that type.

Drop now redundant method calls and UNO querying to
get the XAccessibleContext and XAccessibleComponent
and XComponent interfaces for the parent, as
AccessibleIconChoiceCtrl implements these interfaces
itself (via its OAccessible base class).

Change-Id: Id33943b0458506542798f7f333fb416820b89ec2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210970
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 18:38:08 +02:00
Michael Weghorn c1967a3bb4 vcl a11y: Pass AccessibleIconChoiceCtrl as parent for its entries
The accessible parent of an AccessibleIconChoiceCtrlEntry
is always a AccessibleIconChoiceCtrlEntry.

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

Change-Id: I31836925ac631922adeb320ff77d84ae915f1432
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210969
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 18:38:01 +02:00
Michael Weghorn 6a023bacb9 Return std::unique_ptr in Application::CreateMessageDialog
The caller of Application::CreateMessageDialog owns the
returned message dialog.

So far, it was returned by a plain weld::MessageDialog*.

Return a unique_ptr instead, to make clear the ownership
semantics. (Also adjust SalInstance::CreateMessageDialog
accordingly, which is called by Application::CreateMessageDialog
and implements the actual logic to create a message dialog.)

Adjust callers where needed.
Most callers were already using a smart pointer for the
returned message dialog anyway.

Change-Id: I7c06bb24b611bd67f5af89800adb13bf22dcc6fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211013
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 10:35:19 +02:00
Michael Weghorn 20c69d51b4 vcl a11y: Stop retrieving XAccessibleContext for OAccessible
OAccessible implements the XAccessibleContext interface itself
and returns a reference to self in its
XAccessible::getAccessibleContext implementation.
Therefore, stop calling XAccessible::getAccessibleContext
in a few places of the VCLXAccessibleBox implementation
to get the accessible context.

Change-Id: Id3b65a58a99029f974df2cd7e613eb3b65f76b47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210968
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:25:48 +02:00
Michael Weghorn d9bebde44a vcl a11y: Drop commented code in VCLXAccessibleBox::getCurrentValue
It's commented out ever since it was added in

    commit efb23f2998
    Author: Steve Yin <steve_y@apache.org>
    Date:   Mon Nov 25 15:24:55 2013 +0000

        Integrate branch of IAccessible2

Change-Id: Ia75f737762b608fc420959de2ac89588c0b24800
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210967
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:25:40 +02:00
Michael Weghorn e3fb1e2bb5 vcl a11y: Drop redundant call to OAccessible::getAccessibleContext
OAccessible implements the XAccessibleContext interface itself
and returns a reference to self in its
XAccessible::getAccessibleContext implementation.

Drop the superfluous call in
VCLXAccessibleBox::ProcessWindowEvent altogether
and also drop the null check as result of the static_cast
of a non-null pointer is known to be non-null.

Change-Id: I460c61b64cc9c5185b61c479ab4014785cab3c10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210966
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:25:32 +02:00
Michael Weghorn e0a1759c8d vcl a11y: Make VCLXAccessibleBox::BoxType an enum class
Change-Id: If744c0f105050285646bdbe02a1092dd16da6230
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210965
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 09:25:26 +02:00
Michael Weghorn 0aaf2b7f3a vcl a11y: Switch VCLXAccessibleBox::m_xText to OAccessible
Switch that member from the abstract XAccessible UNO interface
to the more concrete OAccessible.
This makes clear that only subclasses of OAccessible are
used for it and allows further simplification in upcoming commits.

Change-Id: I1f8ab48edbd6290c7a35d8c209f14fb66d2cbbd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210964
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:25:19 +02:00
Michael Weghorn 6d86cbbbef vcl a11y: Drop local var in VCLXAccessibleComponent::getAccessibleParent
Return the result right away instead of first assigning it
to a local XAccessible variable.

Change-Id: I676ecfb07d5fe5403bc8e111569db7e0c38659d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210937
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:25:12 +02:00
Michael Weghorn cf3ac4fe15 sc a11y: Simplify ScAccessiblePageHeaderArea::GetBoundingBox
OAccessible implements the XAccessibleContext and
XAccessibleComponent interfaces itself, so there is no
more need to explicitly retrieve/query for those with
previous commit

    Change-Id: I334f5ffef5214cff20cebcc9527e863128df703f
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Sep 14 12:15:25 2026 +0200

        sc a11y: Switch ScAccessibleContextBase::mxParent to OAccessible

in place.

Simplify accordingly.

Change-Id: I024e2a1ba864cbf7c9d9f0cf68802093b026762e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210936
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:25:06 +02:00
Michael Weghorn def588c000 sc a11y: Use OAccessible methods directly in ScAccessiblePageHeaderArea
OAccessible implements the XAccessibleContext and
XAccessibleComponent interfaces itself, so there is no
more need to explicitly retrieve/query for those with
previous commit

    Change-Id: I334f5ffef5214cff20cebcc9527e863128df703f
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Sep 14 12:15:25 2026 +0200

        sc a11y: Switch ScAccessibleContextBase::mxParent to OAccessible

in place.

Simplify accordingly.

Change-Id: I6c7e26876c76d9df7dc7f93a2b8ca0690994efa5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210935
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:24:59 +02:00
Michael Weghorn dfa021730f sc a11y: Use OAccessible methods directly in ScAccessibleContextBase::getLocale
OAccessible implements the XAccessibleContext interface
itself, so there is no more need to explicitly retrieve it
with previous commit

    Change-Id: I334f5ffef5214cff20cebcc9527e863128df703f
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Sep 14 12:15:25 2026 +0200

        sc a11y: Switch ScAccessibleContextBase::mxParent to OAccessible

in place.

Simplify accordingly.

Change-Id: Ib845cbc4bc1b3e65e78300ec8242daaddd376bb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210934
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:24:52 +02:00
Michael Weghorn 48395eb1ee sc a11y: Use OAccessible methods directly in ScAccessibleContextBase::isShowing
OAccessible implements the XAccessibleContext and
XAccessibleComponent interfaces itself, so there is no
more need to explicitly retrieve/query for those with
previous commit

    Change-Id: I334f5ffef5214cff20cebcc9527e863128df703f
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Sep 14 12:15:25 2026 +0200

        sc a11y: Switch ScAccessibleContextBase::mxParent to OAccessible

in place.

Simplify accordingly.

Change-Id: I8eaf74c97e8583f351ef7365660dde01875b42da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210933
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 09:24:45 +02:00
Michael Weghorn 8f9f7f9c7b sc a11y: Switch ScAccessibleContextBase::mxParent to OAccessible
Switch ScAccessibleContextBase::mxParent from the abstract
XAccessible UNO interface to the more concrete OAccessible.

This will also allow further code simplification in an upcoming
commit.

Change-Id: I334f5ffef5214cff20cebcc9527e863128df703f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210932
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:24:38 +02:00