31 #include <svx/strings.hrc>
43 static AccessibleShape*
96 return GetTypeId (rxShape->getShapeType());
125 : maShapeTypeDescriptorList (1)
158 for (
int i=0;
i<nDescriptorCount;
i++)
186 return GetSlotId (rxShape->getShapeType());
194 const char* pResourceId;
203 pResourceId = STR_ObjNameSingulCube3d;
206 pResourceId = STR_ObjNameSingulExtrude3d;
209 pResourceId = STR_ObjNameSingulLathe3d;
212 pResourceId = STR_ObjNameSingulScene3d;
215 pResourceId = STR_ObjNameSingulSphere3d;
218 pResourceId = STR_ObjNameSingulCAPTION;
221 pResourceId = STR_ObjNameSingulPATHFILL;
224 pResourceId = STR_ObjNameSingulFREEFILL;
227 pResourceId = STR_ObjNameSingulEDGE;
230 pResourceId = STR_ObjNameSingulUno;
233 pResourceId = STR_ObjNameSingulCIRCE;
236 pResourceId = STR_ObjNameSingulGRUP;
239 pResourceId = STR_ObjNameSingulLINE;
242 pResourceId = STR_ObjNameSingulMEASURE;
245 pResourceId = STR_ObjNameSingulPATHLINE;
248 pResourceId = STR_ObjNameSingulFREELINE;
251 pResourceId = STR_ObjNameSingulPAGE;
254 pResourceId = STR_ObjNameSingulPLIN;
257 pResourceId = STR_ObjNameSingulPLIN;
260 pResourceId = STR_ObjNameSingulPOLY;
263 pResourceId = STR_ObjNameSingulPOLY;
266 pResourceId = STR_ObjNameSingulRECT;
269 pResourceId = STR_ObjNameSingulCUSTOMSHAPE;
273 if (
auto pCustomShape = dynamic_cast<SdrObjCustomShape*>(pSdrObject))
275 if (pCustomShape->IsTextPath())
276 pResourceId = STR_ObjNameSingulFONTWORK;
279 pResourceId =
nullptr;
280 sName = pCustomShape->GetCustomShapeName();
286 pResourceId = STR_ObjNameSingulTEXT;
289 pResourceId =
nullptr;
290 sName =
"UnknownAccessibleShape";
292 sName +=
": " + rxShape->getShapeType();
Each shape type is described by listing its id, its service name and a function which creates a new a...
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
css::uno::Reference< css::drawing::XShape > mxShape
The shape itself for which an accessible object is to be constructed.
tServiceNameToSlotId maServiceNameToSlotId
void RegisterDrawShapeTypes()
Register the SVX draw shape types with the ShapeTypeHandler singleton.
rtl::Reference< AccessibleShape > CreateAccessibleObject(const AccessibleShapeInfo &rShapeInfo, const AccessibleShapeTreeInfo &rShapeTreeInfo) const
Create a new accessible object for the given shape.
::std::vector< ShapeTypeDescriptor > maShapeTypeDescriptorList
List of shape type descriptors.
OUString SvxResId(const char *pId)
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.
void AddShapeTypeList(int nDescriptorCount, ShapeTypeDescriptor const aDescriptorList[])
Add new shape types to the internal tables.
int ShapeTypeId
Use an integer to represent shape type ids.
static ShapeTypeHandler & Instance()
This function returns a reference to the only instance of this class.
ShapeTypeHandler()
Create the single instance of this class and initialize its list of type descriptors with an entry of...
static OUString CreateAccessibleBaseName(const css::uno::Reference< css::drawing::XShape > &rxShape)
get the accessible base name for an object
SVX_DLLPRIVATE tools::Long GetSlotId(const OUString &aServiceName) const
Determine the slot id of the specified shape type.
ShapeTypeId mnShapeTypeId
ShapeTypeId GetTypeId(const OUString &aServiceName) const
Determines the type id of a shape with the given service name.
This class is a container for the information specific for a single shape that is passed to the const...
static AccessibleShape * CreateEmptyShapeReference(const AccessibleShapeInfo &, const AccessibleShapeTreeInfo &, ShapeTypeId)
This class bundles all information that is passed down the tree of accessible shapes so that each sha...
tCreateFunction maCreateFunction
~ShapeTypeHandler()
This destructor is never called at the moment.