diff options
Diffstat (limited to 'oox/qa/unit/export.cxx')
-rw-r--r-- | oox/qa/unit/export.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx index 60e20e2d933a..91b8d7608c24 100644 --- a/oox/qa/unit/export.cxx +++ b/oox/qa/unit/export.cxx @@ -590,6 +590,27 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_subpath) assertXPath(pXmlDoc, "//a:pathLst/a:path[4]", "w", "80"); assertXPath(pXmlDoc, "//a:pathLst/a:path[4]", "h", "80"); } + +CPPUNIT_TEST_FIXTURE(Test, testTdf100391TextAreaRect) +{ + // The document has a custom shape of type "non-primitive" to trigger the custGeom export + OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf100391_TextAreaRect.odp"; + // When saving to PPTX the textarea rect was set to default instead of using the actual area + loadAndSave(aURL, "Impress Office Open XML"); + + // Verify the markup. Without fix the values were l="l", t="t", r="r", b="b" + std::unique_ptr<SvStream> pStream = parseExportStream(getTempFile(), "ppt/slides/slide1.xml"); + xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get()); + assertXPath(pXmlDoc, "//a:custGeom/a:rect", "l", "textAreaLeft"); + assertXPath(pXmlDoc, "//a:custGeom/a:rect", "t", "textAreaTop"); + assertXPath(pXmlDoc, "//a:custGeom/a:rect", "r", "textAreaRight"); + assertXPath(pXmlDoc, "//a:custGeom/a:rect", "b", "textAreaBottom"); + // The values are calculated in guides, for example + assertXPath(pXmlDoc, "//a:custGeom/a:gdLst/a:gd[1]", "name", "textAreaLeft"); + assertXPath(pXmlDoc, "//a:custGeom/a:gdLst/a:gd[1]", "fmla", "*/ 1440000 w 2880000"); + // The test reflects the state of Apr 2022. It needs to be adapted when export of handles and + // guides is implemented. +} } CPPUNIT_PLUGIN_IMPLEMENT(); |