From a2baea7faff31d26459dab3668a39eae85e4991b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 11:27:30 +0200 Subject: Adding upstream version 4:24.2.1. Signed-off-by: Daniel Baumann --- .../data/tdf134401_ExportAutoGrowToTextWordWrap.odp | Bin 0 -> 18925 bytes oox/qa/unit/export.cxx | 17 +++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 oox/qa/unit/data/tdf134401_ExportAutoGrowToTextWordWrap.odp (limited to 'oox/qa') diff --git a/oox/qa/unit/data/tdf134401_ExportAutoGrowToTextWordWrap.odp b/oox/qa/unit/data/tdf134401_ExportAutoGrowToTextWordWrap.odp new file mode 100644 index 0000000000..9fcebfe0f4 Binary files /dev/null and b/oox/qa/unit/data/tdf134401_ExportAutoGrowToTextWordWrap.odp differ diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx index 415c5fe8d0..aa9690efdb 100644 --- a/oox/qa/unit/export.cxx +++ b/oox/qa/unit/export.cxx @@ -1345,6 +1345,23 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf157289CircularArrowExport) assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo[1]"_ostr, "wR"_ostr, "6750"); assertXPath(pXmlDoc, "//a:pathLst/a:path/a:arcTo[1]"_ostr, "hR"_ostr, "6750"); } + +CPPUNIT_TEST_FIXTURE(Test, testTdf134401_ExportAutoGrowToTextWordWrap) +{ + // pptx doesn't have autoGrowWidth and autoGrowHeight, but it does have TextWordWrap + // which is similar. If autoGrowWidth and autoGrowHeight are set in the document, + // then they are exported to pptx as TextWordWrap = "none". + loadFromFile(u"tdf134401_ExportAutoGrowToTextWordWrap.odp"); + save("Impress Office Open XML"); + + // There are 2 shapes in the test file. + // The 1. shape is without autoGrowWidth/Height. + // The 2. shape is with autoGrowWidth/Height. + // Check if wrap="none" is exported for shape 2, but no wrap is exported for shape 1. + xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); + assertXPathNoAttribute(pXmlDoc, "//p:sp[1]/p:txBody/a:bodyPr"_ostr, "wrap"_ostr); + assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:bodyPr"_ostr, "wrap"_ostr, "none"); +} } CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit v1.2.3