LibreOffice Module svx (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
SvxGraphCtrlAccessibleContext Class Referencefinal

#include <GraphCtlAccessibleContext.hxx>

Inheritance diagram for SvxGraphCtrlAccessibleContext:
[legend]
Collaboration diagram for SvxGraphCtrlAccessibleContext:
[legend]

Public Member Functions

 SvxGraphCtrlAccessibleContext (GraphCtrl &rRepresentation)
 initialize this component and set default values More...
 
void Notify (SfxBroadcaster &aBC, const SfxHint &aHint) override
 
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext () override
 Return the XAccessibleContext. More...
 
virtual sal_Bool SAL_CALL containsPoint (const css::awt::Point &rPoint) override
 
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint (const css::awt::Point &rPoint) override
 
virtual css::awt::Rectangle SAL_CALL getBounds () override
 
virtual css::awt::Point SAL_CALL getLocation () override
 
virtual css::awt::Point SAL_CALL getLocationOnScreen () override
 
virtual css::awt::Size SAL_CALL getSize () override
 
virtual void SAL_CALL grabFocus () override
 
virtual sal_Int32 SAL_CALL getForeground () override
 
virtual sal_Int32 SAL_CALL getBackground () override
 
virtual sal_Int64 SAL_CALL getAccessibleChildCount () override
 
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild (sal_Int64 nIndex) override
 
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent () override
 
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent () override
 
virtual sal_Int16 SAL_CALL getAccessibleRole () override
 
virtual OUString SAL_CALL getAccessibleDescription () override
 
virtual OUString SAL_CALL getAccessibleName () override
 
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet () override
 Return empty reference to indicate that the relation set is not supported. More...
 
virtual sal_Int64 SAL_CALL getAccessibleStateSet () override
 
virtual css::lang::Locale SAL_CALL getLocale () override
 
virtual void SAL_CALL addAccessibleEventListener (const css::uno::Reference< css::accessibility::XAccessibleEventListener > &xListener) override
 
virtual void SAL_CALL removeAccessibleEventListener (const css::uno::Reference< css::accessibility::XAccessibleEventListener > &xListener) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &sServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
virtual OUString SAL_CALL getServiceName () override
 
virtual void SAL_CALL selectAccessibleChild (sal_Int64 nChildIndex) override
 
virtual sal_Bool SAL_CALL isAccessibleChildSelected (sal_Int64 nChildIndex) override
 
virtual void SAL_CALL clearAccessibleSelection () override
 
virtual void SAL_CALL selectAllAccessibleChildren () override
 
virtual sal_Int64 SAL_CALL getSelectedAccessibleChildCount () override
 
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild (sal_Int64 nSelectedChildIndex) override
 
virtual void SAL_CALL deselectAccessibleChild (sal_Int64 nSelectedChildIndex) override
 
virtual tools::Rectangle GetVisibleArea () const override
 Returns the area of the underlying document that is visible in the corresponding window. More...
 
virtual Point LogicToPixel (const Point &rPoint) const override
 Transform the specified point from internal coordinates in 100th of mm to an absolute screen position. More...
 
virtual Size LogicToPixel (const Size &rSize) const override
 Transform the specified size from internal coordinates in 100th of mm to a screen oriented pixel size. More...
 
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. More...
 
- Public Member Functions inherited from cppu::WeakAggComponentImplHelper7< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 >
 WeakAggComponentImplHelper7 (::osl::Mutex &rMutex) SAL_NOEXCEPT
 
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL queryAggregation (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual void SAL_CALL acquire () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual void SAL_CALL release () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 
- Public Member Functions inherited from SfxListener
 SfxListener ()
 
 SfxListener (const SfxListener &rCopy)
 
virtual ~SfxListener () COVERITY_NOEXCEPT_FALSE
 
void StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
 
void EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
 
void EndListeningAll ()
 
bool IsListening (SfxBroadcaster &rBroadcaster) const
 
sal_uInt16 GetBroadcasterCount () const
 
SfxBroadcasterGetBroadcasterJOE (sal_uInt16 nNo) const
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint)
 
void RemoveBroadcaster_Impl (SfxBroadcaster &rBC)
 
virtual bool IsSdrView () const
 
- Public Member Functions inherited from accessibility::IAccessibleViewForwarder
 IAccessibleViewForwarder ()=default
 
 IAccessibleViewForwarder (IAccessibleViewForwarder const &)=default
 
 IAccessibleViewForwarder (IAccessibleViewForwarder &&)=default
 
IAccessibleViewForwarderoperator= (IAccessibleViewForwarder const &)=default
 
IAccessibleViewForwarderoperator= (IAccessibleViewForwarder &&)=default
 
virtual ~IAccessibleViewForwarder ()
 
virtual tools::Rectangle GetVisibleArea () const =0
 Returns the area of the underlying document that is visible in the corresponding window. More...
 
virtual Point LogicToPixel (const Point &rPoint) const =0
 Transform the specified point from internal coordinates in 100th of mm to an absolute screen position. More...
 
virtual Size LogicToPixel (const Size &rSize) const =0
 Transform the specified size from internal coordinates in 100th of mm to a screen oriented pixel size. More...
 

Private Types

typedef ::std::map< const SdrObject *, rtl::Reference<::accessibility::AccessibleShape > > ShapesMapType
 map of accessible shapes More...
 

Private Member Functions

virtual ~SvxGraphCtrlAccessibleContext () override
 on destruction, this component is disposed and all dispose listeners are called, except if this component was already disposed More...
 
void checkChildIndexOnSelection (sal_Int64 nIndexOfChild)
 
virtual void SAL_CALL disposing () final override
 
SdrObjectgetSdrObject (sal_Int64 nIndex)
 returns the SdrObject at index nIndex from the model of this graph More...
 
void CommitChange (sal_Int16 aEventId, const css::uno::Any &rNewValue, const css::uno::Any &rOldValue)
 sends an AccessibleEventObject to all added XAccessibleEventListeners More...
 
css::uno::Reference< css::accessibility::XAccessible > getAccessible (const SdrObject *pObj)
 returns the XAccessible interface for a given SdrObject. More...
 

Private Attributes

::accessibility::AccessibleShapeTreeInfo maTreeInfo
 
OUString msDescription
 Description of this object. More...
 
OUString msName
 Name of this object. More...
 
ShapesMapType mxShapes
 
GraphCtrlmpControl
 
SdrModelmpModel
 
SdrPagempPage
 
SdrViewmpView
 
sal_uInt32 mnClientId
 client id in the AccessibleEventNotifier queue More...
 
bool mbDisposed
 
- Private Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Friends

class GraphCtrl
 

Detailed Description

Definition at line 70 of file GraphCtlAccessibleContext.hxx.

Member Typedef Documentation

◆ ShapesMapType

map of accessible shapes

Definition at line 173 of file GraphCtlAccessibleContext.hxx.

Constructor & Destructor Documentation

◆ SvxGraphCtrlAccessibleContext()

SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext ( GraphCtrl rRepresentation)

◆ ~SvxGraphCtrlAccessibleContext()

SvxGraphCtrlAccessibleContext::~SvxGraphCtrlAccessibleContext ( )
overrideprivatevirtual

on destruction, this component is disposed and all dispose listeners are called, except if this component was already disposed

Definition at line 100 of file GraphCtlAccessibleContext.cxx.

References disposing().

Member Function Documentation

◆ addAccessibleEventListener()

void SAL_CALL SvxGraphCtrlAccessibleContext::addAccessibleEventListener ( const css::uno::Reference< css::accessibility::XAccessibleEventListener > &  xListener)
overridevirtual

◆ checkChildIndexOnSelection()

void SvxGraphCtrlAccessibleContext::checkChildIndexOnSelection ( sal_Int64  nIndexOfChild)
private
Exceptions
css::lang::IndexOutOfBoundsException

Definition at line 629 of file GraphCtlAccessibleContext.cxx.

References getSelectedAccessibleChildCount().

Referenced by deselectAccessibleChild(), and getSelectedAccessibleChild().

◆ clearAccessibleSelection()

void SAL_CALL SvxGraphCtrlAccessibleContext::clearAccessibleSelection ( )
overridevirtual

Definition at line 549 of file GraphCtlAccessibleContext.cxx.

References mpView, and SdrMarkView::UnmarkAllObj().

◆ CommitChange()

void SvxGraphCtrlAccessibleContext::CommitChange ( sal_Int16  aEventId,
const css::uno::Any &  rNewValue,
const css::uno::Any &  rOldValue 
)
private

sends an AccessibleEventObject to all added XAccessibleEventListeners

Definition at line 299 of file GraphCtlAccessibleContext.cxx.

References comphelper::AccessibleEventNotifier::addEvent(), aEvent, and mnClientId.

Referenced by getAccessible(), and Notify().

◆ containsPoint()

sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::containsPoint ( const css::awt::Point &  rPoint)
overridevirtual

Definition at line 155 of file GraphCtlAccessibleContext.cxx.

References getSize().

◆ deselectAccessibleChild()

void SAL_CALL SvxGraphCtrlAccessibleContext::deselectAccessibleChild ( sal_Int64  nSelectedChildIndex)
overridevirtual

◆ disposing()

void SAL_CALL SvxGraphCtrlAccessibleContext::disposing ( )
finaloverrideprivatevirtual

◆ getAccessible()

Reference< XAccessible > SvxGraphCtrlAccessibleContext::getAccessible ( const SdrObject pObj)
private

returns the XAccessible interface for a given SdrObject.

Multiple calls for the same SdrObject return the same XAccessible.

Definition at line 109 of file GraphCtlAccessibleContext.cxx.

References Any, CommitChange(), getAccessibleParent(), maTreeInfo, and mxShapes.

Referenced by getAccessibleAtPoint(), getAccessibleChild(), getSelectedAccessibleChild(), and Notify().

◆ getAccessibleAtPoint()

Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleAtPoint ( const css::awt::Point &  rPoint)
overridevirtual

◆ getAccessibleChild()

Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleChild ( sal_Int64  nIndex)
overridevirtual

Definition at line 314 of file GraphCtlAccessibleContext.cxx.

References getAccessible(), getSdrObject(), and nIndex.

◆ getAccessibleChildCount()

sal_Int64 SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleChildCount ( )
overridevirtual

◆ getAccessibleContext()

Reference< XAccessibleContext > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleContext ( )
overridevirtual

Return the XAccessibleContext.

Definition at line 149 of file GraphCtlAccessibleContext.cxx.

◆ getAccessibleDescription()

OUString SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleDescription ( )
overridevirtual

Definition at line 369 of file GraphCtlAccessibleContext.cxx.

References msDescription.

◆ getAccessibleIndexInParent()

sal_Int64 SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleIndexInParent ( )
overridevirtual

Definition at line 331 of file GraphCtlAccessibleContext.cxx.

References getAccessibleParent(), and i.

◆ getAccessibleName()

OUString SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleName ( )
overridevirtual

Definition at line 376 of file GraphCtlAccessibleContext.cxx.

References msName.

◆ getAccessibleParent()

Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleParent ( )
overridevirtual

◆ getAccessibleRelationSet()

Reference< XAccessibleRelationSet > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleRelationSet ( )
overridevirtual

Return empty reference to indicate that the relation set is not supported.

Definition at line 386 of file GraphCtlAccessibleContext.cxx.

◆ getAccessibleRole()

sal_Int16 SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleRole ( )
overridevirtual

Definition at line 363 of file GraphCtlAccessibleContext.cxx.

◆ getAccessibleStateSet()

sal_Int64 SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleStateSet ( )
overridevirtual

◆ getBackground()

sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getBackground ( )
overridevirtual

◆ getBounds()

awt::Rectangle SAL_CALL SvxGraphCtrlAccessibleContext::getBounds ( )
overridevirtual

◆ getForeground()

sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getForeground ( )
overridevirtual

◆ getImplementationId()

Sequence< sal_Int8 > SAL_CALL SvxGraphCtrlAccessibleContext::getImplementationId ( )
overridevirtual

◆ getImplementationName()

OUString SAL_CALL SvxGraphCtrlAccessibleContext::getImplementationName ( )
overridevirtual

Definition at line 488 of file GraphCtlAccessibleContext.cxx.

◆ getLocale()

lang::Locale SAL_CALL SvxGraphCtrlAccessibleContext::getLocale ( )
overridevirtual

Definition at line 416 of file GraphCtlAccessibleContext.cxx.

References getAccessibleParent().

◆ getLocation()

awt::Point SAL_CALL SvxGraphCtrlAccessibleContext::getLocation ( )
overridevirtual

Definition at line 212 of file GraphCtlAccessibleContext.cxx.

References getBounds(), and mpControl.

Referenced by getLocationOnScreen().

◆ getLocationOnScreen()

awt::Point SAL_CALL SvxGraphCtrlAccessibleContext::getLocationOnScreen ( )
overridevirtual

Definition at line 228 of file GraphCtlAccessibleContext.cxx.

References getAccessibleParent(), getLocation(), and mpControl.

◆ getSdrObject()

SdrObject * SvxGraphCtrlAccessibleContext::getSdrObject ( sal_Int64  nIndex)
private

returns the SdrObject at index nIndex from the model of this graph

Exceptions
css::uno::RuntimeException
css::lang::IndexOutOfBoundsException

Definition at line 284 of file GraphCtlAccessibleContext.cxx.

References SdrObjList::GetObj(), SdrObjList::GetObjCount(), o3tl::make_unsigned(), mpPage, and nIndex.

Referenced by deselectAccessibleChild(), getAccessibleChild(), isAccessibleChildSelected(), and selectAccessibleChild().

◆ getSelectedAccessibleChild()

Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getSelectedAccessibleChild ( sal_Int64  nSelectedChildIndex)
overridevirtual

◆ getSelectedAccessibleChildCount()

sal_Int64 SAL_CALL SvxGraphCtrlAccessibleContext::getSelectedAccessibleChildCount ( )
overridevirtual

◆ getServiceName()

OUString SvxGraphCtrlAccessibleContext::getServiceName ( )
overridevirtual

Definition at line 512 of file GraphCtlAccessibleContext.cxx.

◆ getSize()

awt::Size SAL_CALL SvxGraphCtrlAccessibleContext::getSize ( )
overridevirtual

Definition at line 255 of file GraphCtlAccessibleContext.cxx.

References getBounds(), and mpControl.

Referenced by containsPoint().

◆ getSupportedServiceNames()

Sequence< OUString > SAL_CALL SvxGraphCtrlAccessibleContext::getSupportedServiceNames ( )
overridevirtual

Definition at line 498 of file GraphCtlAccessibleContext.cxx.

◆ GetVisibleArea()

tools::Rectangle SvxGraphCtrlAccessibleContext::GetVisibleArea ( ) const
overridevirtual

Returns the area of the underlying document that is visible in the corresponding window.

Returns
The rectangle of the visible part of the document. The values are, contrary to the base class, in internal coordinates of 100th of mm.

Implements accessibility::IAccessibleViewForwarder.

Definition at line 744 of file GraphCtlAccessibleContext.cxx.

References SdrPaintView::GetPaintWindow(), SdrPaintWindow::GetVisibleArea(), mpView, and SdrPaintView::PaintWindowCount().

◆ grabFocus()

void SAL_CALL SvxGraphCtrlAccessibleContext::grabFocus ( )
overridevirtual

◆ isAccessibleChildSelected()

sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::isAccessibleChildSelected ( sal_Int64  nChildIndex)
overridevirtual

◆ LogicToPixel() [1/2]

Point SvxGraphCtrlAccessibleContext::LogicToPixel ( const Point rPoint) const
overridevirtual

Transform the specified point from internal coordinates in 100th of mm to an absolute screen position.

Parameters
rPointPoint in internal coordinates (100th of mm).
Returns
The same point but in screen coordinates relative to the upper left corner of the (current) screen.

Implements accessibility::IAccessibleViewForwarder.

Definition at line 757 of file GraphCtlAccessibleContext.cxx.

References weld::DrawingArea::get_ref_device(), weld::CustomWidgetController::GetDrawingArea(), GraphCtrl::GetPositionInDialog(), OutputDevice::LogicToPixel(), and mpControl.

◆ LogicToPixel() [2/2]

Size SvxGraphCtrlAccessibleContext::LogicToPixel ( const Size rSize) const
overridevirtual

Transform the specified size from internal coordinates in 100th of mm to a screen oriented pixel size.

Parameters
rSizeSize in internal coordinates (100th of mm).
Returns
The same size but in screen coordinates.

Implements accessibility::IAccessibleViewForwarder.

Definition at line 769 of file GraphCtlAccessibleContext.cxx.

References weld::DrawingArea::get_ref_device(), weld::CustomWidgetController::GetDrawingArea(), OutputDevice::LogicToPixel(), and mpControl.

◆ Notify()

void SvxGraphCtrlAccessibleContext::Notify ( SfxBroadcaster aBC,
const SfxHint aHint 
)
overridevirtual

◆ removeAccessibleEventListener()

void SAL_CALL SvxGraphCtrlAccessibleContext::removeAccessibleEventListener ( const css::uno::Reference< css::accessibility::XAccessibleEventListener > &  xListener)
overridevirtual

◆ selectAccessibleChild()

void SAL_CALL SvxGraphCtrlAccessibleContext::selectAccessibleChild ( sal_Int64  nChildIndex)
overridevirtual

◆ selectAllAccessibleChildren()

void SAL_CALL SvxGraphCtrlAccessibleContext::selectAllAccessibleChildren ( )
overridevirtual

Definition at line 560 of file GraphCtlAccessibleContext.cxx.

References SdrMarkView::MarkAllObj(), and mpView.

◆ setModelAndView()

void SvxGraphCtrlAccessibleContext::setModelAndView ( SdrModel pModel,
SdrView pView 
)

This method is used by the graph control to tell the accessibility object about a new model and view.

Replace the model, page, and view pointers by the ones provided (explicitly and implicitly).

Definition at line 639 of file GraphCtlAccessibleContext.cxx.

References SdrModel::GetPage(), maTreeInfo, mbDisposed, mpModel, mpPage, mpView, and accessibility::AccessibleShapeTreeInfo::SetSdrView().

◆ supportsService()

sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::supportsService ( const OUString &  sServiceName)
overridevirtual

Definition at line 493 of file GraphCtlAccessibleContext.cxx.

References sServiceName, and cppu::supportsService().

Friends And Related Function Documentation

◆ GraphCtrl

friend class GraphCtrl
friend

Definition at line 75 of file GraphCtlAccessibleContext.hxx.

Member Data Documentation

◆ maTreeInfo

::accessibility::AccessibleShapeTreeInfo SvxGraphCtrlAccessibleContext::maTreeInfo
private

◆ mbDisposed

bool SvxGraphCtrlAccessibleContext::mbDisposed
private

◆ mnClientId

sal_uInt32 SvxGraphCtrlAccessibleContext::mnClientId
private

client id in the AccessibleEventNotifier queue

Definition at line 183 of file GraphCtlAccessibleContext.hxx.

Referenced by addAccessibleEventListener(), CommitChange(), disposing(), and removeAccessibleEventListener().

◆ mpControl

GraphCtrl* SvxGraphCtrlAccessibleContext::mpControl
private

◆ mpModel

SdrModel* SvxGraphCtrlAccessibleContext::mpModel
private

◆ mpPage

SdrPage* SvxGraphCtrlAccessibleContext::mpPage
private

◆ mpView

SdrView* SvxGraphCtrlAccessibleContext::mpView
private

◆ msDescription

OUString SvxGraphCtrlAccessibleContext::msDescription
private

Description of this object.

This is not a constant because it can be set from the outside.

Definition at line 166 of file GraphCtlAccessibleContext.hxx.

Referenced by getAccessibleDescription(), and SvxGraphCtrlAccessibleContext().

◆ msName

OUString SvxGraphCtrlAccessibleContext::msName
private

Name of this object.

Definition at line 170 of file GraphCtlAccessibleContext.hxx.

Referenced by getAccessibleName(), and SvxGraphCtrlAccessibleContext().

◆ mxShapes

ShapesMapType SvxGraphCtrlAccessibleContext::mxShapes
private

Definition at line 174 of file GraphCtlAccessibleContext.hxx.

Referenced by disposing(), getAccessible(), and Notify().


The documentation for this class was generated from the following files: