summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJacobo Aragunde Pérez <jaragunde@igalia.com>2014-05-12 11:46:50 +0200
committerJacobo Aragunde Pérez <jaragunde@igalia.com>2014-05-13 10:28:54 +0200
commite8679367c9020c22a787f441c4d5a43647986e0f (patch)
tree347698f62e231a5dc69ba42bec0869a02eb60ade /sw
parentac9f7c8d1abffe882093f93ea70dc5e31d28a7a2 (diff)
ooxml: Preserve shape 3d effects: material
Shapes 3D effects can specify a material like in the following example: <a:sp3d prstMaterial="metal" z="488950" /> This patch preserves the prstMaterial attribute in the sp3d tag using the shape grab bag and modifies an existing unit test to add this check. Change-Id: I7be2dbbcc7e599d5f0fb8fa53ec1d180c18d8ebd
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/shape-3d-effect-preservation.docxbin18317 -> 19676 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx15
2 files changed, 13 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/shape-3d-effect-preservation.docx b/sw/qa/extras/ooxmlexport/data/shape-3d-effect-preservation.docx
index dd4a522aad12..1e361bd4e4ad 100644
--- a/sw/qa/extras/ooxmlexport/data/shape-3d-effect-preservation.docx
+++ b/sw/qa/extras/ooxmlexport/data/shape-3d-effect-preservation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index 1bee43eaabf9..3a6782cea8cc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -1191,7 +1191,7 @@ DECLARE_OOXMLEXPORT_TEST(testShape3DEffectPreservation, "shape-3d-effect-preserv
"wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d",
"z", "488950");
- // second shape: extrusion with theme color, no camera or light rotation
+ // second shape: extrusion with theme color, no camera or light rotation, metal material
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:scene3d/a:camera",
"prst", "isometricLeftDown");
@@ -1211,12 +1211,18 @@ 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",
"extrusionH", "25400");
+ 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");
- // third shape: colored countour and top and bottom bevel
+ // 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/"
"wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d",
"contourW", "50800");
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",
+ "prstMaterial", "plastic");
+ 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:bevelT",
"w", "139700");
assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
@@ -1231,6 +1237,11 @@ 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");
+
+ // fourth shape: wireframe
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d",
+ "prstMaterial", "legacyWireframe");
}
DECLARE_OOXMLEXPORT_TEST(fdo77719, "fdo77719.docx")