LibreOffice Module svx (master) 1
GraphCtlAccessibleContext.cxx
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#include <com/sun/star/accessibility/AccessibleRole.hpp>
21#include <com/sun/star/accessibility/AccessibleEventId.hpp>
22#include <com/sun/star/accessibility/AccessibleStateType.hpp>
23#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
24#include <com/sun/star/lang/DisposedException.hpp>
25#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
27#include <vcl/svapp.hxx>
28#include <vcl/settings.hxx>
29#include <o3tl/safeint.hxx>
30#include <osl/mutex.hxx>
31#include <tools/gen.hxx>
32#include <svtools/colorcfg.hxx>
35
39#include <svx/graphctl.hxx>
40#include <svx/strings.hrc>
41#include <svx/svdpage.hxx>
42#include <svx/dialmgr.hxx>
44
45// namespaces
46using namespace ::cppu;
47using namespace ::osl;
48using namespace ::accessibility;
49using namespace ::com::sun::star;
50using namespace ::com::sun::star::uno;
51using namespace ::com::sun::star::drawing;
52using namespace ::com::sun::star::lang;
53using namespace ::com::sun::star::accessibility;
54
55// internal
58 GraphCtrl& rRepr ) :
59
61 mpControl( &rRepr ),
62 mpModel (nullptr),
63 mpPage (nullptr),
64 mpView (nullptr),
65 mnClientId( 0 ),
66 mbDisposed( false )
67{
68 if (mpControl != nullptr)
69 {
71 if (mpModel != nullptr)
72 mpPage = mpModel->GetPage( 0 );
74
75 if( mpModel == nullptr || mpPage == nullptr || mpView == nullptr )
76 {
77 mbDisposed = true;
78 // Set all the pointers to NULL just in case they are used as
79 // a disposed flag.
80 mpModel = nullptr;
81 mpPage = nullptr;
82 mpView = nullptr;
83 }
84 }
85
86 {
87 ::SolarMutexGuard aSolarGuard;
88 msName = SvxResId( RID_SVXSTR_GRAPHCTRL_ACC_NAME );
89 msDescription = SvxResId( RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION );
90 }
91
95}
96
97
101{
102 disposing();
103}
104
105
109Reference< XAccessible > SvxGraphCtrlAccessibleContext::getAccessible( const SdrObject* pObj )
110{
111 Reference<XAccessible> xAccessibleShape;
112
113 if( pObj )
114 {
115 // see if we already created an XAccessible for the given SdrObject
116 ShapesMapType::const_iterator iter = mxShapes.find( pObj );
117
118 if( iter != mxShapes.end() )
119 {
120 // if we already have one, return it
121 xAccessibleShape = (*iter).second.get();
122 }
123 else
124 {
125 // create a new one and remember in our internal map
126 Reference< XShape > xShape( Reference< XShape >::query( const_cast<SdrObject*>(pObj)->getUnoShape() ) );
127
128 css::uno::Reference<css::accessibility::XAccessible> xParent(getAccessibleParent());
129 AccessibleShapeInfo aShapeInfo (xShape,xParent);
130 // Create accessible object that corresponds to the descriptor's shape.
131 rtl::Reference<AccessibleShape> pAcc(ShapeTypeHandler::Instance().CreateAccessibleObject(
132 aShapeInfo, maTreeInfo));
133 xAccessibleShape = pAcc.get();
134 if (pAcc.is())
135 {
136 pAcc->Init ();
137 }
138 mxShapes[pObj] = pAcc;
139
140 // Create event and inform listeners of the object creation.
141 CommitChange( AccessibleEventId::CHILD, Any( xAccessibleShape ), Any( Reference<XAccessible>() ) );
142 }
143 }
144
145 return xAccessibleShape;
146}
147
148// XAccessible
149Reference< XAccessibleContext > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleContext()
150{
151 return this;
152}
153
154// XAccessibleComponent
155sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::containsPoint( const awt::Point& rPoint )
156{
157 // no guard -> done in getSize()
158 awt::Size aSize (getSize());
159 return (rPoint.X >= 0)
160 && (rPoint.X < aSize.Width)
161 && (rPoint.Y >= 0)
162 && (rPoint.Y < aSize.Height);
163}
164
165
166Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleAtPoint( const awt::Point& rPoint )
167{
168 ::osl::MutexGuard aGuard( m_aMutex );
169
170 Reference< XAccessible > xAccessible;
171
172 if( !mpControl )
173 {
174 throw DisposedException();
175 }
176
177 Point aPnt( rPoint.X, rPoint.Y );
179
180 SdrObject* pObj = nullptr;
181
183 {
184 pObj = SdrObjListPrimitiveHit(*mpPage, aPnt, 1, *mpView->GetSdrPageView(), nullptr, false);
185 }
186
187 if( pObj )
188 xAccessible = getAccessible( pObj );
189
190 return xAccessible;
191}
192
194{
195 const SolarMutexGuard aSolarGuard;
196
197 if (nullptr == mpControl)
198 throw DisposedException();
199
200 const Point aOutPos;
201 const Size aOutSize( mpControl->GetOutputSizePixel() );
202 awt::Rectangle aRet;
203
204 aRet.X = aOutPos.X();
205 aRet.Y = aOutPos.Y();
206 aRet.Width = aOutSize.Width();
207 aRet.Height = aOutSize.Height();
208
209 return aRet;
210}
211
213{
214 const SolarMutexGuard aSolarGuard;
215
216 if (nullptr == mpControl)
217 throw DisposedException();
218
219 const awt::Rectangle aRect( getBounds() );
220 awt::Point aRet;
221
222 aRet.X = aRect.X;
223 aRet.Y = aRect.Y;
224
225 return aRet;
226}
227
229{
230 const SolarMutexGuard aSolarGuard;
231
232 if (nullptr == mpControl)
233 throw DisposedException();
234
235 awt::Point aScreenLoc(0, 0);
236
237 auto xParent(getAccessibleParent());
238 if (xParent)
239 {
240 css::uno::Reference<css::accessibility::XAccessibleContext> xParentContext(xParent->getAccessibleContext());
241 css::uno::Reference<css::accessibility::XAccessibleComponent> xParentComponent(xParentContext, css::uno::UNO_QUERY);
242 OSL_ENSURE( xParentComponent.is(), "ValueSetAcc::getLocationOnScreen: no parent component!" );
243 if ( xParentComponent.is() )
244 {
245 awt::Point aParentScreenLoc( xParentComponent->getLocationOnScreen() );
246 awt::Point aOwnRelativeLoc( getLocation() );
247 aScreenLoc.X = aParentScreenLoc.X + aOwnRelativeLoc.X;
248 aScreenLoc.Y = aParentScreenLoc.Y + aOwnRelativeLoc.Y;
249 }
250 }
251
252 return aScreenLoc;
253}
254
256{
257 const SolarMutexGuard aSolarGuard;
258
259 if (nullptr == mpControl)
260 throw DisposedException();
261
262 const awt::Rectangle aRect( getBounds() );
263 awt::Size aRet;
264
265 aRet.Width = aRect.Width;
266 aRet.Height = aRect.Height;
267
268 return aRet;
269}
270
271// XAccessibleContext
273{
274 ::SolarMutexGuard aGuard;
275
276 if( nullptr == mpPage )
277 throw DisposedException();
278
279 return mpPage->GetObjCount();
280}
281
282
285{
286 ::SolarMutexGuard aGuard;
287
288 if( nullptr == mpPage )
289 throw DisposedException();
290
291 if( (nIndex < 0) || ( o3tl::make_unsigned(nIndex) >= mpPage->GetObjCount() ) )
292 throw lang::IndexOutOfBoundsException();
293
294 return mpPage->GetObj( nIndex );
295}
296
297
300 sal_Int16 nEventId,
301 const uno::Any& rNewValue,
302 const uno::Any& rOldValue)
303{
304 AccessibleEventObject aEvent (
305 static_cast<uno::XWeak*>(this),
306 nEventId,
307 rNewValue,
308 rOldValue);
309
310 if (mnClientId)
312}
313
314Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleChild( sal_Int64 nIndex )
315{
316 ::SolarMutexGuard aGuard;
317
318 return getAccessible( getSdrObject( nIndex ) );
319}
320
321Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleParent()
322{
323 ::SolarMutexGuard aGuard;
324
325 if( nullptr == mpControl )
326 throw DisposedException();
327
329}
330
332{
333 ::SolarMutexGuard aGuard;
334 // Use a simple but slow solution for now. Optimize later.
335
336 // Iterate over all the parent's children and search for this object.
337 css::uno::Reference<css::accessibility::XAccessible> xParent(getAccessibleParent());
338 if (xParent.is())
339 {
340 Reference< XAccessibleContext > xParentContext( xParent->getAccessibleContext() );
341 if( xParentContext.is() )
342 {
343 sal_Int64 nChildCount = xParentContext->getAccessibleChildCount();
344 for( sal_Int64 i = 0 ; i < nChildCount ; ++i )
345 {
346 Reference< XAccessible > xChild( xParentContext->getAccessibleChild( i ) );
347 if( xChild.is() )
348 {
349 Reference< XAccessibleContext > xChildContext = xChild->getAccessibleContext();
350 if( xChildContext == static_cast<XAccessibleContext*>(this) )
351 return i;
352 }
353 }
354 }
355 }
356
357 // Return -1 to indicate that this object's parent does not know about the
358 // object.
359 return -1;
360}
361
362
364{
365 return AccessibleRole::PANEL;
366}
367
368
370{
371 ::SolarMutexGuard aGuard;
372 return msDescription;
373}
374
375
377{
378 ::SolarMutexGuard aGuard;
379 return msName;
380}
381
382
386Reference< XAccessibleRelationSet > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleRelationSet()
387{
388 return Reference< XAccessibleRelationSet >();
389}
390
391
393{
394 ::SolarMutexGuard aGuard;
395
396 sal_Int64 nStateSet = 0;
397
398 if ( rBHelper.bDisposed || mbDisposed )
399 {
400 nStateSet |= AccessibleStateType::DEFUNC;
401 }
402 else
403 {
404 nStateSet |= AccessibleStateType::FOCUSABLE;
405 if( mpControl->HasFocus() )
406 nStateSet |= AccessibleStateType::FOCUSED;
407 nStateSet |= AccessibleStateType::OPAQUE;
408 nStateSet |= AccessibleStateType::SHOWING;
409 nStateSet |= AccessibleStateType::VISIBLE;
410 }
411
412 return nStateSet;
413}
414
415
417{
418 ::SolarMutexGuard aGuard;
419
420 css::uno::Reference<css::accessibility::XAccessible> xParent(getAccessibleParent());
421 if (xParent.is())
422 {
423 Reference< XAccessibleContext > xParentContext( xParent->getAccessibleContext() );
424 if( xParentContext.is() )
425 return xParentContext->getLocale();
426 }
427
428 // No parent. Therefore throw exception to indicate this cluelessness.
429 throw IllegalAccessibleComponentStateException();
430}
431
432// XAccessibleEventListener
433void SAL_CALL SvxGraphCtrlAccessibleContext::addAccessibleEventListener( const Reference< XAccessibleEventListener >& xListener )
434{
435 if (xListener.is())
436 {
437 ::SolarMutexGuard aGuard;
438 if (!mnClientId)
441 }
442}
443
444
445void SAL_CALL SvxGraphCtrlAccessibleContext::removeAccessibleEventListener( const Reference< XAccessibleEventListener >& xListener )
446{
447 if (!xListener.is())
448 return;
449
450 ::SolarMutexGuard aGuard;
451
452 sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener );
453 if ( !nListenerCount )
454 {
455 // no listeners anymore
456 // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
457 // and at least to us not firing any events anymore, in case somebody calls
458 // NotifyAccessibleEvent, again
460 mnClientId = 0;
461 }
462}
463
465{
466 ::SolarMutexGuard aGuard;
467
468 if( nullptr == mpControl )
469 throw DisposedException();
470
472}
473
475{
476 svtools::ColorConfig aColorConfig;
477 Color nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
478 return static_cast<sal_Int32>(nColor);
479}
480
482{
484 return static_cast<sal_Int32>(nColor);
485}
486
487// XServiceInfo
489{
490 return "com.sun.star.comp.ui.SvxGraphCtrlAccessibleContext";
491}
492
493sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::supportsService( const OUString& sServiceName )
494{
496}
497
499{
500 return { "com.sun.star.accessibility.Accessible",
501 "com.sun.star.accessibility.AccessibleContext",
502 "com.sun.star.drawing.AccessibleGraphControl" };
503}
504
505// XTypeProvider
507{
508 return css::uno::Sequence<sal_Int8>();
509}
510
511// XServiceName
513{
514 return "com.sun.star.accessibility.AccessibleContext";
515}
516
517// XAccessibleSelection
519{
520 ::SolarMutexGuard aGuard;
521
522 if( nullptr == mpView )
523 throw DisposedException();
524
525 if (nIndex < 0 || nIndex >= getAccessibleChildCount())
526 throw lang::IndexOutOfBoundsException();
527
528 SdrObject* pObj = getSdrObject( nIndex );
529
530 if( pObj )
532}
533
534
536{
537 ::SolarMutexGuard aGuard;
538
539 if( nullptr == mpView )
540 throw DisposedException();
541
542 if (nIndex < 0 || nIndex >= getAccessibleChildCount())
543 throw lang::IndexOutOfBoundsException();
544
546}
547
548
550{
551 ::SolarMutexGuard aGuard;
552
553 if( nullptr == mpView )
554 throw DisposedException();
555
557}
558
559
561{
562 ::SolarMutexGuard aGuard;
563
564 if( nullptr == mpView )
565 throw DisposedException();
566
568}
569
570
572{
573 ::SolarMutexGuard aGuard;
574
575 if( nullptr == mpView )
576 throw DisposedException();
577
578 const SdrMarkList& rList = mpView->GetMarkedObjectList();
579 return static_cast<sal_Int64>(rList.GetMarkCount());
580}
581
582
583Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getSelectedAccessibleChild( sal_Int64 nIndex )
584{
585 ::SolarMutexGuard aGuard;
586
588
589 Reference< XAccessible > xAccessible;
590
591 const SdrMarkList& rList = mpView->GetMarkedObjectList();
592 SdrObject* pObj = rList.GetMark(static_cast<size_t>(nIndex))->GetMarkedSdrObj();
593 if( pObj )
594 xAccessible = getAccessible( pObj );
595
596 return xAccessible;
597}
598
599
601{
602 ::SolarMutexGuard aGuard;
603
605
606 if( !mpView )
607 return;
608
609 const SdrMarkList& rList = mpView->GetMarkedObjectList();
610
611 SdrObject* pObj = getSdrObject( nIndex );
612 if( !pObj )
613 return;
614
615 SdrMarkList aRefList( rList );
616
618 mpView->UnmarkAllObj( pPV );
619
620 const size_t nCount = aRefList.GetMarkCount();
621 for( size_t nMark = 0; nMark < nCount; ++nMark )
622 {
623 if( aRefList.GetMark(nMark)->GetMarkedSdrObj() != pObj )
624 mpView->MarkObj( aRefList.GetMark(nMark)->GetMarkedSdrObj(), pPV );
625 }
626}
627
628// internals
630{
631 if( nIndex < 0 || nIndex >= getSelectedAccessibleChildCount() )
632 throw lang::IndexOutOfBoundsException();
633}
634
635
640 SdrModel* pModel,
641 SdrView* pView)
642{
643 ::SolarMutexGuard aGuard;
644
645 mpModel = pModel;
646 if (mpModel != nullptr)
647 mpPage = mpModel->GetPage( 0 );
648 mpView = pView;
649
650 if (mpModel == nullptr || mpPage == nullptr || mpView == nullptr)
651 {
652 mbDisposed = true;
653
654 // Set all the pointers to NULL just in case they are used as
655 // a disposed flag.
656 mpModel = nullptr;
657 mpPage = nullptr;
658 mpView = nullptr;
659 }
660
662}
663
664
666{
667 ::SolarMutexGuard aGuard;
668
669 if( mbDisposed )
670 return;
671
672 mbDisposed = true;
673
674 mpControl = nullptr; // object dies with representation
675 mpView = nullptr;
676 mpPage = nullptr;
677
678 {
679 for (const auto& rEntry : mxShapes)
680 {
681 rtl::Reference<XAccessible> pAcc(rEntry.second);
682 Reference< XComponent > xComp( pAcc.get(), UNO_QUERY );
683 if( xComp.is() )
684 xComp->dispose();
685 }
686
687 mxShapes.clear();
688 }
689
690 // Send a disposing to all listeners.
691 if ( mnClientId )
692 {
694 mnClientId = 0;
695 }
696}
697
699{
700 if (rHint.GetId() == SfxHintId::ThisIsAnSdrHint)
701 {
702 const SdrHint* pSdrHint = static_cast<const SdrHint*>( &rHint );
703 switch( pSdrHint->GetKind() )
704 {
706 {
707 ShapesMapType::iterator iter = mxShapes.find( pSdrHint->GetObject() );
708
709 if( iter != mxShapes.end() )
710 {
711 // if we already have one, return it
712 rtl::Reference<AccessibleShape> pShape((*iter).second);
713
714 if( pShape.is() )
715 pShape->CommitChange( AccessibleEventId::VISIBLE_DATA_CHANGED, uno::Any(), uno::Any() );
716 }
717 }
718 break;
719
721 CommitChange( AccessibleEventId::CHILD, Any( getAccessible( pSdrHint->GetObject() ) ) , uno::Any());
722 break;
724 CommitChange( AccessibleEventId::CHILD, uno::Any(), Any( getAccessible( pSdrHint->GetObject() ) ) );
725 break;
727 dispose();
728 break;
729 default:
730 break;
731 }
732 }
733 else
734 {
735 // Has our SdDrawDocument just died?
736 if(rHint.GetId() == SfxHintId::Dying)
737 {
738 dispose();
739 }
740 }
741}
742
743// IAccessibleViewforwarder
745{
746 tools::Rectangle aVisArea;
747
749 {
750 SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow(0);
751 aVisArea = pPaintWindow->GetVisibleArea();
752 }
753
754 return aVisArea;
755}
756
758{
759 if( mpControl )
760 {
762 }
763 else
764 {
765 return rPoint;
766 }
767}
768
770{
771 if( mpControl )
773 else
774 return rSize;
775}
776
777/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
FPDF_PAGE mpPage
constexpr OUStringLiteral sServiceName
AnyEventRef aEvent
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
SdrModel * GetSdrModel() const
Definition: graphctl.hxx:113
Point GetPositionInDialog() const
Definition: graphctl.cxx:829
SdrView * GetSdrView() const
Definition: graphctl.hxx:114
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
virtual vcl::Window * GetOwnerWindow() const
SdrHintKind GetKind() const
Definition: svdmodel.hxx:132
const SdrObject * GetObject() const
Definition: svdmodel.hxx:131
size_t GetMarkCount() const
Definition: svdmark.hxx:178
SdrMark * GetMark(size_t nNum) const
Definition: svdmark.cxx:230
bool IsObjMarked(SdrObject const *pObj) const
Definition: svdmrkv.cxx:2206
const SdrMarkList & GetMarkedObjectList() const
Definition: svdmrkv.hxx:258
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
Definition: svdmrkv.cxx:2565
void MarkAllObj(SdrPageView *pPV=nullptr)
Definition: svdmrkv.cxx:2585
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
Definition: svdmrkv.cxx:1939
SdrObject * GetMarkedSdrObj() const
Definition: svdmark.hxx:68
const SdrPage * GetPage(sal_uInt16 nPgNum) const
Definition: svdmodel.cxx:1790
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:822
size_t GetObjCount() const
Definition: svdpage.cxx:816
Abstract DrawObject.
Definition: svdobj.hxx:261
SdrPaintWindow * GetPaintWindow(sal_uInt32 nIndex) const
Definition: svdpntv.cxx:75
sal_uInt32 PaintWindowCount() const
Definition: svdpntv.hxx:219
SdrPageView * GetSdrPageView() const
Definition: svdpntv.hxx:300
tools::Rectangle GetVisibleArea() const
SfxHintId GetId() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetWindowColor() const
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
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
void SetViewForwarder(const IAccessibleViewForwarder *pViewForwarder)
The view forwarder allows the transformation between internal and pixel coordinates and can be asked ...
void SetSdrView(SdrView *pView)
Set the view that will be used to construct SvxTextEditSources which in turn are used to create acces...
void SetWindow(vcl::Window *pWindow)
Set the window that is used to construct SvxTextEditSources which in turn is used to create accessibl...
static sal_Int32 addEventListener(const TClientId _nClient, const css::uno::Reference< css::accessibility::XAccessibleEventListener > &_rxListener)
static void addEvent(const TClientId _nClient, const css::accessibility::AccessibleEventObject &_rEvent)
static sal_Int32 removeEventListener(const TClientId _nClient, const css::uno::Reference< css::accessibility::XAccessibleEventListener > &_rxListener)
static void revokeClient(const TClientId _nClient)
static void revokeClientNotifyDisposing(const TClientId _nClient, const css::uno::Reference< css::uno::XInterface > &_rxEventSource)
mutable::osl::Mutex m_aMutex
ColorConfigValue GetColorValue(ColorConfigEntry eEntry, bool bSmart=true) const
weld::DrawingArea * GetDrawingArea() const
Size const & GetOutputSizePixel() const
virtual OutputDevice & get_ref_device()=0
virtual a11yref get_accessible_parent()=0
int nCount
OUString SvxResId(TranslateId aId)
Definition: dialmgr.cxx:24
std::mutex m_aMutex
sal_Int32 nIndex
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
int i
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
void dispose()
SdrObject * SdrObjListPrimitiveHit(const SdrObjList &rList, const Point &rPnt, sal_uInt16 nTol, const SdrPageView &rSdrPageView, const SdrLayerIDSet *pVisiLayer, bool bTextOnly)
UnoViewSharedPtr mpView
unsigned char sal_Bool