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