summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJacobo Aragunde Pérez <jaragunde@igalia.com>2014-05-06 12:45:54 +0200
committerJacobo Aragunde Pérez <jaragunde@igalia.com>2014-05-06 16:32:28 +0200
commit36e22e83a1ca3106d6ef3fbb6ba066a447a65601 (patch)
tree6c51dd7865be3f57dabe33412c87294c561a51af /sw
parent1b7773cb071c7bbf60ea023551f35375b6120d4a (diff)
oox: preserve camera rotation on shape 3D effects.
Camera options in shape 3D effects can have rotation settings like in the following example: <a:camera prst="perspectiveRelaxedModerately" zoom="150000"> <a:rot lat="19490639" lon="0" rev="12900001"/> </a:camera> This patch preserves the a:rot tag and its attributes using the shape grab bag. We created the class Scene3DRotationPropertiesContext to be piled on top of a Scene3DPropertiesContext and process the contents of the child item. It also adds a unit test for this case. Change-Id: Id6bf58ad05fe5b49061619b6750ed0658badc9af
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 5bb9a2170639..e88d320996e6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -1158,11 +1158,23 @@ DECLARE_OOXMLEXPORT_TEST(testShape3DEffectPreservation, "shape-3d-effect-preserv
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
"wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera",
"zoom", "150000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera/a:rot",
+ "lat", "19490639");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera/a:rot",
+ "lon", "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera/a:rot",
+ "rev", "12900001");
// second shape
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");
+ 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/a:rot",
+ 0);
}
DECLARE_OOXMLEXPORT_TEST(fdo77719, "fdo77719.docx")