LibreOffice Module sd (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
accessibility::AccessibleDrawDocumentView Class Referencefinal

This class makes draw documents in the general view modes accessible. More...

#include <AccessibleDrawDocumentView.hxx>

Inheritance diagram for accessibility::AccessibleDrawDocumentView:
[legend]
Collaboration diagram for accessibility::AccessibleDrawDocumentView:
[legend]

Public Member Functions

 AccessibleDrawDocumentView (::sd::Window *pSdWindow, ::sd::ViewShell *pViewShell, const css::uno::Reference< css::frame::XController > &rxController, const css::uno::Reference< css::accessibility::XAccessible > &rxParent)
 
virtual ~AccessibleDrawDocumentView () override
 
virtual void Init () override
 Complete the initialization begun in the constructor. More...
 
virtual void ViewForwarderChanged () override
 A view forwarder change is signalled for instance when any of the window events is received. More...
 
virtual sal_Int64 SAL_CALL getAccessibleChildCount () override
 This implementation returns either 1 or 0 depending on whether there is an active accessible OLE object or not. More...
 
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild (sal_Int64 nIndex) override
 This implementation either returns the active accessible OLE object if it exists and the given index is 0 or throws an exception. More...
 
virtual OUString SAL_CALL getAccessibleName () override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &rEventObject) override
 
virtual void SAL_CALL propertyChange (const css::beans::PropertyChangeEvent &rEventObject) override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) override
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getGroupPosition (const css::uno::Any &rAny) override
 
virtual OUString SAL_CALL getObjectLink (const css::uno::Any &accoject) override
 
- Public Member Functions inherited from accessibility::AccessibleDocumentViewBase
 AccessibleDocumentViewBase (::sd::Window *pSdWindow, ::sd::ViewShell *pViewShell, css::uno::Reference< css::frame::XController > xController, const css::uno::Reference< css::accessibility::XAccessible > &rxParent)
 Create a new object. More...
 
virtual ~AccessibleDocumentViewBase () override
 
virtual void Init ()
 Initialize a new object. More...
 
 DECL_LINK (WindowChildEventListener, VclWindowEvent &, void)
 Define callback for listening to window child events of VCL. More...
 
virtual void ViewForwarderChanged () override
 A view forwarder change is signalled for instance when any of the window events is received. More...
 
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent () override
 
virtual sal_Int64 SAL_CALL getAccessibleChildCount () override
 This implementation returns either 1 or 0 depending on whether there is an active accessible OLE object or not. More...
 
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild (sal_Int64 nIndex) override
 This implementation either returns the active accessible OLE object if it exists and the given index is 0 or throws an exception. More...
 
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint (const css::awt::Point &aPoint) override
 Iterate over all children and test whether the specified point lies within one of their bounding boxes. More...
 
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 css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) override
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual OUString SAL_CALL getImplementationName () override
 Returns an identifier for the implementation of this object. More...
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &rEventObject) override
 
virtual void SAL_CALL propertyChange (const css::beans::PropertyChangeEvent &rEventObject) override
 
virtual void SAL_CALL windowResized (const css::awt::WindowEvent &e) override
 
virtual void SAL_CALL windowMoved (const css::awt::WindowEvent &e) override
 
virtual void SAL_CALL windowShown (const css::lang::EventObject &e) override
 
virtual void SAL_CALL windowHidden (const css::lang::EventObject &e) override
 
virtual void SAL_CALL focusGained (const css::awt::FocusEvent &e) override
 
virtual void SAL_CALL focusLost (const css::awt::FocusEvent &e) override
 
virtual css::uno::Any SAL_CALL getExtendedAttributes () override
 
void SwitchViewActivated ()
 
virtual sal_Int32 SAL_CALL getForeground () override
 
virtual sal_Int32 SAL_CALL getBackground () override
 
virtual void impl_dispose ()
 
- Public Member Functions inherited from accessibility::AccessibleContextBase
 AccessibleContextBase (css::uno::Reference< css::accessibility::XAccessible > xParent, const sal_Int16 aRole)
 
virtual ~AccessibleContextBase () override
 
void CommitChange (sal_Int16 aEventId, const css::uno::Any &rNewValue, const css::uno::Any &rOldValue, sal_Int32 nValueIndex)
 
void SetAccessibleDescription (const OUString &rsDescription, StringOrigin eDescriptionOrigin)
 
void SetAccessibleName (const OUString &rsName, StringOrigin eNameOrigin)
 
virtual bool SetState (sal_Int64 aState)
 
virtual bool ResetState (sal_Int64 aState)
 
bool GetState (sal_Int64 aState)
 
