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>
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>
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>
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
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
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>
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>
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>
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>
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>
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>
... 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
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>
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>
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>
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>
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
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>
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
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
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>
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
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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
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>
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>
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
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>
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>
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
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
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>
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
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
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
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>
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>
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>
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>
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
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
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
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>
... 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>
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>
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>
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>
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>
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
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>
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
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>
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
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>
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>
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>
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>
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>
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
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
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
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>
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>
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
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
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
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
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>
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>
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>
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>
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>
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>
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>
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
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>