LibreOffice Module winaccessibility (master) 1
EnumVariant.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#include <com/sun/star/accessibility/XAccessible.hpp>
24#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
25#include <UAccCOM.h>
27
31class ATL_NO_VTABLE CEnumVariant :
32 public CComObjectRootEx<CComMultiThreadModel>,
33 public CComCoClass<CEnumVariant, &CLSID_EnumVariant>,
34 public IDispatchImpl<IEnumVariant, &IID_IEnumVariant, &LIBID_UACCCOMLib>
35{
36public:
38 :m_nCurrent(0),
39 pUNOInterface(nullptr)
40 {
41 }
42
43 virtual ~CEnumVariant() {};
44
45 DECLARE_NO_REGISTRY()
46
47 DECLARE_PROTECT_FINAL_CONSTRUCT()
48
49 BEGIN_COM_MAP(CEnumVariant)
50 COM_INTERFACE_ENTRY(IEnumVariant)
51 COM_INTERFACE_ENTRY(IEnumVARIANT)
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 // IEnumVariant
62public:
63
64 STDMETHOD(ClearEnumeration)() override;
65
66 // IEnumVARIANT
67
68
69 HRESULT STDMETHODCALLTYPE Next(ULONG cElements,VARIANT __RPC_FAR *pvar,ULONG __RPC_FAR *pcElementFetched) override;
70
71
72 HRESULT STDMETHODCALLTYPE Skip(ULONG cElements) override;
73
74
75 HRESULT STDMETHODCALLTYPE Reset( void) override;
76
77
78 HRESULT STDMETHODCALLTYPE Clone(IEnumVARIANT __RPC_FAR *__RPC_FAR *ppenum) override;
79
80 // IEnumVariant
81
82
83 HRESULT STDMETHODCALLTYPE PutSelection(hyper pXSelection) override;
84
85
86 static HRESULT STDMETHODCALLTYPE Create(CEnumVariant __RPC_FAR *__RPC_FAR *ppenum);
87
88
89 long GetCountOfElements();
90
91private:
92
93 sal_Int64 m_nCurrent;
94 css::accessibility::XAccessible* pUNOInterface;
95 css::uno::Reference<css::accessibility::XAccessibleSelection>
97};
98
99/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
CEnumVariant implements IEnumVARIANT interface.
Definition: EnumVariant.h:35
virtual ~CEnumVariant()
Definition: EnumVariant.h:43
css::uno::Reference< css::accessibility::XAccessibleSelection > m_pXAccessibleSelection
Definition: EnumVariant.h:96
sal_Int64 m_nCurrent
Definition: EnumVariant.h:93
css::accessibility::XAccessible * pUNOInterface
Definition: EnumVariant.h:94
void Create(SwFormatVertOrient &rItem, SvStream &rStrm, sal_uInt16 nVersionAbusedAsSize)
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)