void SetRelationSet (const css::uno::Reference< css::accessibility::XAccessibleRelationSet > &rxRelationSet)
 
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext () 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
 
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
 
bool IsDisposed () const
 
- Public Member Functions inherited from accessibility::AccessibleComponentBase
 AccessibleComponentBase ()
 
virtual ~AccessibleComponentBase ()
 
virtual sal_Bool SAL_CALL containsPoint (const css::awt::Point &aPoint) override
 
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint (const css::awt::Point &aPoint) 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 css::uno::Reference< css::awt::XFont > SAL_CALL getFont () override
 
virtual OUString SAL_CALL getTitledBorderText () override
 
virtual OUString SAL_CALL getToolTipText () override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes ()
 
- Public Member Functions inherited from accessibility::AccessibleSelectionBase
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
 
 AccessibleSelectionBase ()
 
virtual ~AccessibleSelectionBase ()
 
virtual void ViewForwarderChanged ()=0
 

Private Member Functions

virtual OUString SAL_CALL getImplementationName () override
 Returns an identifier for the implementation of this object. More...
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual bool implIsSelected (sal_Int64 nAccessibleChildIndex) override
 Return selection state of specified child. More...
 
virtual void implSelect (sal_Int64 nAccessibleChildIndex, bool bSelect) override
 Select or deselect the specified child or all children if the given index has the special value ACCESSIBLE_SELECTION_CHILD_ALL. More...
 
virtual void SAL_CALL disposing () override
 This method is called from the component helper base class while disposing. More...
 
rtl::Reference< AccessiblePageShapeCreateDrawPageShape ()
 Create a shape the represents the page as seen on the screen. More...
 
virtual OUString CreateAccessibleName () override
 Create an accessible name that contains the current view mode. More...
 
virtual void Activated () override
 Make sure that the currently focused shape sends a FOCUSED state change event indicating that it has (regained) the focus. More...
 
virtual void Deactivated () override
 Make sure that the currently focused shape sends a FOCUSED state change event indicating that it has lost the focus. More...
 
virtual void impl_dispose () override
 
void UpdateAccessibleName ()
 

Private Attributes

::sd::ViewShellmpSdViewSh
 
std::unique_ptr< ChildrenManagermpChildrenManager
 This object manages the shapes of the represented draw page. More...
 

Additional Inherited Members

- Public Types inherited from accessibility::AccessibleContextBase
enum  StringOrigin
 
- Public Attributes inherited from accessibility::AccessibleDocumentViewBase
::sd::ViewShellmpViewShell
 
- Public Attributes inherited from accessibility::AccessibleContextBase
 ManuallySet
 
 FromShape
 
 AutomaticallyCreated
 
 NotSet
 
- Protected Member Functions inherited from accessibility::AccessibleDocumentViewBase
virtual void SAL_CALL disposing () override
 
virtual OUString CreateAccessibleName () override
 Create a name string. More...
 
virtual void Activated ()
 This method is called when (after) the frame containing this document has been activated. More...
 
virtual void Deactivated ()
 This method is called when (before or after?) the frame containing this document has been deactivated. More...
 
void SetAccessibleOLEObject (const css::uno::Reference< css::accessibility::XAccessible > &xOLEObject)
 Set or remove the currently active accessible OLE object. More...
 
- Protected Member Functions inherited from accessibility::AccessibleContextBase
virtual void SAL_CALL disposing () override
 
virtual OUString CreateAccessibleName ()
 
void FireEvent (const css::accessibility::AccessibleEventObject &aEvent)
 
void ThrowIfDisposed ()
 
void SetAccessibleRole (sal_Int16 _nRole)
 
virtual ::osl::Mutex & implGetMutex ()=0
 
- Protected Member Functions inherited from accessibility::IAccessibleViewForwarderListener
 ~IAccessibleViewForwarderListener ()
 
- Protected Attributes inherited from accessibility::AccessibleDocumentViewBase
css::uno::Reference< css::awt::XWindow > mxWindow
 The API window that is made accessible. More...
 
css::uno::Reference< css::frame::XController > mxController
 The controller of the window in which this view is displayed. More...
 
css::uno::Reference< css::frame::XModel > mxModel
 Model of the document. More...
 
AccessibleShapeTreeInfo maShapeTreeInfo
 
AccessibleViewForwarder maViewForwarder
 The view forwarder passed to the children manager. More...
 
css::uno::Reference< css::accessibility::XAccessible > mxAccessibleOLEObject
 Accessible OLE object. More...
 
Link< VclWindowEvent &, void > maWindowLink
 
- Protected Attributes inherited from accessibility::AccessibleContextBase
sal_Int64 mnStateSet
 
css::uno::Reference< css::accessibility::XAccessibleRelationSet > mxRelationSet
 

