@seeChildrenManager
*/ class ChildrenManagerImpl final
: public comphelper::WeakComponentImplHelper<
css::document::XEventListener,
css::view::XSelectionChangeListener>, public IAccessibleViewForwarderListener, public IAccessibleParent
{ public: /** Create a children manager, which manages the children of the given parent.Theparentisusedforcreatingaccessibleobjects.The listofshapesforwhichtocreatethoseobjectsisnotderivedfrom theparentandhastobeprovidedseparatelybycallingoneofthe updatemethods. @paramrxParent Theparentoftheaccessibleobjectswhichwillbecreated ondemandatsomepointoftimeinthefuture. @paramrxShapeList ListofUNOshapestomanage. @paramrShapeTreeInfo Bundleofinformationpasseddowntheshapetree. @paramrContext Anaccessiblecontextobjectthatiscalledforfiringevents fornewanddeletedchildren,i.e.thatholdsalistof listenerstobeinformed.
*/
ChildrenManagerImpl (css::uno::Reference<css::accessibility::XAccessible> xParent,
css::uno::Reference<css::drawing::XShapes> xShapeList, const AccessibleShapeTreeInfo& rShapeTreeInfo,
AccessibleContextBase& rContext);
/** If there still are managed children these are disposed and released.
*/ virtual ~ChildrenManagerImpl() override;
/** Do that part of the initialization that you can not or should not do intheconstructorlikeregisteringatbroadcasters.
*/ void Init();
/** Return the number of currently visible accessible children. @return Iftherearenochildrena0isreturned.
*/
sal_Int64 GetChildCount() const noexcept;
/** Update the child manager. Take care of a modified set of children andmodifiedvisiblearea.Thismethodcanoptimizetheupdate processwithrespectseparateupdatesofamodifiedchildrenlist andvisiblearea. @parambCreateNewObjectsOnDemand If</true>thenaccessibleobjectsassociatedwiththevisible shapesarecreatedonlywhenaskedfor.Noeventissenton creation.If</false>thentheaccessibleobjectsarecreated beforethismethodreturnsandeventsaresenttoinformthe listenersofthenewobject.
*/ void Update (bool bCreateNewObjectsOnDemand);
/** Set the list of UNO shapes to the given list. This removes the old listanddoesnotaddtoit.Thelistofaccessibleshapesthatis buildupbycallsto<member>AddAccessibleShape</member>isnot modified.Neitheristhelistofvisiblechildren.Accessible objectsarecreatedondemand. @paramxShapeList ThelistofUNOshapesthatreplacestheoldlist.
*/ void SetShapeList (const css::uno::Reference<css::drawing::XShapes>& xShapeList);
/** Add an accessible shape. This does not modify the list of UNO shapes orthelistofvisibleshapes.Accessibleshapesare,atthe moment,nottestedagainstthevisibleareabutarealwaysappended tothelistofvisiblechildren. @paramshape Thenewshapethatisaddedtothelistofaccessibleshapes;must benon-null.
*/ void AddAccessibleShape (rtl::Reference<AccessibleShape> const & shape);
/** Clear the lists of accessible shapes and that of visible accessible shapes.ThelistofUNOshapesisnotmodified.
*/ void ClearAccessibleShapeList();
/** Set a new event shape tree info. Call this method to inform the childrenmanagerofachangeoftheinfobundle. @paramrShapeTreeInfo Thenewinfothatreplacesthecurrentone.
*/ void SetInfo (const AccessibleShapeTreeInfo& rShapeTreeInfo);
/** Update the SELECTED and FOCUSED states of all visible children accordingtothegivenselection.Thisincludessetting <em>and</em>resettingthestates.
*/ void UpdateSelection();
/** Return whether one of the shapes managed by this object has currentlythefocus. @return Returns<true/>whenthereisashapethathasthefocusand <false/>whenthereisnosuchshape.
*/ bool HasFocus() const;
/** When there is a shape that currently has the focus, i.e.<member>HasFocus()</member>returns<true/>thenremovethe focusfromthatshape.Otherwisenothingchanges.
*/ void RemoveFocus();
// IAccessibleViewForwarderListener /** Informs this children manager and its children about a change of one (ormore)aspectoftheviewforwarder. @paramaChangeType Achangetypeof<const>VISIBLE_AREA</const>leadstoacallto the<member>Update</member>whichcreatesaccessibleobjectsof newshapesimmediately.Otherchangetypesarepassedtothe visibleaccessiblechildrenwithoutcalling <member>Update</member>. @parampViewForwarder Themodifiedviewforwarder.Usethisonefromnowon.
*/ virtualvoid ViewForwarderChanged() override;
/** The original list of UNO shapes. The visible shapes are inserted intothelistofvisiblechildren <member>maVisibleChildren</member>.
*/
css::uno::Reference<css::drawing::XShapes> mxShapeList;
/** This list of additional accessible shapes that can or shall not be createdbytheshapefactory.
*/ typedef std::vector< rtl::Reference< AccessibleShape> > AccessibleShapeList;
AccessibleShapeList maAccessibleShapes;
/** Rectangle that describes the visible area in which a shape has to lie atleastpartly,tobeaccessiblethroughthisclass.Usedto detectchangesofthevisibleareaafterchangesoftheviewforwarder.
*/
tools::Rectangle maVisibleArea;
/** The parent of the shapes. It is used for creating accessible objectsforgivenshapes.
*/
css::uno::Reference<css::accessibility::XAccessible> mxParent;
/** Bundle of information passed down the shape tree.
*/
AccessibleShapeTreeInfo maShapeTreeInfo;
/** Reference to an accessible context object that is used to inform its listenersofnewandremovedchildren.
*/
AccessibleContextBase& mrContext;
/** This method is called from the component helper base class while disposing.
*/ virtualvoid disposing(std::unique_lock<std::mutex>&) override;
/** This member points to the currently focused shape. It is NULL when thereisnofocusedshape.
*/
AccessibleShape* mpFocusedShape;
/** Three helper functions for the <member>Update</member> method.
*/
/** Create a list of visible shapes from the list of UNO shapes <member>maShapeList</member>andthelistofaccessibleobjects. @paramraChildList Foreveryvisibleshapefromthetwosourcesmentionedaboveone descriptorisaddedtothislist.
*/ void CreateListOfVisibleShapes (ChildDescriptorListType& raChildList);
/** From the old list of (former) visible shapes remove those that arenotmemberofthenewlist.Sendappropriateeventsforevery suchshape. @paramraNewChildList Thenewlistofvisiblechildrenagainstwhichtheoldone iscompared. @paramraOldChildList Theoldlistofvisiblechildrenagainstwhichthenewone iscompared.
*/ void RemoveNonVisibleChildren ( const std::vector<ChildDescriptor*>& rNonVisibleChildren);
/** Merge the information that is already known about the visible shapes fromtheoldlistintothecurrentlist,andreturnalistof childrenthatareintheoldlist,butnotthecurrentone. @paramraChildList Informationismergedtothecurrentlistofvisiblechildren fromthislist.Theoldlistcangetreordered. @return Vectorofchildrenthatareintheoldlist,butnotthecurrent one.
*/
std::vector<ChildDescriptor*> MergeAccessibilityInformation (ChildDescriptorListType& raChildList);
/** If the visible area has changed then send events that signal a changeoftheirboundingboxesforallshapesthataremembersof boththecurrentandthenewlistofvisibleshapes. @paramraChildList Eventsaresenttoallentriesofthislistthatalreadycontain anaccessibleobject.
*/ staticvoid SendVisibleAreaEvents (ChildDescriptorListType& raChildList);
/** If children have to be created immediately and not on demand the createthemissingaccessibleobjectsnow. @paramraDescriptorList Createanaccessibleobjectforeverymemberofthislistwhere thatobjectdoesnotalreadyexist.
*/ void CreateAccessibilityObjects (ChildDescriptorListType& raChildList);
/** Add a single shape. Update all relevant data structures accordingly.Usethismethodinsteadof<member>Update()</member> whenonlyasingleshapehasbeenadded.
*/ void AddShape (const css::uno::Reference<css::drawing::XShape>& xShape);
/** Remove a single shape. Update all relevant data structures accordingly.Usethismethodinsteadof<member>Update()</member> whenonlyasingleshapehasbeenremoved.
*/ void RemoveShape (const css::uno::Reference<css::drawing::XShape>& xShape);
/** Add the children manager as dispose listener at the given shape so thattheassociatedaccessibleobjectcanbedisposedwhentheshape isdisposed. @paramxShape Registeratthisshapeasdisposelistener.
*/ void RegisterAsDisposeListener (const css::uno::Reference<css::drawing::XShape>& xShape);
/** Remove the children manager as dispose listener at the given shape @paramxShape Unregisteratthisshapeasdisposelistener.
*/ void UnregisterAsDisposeListener (const css::uno::Reference<css::drawing::XShape>& xShape);
};
/** A child descriptor holds a reference to a UNO shape and the correspondingaccessibleobject.Therearetwousecases: <ol><li>Theaccessibleobjectisonlycreatedondemandandisthen initiallyempty.</li> <li>ThereisnoUNOshape.Theaccessibleobjectisgivenasargument totheconstructor.</li> </ol> Inbothcasesthechilddescriptorassumesownershipovertheaccessible object.
*/ class ChildDescriptor
{ public: /** Reference to a (partially) visible shape.
*/
css::uno::Reference<css::drawing::XShape> mxShape;
/** The corresponding accessible object. This reference is initially emptyandonlyreplacedbyareferencetoanewobjectwhenthatis requestedfromtheoutside.
*/
rtl::Reference<AccessibleShape> mxAccessibleShape;
/** Return a pointer to the implementation object of the accessible shapeofthisdescriptor. @return TheresultisNULLifeithertheUNOreferencetotheaccessible shapeisemptyoritcannotbetransformedintoapointerto thedesiredclass.
*/
AccessibleShape* GetAccessibleShape() const { return mxAccessibleShape.get(); }
/** set the index _nIndex at the accessible shape @param_nIndex Thenewindexinparent.
*/ void setIndexAtAccessibleShape(sal_Int32 _nIndex);
/** This flag is set during the visibility calculation and indicates thatatonetimeinthisprocessaneventissentthatinformsthe listenersofthecreationofanewaccessibleobject.Thisflagsis notresetafterwards.Don'tuseitunlessyouknowexactlywhatyou aredoing.
*/ bool mbCreateEventPending;
/** Create a new descriptor for the specified shape with empty reference toaccessibleobject.
*/ explicit ChildDescriptor (const css::uno::Reference<css::drawing::XShape>& xShape);
/** Create a new descriptor for the specified shape with empty reference totheoriginalshape.
*/ explicit ChildDescriptor (const rtl::Reference<AccessibleShape>& rxAccessibleShape);
/** Dispose the accessible object of this descriptor. If that object doesnotexistthendonothing. @paramrParent Theparentoftheaccessibleobjecttodispose.Achildevent issentinitsname.
*/ void disposeAccessibleObject (AccessibleContextBase& rParent);
/** Compare two child descriptors. Take into account that a child descriptormaybebasedonaUNOshapeor,already,onanaccessible shape.
*/ booloperator == (const ChildDescriptor& aDescriptor) const
{ return ( this == &aDescriptor ||
(
(mxShape.get() == aDescriptor.mxShape.get() ) &&
(mxShape.is() || mxAccessibleShape.get() == aDescriptor.mxAccessibleShape.get())
)
);
}
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.15Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-30)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.