summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJacobo Aragunde Pérez <jaragunde@igalia.com>2014-05-12 19:13:06 +0200
committerJacobo Aragunde Pérez <jaragunde@igalia.com>2014-05-13 10:28:55 +0200
commit4b4f7e17ad5571482111f1574f7e4b313531cfde (patch)
tree18851e00fec5a2946833a64c8f327c5c67efcf25 /sw
parente8679367c9020c22a787f441c4d5a43647986e0f (diff)
ooxml: Preserve shape 3d effects: extrusion and contour colors
Shapes 3D effects can specify colors for extrusion and contours like in the following example: <a:sp3d extrusionH="25400" prstMaterial="metal"> <a:extrusionClr> <a:schemeClr val="accent5"> <a:lumMod val="40000"/> <a:lumOff val="60000"/> </a:schemeClr> </a:extrusionClr> <a:contourClr> <a:srgbClr val="3333FF"/> </a:contourClr> </a:sp3d> Colors can be theme-defined or set in RGB and can contain transformations. This patch preserves all the color information using the shape grab bag and modifies an existing unit test to add this check. Change-Id: Ida168affd4ca2135d0bd8f97135dc1cd1e74165a
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index 3a6782cea8cc..7996d645a011 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -1214,6 +1214,15 @@ DECLARE_OOXMLEXPORT_TEST(testShape3DEffectPreservation, "shape-3d-effect-preserv
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
"wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d",
"prstMaterial", "metal");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:extrusionClr/a:schemeClr",
+ "val", "accent5");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:extrusionClr/a:schemeClr/a:lumMod",
+ "val", "40000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:extrusionClr/a:schemeClr/a:lumOff",
+ "val", "60000");
// third shape: colored countour and top and bottom bevel, plastic material
assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
@@ -1237,6 +1246,9 @@ DECLARE_OOXMLEXPORT_TEST(testShape3DEffectPreservation, "shape-3d-effect-preserv
assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
"wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:bevelB",
"prst", "relaxedInset");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:contourClr/a:srgbClr",
+ "val", "3333ff");
// fourth shape: wireframe
assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"