LibreOffice Module svx (master) 1
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
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 .
18 */
25#include <com/sun/star/uno/Reference.hxx>
26#include <com/sun/star/accessibility/XAccessible.hpp>
27#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
28#include <com/sun/star/accessibility/XAccessibleContext.hpp>
29#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
30#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
31#include <com/sun/star/lang/XServiceInfo.hpp>
32#include <com/sun/star/lang/XServiceName.hpp>
34#include <svl/lstner.hxx>
36#include <map>
42namespace com::sun::star::awt {
43 struct Point;
44 struct Rectangle;
45 struct Size;
46 class XFocusListener;
48namespace tools { class Rectangle; }
49class GraphCtrl;
50class SdrObject;
51class SdrModel;
52class SdrPage;
53class SdrView;
61 css::accessibility::XAccessible,
62 css::accessibility::XAccessibleComponent,
63 css::accessibility::XAccessibleContext,
64 css::accessibility::XAccessibleEventBroadcaster,
65 css::accessibility::XAccessibleSelection,
66 css::lang::XServiceInfo,
67 css::lang::XServiceName >
75 friend class GraphCtrl;
77 // internal
80 void Notify( SfxBroadcaster& aBC, const SfxHint& aHint ) override;
82 // XAccessible
84 virtual css::uno::Reference< css::accessibility::XAccessibleContext> SAL_CALL
85 getAccessibleContext() override;
87 // XAccessibleComponent
88 virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& rPoint ) override;
89 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& rPoint ) override;
90 virtual css::awt::Rectangle SAL_CALL getBounds() override;
91 virtual css::awt::Point SAL_CALL getLocation() override;
92 virtual css::awt::Point SAL_CALL getLocationOnScreen() override;
93 virtual css::awt::Size SAL_CALL getSize() override;
94 virtual void SAL_CALL grabFocus() override;
96 virtual sal_Int32 SAL_CALL getForeground() override;
98 virtual sal_Int32 SAL_CALL getBackground() override;
100 // XAccessibleContext
101 virtual sal_Int64 SAL_CALL getAccessibleChildCount() override;
102 virtual css::uno::Reference< css::accessibility::XAccessible> SAL_CALL getAccessibleChild (sal_Int64 nIndex) override;
103 virtual css::uno::Reference< css::accessibility::XAccessible> SAL_CALL getAccessibleParent() override;
104 virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override;
105 virtual sal_Int16 SAL_CALL getAccessibleRole() override;
106 virtual OUString SAL_CALL getAccessibleDescription() override;
107 virtual OUString SAL_CALL getAccessibleName() override;
108 virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet> SAL_CALL getAccessibleRelationSet() override;
109 virtual sal_Int64 SAL_CALL getAccessibleStateSet() override;
110 virtual css::lang::Locale SAL_CALL getLocale() override;
112 // XAccessibleEventBroadcaster
113 virtual void SAL_CALL addAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener>& xListener) override;
114 virtual void SAL_CALL removeAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener>& xListener) override;
116 // XServiceInfo
117 virtual OUString SAL_CALL getImplementationName() override;
118 virtual sal_Bool SAL_CALL supportsService (const OUString& sServiceName) override;
119 virtual css::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() override;
121 // XTypeProvider
122 virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId() override;
124 // XServiceName
125 virtual OUString SAL_CALL getServiceName() override;
127 // XAccessibleSelection
128 virtual void SAL_CALL selectAccessibleChild( sal_Int64 nChildIndex ) override;
129 virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int64 nChildIndex ) override;
130 virtual void SAL_CALL clearAccessibleSelection() override;
131 virtual void SAL_CALL selectAllAccessibleChildren() override;
132 virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override;
133 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int64 nSelectedChildIndex ) override;
134 virtual void SAL_CALL deselectAccessibleChild( sal_Int64 nSelectedChildIndex ) override;
136 // IAccessibleViewforwarder
137 virtual tools::Rectangle GetVisibleArea() const override;
138 virtual Point LogicToPixel (const Point& rPoint) const override;
139 virtual Size LogicToPixel (const Size& rSize) const override;
147 virtual ~SvxGraphCtrlAccessibleContext() override;
149 void checkChildIndexOnSelection(sal_Int64 nIndexOfChild );
151 virtual void SAL_CALL disposing() final override;
155 SdrObject* getSdrObject( sal_Int64 nIndex );
157 void CommitChange (sal_Int16 aEventId, const css::uno::Any& rNewValue, const css::uno::Any& rOldValue);
159 css::uno::Reference< css::accessibility::XAccessible > getAccessible( const SdrObject* pObj );
161 ::accessibility::AccessibleShapeTreeInfo maTreeInfo;
170 OUString msName;
173 typedef ::std::map< const SdrObject*, rtl::Reference<::accessibility::AccessibleShape> > ShapesMapType;
183 sal_uInt32 mnClientId;
190/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::cppu::WeakAggComponentImplHelper7< css::accessibility::XAccessible, css::accessibility::XAccessibleComponent, css::accessibility::XAccessibleContext, css::accessibility::XAccessibleEventBroadcaster, css::accessibility::XAccessibleSelection, css::lang::XServiceInfo, css::lang::XServiceName > SvxGraphCtrlAccessibleContext_Base
@descr This base class provides an implementation of the AccessibleContext service.
std::unique_ptr< SdrView > pView
Definition: graphctl.hxx:75
std::unique_ptr< SdrModel > pModel
Definition: graphctl.hxx:74
Abstract DrawObject.
Definition: svdobj.hxx:261
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:377
virtual void SAL_CALL addAccessibleEventListener(const css::uno::Reference< css::accessibility::XAccessibleEventListener > &xListener) override
sal_uInt32 mnClientId
client id in the AccessibleEventNotifier queue
void setModelAndView(SdrModel *pModel, SdrView *pView)
This method is used by the graph control to tell the accessibility object about a new model and view.
void checkChildIndexOnSelection(sal_Int64 nIndexOfChild)
virtual OUString SAL_CALL getAccessibleDescription() override
::std::map< const SdrObject *, rtl::Reference<::accessibility::AccessibleShape > > ShapesMapType
map of accessible shapes
SdrObject * getSdrObject(sal_Int64 nIndex)
returns the SdrObject at index nIndex from the model of this graph
virtual tools::Rectangle GetVisibleArea() const override
Returns the area of the underlying document that is visible in the corresponding window.
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &rPoint) override
virtual void SAL_CALL disposing() final override
css::uno::Reference< css::accessibility::XAccessible > getAccessible(const SdrObject *pObj)
returns the XAccessible interface for a given SdrObject.
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
virtual void SAL_CALL grabFocus() override
virtual sal_Int16 SAL_CALL getAccessibleRole() override
OUString msDescription
Description of this object.
virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int64 nChildIndex) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Int32 SAL_CALL getForeground() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual OUString SAL_CALL getAccessibleName() override
virtual css::lang::Locale SAL_CALL getLocale() override
OUString msName
Name of this object.
virtual sal_Bool SAL_CALL containsPoint(const css::awt::Point &rPoint) override
virtual Point LogicToPixel(const Point &rPoint) const override
Transform the specified point from internal coordinates in 100th of mm to an absolute screen position...
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual void SAL_CALL removeAccessibleEventListener(const css::uno::Reference< css::accessibility::XAccessibleEventListener > &xListener) override
void CommitChange(sal_Int16 aEventId, const css::uno::Any &rNewValue, const css::uno::Any &rOldValue)
sends an AccessibleEventObject to all added XAccessibleEventListeners
virtual css::awt::Point SAL_CALL getLocationOnScreen() override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
Return the XAccessibleContext.
virtual void SAL_CALL clearAccessibleSelection() override
virtual css::awt::Point SAL_CALL getLocation() override
virtual void SAL_CALL selectAllAccessibleChildren() override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
Return empty reference to indicate that the relation set is not supported.
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
virtual ~SvxGraphCtrlAccessibleContext() override
on destruction, this component is disposed and all dispose listeners are called, except if this compo...
void Notify(SfxBroadcaster &aBC, const SfxHint &aHint) override
virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override
virtual css::awt::Rectangle SAL_CALL getBounds() override
SvxGraphCtrlAccessibleContext(GraphCtrl &rRepresentation)
initialize this component and set default values
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex) override
virtual OUString SAL_CALL getServiceName() override
virtual void SAL_CALL deselectAccessibleChild(sal_Int64 nSelectedChildIndex) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 nIndex) override
::accessibility::AccessibleShapeTreeInfo maTreeInfo
virtual css::awt::Size SAL_CALL getSize() override
virtual sal_Int32 SAL_CALL getBackground() override
virtual void SAL_CALL selectAccessibleChild(sal_Int64 nChildIndex) override
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
unsigned char sal_Bool