[Libreoffice-commits] .: Branch 'feature/gsoc_test_improvements' - 4 commits - drawinglayer/inc drawinglayer/source
Artur Dorda
adorda at kemper.freedesktop.org
Sat Jun 9 04:41:37 PDT 2012
drawinglayer/inc/drawinglayer/XShapeDumper.hxx | 4 +
drawinglayer/source/dumper/XShapeDumper.cxx | 51 ++++++++++++++++++++++++-
2 files changed, 54 insertions(+), 1 deletion(-)
New commits:
commit 487031e9116a78dc43bdab60e868170cd66bf212
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Sat Jun 9 13:40:29 2012 +0200
Added dumping [property] LineEndWidth
Change-Id: Id5628d90cd3d451b8b7ae7a2a4b56813c8192cdd
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 5010882..8244667 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -96,6 +96,7 @@ private:
void dumpLineStartCenterAsAttribute(sal_Bool bLineStartCenter, xmlTextWriterPtr xmlWriter);
void dumpLineStartWidthAsAttribute(sal_Int32 aLineStartWidth, xmlTextWriterPtr xmlWriter);
void dumpLineEndCenterAsAttribute(sal_Bool bLineEndCenter, xmlTextWriterPtr xmlWriter);
+ void dumpLineEndWidthAsAttribute(sal_Int32 aLineEndWidth, 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 7c51fb3..32b2f8d 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -527,6 +527,11 @@ namespace {
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineEndCenter"), "%s", "false");
}
+ void XShapeDumper::dumpLineEndWidthAsAttribute(sal_Int32 aLineEndWidth, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineEndWidth"), "%" SAL_PRIdINT32, aLineEndWidth);
+ }
+
void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -814,7 +819,12 @@ namespace {
if(anotherAny >>= bLineEndCenter)
dumpLineEndCenterAsAttribute(bLineEndCenter, xmlWriter);
}
-
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("LineEndWidth");
+ sal_Int32 aLineEndWidth;
+ if(anotherAny >>= aLineEndWidth)
+ dumpLineEndWidthAsAttribute(aLineEndWidth, xmlWriter);
+ }
}
#if DEBUG_DUMPER
commit 8e2208f3a92136cf4f5cc1b72dbb6d83974b67bb
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Sat Jun 9 13:38:45 2012 +0200
Added dumping [property] LineEndCenter
Change-Id: I7cae9e3a22bf63076a8ceacbc80ab1d26bf177fe
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index b923d9a..5010882 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -95,6 +95,7 @@ private:
void dumpLineEndAsElement(com::sun::star::drawing::PolyPolygonBezierCoords aLineEnd, xmlTextWriterPtr xmlWriter);
void dumpLineStartCenterAsAttribute(sal_Bool bLineStartCenter, xmlTextWriterPtr xmlWriter);
void dumpLineStartWidthAsAttribute(sal_Int32 aLineStartWidth, xmlTextWriterPtr xmlWriter);
+ void dumpLineEndCenterAsAttribute(sal_Bool bLineEndCenter, 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 f6bf42b..7c51fb3 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -519,6 +519,14 @@ namespace {
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineStartWidth"), "%" SAL_PRIdINT32, aLineStartWidth);
}
+ void XShapeDumper::dumpLineEndCenterAsAttribute(sal_Bool bLineEndCenter, xmlTextWriterPtr xmlWriter)
+ {
+ if(bLineEndCenter)
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineEndCenter"), "%s", "true");
+ else
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineEndCenter"), "%s", "false");
+ }
+
void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -800,6 +808,12 @@ namespace {
if(anotherAny >>= aLineStartWidth)
dumpLineStartWidthAsAttribute(aLineStartWidth, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("LineEndCenter");
+ sal_Bool bLineEndCenter;
+ if(anotherAny >>= bLineEndCenter)
+ dumpLineEndCenterAsAttribute(bLineEndCenter, xmlWriter);
+ }
}
commit ceca7c75521f2ce962d506477557c615359af80a
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Sat Jun 9 13:36:43 2012 +0200
Added dumping [property] LineStartWidth
Change-Id: Iaaad9056c7cf1fe1ae244fb1839814d7f18d402a
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 6d16682..b923d9a 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -94,6 +94,7 @@ private:
void dumpLineStartAsElement(com::sun::star::drawing::PolyPolygonBezierCoords aLineStart, xmlTextWriterPtr xmlWriter);
void dumpLineEndAsElement(com::sun::star::drawing::PolyPolygonBezierCoords aLineEnd, xmlTextWriterPtr xmlWriter);
void dumpLineStartCenterAsAttribute(sal_Bool bLineStartCenter, xmlTextWriterPtr xmlWriter);
+ void dumpLineStartWidthAsAttribute(sal_Int32 aLineStartWidth, 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 098d702..f6bf42b 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -514,6 +514,11 @@ namespace {
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineStartCenter"), "%s", "false");
}
+ void XShapeDumper::dumpLineStartWidthAsAttribute(sal_Int32 aLineStartWidth, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineStartWidth"), "%" SAL_PRIdINT32, aLineStartWidth);
+ }
+
void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -789,6 +794,12 @@ namespace {
if(anotherAny >>= bLineStartCenter)
dumpLineStartCenterAsAttribute(bLineStartCenter, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("LineStartWidth");
+ sal_Int32 aLineStartWidth;
+ if(anotherAny >>= aLineStartWidth)
+ dumpLineStartWidthAsAttribute(aLineStartWidth, xmlWriter);
+ }
}
commit 93248b138aa164f6a0ff17dc1bc091477772f1a8
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Sat Jun 9 13:35:01 2012 +0200
Added dumping [property] LineStartCenter
Change-Id: Ie8c14d145911525ccea5b8a74eb75bc38d7e1ab0
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 71183ff..6d16682 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -93,6 +93,7 @@ private:
void dumpPolyPolygonBezierCoords(com::sun::star::drawing::PolyPolygonBezierCoords aPolyPolygonBezierCoords, xmlTextWriterPtr xmlWriter);
void dumpLineStartAsElement(com::sun::star::drawing::PolyPolygonBezierCoords aLineStart, xmlTextWriterPtr xmlWriter);
void dumpLineEndAsElement(com::sun::star::drawing::PolyPolygonBezierCoords aLineEnd, xmlTextWriterPtr xmlWriter);
+ void dumpLineStartCenterAsAttribute(sal_Bool bLineStartCenter, 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 0223dbb..098d702 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -506,6 +506,14 @@ namespace {
xmlTextWriterEndElement( xmlWriter );
}
+ void XShapeDumper::dumpLineStartCenterAsAttribute(sal_Bool bLineStartCenter, xmlTextWriterPtr xmlWriter)
+ {
+ if(bLineStartCenter)
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineStartCenter"), "%s", "true");
+ else
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineStartCenter"), "%s", "false");
+ }
+
void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -775,6 +783,12 @@ namespace {
if(anotherAny >>= aLineEnd)
dumpLineEndAsElement(aLineEnd, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("LineStartCenter");
+ sal_Bool bLineStartCenter;
+ if(anotherAny >>= bLineStartCenter)
+ dumpLineStartCenterAsAttribute(bLineStartCenter, xmlWriter);
+ }
}
More information about the Libreoffice-commits
mailing list