tdf#154285 Check correct number of arguments to SbRtl_Now function
[LibreOffice.git] / vcl / inc / accessibility / accessibletablistboxtable.hxx
blob4ca05b25a34b98c8b25023bf058da2a8ae0fb6d4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include <comphelper/uno3.hxx>
23 #include <cppuhelper/implbase1.hxx>
24 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
25 #include <vcl/accessibility/AccessibleBrowseBoxTable.hxx>
27 class SvHeaderTabListBox;
29 class AccessibleTabListBoxTable final
30 : public cppu::ImplInheritanceHelper<AccessibleBrowseBoxTable,
31 css::accessibility::XAccessibleSelection>
33 private:
34 VclPtr<SvHeaderTabListBox> m_pTabListBox;
36 css::uno::Reference< css::accessibility::XAccessible > m_xCurChild;
38 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
39 DECL_LINK( WindowEventListener, VclWindowEvent&, void );
41 // helpers ----------------------------------------------------------------
43 /** Throws an exception, if nIndex is not a valid child index. */
44 void ensureValidIndex( sal_Int64 _nIndex ) const;
46 /** Selects the specified row. */
47 void implSelectRow( sal_Int32 _nRow, bool _bSelect );
49 /** Returns the count of rows in the table. */
50 sal_Int32 implGetRowCount() const override;
51 /** Returns the total column count in the table. */
52 sal_Int32 implGetColumnCount() const override;
53 /** Returns the count of selected rows in the table. */
54 sal_Int32 implGetSelRowCount() const;
56 /** Returns the row index from cell index. */
57 sal_Int32 implGetRow( sal_Int64 _nIndex ) const
59 auto nColCount = implGetColumnCount();
60 assert(nColCount != 0);
61 return _nIndex / nColCount;
64 /** Returns the absolute row index of the nSelRow-th selected row. */
65 sal_Int32 implGetSelRow( sal_Int32 _nSelRow ) const;
67 public:
68 /** ctor()
69 @param rxParent XAccessible interface of the parent object.
70 @param rBox The HeaderTabListBox control. */
71 AccessibleTabListBoxTable(
72 const css::uno::Reference< css::accessibility::XAccessible >& rxParent,
73 SvHeaderTabListBox& rBox );
75 private:
76 /** dtor() */
77 virtual ~AccessibleTabListBoxTable() override;
79 public:
80 // XServiceInfo
81 virtual OUString SAL_CALL getImplementationName() override;
83 // XAccessibleSelection
84 void SAL_CALL selectAccessibleChild( sal_Int64 nChildIndex ) override;
85 sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int64 nChildIndex ) override;
86 void SAL_CALL clearAccessibleSelection( ) override;
87 void SAL_CALL selectAllAccessibleChildren( ) override;
88 sal_Int64 SAL_CALL getSelectedAccessibleChildCount( ) override;
89 css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int64 nSelectedChildIndex ) override;
90 void SAL_CALL deselectAccessibleChild( sal_Int64 nSelectedChildIndex ) override;
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */