diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-10-17 13:42:44 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-15 15:10:00 +0100 |
commit | f34480a58c461bced9b2f0a2ba31ae3e808c081c (patch) | |
tree | 8f1c55a061d38913f4fa50f9cd8755cc70604453 /sw | |
parent | 3af84bfe63f3898ad6e3e23b94f084c264f1113b (diff) |
sw: rename the misleading SwWrtShell::SttDoc/EndDoc
... to StartOfSection/EndOfSection, which corresponds more closely to
where they actually move the cursor, in SwNodes::GoStartOfSection.
SwCursorShell::SttEndDoc does what one would expect from these.
Change-Id: I5005e3ebf230c903a4e63dcdda93892a8658e096
Diffstat (limited to 'sw')
-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 | ||||
-rw-r--r-- | sw/source/ui/misc/titlepage.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/applab.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/inc/wrtsh.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/shells/txtcrsr.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxvw.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/move.cxx | 4 |
12 files changed, 89 insertions, 89 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" diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index 0fbb74ad874f..5ae2c30ed62b 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -181,7 +181,7 @@ SwTitlePageDlg::SwTitlePageDlg(weld::Window *pParent) mpIndexDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_REGISTER); mpNormalDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_STANDARD); - mpSh->SttDoc(); + mpSh->StartOfSection(); if (lcl_GetPageDesc( mpSh, nSetPage, &mpPageFormatDesc )) { if (mpPageFormatDesc->GetPageDesc() == mpTitleDesc) diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index 5c9ca1819568..9cc87905358b 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -321,12 +321,12 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) // if there is no content in the fly then // don't leave the fly!!! pSh->Push(); - pSh->SttDoc(); + pSh->StartOfSection(); bool bInFly = nullptr != pSh->WizardGetFly(); pSh->Pop(bInFly ? SwCursorShell::PopMode::DeleteStack : SwCursorShell::PopMode::DeleteCurrent); if( bInFly ) - pSh->EndDoc(true); // select all content + pSh->EndOfSection(true); // select all content // in the fly else pSh->SetMark(); // set only the mark @@ -346,8 +346,8 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) aSect.SetLinkFileName(sLinkName.makeStringAndClear()); aSect.SetProtectFlag(true); pSh->Insert("."); // Dummytext to allocate the Section - pSh->SttDoc(); - pSh->EndDoc(true); // Select everything in the frame + pSh->StartOfSection(); + pSh->EndOfSection(true); // Select everything in the frame pSh->InsertSection(aSect); } pSh->Pop(SwCursorShell::PopMode::DeleteCurrent); diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index 0c7272221002..8e5717e5e045 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -206,8 +206,8 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); bool LeftMargin ( bool bSelect, bool bBasicCall ); bool RightMargin( bool bSelect, bool bBasicCall ); - bool SttDoc ( bool bSelect = false ); - bool EndDoc ( bool bSelect = false ); + bool StartOfSection( bool bSelect = false ); + bool EndOfSection ( bool bSelect = false ); bool SttNxtPg ( bool bSelect = false ); void SttPrvPg ( bool bSelect = false ); diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx index 93df8a6694a2..f080cf845c9d 100644 --- a/sw/source/uibase/shells/txtcrsr.cxx +++ b/sw/source/uibase/shells/txtcrsr.cxx @@ -140,16 +140,16 @@ void SwTextShell::ExecMove(SfxRequest &rReq) bRet = rSh.RightMargin( false, false ); break; case FN_START_OF_DOCUMENT_SEL: - bRet = rSh.SttDoc( true ); + bRet = rSh.StartOfSection( true ); break; case FN_START_OF_DOCUMENT: - bRet = rSh.SttDoc(); + bRet = rSh.StartOfSection(); break; case FN_END_OF_DOCUMENT_SEL: - bRet = rSh.EndDoc( true ); + bRet = rSh.EndOfSection( true ); break; case FN_END_OF_DOCUMENT: - bRet = rSh.EndDoc(); + bRet = rSh.EndOfSection(); break; case FN_SELECT_WORD: bRet = rSh.SelNearestWrd(); diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 6e2801310134..d753b849b97b 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -1141,7 +1141,7 @@ void SwView::Execute(SfxRequest &rReq) if( xDictionary.is() ) xDictionary->clear(); // put cursor to the start of the document - m_pWrtShell->SttDoc(); + m_pWrtShell->StartOfSection(); SAL_FALLTHROUGH; // call spell/grammar dialog } case FN_SPELL_GRAMMAR_DIALOG: diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index 778404815519..09fd18015ae6 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -367,11 +367,11 @@ void SwView::ExecSearch(SfxRequest& rReq) m_pWrtShell->Push(); if (SwDocPositions::Start == aOpts.eEnd) { - m_pWrtShell->EndDoc(); + m_pWrtShell->EndOfSection(); } else { - m_pWrtShell->SttDoc(); + m_pWrtShell->StartOfSection(); } } nFound = FUNC_Search( aOpts ); @@ -519,9 +519,9 @@ bool SwView::SearchAndWrap(bool bApi) if( m_eLastSearchCommand == SvxSearchCmd::FIND_ALL ) { if( SwDocPositions::Start == aOpts.eEnd ) - m_pWrtShell->EndDoc(); + m_pWrtShell->EndOfSection(); else - m_pWrtShell->SttDoc(); + m_pWrtShell->StartOfSection(); } // fdo#65014 : Ensure that the point of the cursor is at the extremity of the @@ -657,9 +657,9 @@ bool SwView::SearchAll() m_pWrtShell->KillSelection(nullptr, false); if( SwDocPositions::Start == aOpts.eEnd ) - m_pWrtShell->EndDoc(); + m_pWrtShell->EndOfSection(); else - m_pWrtShell->SttDoc(); + m_pWrtShell->StartOfSection(); } m_bExtra = false; sal_uInt16 nFound = static_cast<sal_uInt16>(FUNC_Search( aOpts )); diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index c96b8e243f5c..1a9b9b116a0e 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -1143,7 +1143,7 @@ void SwXTextViewCursor::gotoStart(sal_Bool bExpand) if (!IsTextSelection()) throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); - m_pView->GetWrtShell().SttDoc( bExpand ); + m_pView->GetWrtShell().StartOfSection( bExpand ); } @@ -1157,7 +1157,7 @@ void SwXTextViewCursor::gotoEnd(sal_Bool bExpand) if (!IsTextSelection()) throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); - m_pView->GetWrtShell().EndDoc( bExpand ); + m_pView->GetWrtShell().EndOfSection( bExpand ); } diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index afcdd9d7f58e..d28554afd64e 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -295,13 +295,13 @@ bool SwWrtShell::GoEnd(bool bKeepArea, const bool *pMoveTable) SwCursorShell::SttEndDoc(false); } -bool SwWrtShell::SttDoc( bool bSelect ) +bool SwWrtShell::StartOfSection(bool const bSelect) { ShellMoveCursor aTmp( this, bSelect ); return GoStart(false, nullptr, bSelect ); } -bool SwWrtShell::EndDoc( bool bSelect) +bool SwWrtShell::EndOfSection(bool const bSelect) { ShellMoveCursor aTmp( this, bSelect ); return GoEnd(); |