sd/source/filter/eppt/pptx-epptooxml.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
New commits: commit d5348dd66209697138529e41dd63ee17eff71b3c Author: Sarper Akdemir <[email protected]> AuthorDate: Mon Jun 28 13:29:23 2021 +0300 Commit: Jan Holesovsky <[email protected]> CommitDate: Wed Jun 30 09:53:57 2021 +0200 tdf#59323 tdf#142228 pptx export: fix datetime footers backwards compatibility Versions before 166671f4aa19deec47c10a220ae1d29fa57faa93 do not import the datetime field as expected if there's no text in the datetime field. To compensate that, added placeholder text "Date" inside them. Fixes regression from: 25ae0de974befb9c279936046056a850d77e0dca tdf#59323: pptx export: add support for slide footers Change-Id: I8e35102bc0bb9a2e540cfdd59fb0dc2a0b23f185 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118009 Reviewed-by: Jan Holesovsky <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index e3619e8ce96b..5e93fbb446bf 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1613,6 +1613,10 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody( bool bIsDateTimeFixed = false; xPagePropSet->getPropertyValue("IsDateTimeFixed") >>= bIsDateTimeFixed; + // Ideally "Date" should be replaced with the formatted date text + // but since variable datetime overrides the text, this seems fine for now. + OUString aDateTimeText = "Date"; + if(ePageType != LAYOUT && !bIsDateTimeFixed) { sal_Int32 nDateTimeFormat = 0; @@ -1632,18 +1636,18 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody( { OString aUUID(comphelper::xml::generateGUIDString()); mpFS->startElementNS(XML_a, XML_fld, XML_id, aUUID.getStr(), XML_type, aDateTimeType.toUtf8()); - mpFS->endElementNS(XML_a, XML_fld); } else { - OUString aDateTimeText; xPagePropSet->getPropertyValue("DateTimeText") >>= aDateTimeText; mpFS->startElementNS(XML_a, XML_r); - mpFS->startElementNS(XML_a, XML_t); - mpFS->writeEscaped(aDateTimeText); - mpFS->endElementNS(XML_a, XML_t); - mpFS->endElementNS(XML_a, XML_r); } + + mpFS->startElementNS(XML_a, XML_t); + mpFS->writeEscaped(aDateTimeText); + mpFS->endElementNS(XML_a, XML_t); + + mpFS->endElementNS(XML_a, bIsDateTimeFixed ? XML_r : XML_fld); break; } default: _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
