diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2023-08-25 15:05:42 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2023-08-25 20:50:00 +0200 |
commit | 6e042b1e26bedcc8d8bdcf105ec750b03665c7b0 (patch) | |
tree | 2e6fd21816e2116f4b7aa416354f1411c1cdc934 | |
parent | 3f7e9b2ea67a8de9ad9dd819ec2eb91e8180af95 (diff) |
tdf#150316 Fix missing first line indent in pptx export
Change-Id: Ib2cac800b151823b77e44831100c2de9bbda8a16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156107
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
-rw-r--r-- | oox/source/export/drawingml.cxx | 2 | ||||
-rw-r--r-- | sd/qa/unit/data/odp/tdf150316.odp | bin | 0 -> 13467 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml1.cxx | 9 |
3 files changed, 10 insertions, 1 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 1230517eda81..98496aa2c1f8 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -3440,7 +3440,7 @@ bool DrawingML::WriteParagraphProperties(const Reference<XTextContent>& rParagra mpFS->startElementNS( XML_a, nElement, XML_lvl, sax_fastparser::UseIf(OString::number(nLevel), nLevel > 0), XML_marL, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nParaLeftMargin)), nParaLeftMargin > 0), - XML_indent, sax_fastparser::UseIf(OString::number(!bForceZeroIndent ? oox::drawingml::convertHmmToEmu(nParaFirstLineIndent) : 0), (bForceZeroIndent || (nParaFirstLineIndent != 0))), + XML_indent, sax_fastparser::UseIf(OString::number((bForceZeroIndent && nParaFirstLineIndent == 0) ? 0 : oox::drawingml::convertHmmToEmu(nParaFirstLineIndent)), (bForceZeroIndent || nParaFirstLineIndent != 0)), XML_algn, GetAlignment( nAlignment ), XML_defTabSz, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nParaDefaultTabSize)), nParaDefaultTabSize > 0), XML_rtl, sax_fastparser::UseIf(ToPsz10(bRtl), bRtl)); diff --git a/sd/qa/unit/data/odp/tdf150316.odp b/sd/qa/unit/data/odp/tdf150316.odp Binary files differnew file mode 100644 index 000000000000..dab2971711f8 --- /dev/null +++ b/sd/qa/unit/data/odp/tdf150316.odp diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index 2962456ffd49..0a9f82a27e59 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -1588,6 +1588,15 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testNarrationMimeType) assertXPath(pSlideDoc, "//p:childTnLst/p:audio", "isNarration", "1"); } +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf150316) +{ + createSdImpressDoc("odp/tdf150316.odp"); + save("Impress Office Open XML"); + + xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); + assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:p/a:pPr", "indent", "-343080"); +} + CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest1, testTdf140865Wordart3D) { createSdImpressDoc("pptx/tdf140865Wordart3D.pptx"); |