summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-06-08 22:26:35 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:05 +0200
commitecc15838ab9986c538b3c491b6086a48ac3512ae (patch)
treed8dda3ffc1d910bbaa5c8a03b7b35fffba387470
parent6591fede60c209f170da2a1848f74f1261e9a5d8 (diff)
Added dumping [property] LineJoint
Change-Id: I4d724d5ba9ed0ccd6b0b10d82efef5e6eb6ebd73
-rw-r--r--drawinglayer/inc/drawinglayer/XShapeDumper.hxx2
-rw-r--r--drawinglayer/source/dumper/XShapeDumper.cxx30
2 files changed, 32 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 72a9168988bb..d912ec1e47c8 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -39,6 +39,7 @@
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/drawing/LineJoint.hpp>
#ifndef ChartViewDumper_hxx
#define ChartViewDumper_hxx
@@ -85,6 +86,7 @@ private:
void dumpLineColorAsAttribute(sal_Int32 aLineColor, xmlTextWriterPtr xmlWriter);
void dumpLineTransparenceAsAttribute(sal_Int32 aLineTransparence, xmlTextWriterPtr xmlWriter);
void dumpLineWidthAsAttribute(sal_Int32 aLineWidth, xmlTextWriterPtr xmlWriter);
+ void dumpLineJointAsAttribute(com::sun::star::drawing::LineJoint eLineJoint, xmlTextWriterPtr xmlWriter);
void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
void dumpSizeAsAttribute(const com::sun::star::awt::Size& rSize, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index e254418321b5..3965b1a69730 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -399,6 +399,30 @@ namespace {
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineWidth"), "%" SAL_PRIdINT32, aLineWidth);
}
+ void XShapeDumper::dumpLineJointAsAttribute(drawing::LineJoint eLineJoint, xmlTextWriterPtr xmlWriter)
+ {
+ switch(eLineJoint)
+ {
+ case drawing::LineJoint_NONE:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineJoint"), "%s", "NONE");
+ break;
+ case drawing::LineJoint_MIDDLE:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineJoint"), "%s", "MIDDLE");
+ break;
+ case drawing::LineJoint_BEVEL:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineJoint"), "%s", "BEVEL");
+ break;
+ case drawing::LineJoint_MITER:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineJoint"), "%s", "MITER");
+ break;
+ case drawing::LineJoint_ROUND:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineJoint"), "%s", "ROUND");
+ break;
+ default:
+ break;
+ }
+ }
+
void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -638,6 +662,12 @@ namespace {
if(anotherAny >>= aLineWidth)
dumpLineWidthAsAttribute(aLineWidth, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("LineJoint");
+ drawing::LineJoint eLineJoint;
+ if(anotherAny >>= eLineJoint)
+ dumpLineJointAsAttribute(eLineJoint, xmlWriter);
+ }
}
#if DEBUG_DUMPER