30 #include <svx/strings.hrc>
95 return GetTypeId (rxShape->getShapeType());
124 : maShapeTypeDescriptorList (1)
157 for (
int i=0;
i<nDescriptorCount;
i++)
185 return GetSlotId (rxShape->getShapeType());
202 pResourceId = STR_ObjNameSingulCube3d;
205 pResourceId = STR_ObjNameSingulExtrude3d;
208 pResourceId = STR_ObjNameSingulLathe3d;
211 pResourceId = STR_ObjNameSingulScene3d;
214 pResourceId = STR_ObjNameSingulSphere3d;
217 pResourceId = STR_ObjNameSingulCAPTION;
220 pResourceId = STR_ObjNameSingulPATHFILL;
223 pResourceId = STR_ObjNameSingulFREEFILL;
226 pResourceId = STR_ObjNameSingulEDGE;
229 pResourceId = STR_ObjNameSingulUno;
232 pResourceId = STR_ObjNameSingulCIRCE;
235 pResourceId = STR_ObjNameSingulGRUP;
238 pResourceId = STR_ObjNameSingulLINE;
241 pResourceId = STR_ObjNameSingulMEASURE;
244 pResourceId = STR_ObjNameSingulPATHLINE;
247 pResourceId = STR_ObjNameSingulFREELINE;
250 pResourceId = STR_ObjNameSingulPAGE;
253 pResourceId = STR_ObjNameSingulPLIN;
256 pResourceId = STR_ObjNameSingulPLIN;
259 pResourceId = STR_ObjNameSingulPOLY;
262 pResourceId = STR_ObjNameSingulPOLY;
265 pResourceId = STR_ObjNameSingulRECT;
268 pResourceId = STR_ObjNameSingulCUSTOMSHAPE;
272 if (
auto pCustomShape = dynamic_cast<SdrObjCustomShape*>(pSdrObject))
274 if (pCustomShape->IsTextPath())
275 pResourceId = STR_ObjNameSingulFONTWORK;
279 sName = pCustomShape->GetCustomShapeName();
285 pResourceId = STR_ObjNameSingulTEXT;
289 sName =
"UnknownAccessibleShape";
291 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
static rtl::Reference< AccessibleShape > CreateEmptyShapeReference(const AccessibleShapeInfo &, const AccessibleShapeTreeInfo &, ShapeTypeId)
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(TranslateId aId)
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...
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.