summaryrefslogtreecommitdiffstats
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-13 23:21:33 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-14 02:40:17 +0100
commit81b4ac4f8c405243db5949ea39f2abf8d77c9bb1 (patch)
tree7212f30977b886597e48d4b0e499f01cc1cc7cf5 /chart2
parentfixed pointer to the paper.hxx in comment (diff)
downloadcore-81b4ac4f8c405243db5949ea39f2abf8d77c9bb1.tar.gz
core-81b4ac4f8c405243db5949ea39f2abf8d77c9bb1.zip
add more code to the chart dumper
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/inc/ShapeFactory.hxx2
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx45
2 files changed, 45 insertions, 2 deletions
diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx
index 8fe7ba014c2d..f74d51c446ef 100644
--- a/chart2/source/view/inc/ShapeFactory.hxx
+++ b/chart2/source/view/inc/ShapeFactory.hxx
@@ -67,6 +67,8 @@ public:
void writeAttribute(const char* pAttrName, const com::sun::star::drawing::PointSequenceSequence& rPoints);
void writeAttribute(const char* pAttrName, const com::sun::star::drawing::PolyPolygonShape3D& rPoints);
void writeAttribute(const char* pAttrName, const com::sun::star::drawing::PolyPolygonBezierCoords& rCoords);
+ void writePointElement(const com::sun::star::awt::Point& rPoint);
+ void writeDoubleSequence(const char* pName, const com::sun::star::drawing::DoubleSequenceSequence& rSequence);
void endElement();
};
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index f9589c28c401..4e35e1717b98 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -104,14 +104,55 @@ void DumpHelper::writeAttribute(const char* pAttrName, const sal_Int32 nValue)
std::cout << pAttrName << " " << nValue << std::endl;
}
-void DumpHelper::writeAttribute(const char* pAttrName, const drawing::PointSequenceSequence& )
+void DumpHelper::writePointElement(const awt::Point& rPoint)
+{
+ std::cout << "Point" << " " << rPoint.X << "," << rPoint.Y << std::endl;
+}
+
+void DumpHelper::writeDoubleSequence(const char* pName, const drawing::DoubleSequenceSequence& rSequence)
+{
+ writeElement(pName);
+ writeElement("OuterSequence");
+ sal_Int32 nLength1 = rSequence.getLength();
+ for (sal_Int32 i = 0; i < nLength1; ++i)
+ {
+ writeElement("InnerSequence");
+ const uno::Sequence<double>& aInnerSequence = rSequence[i];
+ sal_Int32 nLength2 = aInnerSequence.getLength();
+ for( sal_Int32 j = 0; j < nLength2; ++j)
+ {
+ std::cout << "Value: " << aInnerSequence[j];
+ }
+ endElement();
+ }
+ endElement();
+}
+
+void DumpHelper::writeAttribute(const char* pAttrName, const drawing::PointSequenceSequence& rSequence)
{
std::cout << pAttrName << " " << std::endl;
+ sal_Int32 nLength1 = rSequence.getLength();
+ writeElement("OuterSequence");
+ for (sal_Int32 i = 0; i < nLength1; ++i)
+ {
+ writeElement("InnerSequence");
+ const uno::Sequence<awt::Point>& aInnerSequence = rSequence[i];
+ sal_Int32 nLength2 = aInnerSequence.getLength();
+ for( sal_Int32 j = 0; j < nLength2; ++j)
+ {
+ writePointElement(aInnerSequence[j]);
+ }
+ endElement();
+ }
+ endElement();
}
-void DumpHelper::writeAttribute(const char* pAttrName, const drawing::PolyPolygonShape3D& )
+void DumpHelper::writeAttribute(const char* pAttrName, const drawing::PolyPolygonShape3D& rShape)
{
std::cout << pAttrName << " " << std::endl;
+ writeDoubleSequence("SequenceX", rShape.SequenceX);
+ writeDoubleSequence("SequenceY", rShape.SequenceY);
+ writeDoubleSequence("SequenceZ", rShape.SequenceZ);
}
void DumpHelper::writeAttribute(const char* pAttrName, const drawing::PolyPolygonBezierCoords& )