namespace com::sun::star { namespace drawing { class XShape; }
}
class SdrObject;
namespace accessibility {
class AccessibleShapeInfo; class AccessibleTextHelper; class ChildrenManager; class IAccessibleParent;
/** This base class provides a base implementation for all shapes. For more detaileddocumentationaboutthemethodsrefertothedescriptionsof theimplementedinterfaces.Theseare,amongothers, XAccessible,<type>XAccessibleContext</type>, XAccessibleComponentand XAccessibleExtendedComponent.
<p>Accessibleshapesdonotlistenfordisposing()callsoftheUNO shapestheymakeaccessible.Thisisthetaskoftheirowner,usuallya container,whocanthencalldispose()attheaccessibleobject.</p>
*/ class SVX_DLLPUBLIC AccessibleShape
: public AccessibleContextBase, public css::accessibility::XAccessibleSelection, public css::accessibility::XAccessibleExtendedAttributes, public css::accessibility::XAccessibleGroupPosition, public css::accessibility::XAccessibleHypertext, public IAccessibleViewForwarderListener, public css::document::XShapeEventListener, public css::lang::XUnoTunnel
{ public: //===== internal ========================================================
/** Create a new accessible object that makes the given shape accessible. @paramrShapeInfo Thisobjectcontainsallinformationspecifictothenew accessibleshape.Thataree.g.theshapetobemadeaccessible andtheaccessibleobjectthatwillbecometheparentofthenew object. @paramrShapeTreeInfo Bundleofinformationpassedtothisshapeandallofitsdescendants. @attention Alwayscallthe<member>init</member>methodaftercreatinga newaccessibleshape.Thisisonewaytoovercomethepotential problemofregisteringthenewobjectwithe.g.event broadcasters.Thatwoulddeletethenewobjectifabroadcaster wouldnotkeepastrongreferencetothenewobject.
*/
AccessibleShape ( const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo); //Solution: Overwrite the object's current name. virtual OUString SAL_CALL getAccessibleName() override; virtual OUString SAL_CALL getAccessibleDescription() override; virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet> SAL_CALL getAccessibleRelationSet() override; //===== XAccessibleSelection ============================================
// ====== XAccessibleExtendedAttributes ===================================== virtual OUString SAL_CALL getExtendedAttributes() override; /// Return this object's role. virtual sal_Int16 SAL_CALL getAccessibleRole() override; //===== XAccessibleGroupPosition ========================================= 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; /** The destructor releases its children manager and text engine if stillexistent.Theseareresponsibletosendappropriateevents.
*/ virtual ~AccessibleShape() override;
/** Initialize a new shape. See the documentation of the constructor forthereasonofthismethod'sexistence.
*/ virtualvoid Init();
/** Set the specified state. If the state is <const>FOCUSED</const> then,additionallytotheinheritedfunctionality,thefocus listenersregisteredwiththeXAccessibleComponent interfacearecalled(ifthatstatereallychanges).
/** Reset the specified state. If the state is <const>FOCUSED</const> then,additionallytotheinheritedfunctionality,thefocus listenersregisteredwiththeXAccessibleComponent interfacearecalled(ifthatstatereallychanges).
/** Listen for disposing events of the model. The accessible shape remainsfunctionalwhenthishappens.
*/ void disposing (const css::lang::EventObject& Source);
/** set the index _nIndex at the accessible shape @param_nIndex Thenewindexinparent.
*/ void setIndexInParent(sal_Int32 _nIndex) { m_nIndexInParent = _nIndex; }
protected: /// Children manager. May be empty if there are no children.
std::unique_ptr<ChildrenManager> mpChildrenManager;
/// Reference to the actual shape.
css::uno::Reference<
css::drawing::XShape> mxShape;
/** Bundle of information passed to all shapes in a document tree.
*/
AccessibleShapeTreeInfo maShapeTreeInfo;
/** the index in parent.
*/
sal_Int32 m_nIndexInParent;
/** The accessible text engine. May be NULL if it can not be created.
*/
std::unique_ptr<AccessibleTextHelper> mpText;
/** This object can be used to modify the child list of our parent.
*/
IAccessibleParent* mpParent;
/** This object can be removed when we have an extra interface to ask if the shape is selected
*/
SdrObject* m_pShape;
/** This method is called from the component helper base class while disposing.
*/ virtualvoid SAL_CALL disposing() override;
/** Create a base name string that contains the accessible name.
/** Create a unique name string that contains the accessible name. The nameconsistsofthebasenameandtheindex.
*/ virtual OUString
CreateAccessibleName() override;
/// @throws css::uno::RuntimeException
OUString
GetFullAccessibleName(AccessibleShape *shape); virtual OUString GetStyle() const; /** Update the <const>OPAQUE</const> and <const>SELECTED</const> state.
*/ void UpdateStates();
/** Call this method when the title, name, or description of the mxShape member(may)havebeenchanged. Thismethodadaptsthenameanddescriptionmembersofthe AccessibleContextBasebaseclass.
*/ void UpdateNameAndDescription();
};
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.