20 #ifndef INCLUDED_SVX_SHAPETYPEHANDLER_HXX
21 #define INCLUDED_SVX_SHAPETYPEHANDLER_HXX
25 #include <rtl/ref.hxx>
26 #include <rtl/ustring.hxx>
28 #include <unordered_map>
63 : mnShapeTypeId (nId),
64 msServiceName (sName),
65 maCreateFunction (aFunction)
70 maCreateFunction (nullptr)
82 enum { UNKNOWN_SHAPE_TYPE = 0 };
98 ShapeTypeId GetTypeId (
const OUString& aServiceName)
const;
109 ShapeTypeId GetTypeId (
const css::uno::Reference<
110 css::drawing::XShape>& rxShape)
const;
123 CreateAccessibleObject (
136 void AddShapeTypeList (
int nDescriptorCount,
142 static OUString CreateAccessibleBaseName (
143 const css::uno::Reference< css::drawing::XShape >& rxShape);
193 css::drawing::XShape>& rxShape)
const;
Each shape type is described by listing its id, its service name and a function which creates a new a...
tServiceNameToSlotId maServiceNameToSlotId
::std::vector< ShapeTypeDescriptor > maShapeTypeDescriptorList
List of shape type descriptors.
AccessibleShape *(* tCreateFunction)(const AccessibleShapeInfo &rShapeInfo, const AccessibleShapeTreeInfo &rShapeTreeInfo, ShapeTypeId nId)
Define the function type for creating accessible objects for given service names. ...
This class is a singleton that has the purpose to transform between service names of shapes and assoc...
static ShapeTypeHandler * instance
Pointer to the only instance of this class.
int ShapeTypeId
Use an integer to represent shape type ids.
std::unordered_map< OUString, ShapeTypeId > tServiceNameToSlotId
This hash map allows the fast look up of a type descriptor for a given service name.
This base class provides a base implementation for all shapes.
ShapeTypeId mnShapeTypeId
ShapeTypeDescriptor(ShapeTypeId nId, const OUString &sName, tCreateFunction aFunction)
This class is a container for the information specific for a single shape that is passed to the const...
This class bundles all information that is passed down the tree of accessible shapes so that each sha...
tCreateFunction maCreateFunction