diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-01-15 15:26:43 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-01-15 16:45:45 +0100 |
commit | cb890ae43bacd2be24bc74fad2e2e5cce8910995 (patch) | |
tree | 858c951d037b4582948a3d180e7b3b29407bdf1f /sd | |
parent | f5ccfd60c2c5dab392d58870fbd079a6286bc239 (diff) |
oox: export Math objects to PPTX files
These hit the assert in lcl_StoreOwnAsOOXML now so better implement some
export.
Change-Id: I10c005a547e8a85f2a82198a49f9a03fc46a61d7
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 102a3f4cd69f..818ea21afb80 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -141,6 +141,7 @@ public: void testFdo90607(); void testTdf91378(); void testBnc822341(); + void testMathObject(); void testTdf80224(); void testTdf92527(); @@ -180,6 +181,7 @@ public: CPPUNIT_TEST(testTdf91378); CPPUNIT_TEST(testBnc822341); + CPPUNIT_TEST(testMathObject); CPPUNIT_TEST(testTdf80224); CPPUNIT_TEST(testExportTransitionsPPTX); @@ -208,10 +210,12 @@ public: { "v", "urn:schemas-microsoft-com:vml" }, { "a", "http://schemas.openxmlformats.org/drawingml/2006/main" }, { "c", "http://schemas.openxmlformats.org/drawingml/2006/chart" }, + { "m", "http://schemas.openxmlformats.org/officeDocument/2006/math" }, { "pic", "http://schemas.openxmlformats.org/drawingml/2006/picture" }, { "wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" }, { "p", "http://schemas.openxmlformats.org/presentationml/2006/main" }, { "w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main" }, + { "a14", "http://schemas.microsoft.com/office/drawing/2010/main" }, { "wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape" }, { "wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" }, }; @@ -1151,6 +1155,30 @@ void SdExportTest::testBnc822341() xDocShRef->DoClose(); } +void SdExportTest::testMathObject() +{ + // Check import / export of math object + ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("sd/qa/unit/data/odp/math.odp"), ODP); + utl::TempFile tempFile1; + xDocShRef = saveAndReload(xDocShRef, PPTX, &tempFile1); + + // Export an LO specific ole object (imported from an ODP document) + { + xmlDocPtr pXmlDocContent = parseExport(tempFile1, "ppt/slides/slide1.xml"); + assertXPath(pXmlDocContent, + "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice", + "Requires", + "a14"); + assertXPathContent(pXmlDocContent, + "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice/p:sp/p:txBody/a:p/a14:m/m:oMath/m:r[1]/m:t", + "a"); + + // TODO can't import yet + } + + xDocShRef->DoClose(); +} + void SdExportTest::testBulletMarginAndIndentation() { ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/bulletMarginAndIndent.pptx"), PPTX ); |