sw/qa/extras/ooxmlexport/ooxmlexport17.cxx | 2 -- sw/source/filter/ww8/docxattributeoutput.cxx | 4 +++- sw/source/filter/ww8/docxexport.cxx | 9 ++++++++- 3 files changed, 11 insertions(+), 4 deletions(-)
New commits: commit a73daa562c82a5c058a217ba80035da08d40451d Author: Justin Luth <jl...@mail.com> AuthorDate: Mon Jul 11 15:27:54 2022 -0400 Commit: Justin Luth <justin_l...@sil.org> CommitDate: Tue Jul 12 20:30:42 2022 +0200 tdf#114734 docx export: save comment paragraph properties DocxExport::WriteOutliner is only called for TXT_ATN, so it is safe to change this generic-sounding function. Anything in the future that wants to save "draw" text likely also would want to save paragraph properties as well. Change-Id: Ied37670f2d3d0d6096300dbc9749c8230abfdc44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136965 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx index 07441a5d9196..496a7cfaed02 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx @@ -174,8 +174,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf132475_printField, "tdf132475_printField.docx") DECLARE_OOXMLEXPORT_TEST(testTdf114734_commentFormating, "tdf114734_commentFormating.docx") { - if (mbExported) - return; // Get the PostIt/Comment/Annotation uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); auto xFieldsAccess(xTextFieldsSupplier->getTextFields()); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index a3a91a77827e..b834f59e9eea 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1494,7 +1494,9 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar // RDF metadata for this text node. SwTextNode* pTextNode = m_rExport.m_pCurPam->GetNode().GetTextNode(); - std::map<OUString, OUString> aStatements = SwRDFHelper::getTextNodeStatements("urn:bails", *pTextNode); + std::map<OUString, OUString> aStatements; + if (pTextNode) + aStatements = SwRDFHelper::getTextNodeStatements("urn:bails", *pTextNode); if (!aStatements.empty()) { m_pSerializer->startElementNS(XML_w, XML_smartTag, diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index a31b51edda25..eddb4c2ea147 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1939,6 +1939,13 @@ sal_Int32 DocxExport::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt OUString aStr( rEditObj.GetText( n )); sal_Int32 nCurrentPos = 0; const sal_Int32 nEnd = aStr.getLength(); + + // Write paragraph properties. + AttrOutput().StartParagraphProperties(); + aAttrIter.OutParaAttr(/*bCharAttr=*/false); + SfxItemSet aParagraphMarkerProperties(m_rDoc.GetAttrPool()); + AttrOutput().EndParagraphProperties(aParagraphMarkerProperties, nullptr, nullptr, nullptr); + do { AttrOutput().StartRun( nullptr, 0 ); const sal_Int32 nNextAttr = std::min(aAttrIter.WhereNext(), nEnd); @@ -1966,7 +1973,7 @@ sal_Int32 DocxExport::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt AttrOutput().EndRun( nullptr, 0 ); } while( nCurrentPos < nEnd ); -// aAttrIter.OutParaAttr(false); + AttrOutput().EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t()); } return nParaId;