LibreOffice Module sd (master) 1
AccessibleSlideSorterObject.hxx
Go to the documentation of this file.
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#pragma once
21
23#include <com/sun/star/accessibility/XAccessible.hpp>
24#include <com/sun/star/accessibility/XAccessibleContext.hpp>
25#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
26#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
27#include <com/sun/star/lang/XServiceInfo.hpp>
28
29class SdPage;
30namespace sd::slidesorter { class SlideSorter; }
31
32namespace accessibility {
33
35 css::accessibility::XAccessible,
36 css::accessibility::XAccessibleEventBroadcaster,
37 css::accessibility::XAccessibleContext,
38 css::accessibility::XAccessibleComponent,
39 css::lang::XServiceInfo > AccessibleSlideSorterObjectBase;
40
45{
46public:
57 const css::uno::Reference<css::accessibility::XAccessible >& rxParent,
59 sal_uInt16 nPageNumber);
60 virtual ~AccessibleSlideSorterObject() override;
61
64 SdPage* GetPage() const;
65
68 sal_uInt16 GetPageNumber() const { return mnPageNumber;}
69
71 short nEventId,
72 const css::uno::Any& rOldValue,
73 const css::uno::Any& rNewValue);
74
75 virtual void disposing(std::unique_lock<std::mutex>&) override;
76
77 //===== XAccessible =======================================================
78
79 virtual css::uno::Reference<css::accessibility::XAccessibleContext > SAL_CALL
80 getAccessibleContext() override;
81
82 //===== XAccessibleEventBroadcaster =======================================
83 virtual void SAL_CALL
85 const css::uno::Reference<css::accessibility::XAccessibleEventListener >& rxListener) override;
86
87 virtual void SAL_CALL
89 const css::uno::Reference<css::accessibility::XAccessibleEventListener >& rxListener ) override;
90
91 //===== XAccessibleContext ==============================================
92
93 virtual sal_Int64 SAL_CALL
94 getAccessibleChildCount() override;
95
96 virtual css::uno::Reference< css::accessibility::XAccessible> SAL_CALL
97 getAccessibleChild (sal_Int64 nIndex) override;
98
99 virtual css::uno::Reference< css::accessibility::XAccessible> SAL_CALL
100 getAccessibleParent() override;
101
102 virtual sal_Int64 SAL_CALL
104
105 virtual sal_Int16 SAL_CALL
106 getAccessibleRole() override;
107
108 virtual OUString SAL_CALL
109 getAccessibleDescription() override;
110
111 virtual OUString SAL_CALL
112 getAccessibleName() override;
113
114 virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet> SAL_CALL
115 getAccessibleRelationSet() override;
116
117 virtual sal_Int64 SAL_CALL
118 getAccessibleStateSet() override;
119
120 virtual css::lang::Locale SAL_CALL
121 getLocale() override;
122
123 //===== XAccessibleComponent ================================================
124
125 virtual sal_Bool SAL_CALL containsPoint (
126 const css::awt::Point& aPoint) override;
127
128 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
130 const css::awt::Point& aPoint) override;
131
132 virtual css::awt::Rectangle SAL_CALL getBounds() override;
133
134 virtual css::awt::Point SAL_CALL getLocation() override;
135
136 virtual css::awt::Point SAL_CALL getLocationOnScreen() override;
137
138 virtual css::awt::Size SAL_CALL getSize() override;
139
140 virtual void SAL_CALL grabFocus() override;
141
142 virtual sal_Int32 SAL_CALL getForeground() override;
143
144 virtual sal_Int32 SAL_CALL getBackground() override;
145
146 //===== XServiceInfo ====================================================
147
150 virtual OUString SAL_CALL
151 getImplementationName() override;
152
155 virtual sal_Bool SAL_CALL
156 supportsService (const OUString& sServiceName) override;
157
160 virtual css::uno::Sequence< OUString> SAL_CALL
161 getSupportedServiceNames() override;
162
163private:
164 css::uno::Reference<css::accessibility::XAccessible> mxParent;
165 sal_uInt16 mnPageNumber;
167 sal_uInt32 mnClientId;
168
176 void ThrowIfDisposed();
177
184 bool IsDisposed() const;
185};
186
187} // end of namespace ::accessibility
188
189/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class makes page objects of the slide sorter accessible.
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &aPoint) override
virtual OUString SAL_CALL getAccessibleDescription() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual OUString SAL_CALL getImplementationName() override
Returns an identifier for the implementation of this object.
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
virtual sal_Int16 SAL_CALL getAccessibleRole() override
sal_uInt16 GetPageNumber() const
The page number as given to the constructor.
virtual css::awt::Rectangle SAL_CALL getBounds() override
virtual sal_Int32 SAL_CALL getBackground() override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
AccessibleSlideSorterObject(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ::sd::slidesorter::SlideSorter &rSlideSorter, sal_uInt16 nPageNumber)
Create a new object that represents a page object in the slide sorter.
virtual void SAL_CALL addAccessibleEventListener(const css::uno::Reference< css::accessibility::XAccessibleEventListener > &rxListener) override
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
SdPage * GetPage() const
Return the page that is made accessible by the called object.
void FireAccessibleEvent(short nEventId, const css::uno::Any &rOldValue, const css::uno::Any &rNewValue)
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
virtual sal_Int32 SAL_CALL getForeground() override
virtual css::awt::Size SAL_CALL getSize() override
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
Return whether the specified service is supported by this class.
virtual css::lang::Locale SAL_CALL getLocale() override
bool IsDisposed() const
Check whether or not the object has been disposed (or is in the state of being disposed).
virtual void disposing(std::unique_lock< std::mutex > &) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual void SAL_CALL removeAccessibleEventListener(const css::uno::Reference< css::accessibility::XAccessibleEventListener > &rxListener) override
virtual css::awt::Point SAL_CALL getLocation() override
void ThrowIfDisposed()
Check whether or not the object has been disposed (or is in the state of being disposed).
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
css::uno::Reference< css::accessibility::XAccessible > mxParent
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual OUString SAL_CALL getAccessibleName() override
virtual css::awt::Point SAL_CALL getLocationOnScreen() override
Show previews for all the slides in a document and allow the user to insert or delete slides and modi...
Definition: SlideSorter.hxx:62
comphelper::WeakComponentImplHelper< css::accessibility::XAccessible, css::accessibility::XAccessibleEventBroadcaster, css::accessibility::XAccessibleContext, css::accessibility::XAccessibleComponent, css::lang::XServiceInfo > AccessibleSlideSorterObjectBase
unsigned char sal_Bool