Kaydet (Commit) cf7e4d3c authored tarafından Artur Dorda's avatar Artur Dorda Kaydeden (comit) Markus Mohrhard

Added dumping of TextPathAllowed & SubViewSize properties

Change-Id: I4088e15cf010f2c0c4493b9a7781c9720d375480
üst 72fc403a
......@@ -44,6 +44,7 @@
#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
#include <com/sun/star/awt/Size.hpp>
#ifndef EnhancedShapeDumper_hxx
#define EnhancedShapeDumper_hxx
......@@ -132,6 +133,8 @@ public:
void dumpGluePointTypeAsAttribute(sal_Int32 aGluePointType);
void dumpExtrusionAllowedAsAttribute(sal_Bool bExtrusionAllowed);
void dumpConcentricGradientFillAllowedAsAttribute(sal_Bool bConcentricGradientFillAllowed);
void dumpTextPathAllowedAsAttribute(sal_Bool bTextPathAllowed);
void dumpSubViewSizeAsElement(com::sun::star::uno::Sequence< com::sun::star::awt::Size > aSubViewSize);
private:
xmlTextWriterPtr xmlWriter;
......
......@@ -877,6 +877,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(uno::Reference< bea
if(anotherAny >>= bConcentricGradientFillAllowed)
dumpConcentricGradientFillAllowedAsAttribute(bConcentricGradientFillAllowed);
}
{
uno::Any anotherAny = xPropSet->getPropertyValue("TextPathAllowed");
sal_Bool bTextPathAllowed;
if(anotherAny >>= bTextPathAllowed)
dumpTextPathAllowedAsAttribute(bTextPathAllowed);
}
{
uno::Any anotherAny = xPropSet->getPropertyValue("SubViewSize");
uno::Sequence< awt::Size > aSubViewSize;
if(anotherAny >>= aSubViewSize)
dumpSubViewSizeAsElement(aSubViewSize);
}
}
void EnhancedShapeDumper::dumpCoordinatesAsElement(uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates)
......@@ -984,4 +996,24 @@ void EnhancedShapeDumper::dumpConcentricGradientFillAllowedAsAttribute(sal_Bool
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("concentricGradientFillAllowed"), "%s", "false");
}
void EnhancedShapeDumper::dumpTextPathAllowedAsAttribute(sal_Bool bTextPathAllowed)
{
if(bTextPathAllowed)
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathAllowed"), "%s", "true");
else
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathAllowed"), "%s", "false");
}
void EnhancedShapeDumper::dumpSubViewSizeAsElement(uno::Sequence< awt::Size > aSubViewSize)
{
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "SubViewSize" ));
sal_Int32 nLength = aSubViewSize.getLength();
for (sal_Int32 i = 0; i < nLength; ++i)
{
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Size" ));
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("width"), "%" SAL_PRIdINT32, aSubViewSize[i].Width);
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("height"), "%" SAL_PRIdINT32, aSubViewSize[i].Height);
xmlTextWriterEndElement( xmlWriter );
}
xmlTextWriterEndElement( xmlWriter );
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment