[Libreoffice-commits] .: Branch 'feature/gsoc_test_improvements' - 3 commits - drawinglayer/inc drawinglayer/source
Artur Dorda
adorda at kemper.freedesktop.org
Sat Jun 9 17:59:35 PDT 2012
drawinglayer/inc/drawinglayer/XShapeDumper.hxx | 7 ++
drawinglayer/source/dumper/XShapeDumper.cxx | 66 +++++++++++++++++++++++++
2 files changed, 73 insertions(+)
New commits:
commit ec04b67ba07599e30e2d4f763005120acc957f70
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Sun Jun 10 02:59:23 2012 +0200
Added dumping ShadowXDistance & ShadowYDistance properties
Change-Id: Ic9be7c648c9cc0fb7cc2c7869e7efab9f6d782cd
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 9c5537c..54f0364 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -144,6 +144,8 @@ private:
void dumpShadowAsAttribute(sal_Bool bShadow, xmlTextWriterPtr xmlWriter);
void dumpShadowColorAsAttribute(sal_Int32 aShadowColor, xmlTextWriterPtr xmlWriter);
void dumpShadowTransparenceAsAttribute(sal_Int32 aShadowTransparence, xmlTextWriterPtr xmlWriter);
+ void dumpShadowXDistanceAsAttribute(sal_Int32 aShadowXDistance, xmlTextWriterPtr xmlWriter);
+ void dumpShadowYDistanceAsAttribute(sal_Int32 aShadowYDistance, xmlTextWriterPtr xmlWriter);
// XShape.idl
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 a47d9d1..f6626e1 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -849,6 +849,16 @@ namespace {
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowTransparence"), "%" SAL_PRIdINT32, aShadowTransparence);
}
+ void XShapeDumper::dumpShadowXDistanceAsAttribute(sal_Int32 aShadowXDistance, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowXDistance"), "%" SAL_PRIdINT32, aShadowXDistance);
+ }
+
+ void XShapeDumper::dumpShadowYDistanceAsAttribute(sal_Int32 aShadowYDistance, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowYDistance"), "%" SAL_PRIdINT32, aShadowYDistance);
+ }
+
// --------------------------------
// ---------- XShape.idl ----------
// --------------------------------
@@ -1331,6 +1341,18 @@ namespace {
if(anotherAny >>= aShadowTransparence)
dumpShadowTransparenceAsAttribute(aShadowTransparence, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("ShadowXDistance");
+ sal_Int32 aShadowXDistance;
+ if(anotherAny >>= aShadowXDistance)
+ dumpShadowXDistanceAsAttribute(aShadowXDistance, xmlWriter);
+ }
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("ShadowYDistance");
+ sal_Int32 aShadowYDistance;
+ if(anotherAny >>= aShadowYDistance)
+ dumpShadowYDistanceAsAttribute(aShadowYDistance, xmlWriter);
+ }
}
#if DEBUG_DUMPER
commit 1082fa7a7cd4c2e5c28490562cc5a288b3e2f259
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Sun Jun 10 02:57:04 2012 +0200
Added dumping ShadowColor & ShadowTransparence properties
Change-Id: I8bffe821d00644f83ab15f4100031bbd4af38e8e
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 9596eaf..9c5537c 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -142,6 +142,8 @@ private:
// ShadowProperties.idl
void dumpShadowAsAttribute(sal_Bool bShadow, xmlTextWriterPtr xmlWriter);
+ void dumpShadowColorAsAttribute(sal_Int32 aShadowColor, xmlTextWriterPtr xmlWriter);
+ void dumpShadowTransparenceAsAttribute(sal_Int32 aShadowTransparence, xmlTextWriterPtr xmlWriter);
// XShape.idl
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 0b1888e..a47d9d1 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -827,9 +827,9 @@ namespace {
}
}
- // ----------------------------------------
- // ---------- TextProperties.idl ----------
- // ----------------------------------------
+ // ------------------------------------------
+ // ---------- ShadowProperties.idl ----------
+ // ------------------------------------------
void XShapeDumper::dumpShadowAsAttribute(sal_Bool bShadow, xmlTextWriterPtr xmlWriter)
{
@@ -839,6 +839,16 @@ namespace {
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadow"), "%s", "false");
}
+ void XShapeDumper::dumpShadowColorAsAttribute(sal_Int32 aShadowColor, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowColor"), "%" SAL_PRIdINT32, aShadowColor);
+ }
+
+ void XShapeDumper::dumpShadowTransparenceAsAttribute(sal_Int32 aShadowTransparence, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowTransparence"), "%" SAL_PRIdINT32, aShadowTransparence);
+ }
+
// --------------------------------
// ---------- XShape.idl ----------
// --------------------------------
@@ -1309,6 +1319,18 @@ namespace {
if(anotherAny >>= bShadow)
dumpShadowAsAttribute(bShadow, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("ShadowColor");
+ sal_Int32 aShadowColor;
+ if(anotherAny >>= aShadowColor)
+ dumpShadowColorAsAttribute(aShadowColor, xmlWriter);
+ }
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("ShadowTransparence");
+ sal_Int32 aShadowTransparence;
+ if(anotherAny >>= aShadowTransparence)
+ dumpShadowTransparenceAsAttribute(aShadowTransparence, xmlWriter);
+ }
}
#if DEBUG_DUMPER
commit a6a1be905ede3ed5366026694f0323f33e8ab39b
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Sun Jun 10 02:52:04 2012 +0200
Start of dumping ShadowProperties service. Added dumping Shadow property
Change-Id: I78f484881dcd846d23d68f7651ac1069f5477a91
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 3d37bd7..9596eaf 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -140,6 +140,9 @@ private:
void dumpTextAnimationStopInsideAsAttribute(sal_Bool bTextAnimationStopInside, xmlTextWriterPtr xmlWriter);
void dumpTextWritingModeAsAttribute(com::sun::star::text::WritingMode eWritingMode, xmlTextWriterPtr xmlWriter);
+ // ShadowProperties.idl
+ void dumpShadowAsAttribute(sal_Bool bShadow, xmlTextWriterPtr xmlWriter);
+
// XShape.idl
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 8f86d5a..0b1888e 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -827,6 +827,18 @@ namespace {
}
}
+ // ----------------------------------------
+ // ---------- TextProperties.idl ----------
+ // ----------------------------------------
+
+ void XShapeDumper::dumpShadowAsAttribute(sal_Bool bShadow, xmlTextWriterPtr xmlWriter)
+ {
+ if(bShadow)
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadow"), "%s", "true");
+ else
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadow"), "%s", "false");
+ }
+
// --------------------------------
// ---------- XShape.idl ----------
// --------------------------------
@@ -1289,6 +1301,16 @@ namespace {
}
}
+ else if(xServiceInfo->supportsService("com.sun.star.drawing.ShadowProperties"))
+ {
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("Shadow");
+ sal_Bool bShadow;
+ if(anotherAny >>= bShadow)
+ dumpShadowAsAttribute(bShadow, xmlWriter);
+ }
+ }
+
#if DEBUG_DUMPER
sal_Int32 nServices = aServiceNames.getLength();
for (sal_Int32 i = 0; i < nServices; ++i)
More information about the Libreoffice-commits
mailing list