Detailed Description

This class makes draw documents in the general view modes accessible.

It passes all shapes on the current draw page to a children manager and additionally creates a new shape that represents the actual draw page.

Please see the documentation of the base class for further explanations of the individual methods.

Definition at line 39 of file AccessibleDrawDocumentView.hxx.

Constructor & Destructor Documentation

◆ AccessibleDrawDocumentView()

accessibility::AccessibleDrawDocumentView::AccessibleDrawDocumentView ( ::sd::Window pSdWindow,
::sd::ViewShell pViewShell,
const css::uno::Reference< css::frame::XController > &  rxController,
const css::uno::Reference< css::accessibility::XAccessible > &  rxParent 
)

Definition at line 82 of file AccessibleDrawDocumentView.cxx.

References UpdateAccessibleName().

◆ ~AccessibleDrawDocumentView()

accessibility::AccessibleDrawDocumentView::~AccessibleDrawDocumentView ( )
overridevirtual

Definition at line 93 of file AccessibleDrawDocumentView.cxx.

References DBG_ASSERT.

Member Function Documentation

◆ acquire()

void SAL_CALL accessibility::AccessibleDrawDocumentView::acquire ( )
overridevirtualnoexcept

◆ Activated()

void accessibility::AccessibleDrawDocumentView::Activated ( )
overrideprivatevirtual

Make sure that the currently focused shape sends a FOCUSED state change event indicating that it has (regained) the focus.

Reimplemented from accessibility::AccessibleDocumentViewBase.

Definition at line 692 of file AccessibleDrawDocumentView.cxx.

References mpChildrenManager, accessibility::AccessibleContextBase::ResetState(), and accessibility::AccessibleContextBase::SetState().

◆ CreateAccessibleName()

OUString accessibility::AccessibleDrawDocumentView::CreateAccessibleName ( )
overrideprivatevirtual

Create an accessible name that contains the current view mode.

Create a name for this view.

Reimplemented from accessibility::AccessibleDocumentViewBase.

Definition at line 518 of file AccessibleDrawDocumentView.cxx.

References accessibility::AccessibleDocumentViewBase::mxController, SdResId(), and sName.

Referenced by UpdateAccessibleName().

◆ CreateDrawPageShape()

rtl::Reference< AccessiblePageShape > accessibility::AccessibleDrawDocumentView::CreateDrawPageShape ( )
private

Create a shape the represents the page as seen on the screen.

The page shape is created on every call at the moment (provided that everything goes well).

Definition at line 133 of file AccessibleDrawDocumentView.cxx.

References accessibility::AccessibleDocumentViewBase::maShapeTreeInfo, accessibility::AccessibleDocumentViewBase::mxController, accessibility::AccessibleDocumentViewBase::mxModel, and xFactory.

Referenced by Init(), and propertyChange().

◆ Deactivated()

void accessibility::AccessibleDrawDocumentView::Deactivated ( )
overrideprivatevirtual

Make sure that the currently focused shape sends a FOCUSED state change event indicating that it has lost the focus.

Reimplemented from accessibility::AccessibleDocumentViewBase.

Definition at line 713 of file AccessibleDrawDocumentView.cxx.

References mpChildrenManager, and accessibility::AccessibleContextBase::ResetState().

◆ disposing() [1/2]

void SAL_CALL accessibility::AccessibleDrawDocumentView::disposing ( )
overrideprivatevirtual

This method is called from the component helper base class while disposing.

Reimplemented from accessibility::AccessibleDocumentViewBase.

Definition at line 729 of file AccessibleDrawDocumentView.cxx.

References accessibility::AccessibleDocumentViewBase::disposing(), and mpChildrenManager.

◆ disposing() [2/2]

virtual void SAL_CALL accessibility::AccessibleDrawDocumentView::disposing ( const css::lang::EventObject &  rEventObject)
overridevirtual

◆ getAccessibleChild()

uno::Reference< XAccessible > SAL_CALL accessibility::AccessibleDrawDocumentView::getAccessibleChild ( sal_Int64  nIndex)
overridevirtual

◆ getAccessibleChildCount()

sal_Int64 SAL_CALL accessibility::AccessibleDrawDocumentView::getAccessibleChildCount ( )
overridevirtual

This implementation returns either 1 or 0 depending on whether there is an active accessible OLE object or not.

Reimplemented from accessibility::AccessibleDocumentViewBase.

Definition at line 186 of file AccessibleDrawDocumentView.cxx.

References accessibility::AccessibleDocumentViewBase::getAccessibleChildCount(), mpChildrenManager, and accessibility::AccessibleContextBase::ThrowIfDisposed().

Referenced by implSelect().

◆ getAccessibleName()

