1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include "Resource.h" // main symbols
24 #include <com/sun/star/uno/Reference.hxx>
25 #include <com/sun/star/accessibility/XAccessibleImage.hpp>
26 #include "UNOXWrapper.h"
29 * CAccImage implements IAccessibleImage interface.
31 class ATL_NO_VTABLE CAccImage
:
32 public CComObjectRoot
,
33 public CComCoClass
<CAccImage
,&CLSID_AccImage
>,
34 public IAccessibleImage
,
44 BEGIN_COM_MAP(CAccImage
)
45 COM_INTERFACE_ENTRY(IAccessibleImage
)
46 COM_INTERFACE_ENTRY(IUNOXWrapper
)
47 COM_INTERFACE_ENTRY_FUNC_BLIND(0,SmartQI_
)
49 #pragma clang diagnostic push
50 #pragma clang diagnostic ignored "-Winconsistent-missing-override"
54 #pragma clang diagnostic pop
57 static HRESULT WINAPI
SmartQI_(void* pv
,
58 REFIID iid
, void** ppvObject
, DWORD_PTR
)
60 return static_cast<CAccImage
*>(pv
)->SmartQI(iid
,ppvObject
);
63 HRESULT
SmartQI(REFIID iid
, void** ppvObject
)
66 return OuterQueryInterface(iid
,ppvObject
);
75 // Gets the description of the image.
76 STDMETHOD(get_description
)(BSTR
* description
) override
;
78 STDMETHOD(get_imagePosition
)( enum IA2CoordinateType coordinateType
,
80 long __RPC_FAR
*y
) override
;
82 STDMETHOD(get_imageSize
)(
83 long __RPC_FAR
*height
,
84 long __RPC_FAR
*width
) override
;
86 // Override of IUNOXWrapper.
87 STDMETHOD(put_XInterface
)(hyper pXInterface
) override
;
91 css::uno::Reference
<css::accessibility::XAccessibleImage
> pRXImg
;
93 css::accessibility::XAccessibleImage
* GetXInterface()
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */