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 .
24 #pragma clang diagnostic push
25 #pragma clang diagnostic ignored "-Wnon-virtual-dtor"
29 #pragma clang diagnostic pop
32 #include <vcl/svapp.hxx>
33 #include <o3tl/char16_t2wchar_t.hxx>
35 #include <com/sun/star/accessibility/XAccessible.hpp>
36 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
38 using namespace css::accessibility
;
39 using namespace css::uno
;
43 * @param description Variant to get description.
46 COM_DECLSPEC_NOTHROW STDMETHODIMP
CAccImage::get_description(BSTR
* description
)
53 if (description
== nullptr)
58 OUString ouStr
= GetXInterface()->getAccessibleImageDescription();
59 SAFE_SYSFREESTRING(*description
);
60 *description
= SysAllocString(o3tl::toW(ouStr
.getStr()));
67 COM_DECLSPEC_NOTHROW STDMETHODIMP
CAccImage::get_imagePosition(
68 /* [in] */ enum IA2CoordinateType
,
69 /* [out] */ long __RPC_FAR
*,
70 /* [retval][out] */ long __RPC_FAR
*)
75 COM_DECLSPEC_NOTHROW STDMETHODIMP
CAccImage::get_imageSize(
76 /* [out] */ long __RPC_FAR
*,
77 /* [retval][out] */ long __RPC_FAR
*)
84 * @param pXInterface UNO interface.
87 COM_DECLSPEC_NOTHROW STDMETHODIMP
CAccImage::put_XInterface(hyper pXInterface
)
89 // internal IUNOXWrapper - no mutex meeded
93 CUNOXWrapper::put_XInterface(pXInterface
);
95 if(pUNOInterface
== nullptr)
98 Reference
<XAccessibleContext
> pRContext
= pUNOInterface
->getAccessibleContext();
103 Reference
<XAccessibleImage
> pRXI(pRContext
,UNO_QUERY
);
110 LEAVE_PROTECTED_BLOCK
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */