Started dumping EnhancedCustomShapeTextPath service & added TextPath property

Change-Id: I4945ee8cba2d9d4fc9f374cf0002dbdb99d6df28
This commit is contained in:
Artur Dorda 2012-07-04 19:07:31 +02:00 committed by Markus Mohrhard
parent cf7e4d3ced
commit ec5b681bbe
3 changed files with 32 additions and 0 deletions

View file

@ -136,6 +136,10 @@ public:
void dumpTextPathAllowedAsAttribute(sal_Bool bTextPathAllowed);
void dumpSubViewSizeAsElement(com::sun::star::uno::Sequence< com::sun::star::awt::Size > aSubViewSize);
// EnhancedCustomShapePath.idl
void dumpEnhancedCustomShapeTextPathService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet);
void dumpTextPathAsAttribute(sal_Bool bTextPath);
private:
xmlTextWriterPtr xmlWriter;
};

View file

@ -1017,3 +1017,26 @@ void EnhancedShapeDumper::dumpSubViewSizeAsElement(uno::Sequence< awt::Size > aS
}
xmlTextWriterEndElement( xmlWriter );
}
// ----------------------------------------------------------
// ---------- EnhancedCustomShapeTextPath.idl ---------------
// ----------------------------------------------------------
void EnhancedShapeDumper::dumpEnhancedCustomShapeTextPathService(uno::Reference< beans::XPropertySet > xPropSet)
{
{
uno::Any anotherAny = xPropSet->getPropertyValue("TextPath");
sal_Bool bTextPath;
if(anotherAny >>= bTextPath)
dumpTextPathAsAttribute(bTextPath);
}
}
void EnhancedShapeDumper::dumpTextPathAsAttribute(sal_Bool bTextPath)
{
if(bTextPath)
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPath"), "%s", "true");
else
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPath"), "%s", "false");
}

View file

@ -1833,6 +1833,11 @@ namespace {
EnhancedShapeDumper enhancedDumper(xmlWriter);
enhancedDumper.dumpEnhancedCustomShapePathService(xPropSet);
}
if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapeTextPath"))
{
EnhancedShapeDumper enhancedDumper(xmlWriter);
enhancedDumper.dumpEnhancedCustomShapeTextPathService(xPropSet);
}
} // end of the 'try' block
catch (com::sun::star::beans::UnknownPropertyException &e)
{