Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / controller / inc / AccessibleTextHelper.hxx
blob30b4123b9aac4c45a79292787975aa076f567485
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 .
19 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ACCESSIBLETEXTHELPER_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ACCESSIBLETEXTHELPER_HXX
22 #include <memory>
23 #include <MutexContainer.hxx>
24 #include <cppuhelper/compbase.hxx>
25 #include <com/sun/star/lang/XInitialization.hpp>
26 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
28 // forward declaration of helper class from svx
29 namespace accessibility
31 class AccessibleTextHelper;
34 namespace chart
37 class DrawViewWrapper;
39 namespace impl
41 typedef ::cppu::WeakComponentImplHelper<
42 css::lang::XInitialization,
43 css::accessibility::XAccessibleContext >
44 AccessibleTextHelper_Base;
47 class AccessibleTextHelper :
48 public MutexContainer,
49 public impl::AccessibleTextHelper_Base
51 public:
52 explicit AccessibleTextHelper( DrawViewWrapper * pDrawViewWrapper );
53 virtual ~AccessibleTextHelper() override;
55 // ____ XInitialization ____
56 /** Must be called at least once for this helper class to work.
58 mandatory parameter 0: type string. This is the CID that is used to find
59 the corresponding drawing object that contains the text that should
60 be handled by this helper class.
62 mandatory parameter 1: type XAccessible. Is used as EventSource for the
63 ::accessibility::AccessibleTextHelper (svx)
65 mandatory parameter 2: type awt::XWindow. The Window that shows the
66 text currently.
68 virtual void SAL_CALL initialize(
69 const css::uno::Sequence< css::uno::Any >& aArguments ) override;
71 // ____ XAccessibleContext ____
72 virtual ::sal_Int32 SAL_CALL getAccessibleChildCount() override;
73 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(
74 ::sal_Int32 i ) override;
75 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override;
76 virtual ::sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
77 virtual ::sal_Int16 SAL_CALL getAccessibleRole() override;
78 virtual OUString SAL_CALL getAccessibleDescription() override;
79 virtual OUString SAL_CALL getAccessibleName() override;
80 virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override;
81 virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override;
82 virtual css::lang::Locale SAL_CALL getLocale() override;
84 private:
85 std::unique_ptr<::accessibility::AccessibleTextHelper> m_pTextHelper;
86 DrawViewWrapper * m_pDrawViewWrapper;
89 } // namespace chart
91 // INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ACCESSIBLETEXTHELPER_HXX
92 #endif
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */