diff options
Diffstat (limited to 'sw/qa/extras/uiwriter/uiwriter.cxx')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index d01b4bbcfb2a..7803895f2fba 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -430,7 +430,8 @@ void SwUiWriterTest::testBookmarkCopy() rIDCO.InsertString(aPaM, "bar"); aPaM.SetMark(); aPaM.MovePara(GoCurrPara, fnParaStart); - rIDMA.makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK); + rIDMA.makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK, + ::sw::mark::InsertMode::New); aPaM.Exchange(); aPaM.DeleteMark(); rIDCO.SplitNode(*aPaM.GetPoint(), false); @@ -1135,7 +1136,8 @@ void SwUiWriterTest::testBookmarkUndo() IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); SwPaM aPaM( SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1) ); - pMarkAccess->makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK); + pMarkAccess->makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK, + ::sw::mark::InsertMode::New); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount()); rUndoManager.Undo(); CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount()); @@ -1287,7 +1289,9 @@ void SwUiWriterTest::testTdf63214() aPaM.SetMark(); aPaM.Move(fnMoveForward, GoInContent); //Inserting a crossRefBookmark - pMarkAccess->makeMark(aPaM, "Bookmark", IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK); + pMarkAccess->makeMark(aPaM, "Bookmark", + IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK, + ::sw::mark::InsertMode::New); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount()); } //moving cursor to the end of paragraph @@ -1316,7 +1320,8 @@ void SwUiWriterTest::testTdf51741() IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); SwPaM aPaM( SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1) ); //Modification 1 - pMarkAccess->makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK); + pMarkAccess->makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK, + ::sw::mark::InsertMode::New); CPPUNIT_ASSERT(pWrtShell->IsModified()); pWrtShell->ResetModified(); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount()); @@ -3439,13 +3444,17 @@ void SwUiWriterTest::testTdf94804() SwPaM* pCrsr = pDoc->GetEditShell()->GetCursor(); IDocumentMarkAccess* pIDMAccess(pDoc->getIDocumentMarkAccess()); //make first bookmark, CROSSREF_HEADING, with *empty* name - sw::mark::IMark* pMark1(pIDMAccess->makeMark(*pCrsr, "", IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK)); + sw::mark::IMark* pMark1(pIDMAccess->makeMark(*pCrsr, "", + IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK, + ::sw::mark::InsertMode::New)); //get the new(autogenerated) bookmark name rtl::OUString bookmark1name = pMark1->GetName(); //match the bookmark name, it should be like "__RefHeading__**" CPPUNIT_ASSERT(bookmark1name.match("__RefHeading__")); //make second bookmark, CROSSREF_NUMITEM, with *empty* name - sw::mark::IMark* pMark2(pIDMAccess->makeMark(*pCrsr, "", IDocumentMarkAccess::MarkType::CROSSREF_NUMITEM_BOOKMARK)); + sw::mark::IMark* pMark2(pIDMAccess->makeMark(*pCrsr, "", + IDocumentMarkAccess::MarkType::CROSSREF_NUMITEM_BOOKMARK, + ::sw::mark::InsertMode::New)); //get the new(autogenerated) bookmark name rtl::OUString bookmark2name = pMark2->GetName(); //match the bookmark name, it should be like "__RefNumPara__**" @@ -3714,7 +3723,9 @@ void SwUiWriterTest::testTdf96479() SwPaM aPaM(aIdx); IDocumentMarkAccess &rIDMA = *pDoc->getIDocumentMarkAccess(); sw::mark::IMark *pMark = - rIDMA.makeMark(aPaM, "original", IDocumentMarkAccess::MarkType::BOOKMARK); + rIDMA.makeMark(aPaM, "original", + IDocumentMarkAccess::MarkType::BOOKMARK, + ::sw::mark::InsertMode::New); CPPUNIT_ASSERT(!pMark->IsExpanded()); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getBookmarksCount()); |