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