LibreOffice Module winaccessibility (master) 1
AccTableCell.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include "Resource.h"
23
24#include <com/sun/star/uno/Reference.hxx>
25#include <com/sun/star/accessibility/XAccessibleTable.hpp>
26#include "UNOXWrapper.h"
27
31class ATL_NO_VTABLE CAccTableCell : public CComObjectRoot,
32 public CComCoClass<CAccTableCell, &CLSID_AccTableCell>,
34 public CUNOXWrapper
35
36{
37public:
39 virtual ~CAccTableCell() {}
40
41 BEGIN_COM_MAP(CAccTableCell)
42 COM_INTERFACE_ENTRY(IAccessibleTableCell)
43 COM_INTERFACE_ENTRY(IUNOXWrapper)
44 COM_INTERFACE_ENTRY_FUNC_BLIND(0, SmartQI_)
45#if defined __clang__
46#pragma clang diagnostic push
47#pragma clang diagnostic ignored "-Winconsistent-missing-override"
48#endif
49 END_COM_MAP()
50#if defined __clang__
51#pragma clang diagnostic pop
52#endif
53
54 static HRESULT WINAPI SmartQI_(void* pv, REFIID iid, void** ppvObject, DWORD_PTR)
55 {
56 return static_cast<CAccTableCell*>(pv)->SmartQI(iid, ppvObject);
57 }
58
59 HRESULT SmartQI(REFIID iid, void** ppvObject)
60 {
61 if (m_pOuterUnknown)
62 return OuterQueryInterface(iid, ppvObject);
63 return E_FAIL;
64 }
65
66 DECLARE_NO_REGISTRY()
67
68public:
69 STDMETHOD(put_XInterface)(hyper pXInterface) override;
70
71 // IAccessibleTableCell interfaces
72 STDMETHOD(get_columnExtent)(long*) override;
73 STDMETHOD(get_columnHeaderCells)(IUnknown***, long*) override;
74 STDMETHOD(get_columnIndex)(long*) override;
75 STDMETHOD(get_rowExtent)(long*) override;
76 STDMETHOD(get_rowHeaderCells)(IUnknown***, long*) override;
77 STDMETHOD(get_rowIndex)(long*) override;
78 STDMETHOD(get_isSelected)(boolean*) override;
79 STDMETHOD(get_rowColumnExtents)(long*, long*, long*, long*, boolean*) override;
80 STDMETHOD(get_table)(IUnknown**) override;
81
82private:
83 css::uno::Reference<css::accessibility::XAccessibleTable> m_xTable;
84 sal_Int64 m_nIndexInParent;
85};
86
87/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
CAccTableCell implements the IAccessibleTableCell interface.
Definition: AccTableCell.h:36
virtual ~CAccTableCell()
Definition: AccTableCell.h:39
HRESULT SmartQI(REFIID iid, void **ppvObject)
Definition: AccTableCell.h:59
static HRESULT WINAPI SmartQI_(void *pv, REFIID iid, void **ppvObject, DWORD_PTR)
Definition: AccTableCell.h:54
CUNOXWrapper implements IUNOXWrapper interface.
Definition: UNOXWrapper.h:32
This interface gives access to the cells of a two-dimensional table.