summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2018-07-15 19:36:00 +0800
committerMark Hung <marklh9@gmail.com>2018-07-18 14:56:19 +0200
commit70674228f3afd1019da7314b368a121a9afaa5d2 (patch)
treecb6437c91121ae443eaf9e064f1ba09512086b08 /sd/qa
parent6af1637d0cf85566ca8482cc284669c4968ae977 (diff)
tdf#118768 fix pptx export of put on the brake animation.
1. Convert to, by, from based on attribute name for Animate. 2. Export auto reverse (autoRev) attribute. Change-Id: I11ae9997de29a5b0992889eed2eb58d48d81fbb5 Reviewed-on: https://gerrit.libreoffice.org/57554 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'sd/qa')
-rwxr-xr-xsd/qa/unit/data/odp/tdf118768-brake.odpbin0 -> 10742 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx23
2 files changed, 23 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/tdf118768-brake.odp b/sd/qa/unit/data/odp/tdf118768-brake.odp
new file mode 100755
index 000000000000..1f3abbcc0d58
--- /dev/null
+++ b/sd/qa/unit/data/odp/tdf118768-brake.odp
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 6ca55d72a4e3..b18810b232db 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -146,6 +146,7 @@ public:
void testTdf104786();
void testTdf104789();
void testOpenDocumentAsReadOnly();
+ void testTdf118768();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
@@ -213,6 +214,7 @@ public:
CPPUNIT_TEST(testTdf104786);
CPPUNIT_TEST(testTdf104789);
CPPUNIT_TEST(testOpenDocumentAsReadOnly);
+ CPPUNIT_TEST(testTdf118768);
CPPUNIT_TEST_SUITE_END();
@@ -1694,6 +1696,27 @@ void SdOOXMLExportTest2::testOpenDocumentAsReadOnly()
xDocShRef->DoClose();
}
+void SdOOXMLExportTest2::testTdf118768()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf118768-brake.odp"), ODP);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+ xDocShRef->DoClose();
+
+ // check that transition attribute didn't change from 'out' to 'in'
+ xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ assertXPath(pXmlDocContent, "//p:anim[1]", "from", "(-#ppt_w/2)");
+ assertXPath(pXmlDocContent, "//p:anim[1]", "to", "(#ppt_x)");
+ assertXPath(pXmlDocContent, "//p:anim[2]", "from", "0");
+
+ assertXPath(pXmlDocContent, "//p:anim[2]", "to", "-1");
+ assertXPath(pXmlDocContent, "//p:anim[2]/p:cBhvr/p:cTn", "autoRev", "1");
+
+ assertXPath(pXmlDocContent, "//p:anim[3]", "by", "(#ppt_h/3+#ppt_w*0.1)");
+ assertXPath(pXmlDocContent, "//p:anim[3]/p:cBhvr/p:cTn", "autoRev", "1");
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
CPPUNIT_PLUGIN_IMPLEMENT();