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 #ifndef INCLUDED_SVX_ACCESSIBLEOLESHAPE_HXX 21 #define INCLUDED_SVX_ACCESSIBLEOLESHAPE_HXX 22 23 #include <com/sun/star/accessibility/XAccessibleAction.hpp> 24 #include <com/sun/star/uno/Any.hxx> 25 #include <com/sun/star/uno/Reference.hxx> 26 #include <com/sun/star/uno/Sequence.hxx> 27 #include <com/sun/star/uno/Type.hxx> 28 #include <rtl/ustring.hxx> 29 #include <sal/types.h> 30 #include <svx/AccessibleShape.hxx> 31 #include <svx/svxdllapi.h> 32 33 namespace com { namespace sun { namespace star { 34 namespace accessibility { class XAccessibleKeyBinding; } 35 } } } 36 37 namespace accessibility { 38 39 class AccessibleShapeInfo; 40 class AccessibleShapeTreeInfo; 41 42 /** @descr 43 This class makes OLE objects accessible. With respect to its 44 base class AccessibleShape it supports the additional 45 XAccessibleAction interface. 46 */ 47 class SVX_DLLPUBLIC AccessibleOLEShape 48 : public AccessibleShape, 49 public css::accessibility::XAccessibleAction 50 { 51 public: 52 //===== internal ======================================================== 53 AccessibleOLEShape ( 54 const AccessibleShapeInfo& rShapeInfo, 55 const AccessibleShapeTreeInfo& rShapeTreeInfo); 56 virtual ~AccessibleOLEShape() override; 57 58 //===== XAccessibleAction =============================================== 59 60 sal_Int32 SAL_CALL getAccessibleActionCount() override; 61 62 sal_Bool SAL_CALL doAccessibleAction (sal_Int32 nIndex) override; 63 64 OUString SAL_CALL getAccessibleActionDescription (sal_Int32 nIndex) override; 65 66 css::uno::Reference< 67 css::accessibility::XAccessibleKeyBinding> SAL_CALL getAccessibleActionKeyBinding ( 68 sal_Int32 nIndex) override; 69 70 //===== XInterface ====================================================== 71 72 virtual css::uno::Any SAL_CALL 73 queryInterface (const css::uno::Type & rType) override; 74 75 virtual void SAL_CALL 76 acquire() 77 throw () override; 78 79 virtual void SAL_CALL 80 release() 81 throw () override; 82 83 //===== XServiceInfo ==================================================== 84 85 virtual OUString SAL_CALL 86 getImplementationName() override; 87 88 virtual css::uno::Sequence< OUString> SAL_CALL 89 getSupportedServiceNames() override; 90 91 //===== XTypeProvider =================================================== 92 93 virtual css::uno::Sequence< css::uno::Type> SAL_CALL 94 getTypes() override; 95 // ====== XAccessibleExtendedAttributes ===================================== 96 virtual css::uno::Any SAL_CALL getExtendedAttributes() override ; 97 protected: 98 /// Create a name string that contains the accessible name. 99 virtual OUString 100 CreateAccessibleBaseName () override; 101 102 private: 103 AccessibleOLEShape (const AccessibleOLEShape&) = delete; 104 105 AccessibleOLEShape& operator= (const AccessibleOLEShape&) = delete; 106 }; 107 108 } // end of namespace accessibility 109 110 #endif 111 112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 113