diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-08-27 14:38:18 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-08-27 17:09:29 +0200 |
commit | 4bf04dea9afb30a9395e80b07a81d1908937ee8b (patch) | |
tree | 2c118bcecdc4f4937f8e70b9272c53bb537a99a4 /sw/qa/extras | |
parent | 3608de9a3647294361c64b923b1ae413ad9755df (diff) |
tdf#128106 sw: copy bookmarks at start if whole node is copied
The CrossRefHeadingBookmarks are always at index 0 so copy them if the
selection also starts at index 0.
This happens in SwDoc::SplitDoc() for the 2nd etc. chapter.
Change-Id: I4765d497e65d3c8257f7eab59b8ba2088688967e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121147
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter3.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index 64e3c8fb61cb..c283f3022803 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -2664,7 +2664,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128106) CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_BOOKMARK), fields[1]->GetField()->GetSubType()); CPPUNIT_ASSERT( static_cast<SwGetRefField const*>(fields[1]->GetField())->IsRefToHeadingCrossRefBookmark()); - // CPPUNIT_ASSERT_EQUAL(OUString("Chapter 2"), static_cast<SwGetRefField const*>(fields[1]->GetField())->GetPar2()); + CPPUNIT_ASSERT_EQUAL(OUString("Chapter 2"), + static_cast<SwGetRefField const*>(fields[1]->GetField())->GetPar2()); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_BOOKMARK), fields[2]->GetField()->GetSubType()); CPPUNIT_ASSERT_EQUAL(OUString("Bookmarkchapter1"), static_cast<SwGetRefField const*>(fields[2]->GetField())->GetSetRefName()); @@ -2683,7 +2684,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128106) CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_BOOKMARK), fields[5]->GetField()->GetSubType()); CPPUNIT_ASSERT( static_cast<SwGetRefField const*>(fields[5]->GetField())->IsRefToHeadingCrossRefBookmark()); - // CPPUNIT_ASSERT_EQUAL(OUString("Chapter 2"), static_cast<SwGetRefField const*>(fields[5]->GetField())->GetPar2()); + CPPUNIT_ASSERT_EQUAL(OUString("Chapter 2"), + static_cast<SwGetRefField const*>(fields[5]->GetField())->GetPar2()); tempDir.EnableKillingFile(); } |