[Libreoffice-commits] .: Branch 'feature/gsoc_test_improvements' - 6 commits - drawinglayer/inc drawinglayer/source
Artur Dorda
adorda at kemper.freedesktop.org
Wed Jun 6 08:46:30 PDT 2012
drawinglayer/inc/drawinglayer/XShapeDumper.hxx | 9 +
drawinglayer/source/dumper/XShapeDumper.cxx | 116 +++++++++++++++++++++++++
2 files changed, 125 insertions(+)
New commits:
commit 244dd966d07884b8f2511e2c85456b08f42dab47
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Wed Jun 6 17:45:30 2012 +0200
Added dumping [property] FillHatch
Change-Id: I883c056bcda79bcf8e0275d2a1bb7145553de483
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index b211a72..2644106 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -32,6 +32,7 @@
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
#ifndef ChartViewDumper_hxx
#define ChartViewDumper_hxx
@@ -53,6 +54,7 @@ private:
void dumpFillGradientNameAsAttribute(rtl::OUString aGradName, xmlTextWriterPtr xmlWriter);
void dumpFillGradientAsElement(com::sun::star::awt::Gradient aGradient, xmlTextWriterPtr xmlWriter);
void dumpFillHatchNameAsAttribute(rtl::OUString aHatchName, xmlTextWriterPtr xmlWriter);
+ void dumpFillHatchAsElement(com::sun::star::drawing::Hatch aHatch, 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 508ad75..400440f 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -165,6 +165,29 @@ namespace {
rtl::OUStringToOString(aHatchName, RTL_TEXTENCODING_UTF8).getStr());
}
+ void XShapeDumper::dumpFillHatchAsElement(drawing::Hatch aHatch, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillHatch" ));
+ switch(aHatch.Style)
+ {
+ case drawing::HatchStyle_SINGLE:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "SINGLE");
+ break;
+ case drawing::HatchStyle_DOUBLE:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "DOUBLE");
+ break;
+ case drawing::HatchStyle_TRIPLE:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "TRIPLE");
+ break;
+ default:
+ break;
+ }
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("color"), "%" SAL_PRIdINT32, (sal_Int32) aHatch.Color);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("distance"), "%" SAL_PRIdINT32, (sal_Int32) aHatch.Distance);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("angle"), "%" SAL_PRIdINT32, (sal_Int32) aHatch.Angle);
+ xmlTextWriterEndElement( xmlWriter );
+ }
+
void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -267,6 +290,12 @@ namespace {
if(anotherAny >>= aHatchName)
dumpFillGradientNameAsAttribute(aHatchName, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("FillHatch");
+ drawing::Hatch aHatch;
+ if(anotherAny >>= aHatch)
+ dumpFillHatchAsElement(aHatch, xmlWriter);
+ }
}
#if DEBUG_DUMPER
commit 374c023d29249194b511fe23560ee3d886c044d2
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Wed Jun 6 17:12:32 2012 +0200
Added dumping [property] FillHatchName
Change-Id: I85e15ca28edaaf2d3c2ac26b7dd152291ff6966e
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 61176d0..b211a72 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -52,6 +52,7 @@ private:
void dumpFillTransparenceGradientAsElement(com::sun::star::awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter);
void dumpFillGradientNameAsAttribute(rtl::OUString aGradName, xmlTextWriterPtr xmlWriter);
void dumpFillGradientAsElement(com::sun::star::awt::Gradient aGradient, xmlTextWriterPtr xmlWriter);
+ void dumpFillHatchNameAsAttribute(rtl::OUString aHatchName, 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 6ae6ef1..508ad75 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -148,7 +148,7 @@ namespace {
void XShapeDumper::dumpFillGradientNameAsAttribute(rtl::OUString aGradName, xmlTextWriterPtr xmlWriter)
{
- xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillTransparenceGradientName"), "%s",
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillGradientName"), "%s",
rtl::OUStringToOString(aGradName, RTL_TEXTENCODING_UTF8).getStr());
}
@@ -159,6 +159,12 @@ namespace {
xmlTextWriterEndElement( xmlWriter );
}
+ void XShapeDumper::dumpFillHatchNameAsAttribute(rtl::OUString aHatchName, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillHatchName"), "%s",
+ rtl::OUStringToOString(aHatchName, RTL_TEXTENCODING_UTF8).getStr());
+ }
+
void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -255,6 +261,12 @@ namespace {
if(anotherAny >>= aGradient)
dumpFillGradientAsElement(aGradient, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("FillHatchName");
+ rtl::OUString aHatchName;
+ if(anotherAny >>= aHatchName)
+ dumpFillGradientNameAsAttribute(aHatchName, xmlWriter);
+ }
}
#if DEBUG_DUMPER
commit 5dfd852d4aa43334c11198f1b3560e88bd4dae4a
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Wed Jun 6 17:06:15 2012 +0200
Added dumping [property] FillGradient
Change-Id: I83efbdca3b232bc1410c3f46a702e62aa8092c6a
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 1ee34bc..61176d0 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -51,6 +51,7 @@ private:
void dumpGradientProperty(com::sun::star::awt::Gradient aGradient, xmlTextWriterPtr xmlWriter);
void dumpFillTransparenceGradientAsElement(com::sun::star::awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter);
void dumpFillGradientNameAsAttribute(rtl::OUString aGradName, xmlTextWriterPtr xmlWriter);
+ void dumpFillGradientAsElement(com::sun::star::awt::Gradient aGradient, 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 77d8bef..6ae6ef1 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -152,6 +152,13 @@ namespace {
rtl::OUStringToOString(aGradName, RTL_TEXTENCODING_UTF8).getStr());
}
+ void XShapeDumper::dumpFillGradientAsElement(awt::Gradient aGradient, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillGradient" ));
+ dumpGradientProperty(aGradient, xmlWriter);
+ xmlTextWriterEndElement( xmlWriter );
+ }
+
void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -242,6 +249,12 @@ namespace {
if(anotherAny >>= aGradName)
dumpFillGradientNameAsAttribute(aGradName, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("FillGradient");
+ awt::Gradient aGradient;
+ if(anotherAny >>= aGradient)
+ dumpFillGradientAsElement(aGradient, xmlWriter);
+ }
}
#if DEBUG_DUMPER
commit 097ec5001dbdee16162032a57a27a825c310e36d
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Wed Jun 6 16:56:47 2012 +0200
Added dumping [property] FillGradientName
Change-Id: I7d124c9df1f05cdca2cb89b8dffa36b3f97bd843
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index e45c597..1ee34bc 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -50,6 +50,7 @@ private:
void dumpFillTransparenceGradientNameAsAttribute(rtl::OUString aTranspGradName, xmlTextWriterPtr xmlWriter);
void dumpGradientProperty(com::sun::star::awt::Gradient aGradient, xmlTextWriterPtr xmlWriter);
void dumpFillTransparenceGradientAsElement(com::sun::star::awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter);
+ void dumpFillGradientNameAsAttribute(rtl::OUString aGradName, 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 49138ed..77d8bef 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -138,6 +138,7 @@ namespace {
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("endIntensity"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.EndIntensity);
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("stepCount"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.StepCount);
}
+
void XShapeDumper::dumpFillTransparenceGradientAsElement(awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillTransparenceGradient" ));
@@ -145,6 +146,12 @@ namespace {
xmlTextWriterEndElement( xmlWriter );
}
+ void XShapeDumper::dumpFillGradientNameAsAttribute(rtl::OUString aGradName, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillTransparenceGradientName"), "%s",
+ rtl::OUStringToOString(aGradName, RTL_TEXTENCODING_UTF8).getStr());
+ }
+
void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -229,6 +236,12 @@ namespace {
if(anotherAny >>= aTranspGrad)
dumpFillTransparenceGradientAsElement(aTranspGrad, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("FillGradientName");
+ rtl::OUString aGradName;
+ if(anotherAny >>= aGradName)
+ dumpFillGradientNameAsAttribute(aGradName, xmlWriter);
+ }
}
#if DEBUG_DUMPER
commit 082b83fcdc066ac3515da63a8b0eafd5dc2450a4
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Wed Jun 6 16:49:05 2012 +0200
Added separate method to dump awt::Gradient properties
Change-Id: Idb5f752973a4c1359587f3d43db5fd0ef9958e8e
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index c77e484..e45c597 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -48,6 +48,7 @@ private:
void dumpFillColorAsAttribute(sal_Int32 aColor, xmlTextWriterPtr xmlWriter);
void dumpFillTransparenceAsAttribute(sal_Int32 aTransparence, xmlTextWriterPtr xmlWriter);
void dumpFillTransparenceGradientNameAsAttribute(rtl::OUString aTranspGradName, xmlTextWriterPtr xmlWriter);
+ void dumpGradientProperty(com::sun::star::awt::Gradient aGradient, xmlTextWriterPtr xmlWriter);
void dumpFillTransparenceGradientAsElement(com::sun::star::awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter);
void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 7cd0892..49138ed 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -102,11 +102,10 @@ namespace {
rtl::OUStringToOString(aTranspGradName, RTL_TEXTENCODING_UTF8).getStr());
}
- void XShapeDumper::dumpFillTransparenceGradientAsElement(awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter)
+ //because there's more awt::Gradient properties to dump
+ void XShapeDumper::dumpGradientProperty(awt::Gradient aGradient, xmlTextWriterPtr xmlWriter)
{
- xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillTransparenceGradient" ));
-
- switch(aTranspGrad.Style) //enum GradientStyle
+ switch(aGradient.Style) //enum GradientStyle
{
case awt::GradientStyle_LINEAR:
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "LINEAR");
@@ -129,15 +128,20 @@ namespace {
default:
break;
}
- xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("startColor"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.StartColor);
- xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("endColor"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.EndColor);
- xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("angle"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.Angle);
- xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("border"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.Border);
- xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("xOffset"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.XOffset);
- xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("yOffset"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.YOffset);
- xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("startIntensity"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.StartIntensity);
- xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("endIntensity"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.EndIntensity);
- xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("stepCount"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.StepCount);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("startColor"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.StartColor);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("endColor"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.EndColor);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("angle"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.Angle);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("border"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.Border);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("xOffset"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.XOffset);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("yOffset"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.YOffset);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("startIntensity"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.StartIntensity);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("endIntensity"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.EndIntensity);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("stepCount"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.StepCount);
+ }
+ void XShapeDumper::dumpFillTransparenceGradientAsElement(awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillTransparenceGradient" ));
+ dumpGradientProperty(aTranspGrad, xmlWriter);
xmlTextWriterEndElement( xmlWriter );
}
commit 6b21b5f4be4547e2848e1b292d812abcbda842f4
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Wed Jun 6 02:52:34 2012 +0200
Added dumping [property] FillTransparenceGradient
Change-Id: I548059675801ee6c85111398836d5122525532db
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 4b77fb7..c77e484 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -31,6 +31,7 @@
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/awt/Gradient.hpp>
#ifndef ChartViewDumper_hxx
#define ChartViewDumper_hxx
@@ -47,6 +48,8 @@ private:
void dumpFillColorAsAttribute(sal_Int32 aColor, xmlTextWriterPtr xmlWriter);
void dumpFillTransparenceAsAttribute(sal_Int32 aTransparence, xmlTextWriterPtr xmlWriter);
void dumpFillTransparenceGradientNameAsAttribute(rtl::OUString aTranspGradName, xmlTextWriterPtr xmlWriter);
+ void dumpFillTransparenceGradientAsElement(com::sun::star::awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter);
+
void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
void dumpSizeAsAttribute(const com::sun::star::awt::Size& rSize, xmlTextWriterPtr xmlWriter);
void dumpShapeDescriptorAsAttribute( com::sun::star::uno::Reference< com::sun::star::drawing::XShapeDescriptor > xDescr, xmlTextWriterPtr xmlWriter );
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 55bfc6f..7cd0892 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -102,6 +102,45 @@ namespace {
rtl::OUStringToOString(aTranspGradName, RTL_TEXTENCODING_UTF8).getStr());
}
+ void XShapeDumper::dumpFillTransparenceGradientAsElement(awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillTransparenceGradient" ));
+
+ switch(aTranspGrad.Style) //enum GradientStyle
+ {
+ case awt::GradientStyle_LINEAR:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "LINEAR");
+ break;
+ case awt::GradientStyle_AXIAL:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "AXIAL");
+ break;
+ case awt::GradientStyle_RADIAL:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "RADIAL");
+ break;
+ case awt::GradientStyle_ELLIPTICAL:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "ELLIPTICAL");
+ break;
+ case awt::GradientStyle_SQUARE:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "SQUARE");
+ break;
+ case awt::GradientStyle_RECT:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "RECT");
+ break;
+ default:
+ break;
+ }
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("startColor"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.StartColor);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("endColor"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.EndColor);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("angle"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.Angle);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("border"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.Border);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("xOffset"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.XOffset);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("yOffset"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.YOffset);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("startIntensity"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.StartIntensity);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("endIntensity"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.EndIntensity);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("stepCount"), "%" SAL_PRIdINT32, (sal_Int32) aTranspGrad.StepCount);
+ xmlTextWriterEndElement( xmlWriter );
+ }
+
void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -180,6 +219,12 @@ namespace {
if(anotherAny >>= aTranspGradName)
dumpFillTransparenceGradientNameAsAttribute(aTranspGradName, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("FillTransparenceGradient");
+ awt::Gradient aTranspGrad;
+ if(anotherAny >>= aTranspGrad)
+ dumpFillTransparenceGradientAsElement(aTranspGrad, xmlWriter);
+ }
}
#if DEBUG_DUMPER
More information about the Libreoffice-commits
mailing list