summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport8.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx4
2 files changed, 5 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index e46c3424aac3..6987e381c0d1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -2015,8 +2015,8 @@ DECLARE_OOXMLEXPORT_TEST(testTdf92157, "tdf92157.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf97417, "section_break_numbering.docx")
{
uno::Reference<beans::XPropertySet> xProps(getParagraph(1), uno::UNO_QUERY_THROW);
-// CPPUNIT_ASSERT_MESSAGE("1st page: first paragraph erroneous numbering",
-// !xProps->getPropertyValue("NumberingRules").hasValue());
+ CPPUNIT_ASSERT_MESSAGE("1st page: first paragraph erroneous numbering",
+ !xProps->getPropertyValue("NumberingRules").hasValue());
// paragraph with numbering and section break was removed by writerfilter
// but its numbering was copied to all following paragraphs
CPPUNIT_ASSERT_MESSAGE("2nd page: first paragraph missing numbering",
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 45f2764aa664..f79ad82402f6 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3281,7 +3281,9 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
&& !( pContext && pContext->isSet(PROP_BREAK_TYPE) )
&& !m_pImpl->GetIsDummyParaAddedForTableInSection()
&& !m_pImpl->GetIsPreviousParagraphFramed();
- PropertyMapPtr xContext = bRemove ? m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH) : PropertyMapPtr();
+
+ const bool bNoNumbering = bRemove || (!m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr() && bSingleParagraph);
+ PropertyMapPtr xContext = bNoNumbering ? m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH) : PropertyMapPtr();
if (xContext)
{
// tdf#97417 delete numbering of the paragraph