OUString SAL_CALL accessibility::AccessibleDrawDocumentView::getAccessibleName ( )
overridevirtual

◆ getGroupPosition()

uno::Sequence< sal_Int32 > SAL_CALL accessibility::AccessibleDrawDocumentView::getGroupPosition ( const css::uno::Any &  rAny)
overridevirtual

◆ getImplementationName()

OUString SAL_CALL accessibility::AccessibleDrawDocumentView::getImplementationName ( )
overrideprivatevirtual

Returns an identifier for the implementation of this object.

Reimplemented from accessibility::AccessibleDocumentViewBase.

Definition at line 374 of file AccessibleDrawDocumentView.cxx.

◆ getObjectLink()

OUString accessibility::AccessibleDrawDocumentView::getObjectLink ( const css::uno::Any &  accoject)
overridevirtual

◆ getSupportedServiceNames()

css::uno::Sequence< OUString > SAL_CALL accessibility::AccessibleDrawDocumentView::getSupportedServiceNames ( )
overrideprivatevirtual

◆ impl_dispose()

void accessibility::AccessibleDrawDocumentView::impl_dispose ( )
overrideprivatevirtual

◆ implIsSelected()

bool accessibility::AccessibleDrawDocumentView::implIsSelected ( sal_Int64  nAccessibleChildIndex)
overrideprivatevirtual

◆ implSelect()

void accessibility::AccessibleDrawDocumentView::implSelect ( sal_Int64  nAccessibleChildIndex,
bool  bSelect 
)
overrideprivatevirtual

Select or deselect the specified child or all children if the given index has the special value ACCESSIBLE_SELECTION_CHILD_ALL.

Select or deselect the specified shapes.

Selecting or deselecting a child sets or resets the <const>SELECTED</const> state and selects or deselects the UNO shape being made accessible by the child.

Parameters
nAccessibleChildIndexIndex of the child to select or deselect. If the parameter has the value ACCESSIBLE_SELECTION_CHILD_ALL then all children are selected or deselected.
bSelectIndicates whether to select or deselect the specified child reps. children.

The corresponding accessible shapes are notified over the selection change listeners registered with the XSelectionSupplier of the controller.

Reimplemented from accessibility::AccessibleDocumentViewBase.

Definition at line 610 of file AccessibleDrawDocumentView.cxx.

References ACCESSIBLE_SELECTION_CHILD_ALL, Any, getAccessibleChild(), getAccessibleChildCount(), comphelper::getProcessComponentContext(), accessibility::AccessibleShape::GetXShape(), i, accessibility::AccessibleDocumentViewBase::mxController, and nCount.

◆ Init()

void accessibility::AccessibleDrawDocumentView::Init ( void  )
overridevirtual

◆ propertyChange()

void SAL_CALL accessibility::AccessibleDrawDocumentView::propertyChange ( const css::beans::PropertyChangeEvent &  rEventObject)
overridevirtual

◆ queryInterface()

uno::Any SAL_CALL accessibility::AccessibleDrawDocumentView::queryInterface ( const css::uno::Type &  rType)
overridevirtual

◆ release()

void SAL_CALL accessibility::AccessibleDrawDocumentView::release ( )
overridevirtualnoexcept

◆ UpdateAccessibleName()

void accessibility::AccessibleDrawDocumentView::UpdateAccessibleName ( )
private

◆ ViewForwarderChanged()

void accessibility::AccessibleDrawDocumentView::ViewForwarderChanged ( )
overridevirtual

A view forwarder change is signalled for instance when any of the window events is received.

Thus, instead of overriding the four windowResized... methods it will be sufficient in most cases just to override this method.

Reimplemented from accessibility::AccessibleDocumentViewBase.

Definition at line 123 of file AccessibleDrawDocumentView.cxx.

References mpChildrenManager, and accessibility::AccessibleDocumentViewBase::ViewForwarderChanged().

Member Data Documentation

◆ mpChildrenManager

std::unique_ptr<ChildrenManager> accessibility::AccessibleDrawDocumentView::mpChildrenManager
private

This object manages the shapes of the represented draw page.

It is responsible to determine the visible shapes and create on demand the accessible objects representing them.

Definition at line 134 of file AccessibleDrawDocumentView.hxx.

Referenced by Activated(), Deactivated(), disposing(), getAccessibleChild(), getAccessibleChildCount(), getGroupPosition(), impl_dispose(), Init(), propertyChange(), and ViewForwarderChanged().

◆ mpSdViewSh

::sd::ViewShell* accessibility::AccessibleDrawDocumentView::mpSdViewSh
private

Definition at line 128 of file AccessibleDrawDocumentView.hxx.

Referenced by getGroupPosition(), and propertyChange().


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