Added dumping TextAutoGrowHeight & TextAutoGrowWidth properties

Change-Id: I03c8786d1cfce2f05ead5fabd58f5f24cd567aff
This commit is contained in:
Artur Dorda 2012-06-10 01:37:25 +02:00 committed by Markus Mohrhard
parent cace122087
commit 5022553e09
2 changed files with 30 additions and 0 deletions

View file

@ -110,6 +110,8 @@ private:
// TextProperties.idl
void dumpIsNumberingAsAttribute(sal_Bool bIsNumbering, xmlTextWriterPtr xmlWriter);
void dumpTextAutoGrowHeightAsAttribute(sal_Bool bTextAutoGrowHeight, xmlTextWriterPtr xmlWriter);
void dumpTextAutoGrowWidthAsAttribute(sal_Bool bTextAutoGrowWidth, xmlTextWriterPtr xmlWriter);
// XShape.idl
void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);

View file

@ -606,6 +606,22 @@ namespace {
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("isNumbering"), "%s", "false");
}
void XShapeDumper::dumpTextAutoGrowHeightAsAttribute(sal_Bool bTextAutoGrowHeight, xmlTextWriterPtr xmlWriter)
{
if(bTextAutoGrowHeight)
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowHeight"), "%s", "true");
else
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowHeight"), "%s", "false");
}
void XShapeDumper::dumpTextAutoGrowWidthAsAttribute(sal_Bool bTextAutoGrowWidth, xmlTextWriterPtr xmlWriter)
{
if(bTextAutoGrowWidth)
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowWidth"), "%s", "true");
else
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowWidth"), "%s", "false");
}
// --------------------------------
// ---------- XShape.idl ----------
// --------------------------------
@ -666,6 +682,18 @@ namespace {
if(anotherAny >>= bIsNumbering)
dumpIsNumberingAsAttribute(bIsNumbering, xmlWriter);
}
{
uno::Any anotherAny = xPropSet->getPropertyValue("TextAutoGrowHeight");
sal_Bool bTextAutoGrowHeight;
if(anotherAny >>= bTextAutoGrowHeight)
dumpTextAutoGrowHeightAsAttribute(bTextAutoGrowHeight, xmlWriter);
}
{
uno::Any anotherAny = xPropSet->getPropertyValue("TextAutoGrowWidth");
sal_Bool bTextAutoGrowWidth;
if(anotherAny >>= bTextAutoGrowWidth)
dumpTextAutoGrowWidthAsAttribute(bTextAutoGrowWidth, xmlWriter);
}
}
else if(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
{