[Libreoffice-commits] core.git: sw/qa writerfilter/source

Justin Luth (via logerrit) logerrit at kemper.freedesktop.org
Sat Aug 8 17:32:28 UTC 2020


 sw/qa/extras/ooxmlexport/ooxmlexport15.cxx        |    3 +++
 writerfilter/source/dmapper/DomainMapper.cxx      |    1 +
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |    1 +
 3 files changed, 5 insertions(+)

New commits:
commit 538898d6b9a70d593d9e061f83bed1bffd3987c5
Author:     Justin Luth <justin.luth at collabora.com>
AuthorDate: Thu Jul 30 09:50:27 2020 +0300
Commit:     Justin Luth <justin_luth at sil.org>
CommitDate: Sat Aug 8 19:31:50 2020 +0200

    related tdf#135216 writerfilter: don't bRemove para with field
    
    So the lovely task of building up every possible exception
    where a paragraph has content without noticed character properties
    continues...
    
    Change-Id: I1df13f1ea96866b82f44cbbedd52bb525e0d3c2d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99761
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 1700318a19dc..85e7097093d0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -108,6 +108,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135216_evenOddFooter, "tdf135216_evenOddFooter.o
     xPageStyle.set(xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
     xFooter.set(getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextLeft"));
     CPPUNIT_ASSERT_EQUAL(OUString("even page"), xFooter->getString());
+
+    // The contents of paragraph 2 should be the page number (2) located on page 1.
+    getParagraph(2, "2");
 }
 
 DECLARE_OOXMLEXPORT_TEST(testTdf133370_columnBreak, "tdf133370_columnBreak.odt")
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 911f55431cc9..1fa3d39a9b9b 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3507,6 +3507,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
             bool bRemove = (!m_pImpl->GetParaChanged() && m_pImpl->GetRemoveThisPara()) ||
                            (!m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr()
                             && !bSingleParagraphAfterRedline
+                            && !m_pImpl->GetParaHadField()
                             && !m_pImpl->GetIsDummyParaAddedForTableInSection()
                             && !( pSectionContext && pSectionContext->GetBreakType() != -1 && pContext && pContext->isSet(PROP_BREAK_TYPE) )
                             && !m_pImpl->GetIsPreviousParagraphFramed()
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index d69168ed74fc..2597f6877f34 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -664,6 +664,7 @@ public:
     /// Getter method for m_bSdt.
     bool GetSdt() const { return m_bSdt;}
     bool GetParaChanged() const { return m_bParaChanged;}
+    bool GetParaHadField() const { return m_bParaHadField; }
     bool GetRemoveThisPara() const { return m_bRemoveThisParagraph; }
 
     void deferBreak( BreakType deferredBreakType );


More information about the Libreoffice-commits mailing list