diff options
-rw-r--r-- | sw/qa/extras/uiwriter/data2/tdf125916.docx | bin | 0 -> 40570 bytes | |||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter2.cxx | 17 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentRedlineManager.cxx | 2 |
3 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data2/tdf125916.docx b/sw/qa/extras/uiwriter/data2/tdf125916.docx Binary files differnew file mode 100644 index 000000000000..6e1350da9c4a --- /dev/null +++ b/sw/qa/extras/uiwriter/data2/tdf125916.docx diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx index 1be95f8a0ea5..b283af27b24c 100644 --- a/sw/qa/extras/uiwriter/uiwriter2.cxx +++ b/sw/qa/extras/uiwriter/uiwriter2.cxx @@ -1268,6 +1268,23 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf125881_redline_list_level) CPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty<sal_Int16>(getParagraph(8), "NumberingLevel")); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf125916_redline_restart_numbering) +{ + load(DATA_DIRECTORY, "tdf125916.docx"); + + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + + SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); + IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess()); + rIDRA.AcceptAllRedline(true); + + // check unnecessary numbering + uno::Reference<beans::XPropertySet> xProps(getParagraph(3), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_MESSAGE("first paragraph after the first deletion: erroneous numbering", + !xProps->getPropertyValue("NumberingRules").hasValue()); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf125310) { load(DATA_DIRECTORY, "tdf125310.fodt"); diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 8548768793eb..5142be7c8d85 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -3046,6 +3046,8 @@ void DocumentRedlineManager::FinalizeImport() // tdf#118699 remove numbering of the first deleted list item const SwPaM aPam( *pStt, *pStt ); m_rDoc.DelNumRules( aPam ); + // tdf#125916 copy style + pDelNode->ChgFormatColl( pTextNode->GetTextColl() ); } else if ( pDelNode->GetNumRule() != pTextNode->GetNumRule() ) { |