bump product version to 5.0.4.1
[LibreOffice.git] / winaccessibility / source / UAccCOM / EnumVariant.h
blob7113aabf064f87247bf6cab5f5e69eb5e9de54fe
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 #ifndef INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ENUMVARIANT_H
21 #define INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ENUMVARIANT_H
23 #include "resource.h" // main symbols
24 #include <com/sun/star/accessibility/XAccessible.hpp>
25 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
26 #include "UAccCOM.h"
27 #include <AccObjectManagerAgent.hxx>
30 /**
31 * CEnumVariant implements IEnumVARIANT interface.
33 class ATL_NO_VTABLE CEnumVariant :
34 public CComObjectRootEx<CComMultiThreadModel>,
35 public CComCoClass<CEnumVariant, &CLSID_EnumVariant>,
36 public IDispatchImpl<IEnumVariant, &IID_IEnumVariant, &LIBID_UACCCOMLib>
38 public:
39 CEnumVariant()
40 :m_lLBound(0),
41 pUNOInterface(NULL),
42 m_pXAccessibleSelection(NULL)
44 m_lCurrent = m_lLBound;
47 virtual ~CEnumVariant() {};
49 DECLARE_NO_REGISTRY()
51 DECLARE_PROTECT_FINAL_CONSTRUCT()
53 BEGIN_COM_MAP(CEnumVariant)
54 COM_INTERFACE_ENTRY(IEnumVariant)
55 COM_INTERFACE_ENTRY(IEnumVARIANT)
56 END_COM_MAP()
58 // IEnumVariant
59 public:
61 STDMETHOD(ClearEnumeration)();
63 // IEnumVARIANT
66 HRESULT STDMETHODCALLTYPE Next(ULONG cElements,VARIANT __RPC_FAR *pvar,ULONG __RPC_FAR *pcElementFetched);
69 HRESULT STDMETHODCALLTYPE Skip(ULONG cElements);
72 HRESULT STDMETHODCALLTYPE Reset( void);
75 HRESULT STDMETHODCALLTYPE Clone(IEnumVARIANT __RPC_FAR *__RPC_FAR *ppenum);
77 // IEnumVariant
80 HRESULT STDMETHODCALLTYPE PutSelection(hyper pXSelection);
83 static HRESULT STDMETHODCALLTYPE Create(CEnumVariant __RPC_FAR *__RPC_FAR *ppenum);
86 long GetCountOfElements();
88 private:
90 long m_lCurrent;
91 long m_lLBound;
92 css::accessibility::XAccessible* pUNOInterface;
93 css::uno::Reference<css::accessibility::XAccessibleSelection>
94 m_pXAccessibleSelection;
97 #endif // INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ENUMVARIANT_H
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */