Age | Commit message (Collapse) | Author |
|
Change-Id: I0b037261c753df6cd7efc2ee605abc02304c226c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179238
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: I3e55e6173494f660febc296ec342ab223e5cdec1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178227
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Change-Id: I9fc9554f659beea6041b8c64f915c853478aebd6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181179
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
Change-Id: I293213079fede1444f3d5e9f0bce5d03d30a9253
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180839
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
By now, all AccessibleGridControlBase subclasses implement
both, the XAccessible and XAccessibleContext interfaces,
and their XAccessible::getAccessibleContext implementations
return a reference to self.
This is implemented in different ways: Either implementing
it directly or using the GridControlAccessibleElement
class that does it as base class.
Unify and simplify this by letting AccessibleGridControlBase
implement the XAccessible interface, and dropping the extra
handling in all subclasses.
(Other than the other implementations,
AccessibleGridControlHeaderCell::getAccessibleContext
was previously not using SolarMutexGuard, but I can't
see a particular reason, so don't see a reason to
override the new base class implementation.)
Change-Id: Ibdb674c5d5556fcf1c5644a2f6d961985b0e3362
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180838
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Change-Id: I363a3836ee46f1243c6d61c323910bcac70c0da6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180834
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Implementation was dropped in
commit ce52b490ddb7924c6b5b14fee4077182a3c7dd02
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon Jan 27 15:13:10 2025 +0100
toolkit a11y: Simplify AccessibleGridControl::getAccessibleAtPoint
Change-Id: Id6038b57648be5549645c5f77ebbfc4d387a5dd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180833
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
So far, AccessibleGridControlAccess was implementing
the XAccessible interface, and its
XAccessible::getAccessibleContext implementation
was returning a AccessibleGridControl instance
that implements XAccessibleContext.
Drop that separation and let AccessibleGridControl
also implement the XAccessible interface directly
and return itself in
AccessibleGridControl::getAccessibleContext.
TableControl_Impl::getAccessible now creates
an AccessibleGridControl accordingly.
No change in behavior intended or seen when
testing with the grid in the sample doc attachment 198647
from tdf#164783 when testing with Orca and Accerciser
with the gtk3 and qt6 VCL plugins.
Change-Id: Iabc4cd11e7b6b6e121c65a6813a28e218c34b4e1
Change-Id: I8bfdf64f436a831251f155d0e1238e4d82d1fa58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180832
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
AccessibleGridControlAccess owns its
AccessibleGridControl (`m_xContext` member)
and is responsible for disposing it.
It does that in AccessibleGridControlAccess::DisposeAccessImpl
where it also clears `m_xContext` to nullptr.
Therefore, this
// if the context died meanwhile (we're no listener, so it won't tell us explicitly when this happens),
// then reset and re-create.
check looks very suspicious and should never be reached,
as anything "from outside", i.e. something not
owning the AccessibleGridControl should never
dispose it.
Drop that check.
(In case there actually *is* something disposing the
accessible context from elsewhere, that should most likely
be changed in the first place.)
See also
Change-Id: Id16dd7dbf8264d887f52e2fe304b0568079cb924
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Jan 28 09:17:10 2025 +0100
uno grid a11y: Replace alive check by simple null check
TableControl_Impl owns its accessible (`m_pAccessibleTable`)
and disposes it in TableControl_Impl::disposeAccessible
which gets called from TableControl::dispose.
TableControl_Impl::disposeAccessible also sets
`m_pAccessibleTable` to nullptr.
As `m_pAccessibleTable` should only ever be disposed by
its owner, I can't think of any (valid) scenario where
`m_pAccessibleTable` could be non-null but disposed,
so simply use a null check instead of
TableControl_Impl::isAccessibleAlive that was checking
for it being non-null and not diposed.
for a similar commit elsewhere.
Change-Id: Ibe89b39be7540d68144400927bc96c318b2873c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180831
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
TableControl_Impl owns its accessible (`m_pAccessibleTable`)
and disposes it in TableControl_Impl::disposeAccessible
which gets called from TableControl::dispose.
TableControl_Impl::disposeAccessible also sets
`m_pAccessibleTable` to nullptr.
As `m_pAccessibleTable` should only ever be disposed by
its owner, I can't think of any (valid) scenario where
`m_pAccessibleTable` could be non-null but disposed,
so simply use a null check instead of
TableControl_Impl::isAccessibleAlive that was checking
for it being non-null and not diposed.
Change-Id: Id16dd7dbf8264d887f52e2fe304b0568079cb924
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180830
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Make TableControl_Impl::isAccessibleAlive private
and drop all uses in TableControl. They are unnecessary
there, because the TableControl_Impl methods that
get called already call TableControl_Impl::isAccessibleAlive
themselves to check whether the accessible is still alive,
and that is in my opinion actually an implementation detail
only the impl should have to care about.
Drop "IfAccessibleAlive" from the method names for
TableControl::commitCellEventIfAccessibleAlive
and TableControl::commitTableEventIfAccessibleAlive.
Change-Id: I5589289de0ca96ce5fc5993df5cef3877dce881a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180819
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Move logic from TableControl_Impl::isAccessibleAlive
to TableControl_Impl::isAccessibleAlive, which was
previously just calling the latter.
Change-Id: I6161e8745568954fdaa53dbfa573d29daa547275
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180818
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
TableControl_Impl::commitTableEvent and
TableControl_Impl::impl_commitAccessibleEvent
check whether the accessible is alive before
doing anything, so there's no need to do that
manually before calling those methods in addition.
Change-Id: Ie940653a994fe92eefd367d0816ba03c95d409a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180817
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
The non-null case already has an early return
above, so there's no need to check again whether
`m_pAccessibleTable` is actually nullptr.
Change-Id: Id094c80787f425fe18e48cf0a6460c50d33056ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180816
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Change-Id: Ie60417bd84f1ed1378da987f012cacad796ea0dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180805
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
... instead of creating a new one every time
AccessibleGridControlTable::getAccessibleAtPoint
gets called.
Change-Id: Icc6e2963bcbe56136717cc2499e10d8d45a2e15a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180804
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
TableControl::ConvertPointToCellAddress expects a position
relative to the TableControl.
However, AccessibleGridControlTable::getAccessibleAtPoint
gets a position relative to itself, which is different
at least when the table also has row/col headers.
Add the own position relative to the parent (which is the
TableControl) to convert the position as needed.
With this in place, using Accerciser's "Select object under mouse"
feature with the grid control from attachment 198647 from tdf#164783
with the qt6 VCL plugin now results in the correct cell being
highlighted when the mouse pointer is over a regular cell, while
the cell one row above was highlighted previously.
The cell is still not selected in Accerciser's treeview
of LO a11y tree, but that's still another issue.
Change-Id: If9456b6399ad7a871cb52d9ff4f38168e5907579
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180803
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
TableControl::calcHeaderRect's `_bIsColumnBar` param is
passed as the `bColHeader` to TableControl_Impl::calcHeaderRect,
both of which have the same meaning ("whether this is a column
header (cell)"), so inverting it (for no apparent reason) is
incorrect.
As a consquence, selecting the grid control's column header bar
in Accerciser's treeview of the LO a11y hierarchy with sample doc
attachment 198647 from tdf#164783 with the qt6 VCL plugin
would result in not only the header area getting highlighted, but
the area of the rest of the table as well (as rectangle returned by
AccessibleGridControlHeaderCell::implGetBoundingBoxOnScreen
result was incorrect).
With this commit in place, the header area is now highlighted
as expected.
Change-Id: I2c99c940faf469678ecee33dd029580e57170f2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180802
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
AccessibleGridControl::implGetAccessibleChildCount calls
TableControl::GetAccessibleControlCount which always returns
a positive integer, so assert on that and drop the fallback
path.
Change-Id: I06c9b31d0d79535fe6fa9d7ada371717e42badfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180800
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
In order to check whether any of the children contains
the given point, use the existing
AccessibleGridControl::getAccessibleChild method to iterate
over the actually existing children instead of having
an additional AccessibleGridControl::implGetFixedChild
that uses static/fixed indices for the different kinds
of potential children that may or may not be there.
Drop now unused helper methods that mostly duplicated
logic already found in AccessibleGridControl::getAccessibleChild.
Change-Id: I57b814aa497097d1f18506303a76d53ec9f6e0b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180799
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
It's only used in the toolkit module by now, so there's no
more need to have it in a global header.
Change-Id: Iba820035752e5f4ed5a0e6f99f6c792447d4209b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180798
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Now that all related code is in the toolkit module
and the interface (abstract base class) is no more
needed to break a dependency cycle, drop the interface altogether.
(An earlier version of this change resulted in LO clang plugins
pointing out some oddities. These have in the meantime been addressed
separately in previous commits to prepare for this change.)
Change-Id: I6295695d9f0bf02be26175c45142965351ec5eff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180797
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Change-Id: I15fa134992de8ada04346c8bfd881ed76f9e4b4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180793
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
XAccessibleComponent::getAccessibleAtPoint should return
the direct child at the given point.
AccessibleGridControl can have up to 3 children,
see AccessibleGridControl::getAccessibleChild:
* a row header (AccessibleGridControlHeader)
* a column header (AccessibleGridControlHeader)
* the table (AccessibleGridControlTable)
TableControl::ConvertPointToControlIndex on the other
hand returns the child index of a cell within
the table, so could only be relevant when
calling AccessibleGridControlTable::getAccessibleAtPoint on the
AccessibleGridControlTable child
(and AccessibleGridControlTable::getAccessibleAtPoint does similar,
but uses a method called TableControl::ConvertPointToCellAddress
instead).
In addition, TableControl::CreateAccessibleControl that
was called with the index retrieved that way was
warning it should be overriden (Where?) and unconditionally
returning nullptr.
Drop that broken code path. The remaining logic
to iterate over the children looks reasonable in principle.
Without this commit in place, using the "Inspect object under mouse"
feature in Accerciser when the mouse is over a cell of the grid control
of the sample doc attachment 198647 from tdf#164783 with the qt6 VCL plugin
would result in the top-level's TableControl's a11y object getting selected
in Accerciser's treeview of the LO a11y and its full area getting
highlighted.
Now, it selects/highlights the column header cell - even if the mouse cursor
is over one of the regular cells - which is still not fully correct,
but that is a different issue.
Change-Id: Ib4a0d05145c66a96dcb72a6a50805182c17fb2f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180792
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Reuse existing AccessibleGridControlHeader::implGetChild
instead of duplicating the logic.
Change-Id: Id5a89a24d511ff5667d8a512fb7c89394ce9c636
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180791
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Extend AccessibleGridControlTableBase::ensureIsValid{Row,Column,Index}
to also check that the index is non-negative and use
the existing AccessibleGridControlTableBase::ensureIsValidIndex in
AccessibleGridControlHeader::getAccessibleChild.
Change-Id: If67fe2e23ee2d22683be072a8ed9ccfb1d9efd57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180790
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Change-Id: I69a1eeb53b1f3f2f4ba2b9050c70efb3d91e2150
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180725
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
It effectively does the same as the base class implementation,
OCommonAccessibleComponent::getAccessibleIndexInParent.
Change-Id: I649841c4676009797612cbe0e6422dd088218a78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180724
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Simplify AccessibleGridControlBase by subclassing the
comphelper::OAccessibleComponentHelper helper class
that already provides much of the logic.
Unless I'm missing anything, the corresponding custom
implementations in AccessibleGridControlBase were
equivalent (and partly looked copy-pasted).
Notes:
* XAccessibleEventBroadcaster logic is fully implemented
in OAccessibleComponentHelper, so drop the custom logic.
* In order to implement XAccessibleComponent methods,
only OAccessibleComponentHelper::getBounds needs
to be overriden. The logic is already implemented
in AccessibleGridControlBase::implGetBoundingBox,
just need to convert from tools::Rectangle to
css::awt::Rectangle in addition.
Drop all of the other methods related to location/bounds
handling. The AccessibleGridControlBase logic takes
care of that now.
* Drop AccessibleGridControlBase::ensureIsAlive and
use OAccessibleComponentHelper::ensureAlive instead,
which has the same logic.
In a quick test using sample document attachment 198647
from tdf#164783 with the qt6 VCL plugin and Accerciser
and the Orca screen reader, no differences in behavior
were observed with this change in place.
Change-Id: I90099dd5426db093260175b2c3d09db548e05c33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180723
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
As its documentation described, the (so far) purely virtual
AccessibleGridControlBase::implGetBoundingBox was implemented
by all subclasses to return the bounding box relative to the
TableControl's vcl::Window parent.
However, this method is used to implement methods like
XAccessibleComponent::containsPoint,
XAccessibleComponent::getBounds and
XAccessibleComponent::getLocation, all of which are supposed
to be using the position relative to the *immediate* accessible
parent.
This mismatch could e.g. be seen with the grid control
in attachment 198647 of tdf#164783 and the gtk3 VCL plugin
as follows:
1) allow macros
2) open sample file
3) click "Grid in dialog" to start the dialog containing a grid
4) start Accerciser
5) In Accerciser's treeview of the LO a11y hierarchy, select the
"Grid control" object with a11y table role.
6) Select its first child, which is a table cell.
What could be seen is that the top-left corner of the highlighted
area for the first cell (step 6) is shifted to the right and down
as compareed to the highlighted area for the table (step 5), even
though the first cell in reality has the exact same origin, (because
the table area is defined by the cells it contains).
The AccessibleGridControlBase::implGetBoundingBoxOnScreen overrides
correctly return the bounding box on screen and duplicated much
of the logic.
Fix the problem and deduplicate code by implementing
AccessibleGridControlBase::implGetBoundingBox directly in
AccessibleGridControlBase: Let it calculate the position
relative to the parent from the absolute position of the parent
and of the object itself.
With this in place, the scenario described above now results in
the area highlighted in steps 5) and 6) to have the same top-left
corner.
Change-Id: If28de14d440706bd6493626586f82859e5570e75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180720
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Move logic from TableControl_Impl::impl_getCellRect
to TableControl_Impl::calcCellRect and drop the
former.
Change-Id: I2c44e72a4e781130661deebd0882939ad34c050a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180718
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Return direct uses of TableControl_Impl::impl_getCellRect
with uses of TableControl_Impl::calcCellRect
that returns the Rectangle instead of taking an
out Rectangle& param.
(Note that the order of the row/col index params is
reversed in both methods.)
Change-Id: I32af4c14d6193c12bd0bbc91dde14bb526abc48e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180717
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
In the only 2 callers of this method, the logic
so far was this:
1) Retrieve the child index, which is calculated
from the row index + column index.
2) Revert the calculation from step 1 by calculating
the row and column index from the child index.
3) Pass the column index calculated this way as the
`_nRowPos` param and the row index as the
`_nColPos` param to TableControl::calcCellRect.
(Note that the param order is reversed from what
at least I would naively have expected from looking
at the param names.)
4) In TableControl::calcCellRect, call
TableControl_Impl::calcCellRect, passing the `_nRowPos`
param as the `nRow` param and the `_nColPos` as the
`nCol` param.
(That looks reasonable.)
5) In TableControl_Impl::calcCellRect,
call TableControl_Impl::impl_getCellRect, which
takes row index and column index in the reverse
order. Pass the TableControl::calcCellRect's
`nRow` param as TableControl_Impl::impl_getCellRect's
`_nColumn` param and vice versa.
(Note that using `_nRowPos`/`nRow` for the row index in
one method and for the column pos in the other
method is not what I would naively have expected,
but together with 3), the order is correct again.)
Make this a bit less confusing by skipping steps 1) and 2)
and consistently using `_nRowPos`/`nRow` as param name for
the row index, `_nColumn`/`nCol` for the column index.
Change-Id: Iffb920c45e08c00087e590debebaa286368aee3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180712
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
The AccessibleGridControlBase::m_aClientId is
(and should only be) used by the class itself, not by subclasses,
so access the member directly and drop the protected getter
and setter.
Change-Id: I987cad89c7aec48fb0286d7b24e9b282db3b536c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180711
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Same as
Change-Id: Ib2c799cdb5f8f8515ee771b241e1fd8567dc967d
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Jan 24 10:40:53 2025 +0100
toolkit a11y: Port away from TableControl::GetFieldCharacterBounds
, but for TableControl::GetFieldIndexAtPoint.
Change-Id: I359376532e8e80e001e6c286ee4fdd3d7a3ea2f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180710
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
TableControl::GetFieldCharacterBounds ignores the first
2 params and just calls TableControl::GetCharacterBounds,
so use the latter directly instead and drop the former.
Change-Id: Ib2c799cdb5f8f8515ee771b241e1fd8567dc967d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180697
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
This method to get a vcl::Window pointer to self is
no more needed since
commit c6c471546ee82d939092da3ac25a6548145c56c9
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Jan 23 17:29:32 2025 +0100
toolkit a11y: Use pointers/refs to concrete TableControl class
Use the TableControl right away instead.
Change-Id: I692b0397e6d6b74d8dd5d194d1708a796e1c4e8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180696
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
These were only needed before
commit c6c471546ee82d939092da3ac25a6548145c56c9
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Jan 23 17:29:32 2025 +0100
toolkit a11y: Use pointers/refs to concrete TableControl class
to be able to call them with only a pointer/ref to the
abstract IAccessibleTable base class.
Change-Id: I9d148babaa4ac7210d9b1d3a81d7361ff8eab438
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180695
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
No need for a public getter, as this is only used
by the class itself, and that one can use the
`m_xContext` member directly.
Change-Id: Ice625a63e84512ac5d77fd26e8d67b4977eb48e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180671
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Use pointers/references to the concrete TableControl class
instead of the interface (abstract base class) IAccessibleTable,
now that all relevant code is located inside toolkit since
Change-Id: Ic93796bce96916192da7cfffcf1faf00905373c7
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Jan 23 16:26:57 2025 +0100
a11y: Move AccessibleGridControl* classes to toolkit
and there's no more need to use an abstract interface to avoid
dependencies between multiple modules anymore.
As requested by loplugin:vclwidgets, use a VclPtr now
for AccessibleGridControlAccess::m_pTable (now renamed
to `m_xTable`).
Getting rid of the IAccessibleTable base class altogether
can be considered for a separate commit.
Change-Id: I5c8c8ae22db3a7b3e1ba8cb751482a647bb9663a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180670
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Now after
Change-Id: Ic93796bce96916192da7cfffcf1faf00905373c7
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Jan 23 16:26:57 2025 +0100
a11y: Move AccessibleGridControl* classes to toolkit
, AccessibleGridControlAccess is in the toolkit library
and can be used directly, which removes the need to
abstract from the actual implementation by using
an interface (abstract base class) IAccessibleTableControl.
Therefore, drop that one and use references to
AccessibleGridControlAccess instead.
Change-Id: I81a0de53d0190477e238fe4c5010379bd8fd46d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180669
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Move AccessibleGridControlAccess and all related
classes from vcl to toolkit, as that is where the
grid control that makes use of them is located.
Stop using the AccessibleFactory to create the
AccessibleGridControlAccess, but call the ctor
directly in TableControl_Impl::getAccessible,
now that the class is also in the toolkit module.
Further simplificiation can happen in upcoming
commits.
Change-Id: Ic93796bce96916192da7cfffcf1faf00905373c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180668
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Move logic from DefaultInputHandler::KeyInput
into the only caller, TableControl::KeyInput.
Drop ITableControl::dispatchAction from that interface
as TableControl is now the only caller and that one
knows that it's TableControl::m_pImpl is a
TableControl_Impl.
Change-Id: I0445ce10f8abee17ab6e4895aba5adf42974721b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180662
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
TableControl::commitCellEventIfAccessibleAlive sends an event
on the currently selected/active cell. So only call it in
SVTXGridControl::ProcessWindowEvent when there is one.
Use TableControl::GetCurrentRow and TableControl::GetCurrentColumn
to check that, which return a special value (of -2) for the case there
is no active cell.
For TableControl::GetCurrentRow:
/** retrieves the current row
The current row is the one which contains the active cell.
@return
the row index of the active cell, or ->ROW_INVALID
if there is no active cell, e.g. because the table does
not contain any rows or columns.
*/
sal_Int32 GetCurrentRow() const override;
The previous check whether the table has any rows was insufficient
and resulted in an invalid attempt to access vector elements at
negative indices.
For the tdf#164783 scenario:
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508:
In function:
reference
std::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>>::operator[](size_type)
[_Tp = rtl::Reference<accessibility::AccessibleGridControlTableCell>,
_Allocator =
std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell>>]
Error: attempt to subscript container with out-of-bounds index -6, but
container only holds 60 elements.
Objects involved in the operation:
sequence "this" @ 0x5638c74e2350 {
type = std::debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell> > >;
}
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508:
In function:
reference
std::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>>::operator[](size_type)
[_Tp = rtl::Reference<accessibility::AccessibleGridControlTableCell>,
_Allocator =
std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell>>]
Error: attempt to subscript container with out-of-bounds index -6, but
container only holds 60 elements.
Objects involved in the operation:
sequence "this" @ 0x5638c74e2350 {
type = std::debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell> > >;
}
sequence "this" @ 0x5638c74e2350 {
type = std::debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell> > >;
}
Fatal exception: Signal 6
Stack:
#0 sal::backtrace_get(unsigned int) at .../libreoffice/sal/osl/unx/backtraceapi.cxx:42
#1 (anonymous namespace)::printStack(int) at .../libreoffice/sal/osl/unx/signal.cxx:289
#2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at .../libreoffice/sal/osl/unx/signal.cxx:330
#3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) at .../libreoffice/sal/osl/unx/signal.cxx:427
#4 /lib/x86_64-linux-gnu/libc.so.6(+0x3fda0) [0x7f7544649da0]
#5 __pthread_kill_implementation at ./nptl/pthread_kill.c:44 (discriminator 1)
#6 raise at ./signal/../sysdeps/posix/raise.c:27
#7 abort at ./stdlib/abort.c:81
#8 std::__throw_bad_exception() in /lib/x86_64-linux-gnu/libstdc++.so.6
#9 std::__debug::vector<rtl::Reference<accessibility::AccessibleGridControlTableCell>, std::allocator<rtl::Reference<accessibility::AccessibleGridControlTableCell>>>::operator[](unsigned long) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508
#10 accessibility::AccessibleGridControlTable::getAccessibleChild(long) at .../libreoffice/vcl/source/accessibility/AccessibleGridControlTable.cxx:66
#11 accessibility::AccessibleGridControlTable::getAccessibleCellAt(int, int) at .../libreoffice/vcl/source/accessibility/AccessibleGridControlTable.cxx:191
#12 accessibility::AccessibleGridControl::commitCellEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/vcl/source/accessibility/AccessibleGridControl.cxx:272
#13 accessibility::AccessibleGridControlAccess::commitCellEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/vcl/inc/accessibility/AccessibleGridControl.hxx:197
#14 svt::table::TableControl_Impl::commitCellEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/toolkit/source/controls/table/tablecontrol_impl.cxx:2304
#15 svt::table::TableControl::commitCellEventIfAccessibleAlive(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at .../libreoffice/toolkit/source/controls/table/tablecontrol.cxx:470
#16 SVTXGridControl::ProcessWindowEvent(VclWindowEvent const&) at .../libreoffice/toolkit/source/controls/svtxgridcontrol.cxx:823
#17 VCLXWindow::WindowEventListener(VclWindowEvent&) at .../libreoffice/toolkit/source/awt/vclxwindow.cxx:390
#18 VCLXWindow::LinkStubWindowEventListener(void*, VclWindowEvent&) at .../libreoffice/toolkit/source/awt/vclxwindow.cxx:383
#19 Link<VclWindowEvent&, void>::Call(VclWindowEvent&) const at .../libreoffice/include/tools/link.hxx:101
#20 vcl::Window::CallEventListeners(VclEventId, void*) at .../libreoffice/vcl/source/window/event.cxx:262
#21 Control::CallEventListeners(VclEventId, void*) at .../libreoffice/vcl/source/control/ctrl.cxx:298
#22 Control::ImplCallEventListenersAndHandler(VclEventId, std::function<void ()> const&) at .../libreoffice/vcl/source/control/ctrl.cxx:305
#23 Control::EventNotify(NotifyEvent&) at .../libreoffice/vcl/source/control/ctrl.cxx:247
#24 vcl::Window::CompatNotify(NotifyEvent&) at .../libreoffice/vcl/source/window/window.cxx:3943
#25 vcl::Window::LoseFocus() at .../libreoffice/vcl/source/window/window.cxx:1861
#26 svt::table::TableControl::LoseFocus() at .../libreoffice/toolkit/source/controls/table/tablecontrol.cxx:94
#27 vcl::Window::CompatLoseFocus() at .../libreoffice/vcl/source/window/window.cxx:3912
#28 vcl::Window::ImplAsyncFocusHdl(void*) at .../libreoffice/vcl/source/window/winproc.cxx:2127
#29 vcl::Window::LinkStubImplAsyncFocusHdl(void*, void*) at .../libreoffice/vcl/source/window/winproc.cxx:2033
#30 Link<void*, void>::Call(void*) const at .../libreoffice/include/tools/link.hxx:101
#31 ImplHandleUserEvent(ImplSVEvent*) at .../libreoffice/vcl/source/window/winproc.cxx:2288
#32 ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at .../libreoffice/vcl/source/window/winproc.cxx:2849
#33 SalFrame::CallCallback(SalEvent, void const*) const at .../libreoffice/vcl/inc/salframe.hxx:311
#34 SalGenericDisplay::ProcessEvent(SalUserEventList::SalUserEvent) at .../libreoffice/vcl/unx/generic/app/gendisp.cxx:67
#35 SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const at .../libreoffice/vcl/source/app/salusereventlist.cxx:119
#36 SalUserEventList::DispatchUserEvents(bool) at .../libreoffice/vcl/source/app/salusereventlist.cxx:120
#37 SalGenericDisplay::DispatchInternalEvent(bool) at .../libreoffice/vcl/unx/generic/app/gendisp.cxx:51
#38 call_userEventFn(void*) at .../libreoffice/vcl/unx/gtk3/gtkdata.cxx:827
#39 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5a81f) [0x7f7536f0b81f]
#40 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5ca57) [0x7f7536f0da57]
#41 g_main_loop_run in /lib/x86_64-linux-gnu/libglib-2.0.so.0
...
Change-Id: Iafed90e6985cf2c05d65be5f74334f58b369d945
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180661
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
TableFunctionSet doesn't need access to any non-public
members.
Change-Id: I73acd3b1efd8ff326a08b3a2a404c047729f8ecd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180660
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Change-Id: I70197d55a95c3d87a2d0921aca4d05068d88d5b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180659
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
commit e8f649b5ad64a2a3f07dfab1a52033d126da211b
Author: Frank Schoenheit [fs] <frank.schoenheit@oracle.com>
Date: Wed Jan 19 11:11:29 2011 +0100
gridsort: render indicator for current column sort
replaced the previous `pTable->Invalidate();` with
pTable->getTableControlInterface().invalidate( TableAreaRowHeaders );
, which should have implemented what the TODO was
suggesting (invalidate the header area only).
Change-Id: Iae9f8cee75d25ce982597e0da654357ec8c03692
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180658
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Drop TableControl::getTableControlInterface that was
providing direct access to TableControl::m_pImpl
via the ITableControl interface.
This was only used in SVTXGridControl to call
ITableControl::hitTest and ITableControl::invalidate.
Add new methods TableControl::hitTest and
TableControl::invalidate which allow doing exactly
that via the TableControl without requiring direct
access to the `m_pImpl` from outside.
Change-Id: I098739e0bb64efcbaafdb8762e082d6f7b7325bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180633
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Use DBG_TESTSOLARMUTEX directly.
Change-Id: If3dd942d1e3d32615a82419071f1a4b8a7e5eceb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180632
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Both always return false, so Control::{Get,Lose}Focus
always gets called.
Change-Id: If26132d68cebfb7930f12418480480ddd3cb9333
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180631
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|