Added dumping of TextFrames & GluePoints properties
Change-Id: Ibaa5f782d511d406575bfec6267f95d6ae50b87c
This commit is contained in:
parent
4b4ca80302
commit
85ff400da5
2 changed files with 49 additions and 0 deletions
|
@ -43,6 +43,7 @@
|
|||
#include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp>
|
||||
|
||||
#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
|
||||
#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
|
||||
|
||||
#ifndef EnhancedShapeDumper_hxx
|
||||
#define EnhancedShapeDumper_hxx
|
||||
|
@ -125,6 +126,8 @@ public:
|
|||
void dumpSegmentsAsElement(com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeSegment > aSegments);
|
||||
void dumpStretchXAsAttribute(sal_Int32 aStretchX);
|
||||
void dumpStretchYAsAttribute(sal_Int32 aStretchY);
|
||||
void dumpTextFramesAsElement(com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeTextFrame > aTextFrames);
|
||||
void dumpGluePointsAsElement(com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair > aGluePoints);
|
||||
|
||||
private:
|
||||
xmlTextWriterPtr xmlWriter;
|
||||
|
|
|
@ -841,6 +841,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(uno::Reference< bea
|
|||
if(anotherAny >>= aStretchY)
|
||||
dumpStretchYAsAttribute(aStretchY);
|
||||
}
|
||||
{
|
||||
uno::Any anotherAny = xPropSet->getPropertyValue("TextFrames");
|
||||
uno::Sequence< drawing::EnhancedCustomShapeTextFrame > aTextFrames;
|
||||
if(anotherAny >>= aTextFrames)
|
||||
dumpTextFramesAsElement(aTextFrames);
|
||||
}
|
||||
{
|
||||
uno::Any anotherAny = xPropSet->getPropertyValue("GluePoints");
|
||||
uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aGluePoints;
|
||||
if(anotherAny >>= aGluePoints)
|
||||
dumpGluePointsAsElement(aGluePoints);
|
||||
}
|
||||
}
|
||||
|
||||
void EnhancedShapeDumper::dumpCoordinatesAsElement(uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates)
|
||||
|
@ -882,4 +894,38 @@ void EnhancedShapeDumper::dumpStretchYAsAttribute(sal_Int32 aStretchY)
|
|||
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("stretchY"), "%" SAL_PRIdINT32, aStretchY);
|
||||
}
|
||||
|
||||
void EnhancedShapeDumper::dumpTextFramesAsElement(uno::Sequence< drawing::EnhancedCustomShapeTextFrame > aTextFrames)
|
||||
{
|
||||
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "TextFrames" ));
|
||||
sal_Int32 nLength = aTextFrames.getLength();
|
||||
for (sal_Int32 i = 0; i < nLength; ++i)
|
||||
{
|
||||
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "EnhancedCustomShapeTextFrame" ));
|
||||
{
|
||||
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "TopLeft" ));
|
||||
dumpEnhancedCustomShapeParameterPair(aTextFrames[i].TopLeft);
|
||||
xmlTextWriterEndElement( xmlWriter );
|
||||
|
||||
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "BottomRight" ));
|
||||
dumpEnhancedCustomShapeParameterPair(aTextFrames[i].BottomRight);
|
||||
xmlTextWriterEndElement( xmlWriter );
|
||||
}
|
||||
xmlTextWriterEndElement( xmlWriter );
|
||||
}
|
||||
xmlTextWriterEndElement( xmlWriter );
|
||||
}
|
||||
|
||||
void EnhancedShapeDumper::dumpGluePointsAsElement(uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aGluePoints)
|
||||
{
|
||||
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "GluePoints" ));
|
||||
sal_Int32 nLength = aGluePoints.getLength();
|
||||
for (sal_Int32 i = 0; i < nLength; ++i)
|
||||
{
|
||||
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "EnhancedCustomShapeParameterPair" ));
|
||||
dumpEnhancedCustomShapeParameterPair(aGluePoints[i]);
|
||||
xmlTextWriterEndElement( xmlWriter );
|
||||
}
|
||||
xmlTextWriterEndElement( xmlWriter );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue