diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2025-01-23 16:26:57 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2025-01-24 07:37:59 +0100 |
commit | d040635b8e0b74a1d6cfee175cdc64bd29c60a84 (patch) | |
tree | c1c2b60cdd34e54651a1fc1d41452055d9b18fab /toolkit/inc/controls/table/AccessibleGridControlHeaderCell.hxx | |
parent | 6fc13fb03bc96eda65b91fd65ada26a162437404 (diff) |
a11y: Move AccessibleGridControl* classes to toolkit
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
Diffstat (limited to 'toolkit/inc/controls/table/AccessibleGridControlHeaderCell.hxx')
-rw-r--r-- | toolkit/inc/controls/table/AccessibleGridControlHeaderCell.hxx | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/toolkit/inc/controls/table/AccessibleGridControlHeaderCell.hxx b/toolkit/inc/controls/table/AccessibleGridControlHeaderCell.hxx new file mode 100644 index 000000000000..8f3022807e13 --- /dev/null +++ b/toolkit/inc/controls/table/AccessibleGridControlHeaderCell.hxx @@ -0,0 +1,79 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#pragma once + +#include <controls/table/AccessibleGridControlTableCell.hxx> + +namespace accessibility +{ + class AccessibleGridControlHeaderCell final : public AccessibleGridControlCell, public css::accessibility::XAccessible + { + sal_Int32 m_nColumnRowId; + public: + AccessibleGridControlHeaderCell(sal_Int32 _nColumnRowId, + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::vcl::table::IAccessibleTable& _rTable, + ::vcl::table::AccessibleTableControlObjType _eObjType); + /** @return The count of visible children. */ + virtual sal_Int64 SAL_CALL getAccessibleChildCount() override; + + /** @return The XAccessible interface of the specified child. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int64 nChildIndex ) override; + + /** @return The index of this object among the parent's children. */ + virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override; + + /** Grabs the focus to the GridControl. */ + virtual void SAL_CALL grabFocus() override; + + // XInterface + + /** Queries for a new interface. */ + css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override; + + /** Acquires the object (calls acquire() on base class). */ + virtual void SAL_CALL acquire() noexcept override; + + /** Releases the object (calls release() on base class). */ + virtual void SAL_CALL release() noexcept override; + // XAccessible + + /** @return The XAccessibleContext interface of this object. */ + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL + getAccessibleContext() override; + + /** @return + The name of this class. + */ + virtual OUString SAL_CALL getImplementationName() override; + + /** Return a bitset of states of the current object. + */ + sal_Int64 implCreateStateSet() override; + + private: + virtual tools::Rectangle implGetBoundingBox() override; + + virtual AbsoluteScreenPixelRectangle implGetBoundingBoxOnScreen() override; + }; +} + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |