diff options
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 30 | ||||
-rw-r--r-- | sw/qa/extras/tiledrendering/tiledrendering.cxx | 18 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 84 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter2.cxx | 2 |
4 files changed, 67 insertions, 67 deletions
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index b25ecd8920f6..99bf4ba29c76 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -273,7 +273,7 @@ void SwLayoutWriter::testRedlineFlysInBody() SfxItemSet flySet(pDoc->GetAttrPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{}); SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR); - pWrtShell->SttDoc(false); + pWrtShell->StartOfSection(false); pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false); anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint()); flySet.Put(anchor); @@ -370,7 +370,7 @@ void SwLayoutWriter::testRedlineFlysInBody() } // anchor to 2nd (deleted) paragraph - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pWrtShell->Down(false, 1); anchor.SetType(RndStdIds::FLY_AT_CHAR); anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint()); @@ -447,7 +447,7 @@ void SwLayoutWriter::testRedlineFlysInBody() } // anchor to 3rd paragraph - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); anchor.SetType(RndStdIds::FLY_AT_CHAR); anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint()); pDoc->SetAttr(anchor, *const_cast<SwFrameFormat*>(pFly)); @@ -555,7 +555,7 @@ void SwLayoutWriter::testRedlineFlysInHeader() SfxItemSet flySet(pDoc->GetAttrPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{}); SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR); - pWrtShell->SttDoc(false); + pWrtShell->StartOfSection(false); pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false); anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint()); flySet.Put(anchor); @@ -656,7 +656,7 @@ void SwLayoutWriter::testRedlineFlysInHeader() } // anchor to 2nd (deleted) paragraph - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pWrtShell->Down(false, 1); anchor.SetType(RndStdIds::FLY_AT_CHAR); anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint()); @@ -738,7 +738,7 @@ void SwLayoutWriter::testRedlineFlysInHeader() } // anchor to 3rd paragraph - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); anchor.SetType(RndStdIds::FLY_AT_CHAR); anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint()); pDoc->SetAttr(anchor, *const_cast<SwFrameFormat*>(pFly)); @@ -862,7 +862,7 @@ void SwLayoutWriter::testRedlineFlysInFootnote() pWrtShell->SplitNode(false); pWrtShell->Insert("baz"); - pWrtShell->SttDoc(false); + pWrtShell->StartOfSection(false); CPPUNIT_ASSERT(pWrtShell->IsCursorInFootnote()); pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false); anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint()); @@ -1085,11 +1085,11 @@ void SwLayoutWriter::testRedlineFlysInFootnote() } // anchor to 3rd paragraph - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); pWrtShell->SttEndDoc(false); pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false); pWrtShell->GotoFootnoteText(); - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); anchor.SetType(RndStdIds::FLY_AT_CHAR); anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint()); pDoc->SetAttr(anchor, *const_cast<SwFrameFormat*>(pFly)); @@ -1213,7 +1213,7 @@ void SwLayoutWriter::testRedlineFlysInFlys() svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{}); SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000); flySet.Put(size); // set a size, else we get 1 char per line... - pWrtShell->SttDoc(false); + pWrtShell->StartOfSection(false); pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false); SwFormatAnchor anchor1(RndStdIds::FLY_AT_CHAR); anchor1.SetAnchor(pWrtShell->GetCursor()->GetPoint()); @@ -1229,7 +1229,7 @@ void SwLayoutWriter::testRedlineFlysInFlys() pWrtShell->Insert("ghi"); SwFormatAnchor anchor2(RndStdIds::FLY_AT_CHAR); - pWrtShell->SttDoc(false); // start of fly... + pWrtShell->StartOfSection(false); // start of fly... anchor2.SetAnchor(pWrtShell->GetCursor()->GetPoint()); flySet.Put(anchor2); SwFrameFormat const* pFly2 = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true); @@ -1391,7 +1391,7 @@ void SwLayoutWriter::testRedlineFlysInFlys() // anchor to 2nd (deleted) paragraph // also, switch the in-fly anchoring to the other fly, for additional fun! - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pWrtShell->Down(false, 1); anchor2.SetType(RndStdIds::FLY_AT_CHAR); anchor2.SetAnchor(pWrtShell->GetCursor()->GetPoint()); @@ -1524,7 +1524,7 @@ void SwLayoutWriter::testRedlineFlysInFlys() anchor1.SetAnchor(pWrtShell->GetCursor()->GetPoint()); pDoc->SetAttr(anchor1, *const_cast<SwFrameFormat*>(pFly1)); pWrtShell->GotoFly(pFly1->GetName(), FLYCNTTYPE_FRM, /*bSelFrame=*/false); - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); anchor2.SetType(RndStdIds::FLY_AT_CHAR); anchor2.SetAnchor(pWrtShell->GetCursor()->GetPoint()); pDoc->SetAttr(anchor2, *const_cast<SwFrameFormat*>(pFly2)); @@ -1689,7 +1689,7 @@ void SwLayoutWriter::testRedlineFlysAtFlys() svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{}); SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000); flySet.Put(size); // set a size, else we get 1 char per line... - pWrtShell->SttDoc(false); + pWrtShell->StartOfSection(false); pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false); SwFormatAnchor anchor1(RndStdIds::FLY_AT_CHAR); anchor1.SetAnchor(pWrtShell->GetCursor()->GetPoint()); @@ -1837,7 +1837,7 @@ void SwLayoutWriter::testRedlineFlysAtFlys() assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/Text[2]", "Portion", "az"); // anchor to 2nd (deleted) paragraph - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pWrtShell->Down(false, 1); anchor1.SetType(RndStdIds::FLY_AT_CHAR); anchor1.SetAnchor(pWrtShell->GetCursor()->GetPoint()); diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 65bfd7087058..06cd6bfa48b2 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -1139,7 +1139,7 @@ void SwTiledRenderingTest::testUndoInvalidations() // Insert a character the end of the document. SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell(); - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'c', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'c', 0); Scheduler::ProcessEventsToIdle(); @@ -1173,7 +1173,7 @@ void SwTiledRenderingTest::testUndoLimiting() // Insert a character the end of the document in the second view. SwWrtShell* pWrtShell2 = pXTextDocument->GetDocShell()->GetWrtShell(); - pWrtShell2->EndDoc(); + pWrtShell2->EndOfSection(); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'c', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'c', 0); Scheduler::ProcessEventsToIdle(); @@ -1399,9 +1399,9 @@ void SwTiledRenderingTest::testTrackChanges() ViewCallback aView; SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell(); pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(&ViewCallback::callback, &aView); - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); pWrtShell->Insert("zzz"); - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); // Get the redline just created const SwRedlineTable& rTable = pWrtShell->GetDoc()->getIDocumentRedlineAccess().GetRedlineTable(); @@ -1611,7 +1611,7 @@ void SwTiledRenderingTest::testRedlineColors() uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY); xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true)); SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell(); - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); pWrtShell->Insert("zzz"); // Assert that info about exactly one author is returned. @@ -1900,10 +1900,10 @@ void SwTiledRenderingTest::testAllTrackedChanges() SwWrtShell* pWrtShell2 = pView2->GetWrtShellPtr(); // Insert text and reject all { - pWrtShell1->SttDoc(); + pWrtShell1->StartOfSection(); pWrtShell1->Insert("hxx"); - pWrtShell2->EndDoc(); + pWrtShell2->EndOfSection(); pWrtShell2->Insert("cxx"); } @@ -1925,10 +1925,10 @@ void SwTiledRenderingTest::testAllTrackedChanges() // Insert text and accept all { - pWrtShell1->SttDoc(); + pWrtShell1->StartOfSection(); pWrtShell1->Insert("hyy"); - pWrtShell2->EndDoc(); + pWrtShell2->EndOfSection(); pWrtShell2->Insert("cyy"); } diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 6d0ba0277d11..b711a3cbbd90 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -753,7 +753,7 @@ void SwUiWriterTest::testTdf67238() CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getColumns()->getCount()); //selecting the table - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pWrtShell->SelTable(); //making the table protected pWrtShell->ProtectCells(); @@ -792,7 +792,7 @@ void SwUiWriterTest::testTdf67238() CPPUNIT_ASSERT(((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected()); CPPUNIT_ASSERT(((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected()); //moving the cursor to the starting of the document - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); //making the table [un]protected pWrtShell->SelTable(); pWrtShell->UnProtectCells(); @@ -2409,7 +2409,7 @@ void SwUiWriterTest::testTdf72788() //Make selection to remove formatting in first paragraph //[this is text //]more text - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); //Start selection pCursor->SetMark(); for (int i = 0; i < 13; i++) { @@ -2576,20 +2576,20 @@ void SwUiWriterTest::testTdf77342() SwFieldType* pField = pWrtShell->GetFieldType(0, SwFieldIds::GetRef); SwGetRefFieldType* pRefType = static_cast<SwGetRefFieldType*>(pField); //moving cursor to the starting of document - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); //inserting reference field 1 SwGetRefField aField1(pRefType, "", "", REF_FOOTNOTE, sal_uInt16(0), REF_CONTENT); pWrtShell->Insert(aField1); //inserting second footnote pWrtShell->InsertFootnote(""); - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pCursor->Move(fnMoveForward); //inserting reference field 2 SwGetRefField aField2(pRefType, "", "", REF_FOOTNOTE, sal_uInt16(1), REF_CONTENT); pWrtShell->Insert(aField2); //inserting third footnote pWrtShell->InsertFootnote(""); - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pCursor->Move(fnMoveForward); pCursor->Move(fnMoveForward); //inserting reference field 3 @@ -2619,7 +2619,7 @@ void SwUiWriterTest::testTdf77342() uno::Any aAny; sal_uInt16 aFormat; //reference field 1 - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); SwField* pRef1 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pRef1->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); @@ -2640,11 +2640,11 @@ void SwUiWriterTest::testTdf77342() pRef3->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(2)), aAny); //moving cursor to the end of the document - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); //pasting the copied selection at current cursor position pWrtShell->Paste(xClpDoc.get()); //checking the fields, both new and old, for proper values - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); //old reference field 1 SwField* pOldRef11 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef11->GetFormat(); @@ -2712,11 +2712,11 @@ void SwUiWriterTest::testTdf77342() SwTextFootnote* pTFNote4 = static_cast<SwTextFootnote*> (pFootnote4); CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), pTFNote4->GetSeqRefNo()); //moving the cursor to the starting of document - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); //pasting the selection again at current cursor position pWrtShell->Paste(xClpDoc.get()); //checking the fields, both new and old, for proper values - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); //new reference field 1 SwField* pNewRef21 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pNewRef21->GetFormat(); @@ -2818,7 +2818,7 @@ void SwUiWriterTest::testTdf63553() pWrtShell->Insert(aSetField1); SwGetRefFieldType* pRefType = static_cast<SwGetRefFieldType*>(pWrtShell->GetFieldType(0, SwFieldIds::GetRef)); //moving cursor to the starting of document - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); //inserting reference field 1 SwGetRefField aGetField1(pRefType, "Illustration", "", REF_SEQUENCEFLD, sal_uInt16(0), REF_CONTENT); pWrtShell->Insert(aGetField1); @@ -2829,7 +2829,7 @@ void SwUiWriterTest::testTdf63553() SwSetExpField aSetField2(pSeqType, "", SVX_NUM_ARABIC); pWrtShell->Insert(aSetField2); //moving the cursor - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pCursor->Move(fnMoveForward); //inserting reference field 2 SwGetRefField aGetField2(pRefType, "Illustration", "", REF_SEQUENCEFLD, sal_uInt16(1), REF_CONTENT); @@ -2841,7 +2841,7 @@ void SwUiWriterTest::testTdf63553() //inserting sequence field 3 SwSetExpField aSetField3(pSeqType, "", SVX_NUM_ARABIC); pWrtShell->Insert(aSetField3); - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pCursor->Move(fnMoveForward); pCursor->Move(fnMoveForward); //inserting reference field 3 @@ -2858,7 +2858,7 @@ void SwUiWriterTest::testTdf63553() //selecting reference field 2 and 3 and sequence field 1 and 2 //selection is such that more than one and not all sequence fields and reference fields are selected //ref1-[ref2-ref3-seq1-seq2]-seq3 - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pCursor->Move(fnMoveForward); //start marking pCursor->SetMark(); @@ -2874,7 +2874,7 @@ void SwUiWriterTest::testTdf63553() uno::Any aAny; sal_uInt16 aFormat; //reference field 1 - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); SwField* pRef1 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pRef1->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); @@ -2910,11 +2910,11 @@ void SwUiWriterTest::testTdf63553() CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pSeqF3->GetSeqNumber()); CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pSeqF3->GetFieldName()); //moving cursor to the end of the document - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); //pasting the copied selection at current cursor position pWrtShell->Paste(xClpDoc.get()); //checking the fields, both new and old, for proper values - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); //now we have ref1-ref2-ref3-seq1-seq2-seq3-nref1-nref2-nseq1-nseq2 //old reference field 1 SwField* pOldRef11 = SwCursorShell::GetFieldAtCursor(pCursor, true); @@ -2976,11 +2976,11 @@ void SwUiWriterTest::testTdf63553() CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), pNewSeq2->GetSeqNumber()); CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pNewSeq2->GetFieldName()); //moving the cursor to the starting of document - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); //pasting the selection again at current cursor position pWrtShell->Paste(xClpDoc.get()); //checking the fields, both new and old, for proper values - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); //now we have [nnref1-nnref2-nnseq1-nnseq2]-ref1-[ref2-ref3-seq1-seq2]-seq3-[nref1-nref2-nseq1-nseq2] //new reference field 1 SwField* pNewRef21 = SwCursorShell::GetFieldAtCursor(pCursor, true); @@ -3115,7 +3115,7 @@ void SwUiWriterTest::testTdf80663() CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount()); //Deleting the first row - pWrtShell->SttDoc(); //moves the cursor to the start of Doc + pWrtShell->StartOfSection(); //moves the cursor to the start of Doc pWrtShell->SelTableRow(); //selects the first row pWrtShell->DeleteRow(); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount()); @@ -3151,7 +3151,7 @@ void SwUiWriterTest::testTdf80663() CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount()); //Deleting the first column - pWrtShell->SttDoc(); //moves the cursor to the start of Doc + pWrtShell->StartOfSection(); //moves the cursor to the start of Doc pWrtShell->SelTableCol(); //selects first column pWrtShell->DeleteCol(); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount()); @@ -3169,7 +3169,7 @@ void SwUiWriterTest::testTdf80663() CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount()); //Deleting the second column - pWrtShell->SttDoc(); //moves the cursor to the start of Doc + pWrtShell->StartOfSection(); //moves the cursor to the start of Doc pWrtShell->GoNextCell(); //moves the cursor to next cell pWrtShell->SelTableCol(); //selects second column pWrtShell->DeleteCol(); @@ -3202,7 +3202,7 @@ void SwUiWriterTest::testTdf57197() CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount()); //Inserting one row before the existing row - pWrtShell->SttDoc(); //moves the cursor to the start of Doc + pWrtShell->StartOfSection(); //moves the cursor to the start of Doc pWrtShell->InsertRow(1, false); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount()); @@ -3219,7 +3219,7 @@ void SwUiWriterTest::testTdf57197() CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount()); //Inserting one row after the existing row - pWrtShell->SttDoc(); //moves the cursor to the start of Doc + pWrtShell->StartOfSection(); //moves the cursor to the start of Doc pWrtShell->InsertRow(1, true); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount()); @@ -3236,7 +3236,7 @@ void SwUiWriterTest::testTdf57197() CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount()); //Inserting one column before the existing column - pWrtShell->SttDoc(); //moves the cursor to the start of Doc + pWrtShell->StartOfSection(); //moves the cursor to the start of Doc pWrtShell->InsertCol(1, false); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount()); @@ -3253,7 +3253,7 @@ void SwUiWriterTest::testTdf57197() CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount()); //Inserting one column after the existing column - pWrtShell->SttDoc(); //moves the cursor to the start of Doc + pWrtShell->StartOfSection(); //moves the cursor to the start of Doc pWrtShell->InsertCol(1, true); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount()); @@ -3557,7 +3557,7 @@ void SwUiWriterTest::testTableBackgroundColor() uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getColumns()->getCount()); - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pWrtShell->SelTableRow(); //Selecting First Row pWrtShell->ClearMark(); //Modifying the color of Table Box @@ -4903,16 +4903,16 @@ void SwUiWriterTest::testRedlineParam() // Turn on track changes, and add changes to the start and end of the document. uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY); xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true)); - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pWrtShell->Insert("aaa"); - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); pWrtShell->Insert("zzz"); const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable(); CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), rTable.size()); // Select the first redline. - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence( { {"NextTrackedChange", uno::makeAny(static_cast<sal_uInt16>(rTable[0]->GetId()))} @@ -4925,7 +4925,7 @@ void SwUiWriterTest::testRedlineParam() CPPUNIT_ASSERT_EQUAL(OUString("aaa"), pShellCursor->GetText()); // Select the second redline. - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); aPropertyValues = comphelper::InitPropertySequence( { {"NextTrackedChange", uno::makeAny(static_cast<sal_uInt16>(rTable[1]->GetId()))} @@ -4936,7 +4936,7 @@ void SwUiWriterTest::testRedlineParam() CPPUNIT_ASSERT_EQUAL(OUString("zzz"), pShellCursor->GetText()); // Move the cursor to the start again, and reject the second change. - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); aPropertyValues = comphelper::InitPropertySequence( { {"RejectTrackedChange", uno::makeAny(static_cast<sal_uInt16>(rTable[1]->GetId()))} @@ -4967,7 +4967,7 @@ void SwUiWriterTest::testRedlineViewAuthor() // Turn on track changes, and add changes to the start of the document. uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY); xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true)); - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pWrtShell->Insert("aaa"); // Now assert that SwView::SetRedlineAuthor() had an effect. @@ -5027,15 +5027,15 @@ void SwUiWriterTest::testRedlineTimestamp() // the document. uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY); xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true)); - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pWrtShell->Insert("aaa"); osl::Thread::wait(std::chrono::seconds(1)); - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); pWrtShell->Insert("zzz"); // Inserting additional characters at the start changed the table size to // 3, i.e. the first and the second "aaa" wasn't combined. - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pWrtShell->Insert("aaa"); // Now assert that at least one of the seconds are not 0. @@ -5117,10 +5117,10 @@ void SwUiWriterTest::testTdf104032() sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); SwDoc aClipboard; SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false); pWrtShell->Copy(&aClipboard); - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); pWrtShell->Paste(&aClipboard); rUndoManager.Undo(); } @@ -5776,7 +5776,7 @@ void SwUiWriterTest::testTdf113445() // Insert a new paragraph at the start of the document. SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); pWrtShell->SplitNode(); discardDumpedLayout(); pXmlDoc = parseLayoutDump(); @@ -6146,14 +6146,14 @@ void SwUiWriterTest::testTdf115132() // Create an empty paragraph that will separate first table from the rest pWrtShell->SplitNode(); - pWrtShell->SttDoc(); + pWrtShell->StartOfSection(); // Create a table at the start of document body SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0); const SwTable* pTable = &pWrtShell->InsertTable(TableOpt, 2, 3); const SwTableFormat* pFormat = pTable->GetFrameFormat(); CPPUNIT_ASSERT(pFormat); vTestTableNames.push_back(pFormat->GetName()); - pWrtShell->EndDoc(); + pWrtShell->EndOfSection(); // Create a table after a paragraph pTable = &pWrtShell->InsertTable(TableOpt, 2, 3); pFormat = pTable->GetFrameFormat(); diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx index 7535e4926db6..1ef90535f101 100644 --- a/sw/qa/extras/uiwriter/uiwriter2.cxx +++ b/sw/qa/extras/uiwriter/uiwriter2.cxx @@ -110,7 +110,7 @@ void SwUiWriterTest2::testRedlineMoveInsertInDelete() pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false); pWrtShell->Delete(); // the footnote // second delete redline, following the first one - pWrtShell->EndDoc(false); + pWrtShell->EndOfSection(false); pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 3, /*bBasicCall=*/false); pWrtShell->Delete(); // "foo" |