LibreOffice Module sd (master) 1
|
This class makes draw documents in the general view modes accessible. More...
#include <AccessibleDrawDocumentView.hxx>
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< AccessiblePageShape > | CreateDrawPageShape () |
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::ViewShell * | mpSdViewSh |
std::unique_ptr< ChildrenManager > | mpChildrenManager |
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::ViewShell * | mpViewShell |
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 |
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.
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().
|
overridevirtual |
Definition at line 93 of file AccessibleDrawDocumentView.cxx.
References DBG_ASSERT.
|
overridevirtualnoexcept |
Reimplemented from accessibility::AccessibleDocumentViewBase.
Definition at line 404 of file AccessibleDrawDocumentView.cxx.
References accessibility::AccessibleDocumentViewBase::acquire().
|
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().
|
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().
|
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().
|
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().
|
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.
|
overridevirtual |
Reimplemented from accessibility::AccessibleDocumentViewBase.
|
overridevirtual |
This implementation either returns the active accessible OLE object if it exists and the given index is 0 or throws an exception.
Reimplemented from accessibility::AccessibleDocumentViewBase.
Definition at line 200 of file AccessibleDrawDocumentView.cxx.
References accessibility::AccessibleDocumentViewBase::getAccessibleChild(), accessibility::AccessibleDocumentViewBase::getAccessibleChildCount(), accessibility::ChildrenManager::GetChild(), m_aMutex, mpChildrenManager, nCount, nIndex, and accessibility::AccessibleContextBase::ThrowIfDisposed().
Referenced by implIsSelected(), and implSelect().
|
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().
|
overridevirtual |
Reimplemented from accessibility::AccessibleContextBase.
Definition at line 231 of file AccessibleDrawDocumentView.cxx.
References sd::View::GetDoc(), SdDrawDocument::getDocAccTitle(), SdDrawDocument::getDocReadOnly(), sd::View::GetDocSh(), accessibility::AccessibleShapeTreeInfo::GetSdrView(), SfxObjectShell::GetTitle(), accessibility::AccessibleDocumentViewBase::maShapeTreeInfo, SdResId(), SFX_TITLE_APINAME, sName, and sReadOnly.
|
overridevirtual |
Definition at line 417 of file AccessibleDrawDocumentView.cxx.
References SdrObject::getSdrObjectFromXShape(), SdrPaintView::GetSdrPageView(), sd::ViewShell::GetView(), accessibility::AccessibleShape::GetXShape(), i, SdrMarkView::IsObjMarkable(), mpChildrenManager, mpSdViewSh, and nCount.
|
overrideprivatevirtual |
Returns an identifier for the implementation of this object.
Reimplemented from accessibility::AccessibleDocumentViewBase.
Definition at line 374 of file AccessibleDrawDocumentView.cxx.
|
overridevirtual |
Definition at line 485 of file AccessibleDrawDocumentView.cxx.
References SdAnimationInfo::GetBookmark(), SdrObject::getSdrObjectFromXShape(), SdDrawDocument::GetShapeUserData(), accessibility::AccessibleShape::GetXShape(), and SdAnimationInfo::meClickAction.
|
overrideprivatevirtual |
Reimplemented from accessibility::AccessibleDocumentViewBase.
Definition at line 380 of file AccessibleDrawDocumentView.cxx.
References aServiceNames, comphelper::concatSequences(), accessibility::AccessibleDocumentViewBase::getSupportedServiceNames(), and accessibility::AccessibleContextBase::ThrowIfDisposed().
|
overrideprivatevirtual |
Reimplemented from accessibility::AccessibleDocumentViewBase.
Definition at line 720 of file AccessibleDrawDocumentView.cxx.
References accessibility::AccessibleDocumentViewBase::impl_dispose(), and mpChildrenManager.
|
overrideprivatevirtual |
Return selection state of specified child.
Reimplemented from accessibility::AccessibleDocumentViewBase.
Definition at line 569 of file AccessibleDrawDocumentView.cxx.
References getAccessibleChild(), accessibility::AccessibleShape::GetXShape(), i, accessibility::AccessibleDocumentViewBase::mxController, and nCount.
|
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.
nAccessibleChildIndex | Index of the child to select or deselect. If the parameter has the value ACCESSIBLE_SELECTION_CHILD_ALL then all children are selected or deselected. |
bSelect | Indicates 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.
|
overridevirtual |
Complete the initialization begun in the constructor.
Reimplemented from accessibility::AccessibleDocumentViewBase.
Definition at line 99 of file AccessibleDrawDocumentView.cxx.
References CreateDrawPageShape(), accessibility::AccessibleDocumentViewBase::Init(), accessibility::AccessibleDocumentViewBase::maShapeTreeInfo, mpChildrenManager, and accessibility::AccessibleDocumentViewBase::mxController.
|
overridevirtual |
Reimplemented from accessibility::AccessibleDocumentViewBase.
Definition at line 285 of file AccessibleDrawDocumentView.cxx.
References accessibility::AccessibleContextBase::CommitChange(), CreateDrawPageShape(), sd::SlideShow::GetSlideShow(), sd::ViewShell::GetViewShellBase(), mpChildrenManager, mpSdViewSh, accessibility::AccessibleDocumentViewBase::mxController, accessibility::AccessibleDocumentViewBase::propertyChange(), SAL_INFO, SAL_WARN, accessibility::AccessibleContextBase::ThrowIfDisposed(), and UpdateAccessibleName().
|
overridevirtual |
Reimplemented from accessibility::AccessibleDocumentViewBase.
Definition at line 393 of file AccessibleDrawDocumentView.cxx.
References uno::Any::hasValue(), and accessibility::AccessibleDocumentViewBase::queryInterface().
|
overridevirtualnoexcept |
Reimplemented from accessibility::AccessibleDocumentViewBase.
Definition at line 410 of file AccessibleDrawDocumentView.cxx.
References accessibility::AccessibleDocumentViewBase::release().
|
private |
Definition at line 738 of file AccessibleDrawDocumentView.cxx.
References accessibility::AccessibleContextBase::AutomaticallyCreated, CreateAccessibleName(), accessibility::AccessibleDocumentViewBase::mxController, accessibility::AccessibleDocumentViewBase::mxModel, and accessibility::AccessibleContextBase::SetAccessibleName().
Referenced by AccessibleDrawDocumentView(), and propertyChange().
|
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().
|
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().
|
private |
Definition at line 128 of file AccessibleDrawDocumentView.hxx.
Referenced by getGroupPosition(), and propertyChange().