LibreOffice Module winaccessibility (master) 1
AccRelation.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" // main symbols
23
24#include <com/sun/star/uno/Reference.hxx>
25#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
26#include "UNOXWrapper.h"
27
31class ATL_NO_VTABLE CAccRelation :
32 public CComObjectRoot,
33 public CComCoClass<CAccRelation, &CLSID_AccRelation>,
35 public CUNOXWrapper
36{
37public:
39 {
40 }
41 virtual ~CAccRelation()
42 {
43 }
44
45 DECLARE_NO_REGISTRY()
46
47 DECLARE_PROTECT_FINAL_CONSTRUCT()
48
49 BEGIN_COM_MAP(CAccRelation)
50 COM_INTERFACE_ENTRY(IAccessibleRelation)
51 COM_INTERFACE_ENTRY(IUNOXWrapper)
52#if defined __clang__
53#pragma clang diagnostic push
54#pragma clang diagnostic ignored "-Winconsistent-missing-override"
55#endif
56 END_COM_MAP()
57#if defined __clang__
58#pragma clang diagnostic pop
59#endif
60
61 // IAccessibleRelation
62public:
63 // IAccessibleRelation
64
65 // Gets what the type of relation is.
66 STDMETHOD(get_relationType)(BSTR * relationType) override;
67
68 // Gets what the type of localized relation is.
69 STDMETHOD(get_localizedRelationType)(BSTR * relationType) override;
70
71 // Gets how many targets this relation have.
72 STDMETHOD(get_nTargets)(long * nTargets) override;
73
74 // Gets one accessible relation target.
75 STDMETHOD(get_target)(long targetIndex, IUnknown * * target) override;
76
77 // Gets multiple accessible relation targets.
78 STDMETHOD(get_targets)(long maxTargets, IUnknown * * target, long * nTargets) override;
79
80 // Override of IUNOXWrapper.
81 STDMETHOD(put_XSubInterface)(hyper pXSubInterface) override;
82
83 //static OLECHAR* getRelationTypeOLECHAR(int type);
84 static BSTR getRelationTypeBSTR(int type);
85
86private:
87
88 css::accessibility::AccessibleRelation relation;
89};
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
CAccRelation implements IAccessibleRelation interface.
Definition: AccRelation.h:36
css::accessibility::AccessibleRelation relation
Definition: AccRelation.h:88
virtual ~CAccRelation()
Definition: AccRelation.h:41
CUNOXWrapper implements IUNOXWrapper interface.
Definition: UNOXWrapper.h:32
This interface gives access to an object's set of relations.
long nTargets
Returns the number of targets for this relation.
IUnknown target([in] long targetIndex)
Returns one accessible relation target.
BSTR relationType
Returns the type of the relation.