[Libreoffice-commits] .: Branch 'feature/gsoc_test_improvements' - 3 commits - drawinglayer/inc drawinglayer/source
Artur Dorda
adorda at kemper.freedesktop.org
Fri Jun 8 13:27:30 PDT 2012
drawinglayer/inc/drawinglayer/XShapeDumper.hxx | 4 +
drawinglayer/source/dumper/XShapeDumper.cxx | 52 +++++++++++++++++++++++++
2 files changed, 56 insertions(+)
New commits:
commit 2b014a3c52c7feeca517f2f18132302bf7a64724
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Fri Jun 8 22:26:35 2012 +0200
Added dumping [property] LineJoint
Change-Id: I4d724d5ba9ed0ccd6b0b10d82efef5e6eb6ebd73
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 72a9168..d912ec1 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 e254418..3965b1a 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
commit 1dec3c1898a46784dc314a35e58e743f5ac9a819
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Fri Jun 8 21:45:47 2012 +0200
Added dumping [property] LineWidth
Change-Id: I7d0b027af0b8d2367038747aea3f204252bae22e
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 73cfb94..72a9168 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -84,6 +84,7 @@ private:
void dumpLineDashNameAsAttribute(rtl::OUString sLineDashName, xmlTextWriterPtr xmlWriter);
void dumpLineColorAsAttribute(sal_Int32 aLineColor, xmlTextWriterPtr xmlWriter);
void dumpLineTransparenceAsAttribute(sal_Int32 aLineTransparence, xmlTextWriterPtr xmlWriter);
+ void dumpLineWidthAsAttribute(sal_Int32 aLineWidth, 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 6c84c4d..e254418 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -394,6 +394,11 @@ namespace {
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineTransparence"), "%" SAL_PRIdINT32, aLineTransparence);
}
+ void XShapeDumper::dumpLineWidthAsAttribute(sal_Int32 aLineWidth, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineWidth"), "%" SAL_PRIdINT32, aLineWidth);
+ }
+
void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -627,6 +632,12 @@ namespace {
if(anotherAny >>= aLineTransparence)
dumpLineTransparenceAsAttribute(aLineTransparence, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("LineWidth");
+ sal_Int32 aLineWidth;
+ if(anotherAny >>= aLineWidth)
+ dumpLineWidthAsAttribute(aLineWidth, xmlWriter);
+ }
}
#if DEBUG_DUMPER
commit 2316a2b183c8649ba28157d5d6f063c88da8dcf8
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Fri Jun 8 21:43:43 2012 +0200
Added dumping [property] LineTransparence
Change-Id: I491715b3838f85201cc349134abe9368b890fa83
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 44f739e..73cfb94 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -83,6 +83,7 @@ private:
void dumpLineDashAsElement(com::sun::star::drawing::LineDash aLineDash, xmlTextWriterPtr xmlWriter);
void dumpLineDashNameAsAttribute(rtl::OUString sLineDashName, xmlTextWriterPtr xmlWriter);
void dumpLineColorAsAttribute(sal_Int32 aLineColor, xmlTextWriterPtr xmlWriter);
+ void dumpLineTransparenceAsAttribute(sal_Int32 aLineTransparence, 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 4fe4133..6c84c4d 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -389,6 +389,11 @@ namespace {
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineColor"), "%" SAL_PRIdINT32, aLineColor);
}
+ void XShapeDumper::dumpLineTransparenceAsAttribute(sal_Int32 aLineTransparence, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineTransparence"), "%" SAL_PRIdINT32, aLineTransparence);
+ }
+
void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -616,6 +621,12 @@ namespace {
if(anotherAny >>= aLineColor)
dumpLineColorAsAttribute(aLineColor, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("LineTransparence");
+ sal_Int32 aLineTransparence;
+ if(anotherAny >>= aLineTransparence)
+ dumpLineTransparenceAsAttribute(aLineTransparence, xmlWriter);
+ }
}
#if DEBUG_DUMPER
More information about the Libreoffice-commits
mailing list