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

Added dumping Transformation property

Change-Id: Id7ded83cee7798a1ddc3fc3ce7344d64b8f0f795
üst b1e0f23f
......@@ -52,6 +52,7 @@
#include <com/sun/star/text/WritingMode.hpp>
#include <com/sun/star/drawing/HomogenMatrixLine3.hpp>
#include <com/sun/star/drawing/HomogenMatrix3.hpp>
#ifndef ChartViewDumper_hxx
#define ChartViewDumper_hxx
......@@ -159,6 +160,7 @@ private:
void dumpNameAsAttribute(rtl::OUString sName, xmlTextWriterPtr xmlWriter);
void dumpSizeProtectAsAttribute(sal_Bool bSizeProtect, xmlTextWriterPtr xmlWriter);
void dumpHomogenMatrixLine3(com::sun::star::drawing::HomogenMatrixLine3 aLine, xmlTextWriterPtr xmlWriter);
void dumpTransformationAsElement(com::sun::star::drawing::HomogenMatrix3 aTransformation, xmlTextWriterPtr xmlWriter);
// XShape.idl
void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
......
......@@ -917,11 +917,28 @@ namespace {
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("sizeProtect"), "%s", "false");
}
void XShapeDumper::dumpHomogenMatrixLine3(drawing::HomogenMatrixLine3 aLine, xmlTextWriterPtr xmlWriter)
void XShapeDumper::dumpHomogenMatrixLine3(drawing::HomogenMatrixLine3 aHomogenMatrixLine3, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column1"), "%f", aLine.Column1);
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column2"), "%f", aLine.Column2);
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column3"), "%f", aLine.Column3);
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column1"), "%f", aHomogenMatrixLine3.Column1);
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column2"), "%f", aHomogenMatrixLine3.Column2);
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column3"), "%f", aHomogenMatrixLine3.Column3);
}
void XShapeDumper::dumpTransformationAsElement(drawing::HomogenMatrix3 aTransformation, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Transformation" ));
{
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Line1" ));
dumpHomogenMatrixLine3(aTransformation.Line1, xmlWriter);
xmlTextWriterEndElement( xmlWriter );
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Line2" ));
dumpHomogenMatrixLine3(aTransformation.Line2, xmlWriter);
xmlTextWriterEndElement( xmlWriter );
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Line3" ));
dumpHomogenMatrixLine3(aTransformation.Line3, xmlWriter);
xmlTextWriterEndElement( xmlWriter );
}
xmlTextWriterEndElement( xmlWriter );
}
// --------------------------------
......@@ -1469,6 +1486,12 @@ namespace {
if(anotherAny >>= bSizeProtect)
dumpSizeProtectAsAttribute(bSizeProtect, xmlWriter);
}
{
uno::Any anotherAny = xPropSet->getPropertyValue("Transformation");
drawing::HomogenMatrix3 aTransformation;
if(anotherAny >>= aTransformation)
dumpTransformationAsElement(aTransformation, xmlWriter);
}
}
#if DEBUG_DUMPER
......
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