summaryrefslogtreecommitdiff
path: root/toolkit/source/controls/table/tablecontrol.cxx
AgeCommit message (Collapse)Author
13 daysuno grid a11y: Deduplicate 2 cases doing the sameMichael Weghorn
Change-Id: I293213079fede1444f3d5e9f0bce5d03d30a9253 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180839 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
13 daysuno grid a11y: Let impl handle alive checkMichael Weghorn
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>
2025-01-27uno grid a11y: Don't confuse row/colMichael Weghorn
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>
2025-01-27a11y: Move AccessibleTableControlObjType to toolkit-only headerMichael Weghorn
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>
2025-01-27toolkit: Drop now unused TableControl::ConvertPointToControlIndexMichael Weghorn
Change-Id: I15fa134992de8ada04346c8bfd881ed76f9e4b4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180793 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-01-27a11y: Drop non-functional bits from AccessibleGridControl::getAccessibleAtPointMichael Weghorn
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
2025-01-24toolkit a11y: Port away from TableControl::GetFieldIndexAtPointMichael Weghorn
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>
2025-01-24toolkit a11y: Port away from TableControl::GetFieldCharacterBoundsMichael Weghorn
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>
2025-01-24toolkit: Drop IAccessibleTable::GetWindowInstanceMichael Weghorn
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>
2025-01-24toolkit a11y: Drop methods just calling their base class implementationsMichael Weghorn
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>
2025-01-24toolkit: Move TableControl key input logic into that classMichael Weghorn
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>
2025-01-24toolkit: No longer provide getter for TableControl::m_pImplMichael Weghorn
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
2025-01-24toolkit: Move DefaultInputHandler::{Get,Lose}Focus logic to only callersMichael Weghorn
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
2025-01-24toolkit: Drop ITableInputHandlerMichael Weghorn
Drop the ITableInputHandler interface (abstract class) that is only implemented by a single subclass, DefaultInputHandler, and use that one directly. Adjust the PTableInputHandler to typedef std::shared_ptr<DefaultInputHandler> PTableInputHandler and take over method comments to DefaultInputHandler. Make methods non-virtual and follow the loplugin:staticaccess suggestion to make 3 of the methods static. This also prepares for further code simplification in upcoming commits. Change-Id: Ib4f3c2eb9f132da0484ef86a404251e3cdd84890 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180630 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-04-03tdf#146619 Drop unused 'using namespace' in: toolkit/Gabor Kelemen
Change-Id: Idab290ebc1394587c17dbec0c110bfa759cbdb8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165540 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2023-08-02split Point/Size/Rectangle into AbsoluteScreenPixel* typesNoel Grandin
to attempt to make it obvious in code what kind of coordinate system we are dealing with. The idea is that by doing this, the compile-time type checking will flush out inconsistencies between different code. I started with vcl::Window::OutputToAbsoluteScreenPixel and worked outwards from there. Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-02a11y: Convert AccessibleTableControlObjType to enum classMichael Weghorn
Change-Id: I227ca242ae8fa22940b1bf302541f8d9b7b40eb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155199 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-07-20split GetWindowExtentsRelative asunderNoel Grandin
sometimes it returns a relative position, sometimes an absolute position. Rather have two different methods with names that match what they return. Change-Id: Ie1e73c6be1c797fd59934c96866d1fef1f972b35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-06move SVTXGridControl to toolkitCaolán McNamara
Change-Id: I513a2885027d0295f70e7c64269d1653a6c2642b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137870 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>