diff options
author | Tor Lillqvist <tml@collabora.com> | 2016-08-29 12:52:04 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2016-08-29 14:45:32 +0300 |
commit | 6f9750ef54f7e0f2c1345b39dcf45bdf589630d8 (patch) | |
tree | bad8db239238254daa1a6107dccae1245dfea172 /sw | |
parent | bdd60f1f5e0b995572321fd0865ccb8849d8ed76 (diff) |
Get rid of pointless indirect function pointer variables
Change-Id: Ic8eddec51d59b531ae22421b796a148267b9f3c1
Diffstat (limited to 'sw')
59 files changed, 184 insertions, 199 deletions
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 6c9edb1367cc..05852095d627 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -146,13 +146,13 @@ SW_DLLPUBLIC extern SwMoveFn fnMoveBackward; // also works: using SwGoInDoc = bool (*) (SwPaM& rPam, SwMoveFn fnMove); // no works: using SwGoInDoc = [](SwPaM& rPam, SwMoveFn fnMove) -> bool; using SwGoInDoc = auto (*)(SwPaM& rPam, SwMoveFn fnMove) -> bool; -SW_DLLPUBLIC extern SwGoInDoc fnGoDoc; -extern SwGoInDoc fnGoSection; -SW_DLLPUBLIC extern SwGoInDoc fnGoNode; -SW_DLLPUBLIC extern SwGoInDoc fnGoContent; ///< SwPam::Move() default argument. -extern SwGoInDoc fnGoContentCells; -extern SwGoInDoc fnGoContentSkipHidden; -extern SwGoInDoc fnGoContentCellsSkipHidden; +SW_DLLPUBLIC bool GoInDoc( SwPaM&, SwMoveFn); +SW_DLLPUBLIC bool GoInSection( SwPaM&, SwMoveFn); +SW_DLLPUBLIC bool GoInNode( SwPaM&, SwMoveFn); +SW_DLLPUBLIC bool GoInContent( SwPaM&, SwMoveFn); +SW_DLLPUBLIC bool GoInContentCells( SwPaM&, SwMoveFn); +SW_DLLPUBLIC bool GoInContentSkipHidden( SwPaM&, SwMoveFn); +SW_DLLPUBLIC bool GoInContentCellsSkipHidden( SwPaM&, SwMoveFn); /// PaM is Point and Mark: a selection of the document model. class SW_DLLPUBLIC SwPaM : public sw::Ring<SwPaM> @@ -190,7 +190,7 @@ public: /// Movement of cursor. bool Move( SwMoveFn fnMove = fnMoveForward, - SwGoInDoc fnGo = fnGoContent ); + SwGoInDoc fnGo = GoInContent ); /// Search. bool Find( const css::util::SearchOptions2& rSearchOpt, diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index 1cfdf5033223..2f4d95369622 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -202,21 +202,21 @@ void SwMacrosTest::testBookmarkDeleteAndJoin() rIDCO.AppendTextNode(*aPaM.GetPoint()); rIDCO.InsertString(aPaM, "A"); rIDCO.AppendTextNode(*aPaM.GetPoint()); - aPaM.Move(fnMoveBackward, fnGoNode); - aPaM.Move(fnMoveBackward, fnGoNode); - aPaM.Move(fnMoveBackward, fnGoContent); + aPaM.Move(fnMoveBackward, GoInNode); + aPaM.Move(fnMoveBackward, GoInNode); + aPaM.Move(fnMoveBackward, GoInContent); aPaM.SetMark(); - aPaM.Move(fnMoveForward, fnGoDoc); + aPaM.Move(fnMoveForward, GoInDoc); IDocumentMarkAccess & rIDMA = *pDoc->getIDocumentMarkAccess(); sw::mark::IMark *pMark = rIDMA.makeMark(aPaM, "test", IDocumentMarkAccess::MarkType::BOOKMARK); CPPUNIT_ASSERT(pMark); // select so pMark start position is on a node that is fully deleted - aPaM.Move(fnMoveBackward, fnGoNode); + aPaM.Move(fnMoveBackward, GoInNode); // must leave un-selected content in last node to get the bJoinPrev flag! - aPaM.Move(fnMoveBackward, fnGoContent); + aPaM.Move(fnMoveBackward, GoInContent); aPaM.Exchange(); - aPaM.Move(fnMoveBackward, fnGoDoc); + aPaM.Move(fnMoveBackward, GoInDoc); // delete rIDCO.DeleteAndJoin(aPaM); @@ -238,9 +238,9 @@ void SwMacrosTest::testBookmarkDeleteTdf90816() IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations()); rIDCO.AppendTextNode(*aPaM.GetPoint()); rIDCO.InsertString(aPaM, "ABC"); - aPaM.Move(fnMoveBackward, fnGoContent); + aPaM.Move(fnMoveBackward, GoInContent); aPaM.SetMark(); - aPaM.Move(fnMoveBackward, fnGoContent); + aPaM.Move(fnMoveBackward, GoInContent); IDocumentMarkAccess & rIDMA = *pDoc->getIDocumentMarkAccess(); sw::mark::IMark *pMark = rIDMA.makeMark(aPaM, "test", IDocumentMarkAccess::MarkType::BOOKMARK); @@ -540,7 +540,7 @@ void SwMacrosTest::testFindReplace() rIDCO.InsertString(*pPaM, "bar"); rIDCO.AppendTextNode(*pPaM->GetPoint()); rIDCO.InsertString(*pPaM, "baz"); - pPaM->Move(fnMoveBackward, fnGoDoc); + pPaM->Move(fnMoveBackward, GoInDoc); bool bCancel(false); util::SearchOptions2 opts( @@ -574,12 +574,12 @@ void SwMacrosTest::testFindReplace() rIDCO.ReplaceRange(*pPaM, " ", true); pPaM->DeleteMark(); - pPaM->Move(fnMoveBackward, fnGoDoc); + pPaM->Move(fnMoveBackward, GoInDoc); // problem was that after the 2nd Find, the wrong newline was selected CPPUNIT_ASSERT_EQUAL(OUString("foo bar"), pPaM->Start()->nNode.GetNode().GetTextNode()->GetText()); - pPaM->Move(fnMoveForward, fnGoNode); + pPaM->Move(fnMoveForward, GoInNode); CPPUNIT_ASSERT_EQUAL(OUString("baz"), pPaM->End()->nNode.GetNode().GetTextNode()->GetText()); } diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 0a971d5a2dee..2fafc7416386 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -1036,7 +1036,7 @@ getRandomPosition(SwDoc *pDoc, int /* nOffset */) SwPaM pam(aPos); for (sal_uLong i = 0; i < n; ++i) { - pam.Move(fnMoveBackward, fnGoNode); + pam.Move(fnMoveBackward, GoInNode); } return *pam.GetPoint(); } diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx index 5425450bf609..818fbd658567 100644 --- a/sw/qa/extras/globalfilter/globalfilter.cxx +++ b/sw/qa/extras/globalfilter/globalfilter.cxx @@ -844,9 +844,9 @@ void Test::testRedlineMode() | nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_SHOW_DELETE); // need a delete redline to trigger mode switching - pam.Move(fnMoveForward, fnGoDoc); + pam.Move(fnMoveForward, GoInDoc); pam.SetMark(); - pam.Move(fnMoveBackward, fnGoDoc); + pam.Move(fnMoveBackward, GoInDoc); pDoc->getIDocumentContentOperations().DeleteAndJoin(pam); // hide delete redlines diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 471860e60a85..dd63e8cecad9 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -409,10 +409,10 @@ void SwUiWriterTest::testBookmarkCopy() // copy range rIDCO.SplitNode(*aPaM.GetPoint(), false); SwPosition target(*aPaM.GetPoint()); - aPaM.Move(fnMoveBackward, fnGoContent); + aPaM.Move(fnMoveBackward, GoInContent); aPaM.SetMark(); aPaM.SttEndDoc(true/*start*/); - aPaM.Move(fnMoveForward, fnGoContent); // partially select 1st para + aPaM.Move(fnMoveForward, GoInContent); // partially select 1st para rIDCO.CopyRange(aPaM, target, /*bCopyAll=*/false, /*bCheckPos=*/true); @@ -1251,7 +1251,7 @@ void SwUiWriterTest::testTdf63214() IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); SwPaM aPaM( SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1) ); aPaM.SetMark(); - aPaM.Move(fnMoveForward, fnGoContent); + aPaM.Move(fnMoveForward, GoInContent); //Inserting a crossRefBookmark pMarkAccess->makeMark(aPaM, "Bookmark", IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount()); @@ -2829,30 +2829,30 @@ void SwUiWriterTest::testTdf83798() pWrtShell->UpdateTableOf(*pTOXBase); SwPaM* pCursor = pDoc->GetEditShell()->GetCursor(); pCursor->SetMark(); - pCursor->Move(fnMoveForward, fnGoNode); + pCursor->Move(fnMoveForward, GoInNode); CPPUNIT_ASSERT_EQUAL(OUString("Table of Contents"), pCursor->GetText()); pCursor->DeleteMark(); pCursor->SetMark(); - pCursor->Move(fnMoveForward, fnGoContent); + pCursor->Move(fnMoveForward, GoInContent); CPPUNIT_ASSERT_EQUAL(OUString("1"), pCursor->GetText()); pCursor->DeleteMark(); - pCursor->Move(fnMoveForward, fnGoNode); + pCursor->Move(fnMoveForward, GoInNode); pCursor->SetMark(); - pCursor->Move(fnMoveForward, fnGoContent); - pCursor->Move(fnMoveForward, fnGoContent); - pCursor->Move(fnMoveForward, fnGoContent); + pCursor->Move(fnMoveForward, GoInContent); + pCursor->Move(fnMoveForward, GoInContent); + pCursor->Move(fnMoveForward, GoInContent); CPPUNIT_ASSERT_EQUAL(OUString("1.A"), pCursor->GetText()); pCursor->DeleteMark(); - pCursor->Move(fnMoveForward, fnGoNode); + pCursor->Move(fnMoveForward, GoInNode); pCursor->SetMark(); - pCursor->Move(fnMoveForward, fnGoContent); + pCursor->Move(fnMoveForward, GoInContent); CPPUNIT_ASSERT_EQUAL(OUString("2"), pCursor->GetText()); pCursor->DeleteMark(); - pCursor->Move(fnMoveForward, fnGoNode); + pCursor->Move(fnMoveForward, GoInNode); pCursor->SetMark(); - pCursor->Move(fnMoveForward, fnGoContent); - pCursor->Move(fnMoveForward, fnGoContent); - pCursor->Move(fnMoveForward, fnGoContent); + pCursor->Move(fnMoveForward, GoInContent); + pCursor->Move(fnMoveForward, GoInContent); + pCursor->Move(fnMoveForward, GoInContent); CPPUNIT_ASSERT_EQUAL(OUString("2.A"), pCursor->GetText()); pCursor->DeleteMark(); } diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 8172657d0eff..7551311f0b42 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -1533,7 +1533,7 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild( pCursorShell->StartAction(); // Set cursor into current cell. This deletes any table cursor. SwPaM aPaM( *pStartNode ); - aPaM.Move( fnMoveForward, fnGoNode ); + aPaM.Move( fnMoveForward, GoInNode ); Select( aPaM ); // Move cursor to the end of the table creating a selection and a table // cursor. @@ -1552,7 +1552,7 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild( // expand the current selection (i.e., set // point to new position; keep mark) SwPaM aPaM( *pStartNode ); - aPaM.Move( fnMoveForward, fnGoNode ); + aPaM.Move( fnMoveForward, GoInNode ); aPaM.SetMark(); const SwPaM *pPaM = pCursorShell->GetTableCrs() ? pCursorShell->GetTableCrs() : pCursorShell->GetCursor(); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 5b6edb7ebdde..2236caf56762 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1667,7 +1667,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) // move point; forward if it's the start, backwards if it's the end if( ! rCmp.GetPoint()->nNode.GetNode().IsContentNode() ) rCmp.Move( bPointIsStart ? fnMoveForward : fnMoveBackward, - fnGoContent ); + GoInContent ); // move mark (if exists); forward if it's the start, else backwards if( rCmp.HasMark() ) @@ -1676,7 +1676,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) { rCmp.Exchange(); rCmp.Move( !bPointIsStart ? fnMoveForward : fnMoveBackward, - fnGoContent ); + GoInContent ); rCmp.Exchange(); } } @@ -2877,7 +2877,7 @@ bool SwCursorShell::FindValidContentNode( bool bOnlyText ) // move forward into non-protected area. SwPaM aPam( rNdIdx.GetNode(), 0 ); while( aPam.GetNode().IsProtect() && - aPam.Move( fnMoveForward, fnGoContent ) ) + aPam.Move( fnMoveForward, GoInContent ) ) ; // nothing to do in the loop; the aPam.Move does the moving! // didn't work? then go backwards! @@ -2886,7 +2886,7 @@ bool SwCursorShell::FindValidContentNode( bool bOnlyText ) SwPaM aTmpPaM( rNdIdx.GetNode(), 0 ); aPam = aTmpPaM; while( aPam.GetNode().IsProtect() && - aPam.Move( fnMoveBackward, fnGoContent ) ) + aPam.Move( fnMoveBackward, GoInContent ) ) ; // nothing to do in the loop; the aPam.Move does the moving! } diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 965114975d72..5c30d0b0b000 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1073,7 +1073,7 @@ bool SwCursorShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos, m_pCurrentCursor->GetPoint()->nContent.Assign( pSttNd->GetContentNode(), 0 ); m_pCurrentCursor->SetMark(); m_pCurrentCursor->GetPoint()->nNode = *pEndNd; - m_pCurrentCursor->Move( fnMoveBackward, fnGoNode ); // end of predecessor + m_pCurrentCursor->Move( fnMoveBackward, GoInNode ); // end of predecessor // and everything is already selected bool bRet = !m_pCurrentCursor->IsSelOvr(); @@ -1698,7 +1698,7 @@ bool SwContentAtPos::IsInRTLText()const { SwStartNode* pSttNd = pTextFootnote->GetStartNode()->GetNode().GetStartNode(); SwPaM aTemp( *pSttNd ); - aTemp.Move(fnMoveForward, fnGoNode); + aTemp.Move(fnMoveForward, GoInNode); SwContentNode* pContentNode = aTemp.GetContentNode(); if(pContentNode && pContentNode->IsTextNode()) pNd = pContentNode->GetTextNode(); diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index d37756fc869c..2084cabdc845 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -615,7 +615,7 @@ bool SwPaM::DoSearch( const SearchOptions2& rSearchOpt, utl::TextSearch& rSText, * search, it probably never did. (pSttNd != &rNdIdx.GetNode()) * is never true in this case. */ if( (bSrchForward || pSttNd != &rNdIdx.GetNode()) && - Move( fnMoveForward, fnGoContent ) && + Move( fnMoveForward, GoInContent ) && (!bSrchForward || pSttNd != &GetPoint()->nNode.GetNode()) && 1 == std::abs( (int)( GetPoint()->nNode.GetIndex() - GetMark()->nNode.GetIndex()) ) ) diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 270c527fa5e4..f70cd26897ac 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -512,7 +512,7 @@ SwPaM* SwPaM::MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg ) { pPam = new SwPaM( *m_pPoint ); pPam->SetMark(); // set beginning - pPam->Move( fnMove, fnGoSection); // to beginning or end of a node + pPam->Move( fnMove, GoInSection); // to beginning or end of a node // set SPoint onto its old position; set GetMark to the "end" pPam->Exchange(); @@ -920,7 +920,7 @@ bool GoInContentCellsSkipHidden( SwPaM & rPam, SwMoveFn fnMove ) bool GoPrevPara( SwPaM & rPam, SwPosPara aPosPara ) { - if( rPam.Move( fnMoveBackward, fnGoNode ) ) + if( rPam.Move( fnMoveBackward, GoInNode ) ) { // always on a ContentNode SwPosition& rPos = *rPam.GetPoint(); @@ -962,7 +962,7 @@ bool GoCurrPara( SwPaM & rPam, SwPosPara aPosPara ) bool GoNextPara( SwPaM & rPam, SwPosPara aPosPara ) { - if( rPam.Move( fnMoveForward, fnGoNode ) ) + if( rPam.Move( fnMoveForward, GoInNode ) ) { // always on a ContentNode SwPosition& rPos = *rPam.GetPoint(); diff --git a/sw/source/core/crsr/paminit.cxx b/sw/source/core/crsr/paminit.cxx index 479fa12745d4..62452777089c 100644 --- a/sw/source/core/crsr/paminit.cxx +++ b/sw/source/core/crsr/paminit.cxx @@ -44,14 +44,6 @@ static SwMoveFnCollection aBwrd = { /* fnSection */ &SwNodes::GoEndOfSection }; -SwGoInDoc fnGoDoc = &GoInDoc; -SwGoInDoc fnGoSection = &GoInSection; -SwGoInDoc fnGoNode = &GoInNode; -SwGoInDoc fnGoContent = &GoInContent; -SwGoInDoc fnGoContentCells = &GoInContentCells; -SwGoInDoc fnGoContentSkipHidden = &GoInContentSkipHidden; -SwGoInDoc fnGoContentCellsSkipHidden = &GoInContentCellsSkipHidden; - SwWhichPara fnParaPrev = &GoPrevPara; SwWhichPara fnParaCurr = &GoCurrPara; SwWhichPara fnParaNext = &GoNextPara; diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index f4d3a3f5f552..b2267a83dfbc 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -1633,9 +1633,9 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, SwGoInDoc fnGo; if ( bSkipHidden ) - fnGo = CRSR_SKIP_CELLS == nMode ? fnGoContentCellsSkipHidden : fnGoContentSkipHidden; + fnGo = CRSR_SKIP_CELLS == nMode ? GoInContentCellsSkipHidden : GoInContentSkipHidden; else - fnGo = CRSR_SKIP_CELLS == nMode ? fnGoContentCells : fnGoContent; + fnGo = CRSR_SKIP_CELLS == nMode ? GoInContentCells : GoInContent; while( nCnt ) { @@ -1828,7 +1828,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, { const SwNode* pEndNd = pTableNd->EndOfSectionNode(); GetPoint()->nNode = *pEndNd; - pTableCursor->Move( fnMoveBackward, fnGoNode ); + pTableCursor->Move( fnMoveBackward, GoInNode ); pFrame = GetContentNode()->getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() ); } } @@ -1917,7 +1917,7 @@ bool SwCursor::SttEndDoc( bool bStt ) // Can the cursor still moved on? SwMoveFn fnMove = bStt ? fnMoveBackward : fnMoveForward; bool bRet = (!HasMark() || !IsNoContent() ) && - Move( fnMove, fnGoDoc ) && + Move( fnMove, GoInDoc ) && !IsInProtectTable( true ) && !IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS | @@ -2004,7 +2004,7 @@ bool SwCursor::GotoTable( const OUString& rName ) SwCursorSaveState aSave( *this ); GetPoint()->nNode = *pTmpTable->GetTabSortBoxes()[ 0 ]-> GetSttNd()->FindTableNode(); - Move( fnMoveForward, fnGoContent ); + Move( fnMoveForward, GoInContent ); bRet = !IsSelOvr(); } } @@ -2025,7 +2025,7 @@ bool SwCursor::GotoTableBox( const OUString& rName ) { SwCursorSaveState aSave( *this ); GetPoint()->nNode = *pTableBox->GetSttNd(); - Move( fnMoveForward, fnGoContent ); + Move( fnMoveForward, GoInContent ); bRet = !IsSelOvr(); } } diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx index 2aef93f8a8ae..2847e85e394e 100644 --- a/sw/source/core/crsr/trvlreg.cxx +++ b/sw/source/core/crsr/trvlreg.cxx @@ -247,7 +247,7 @@ bool SwCursor::GotoRegion( const OUString& rName ) SwCursorSaveState aSaveState( *this ); GetPoint()->nNode = *pIdx; - Move( fnMoveForward, fnGoContent ); + Move( fnMoveForward, GoInContent ); bRet = !IsSelOvr(); } } diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index c6d515c9d305..4e989bef0196 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -233,10 +233,10 @@ bool SwCursorShell::SelTableRowOrCol( bool bRow, bool bRowSimple ) // set start and end of a column m_pTableCursor->GetPoint()->nNode = *pEnd->GetSttNd(); - m_pTableCursor->Move( fnMoveForward, fnGoContent ); + m_pTableCursor->Move( fnMoveForward, GoInContent ); m_pTableCursor->SetMark(); m_pTableCursor->GetPoint()->nNode = *pStt->GetSttNd()->EndOfSectionNode(); - m_pTableCursor->Move( fnMoveBackward, fnGoContent ); + m_pTableCursor->Move( fnMoveBackward, GoInContent ); // set PtPos 'close' to the reference table, otherwise we might get problems // with the repeated headlines check in UpdateCursor(): @@ -271,13 +271,13 @@ bool SwCursorShell::SelTable() m_pTableCursor->DeleteMark(); m_pTableCursor->GetPoint()->nNode = *pTableNd; - m_pTableCursor->Move( fnMoveForward, fnGoContent ); + m_pTableCursor->Move( fnMoveForward, GoInContent ); m_pTableCursor->SetMark(); // set MkPos 'close' to the master table, otherwise we might get problems // with the repeated headlines check in UpdateCursor(): m_pTableCursor->GetMkPos() = pMasterTabFrame->IsVertical() ? pMasterTabFrame->Frame().TopRight() : pMasterTabFrame->Frame().TopLeft(); m_pTableCursor->GetPoint()->nNode = *pTableNd->EndOfSectionNode(); - m_pTableCursor->Move( fnMoveBackward, fnGoContent ); + m_pTableCursor->Move( fnMoveBackward, GoInContent ); UpdateCursor(); return true; } @@ -316,12 +316,12 @@ bool SwCursorShell::SelTableBox() // 1. delete mark, and move point to first content node in box m_pTableCursor->DeleteMark(); *(m_pTableCursor->GetPoint()) = SwPosition( *pStartNode ); - m_pTableCursor->Move( fnMoveForward, fnGoNode ); + m_pTableCursor->Move( fnMoveForward, GoInNode ); // 2. set mark, and move point to last content node in box m_pTableCursor->SetMark(); *(m_pTableCursor->GetPoint()) = SwPosition( *(pStartNode->EndOfSectionNode()) ); - m_pTableCursor->Move( fnMoveBackward, fnGoNode ); + m_pTableCursor->Move( fnMoveBackward, GoInNode ); // 3. exchange m_pTableCursor->Exchange(); diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 459b569b5a5a..3706e096acca 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -1849,11 +1849,11 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam ) rPam.Exchange(); // Try to move past the End - if( !rPam.Move( fnMoveForward, fnGoNode ) ) + if( !rPam.Move( fnMoveForward, GoInNode ) ) { // Fair enough, at the Beginning then rPam.Exchange(); - if( !rPam.Move( fnMoveBackward, fnGoNode )) + if( !rPam.Move( fnMoveBackward, GoInNode )) { OSL_FAIL( "no more Nodes" ); return false; @@ -2029,7 +2029,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos, // the manipulated range. // If there's no content anymore, set it to the StartNode (that's // always there). - const bool bNullContent = !aSavePam.Move( fnMoveBackward, fnGoContent ); + const bool bNullContent = !aSavePam.Move( fnMoveBackward, GoInContent ); if( bNullContent ) { aSavePam.GetPoint()->nNode--; @@ -2107,7 +2107,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos, } bJoin = false; } - else if ( !aSavePam.Move( fnMoveForward, fnGoContent ) ) + else if ( !aSavePam.Move( fnMoveForward, GoInContent ) ) { aSavePam.GetPoint()->nNode++; } @@ -2138,7 +2138,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos, } else if( bRemove ) // No move forward after joining with next paragraph { - aSavePam.Move( fnMoveForward, fnGoContent ); + aSavePam.Move( fnMoveForward, GoInContent ); } } @@ -4175,7 +4175,7 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, // Move the PaM one node back from the insert position, so that // the position doesn't get moved pCopyPam->SetMark(); - bool bCanMoveBack = pCopyPam->Move(fnMoveBackward, fnGoContent); + bool bCanMoveBack = pCopyPam->Move(fnMoveBackward, GoInContent); // If the position was shifted from more than one node, an end node has been skipped bool bAfterTable = false; if ((rPos.nNode.GetIndex() - pCopyPam->GetPoint()->nNode.GetIndex()) > 1) @@ -4267,8 +4267,8 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, if (bCanMoveBack && rPos == *pCopyPam->GetPoint()) { // after the SplitNode, span the CpyPam correctly again - pCopyPam->Move( fnMoveBackward, fnGoContent ); - pCopyPam->Move( fnMoveBackward, fnGoContent ); + pCopyPam->Move( fnMoveBackward, GoInContent ); + pCopyPam->Move( fnMoveBackward, GoInContent ); } pDestTextNd = pDoc->GetNodes()[ aInsPos.GetIndex()-1 ]->GetTextNode(); @@ -4281,7 +4281,7 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, bool bChg = pEnd != rPam.GetPoint(); if( bChg ) rPam.Exchange(); - rPam.Move( fnMoveBackward, fnGoContent ); + rPam.Move( fnMoveBackward, GoInContent ); if( bChg ) rPam.Exchange(); } @@ -4352,8 +4352,8 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, if (bCanMoveBack && rPos == *pCopyPam->GetPoint()) { // after the SplitNode, span the CpyPam correctly again - pCopyPam->Move( fnMoveBackward, fnGoContent ); - pCopyPam->Move( fnMoveBackward, fnGoContent ); + pCopyPam->Move( fnMoveBackward, GoInContent ); + pCopyPam->Move( fnMoveBackward, GoInContent ); } // Correct the area again @@ -4440,7 +4440,7 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, if (bCanMoveBack) { // pCopyPam is actually 1 before the copy range so move it fwd SwPaM temp(*pCopyPam->GetPoint()); - temp.Move(fnMoveForward, fnGoContent); + temp.Move(fnMoveForward, GoInContent); startPos = *temp.GetPoint(); } assert(startPos.nNode.GetNode().IsContentNode()); @@ -4495,7 +4495,7 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos, *pCopyPam->GetMark() = rPos; if ( !bAfterTable ) - pCopyPam->Move( fnMoveForward, bCanMoveBack ? fnGoContent : fnGoNode ); + pCopyPam->Move( fnMoveForward, bCanMoveBack ? GoInContent : GoInNode ); else { // Reset the offset to 0 as it was before the insertion diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 08631909fd91..022b0553dcc2 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -925,7 +925,7 @@ void DocumentFieldsManager::UpdateExpFields( SwTextField* pUpdateField, bool bUp { // Is the last node part of a section? SwPaM aPam(m_rDoc.GetNodes()); - aPam.Move(fnMoveForward, fnGoDoc); + aPam.Move(fnMoveForward, GoInDoc); if (aPam.Start()->nNode.GetNode().StartOfSectionNode()->IsSectionNode()) { // This would be the last section, so set its condition to false, and avoid hiding it. diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index f2de8f827ded..364a539efc6f 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -793,9 +793,9 @@ void SwDoc::UpdatePagesForPrintingWithPostItData( // clear document and move to end of it SwDoc & rPostItDoc(*rData.m_pPostItShell->GetDoc()); SwPaM aPam(rPostItDoc.GetNodes().GetEndOfContent()); - aPam.Move( fnMoveBackward, fnGoDoc ); + aPam.Move( fnMoveBackward, GoInDoc ); aPam.SetMark(); - aPam.Move( fnMoveForward, fnGoDoc ); + aPam.Move( fnMoveForward, GoInDoc ); rPostItDoc.getIDocumentContentOperations().DeleteRange( aPam ); const StringRangeEnumerator aRangeEnum( rData.GetPageRange(), 1, nDocPageCount, 0 ); diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index eec97754fe3b..937b8eb2a352 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -359,11 +359,11 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline, SwNodeIndex aEIdx( aTmp.GetPoint()->nNode ); // Try to move past the end - if( !aTmp.Move( fnMoveForward, fnGoNode ) ) + if( !aTmp.Move( fnMoveForward, GoInNode ) ) { // well then, back to the beginning aTmp.Exchange(); - if( !aTmp.Move( fnMoveBackward, fnGoNode )) + if( !aTmp.Move( fnMoveBackward, GoInNode )) { OSL_FAIL( "no more Nodes!" ); } diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx index d5546626c502..1d0e490fbfde 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -77,7 +77,7 @@ sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList, { // goto next paragraph aPam.DeleteMark(); - aPam.Move( fnMoveForward, fnGoNode ); + aPam.Move( fnMoveForward, GoInNode ); } else break; @@ -148,7 +148,7 @@ void SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList, { // goto next paragraph aPam.DeleteMark(); - aPam.Move( fnMoveForward, fnGoNode ); + aPam.Move( fnMoveForward, GoInNode ); } else { diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 5bb756581e91..7a13fd33205c 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -616,7 +616,7 @@ static void lcl_CpyBox( const SwTable& rCpyTable, const SwTableBox* pCpyBox, { SwPaM aPam( aSavePos ); aPam.SetMark(); - aPam.Move( fnMoveForward, fnGoSection ); + aPam.Move( fnMoveForward, GoInSection ); pDoc->SetTextFormatColl( aPam, pColl ); } } diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 0ba13326dd4d..0abfc39c6d3e 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2026,10 +2026,10 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) // Save the cursors (UNO and otherwise) SwPaM aSavePaM( SwNodeIndex( *pTableNd->EndOfSectionNode() ) ); - if( ! aSavePaM.Move( fnMoveForward, fnGoNode ) ) + if( ! aSavePaM.Move( fnMoveForward, GoInNode ) ) { *aSavePaM.GetMark() = SwPosition( *pTableNd ); - aSavePaM.Move( fnMoveBackward, fnGoNode ); + aSavePaM.Move( fnMoveBackward, GoInNode ); } { SwPaM const tmpPaM(*pTableNd, *pTableNd->EndOfSectionNode()); @@ -2078,10 +2078,10 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) // Save the cursors (UNO and otherwise) SwPaM aSavePaM( SwNodeIndex( *pTableNd->EndOfSectionNode() ) ); - if( ! aSavePaM.Move( fnMoveForward, fnGoNode ) ) + if( ! aSavePaM.Move( fnMoveForward, GoInNode ) ) { *aSavePaM.GetMark() = SwPosition( *pTableNd ); - aSavePaM.Move( fnMoveBackward, fnGoNode ); + aSavePaM.Move( fnMoveBackward, GoInNode ); } { SwPaM const tmpPaM(*pTableNd, *pTableNd->EndOfSectionNode()); diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 55f40492d42d..34e1ef2d93c0 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -1371,7 +1371,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) if( 2 < pSectNd->EndOfSectionIndex() - pSectNd->GetIndex() ) { aSave = rInsPos; - pPam->Move( fnMoveBackward, fnGoNode ); + pPam->Move( fnMoveBackward, GoInNode ); pPam->SetMark(); // Rewire both SwPositions pDoc->CorrAbs( aSave, *pPam->GetPoint(), 0, true ); diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 1d129cc4a48e..0cf4b47652c9 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -2582,7 +2582,7 @@ void SwEditShell::AutoFormatBySplitNode() { SET_CURR_SHELL( this ); SwPaM* pCursor = GetCursor(); - if( !pCursor->IsMultiSelection() && pCursor->Move( fnMoveBackward, fnGoNode ) ) + if( !pCursor->IsMultiSelection() && pCursor->Move( fnMoveBackward, GoInNode ) ) { StartAllAction(); StartUndo( UNDO_AUTOFORMAT ); @@ -2622,7 +2622,7 @@ void SwEditShell::AutoFormatBySplitNode() pCursor = GetCursor(); } pCursor->DeleteMark(); - pCursor->Move( fnMoveForward, fnGoNode ); + pCursor->Move( fnMoveForward, GoInNode ); EndUndo( UNDO_AUTOFORMAT ); EndAllAction(); diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 70b13d35eb98..0ab00d9f6cf4 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -71,7 +71,7 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo ) { // then go to the end of the selection aDelPam.GetPoint()->nNode = rEndNd; - aDelPam.Move( fnMoveBackward, fnGoContent ); + aDelPam.Move( fnMoveBackward, GoInContent ); } // skip protected boxes if( !rNd.IsContentNode() || @@ -85,7 +85,7 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo ) if( !pEndSelPos ) // at the end of a selection break; aDelPam.DeleteMark(); - aDelPam.Move( fnMoveForward, fnGoContent ); // next box + aDelPam.Move( fnMoveForward, GoInContent ); // next box } while( pEndSelPos ); } else diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx index 6f872ee5e1c6..a192dc1e3f9e 100644 --- a/sw/source/core/edit/edglss.cxx +++ b/sw/source/core/edit/edglss.cxx @@ -212,7 +212,7 @@ bool SwEditShell::CopySelToDoc( SwDoc* pInsDoc ) ( bColSel || !pNd->GetTextNode() ) ) { rPaM.SetMark(); - rPaM.Move( fnMoveForward, fnGoContent ); + rPaM.Move( fnMoveForward, GoInContent ); bRet = GetDoc()->getIDocumentContentOperations().CopyRange( rPaM, aPos, /*bCopyAll=*/false, /*bCheckPos=*/true ) || bRet; rPaM.Exchange(); diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index 1ca81b2017b9..ab385cd975e9 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -506,13 +506,13 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) if( nOffset ) { - aCursor.Move( fnMoveBackward, fnGoNode ); + aCursor.Move( fnMoveBackward, GoInNode ); bRet = GetDoc()->MoveParagraph( aCursor, nOffset ); } } else if( (bUpperLeft ? nUpperLevel : nLowerLevel+1) < MAXLEVEL ) { - aCursor.Move( fnMoveBackward, fnGoNode ); + aCursor.Move( fnMoveBackward, GoInNode ); bRet = GetDoc()->NumUpDown( aCursor, !bUpperLeft ); } } diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index 950e79b6c38d..befb2cb7d113 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -175,7 +175,7 @@ bool SwEditShell::TableToText( sal_Unicode cCh ) SwContentNode* pCNd = pCursor->GetContentNode(); if( !pCNd ) - pCursor->Move( fnMoveForward, fnGoContent ); + pCursor->Move( fnMoveForward, GoInContent ); else pCursor->GetPoint()->nContent.Assign( pCNd, 0 ); diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 0c6547619bfb..ce0d1a457787 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -702,12 +702,12 @@ bool SwFEShell::Paste( SwDoc* pClpDoc ) SwContentNode* pCNd = aCpyPam.GetNode().GetContentNode(); if( pCNd ) aCpyPam.GetPoint()->nContent.Assign( pCNd, 0 ); - else if( !aCpyPam.Move( fnMoveForward, fnGoNode )) - aCpyPam.Move( fnMoveBackward, fnGoNode ); + else if( !aCpyPam.Move( fnMoveForward, GoInNode )) + aCpyPam.Move( fnMoveBackward, GoInNode ); } aCpyPam.SetMark(); - aCpyPam.Move( fnMoveForward, fnGoDoc ); + aCpyPam.Move( fnMoveForward, GoInDoc ); bool bRet = true; StartAllAction(); diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 49298ac5ddf2..14109017296e 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -866,10 +866,10 @@ static void lcl_InsTableBox( SwTableNode* pTableNd, SwDoc* pDoc, SwTableBox* pBo bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam ) { rPam.GetPoint()->nNode = *rBox.GetSttNd()->EndOfSectionNode(); - rPam.Move( fnMoveBackward, fnGoContent ); + rPam.Move( fnMoveBackward, GoInContent ); rPam.SetMark(); rPam.GetPoint()->nNode = *rBox.GetSttNd(); - rPam.Move( fnMoveForward, fnGoContent ); + rPam.Move( fnMoveForward, GoInContent ); bool bRet = *rPam.GetMark() == *rPam.GetPoint() && ( rBox.GetSttNd()->GetIndex() + 1 == rPam.GetPoint()->nNode.GetIndex() ); diff --git a/sw/source/core/inc/pamtyp.hxx b/sw/source/core/inc/pamtyp.hxx index 1bc4a0c6257c..5a4537f0c617 100644 --- a/sw/source/core/inc/pamtyp.hxx +++ b/sw/source/core/inc/pamtyp.hxx @@ -34,13 +34,6 @@ void GoStartDoc( SwPosition*); void GoEndDoc( SwPosition*); void GoStartSection( SwPosition*); void GoEndSection( SwPosition*); -bool GoInDoc( SwPaM&, SwMoveFn); -bool GoInSection( SwPaM&, SwMoveFn); -bool GoInNode( SwPaM&, SwMoveFn); -bool GoInContent( SwPaM&, SwMoveFn); -bool GoInContentCells( SwPaM&, SwMoveFn); -bool GoInContentSkipHidden( SwPaM&, SwMoveFn); -bool GoInContentCellsSkipHidden( SwPaM&, SwMoveFn); const SwTextAttr* GetFrwrdTextHint( const SwpHints&, sal_uInt16&, sal_Int32 ); const SwTextAttr* GetBkwrdTextHint( const SwpHints&, sal_uInt16&, sal_Int32 ); diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index 7495094ec898..6941ae5fa91a 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -120,9 +120,9 @@ void SwImpBlocks::ClearDoc() SwPaM* SwImpBlocks::MakePaM() { SwPaM* pPam = new SwPaM( pDoc->GetNodes().GetEndOfContent() ); - pPam->Move( fnMoveBackward, fnGoDoc ); + pPam->Move( fnMoveBackward, GoInDoc ); pPam->SetMark(); - pPam->Move( fnMoveForward, fnGoDoc ); + pPam->Move( fnMoveForward, GoInDoc ); pPam->Exchange(); return pPam; } diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index c78901ab6c43..bf476b2c4a23 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -342,7 +342,7 @@ SwUndoDelete::SwUndoDelete( if( !pSttTextNd && !pEndTextNd ) { m_nNdDiff = nSttNode - rPam.GetPoint()->nNode.GetIndex() - (bFullPara ? 0 : 1); - rPam.Move( fnMoveForward, fnGoNode ); + rPam.Move( fnMoveForward, GoInNode ); } else { @@ -1051,10 +1051,10 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext) // avoid asserts from ~SwIndexReg for deleted nodes SwPaM aTmp(*rPam.End()); - if (!aTmp.Move(fnMoveForward, fnGoNode)) + if (!aTmp.Move(fnMoveForward, GoInNode)) { *aTmp.GetPoint() = *rPam.Start(); - aTmp.Move(fnMoveBackward, fnGoNode); + aTmp.Move(fnMoveBackward, GoInNode); } assert(aTmp.GetPoint()->nNode != rPam.GetPoint()->nNode && aTmp.GetPoint()->nNode != rPam.GetMark()->nNode); @@ -1090,7 +1090,7 @@ void SwUndoDelete::RepeatImpl(::sw::RepeatContext & rContext) if( !rPam.HasMark() ) { rPam.SetMark(); - rPam.Move( fnMoveForward, fnGoContent ); + rPam.Move( fnMoveForward, GoInContent ); } if( m_bDelFullPara ) rDoc.getIDocumentContentOperations().DelFullPara( rPam ); diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 227d3fe5b4e9..afc5d75f007a 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -84,7 +84,7 @@ void SwUndRng::SetPaM( SwPaM & rPam, bool bCorrToContent ) const if( rNd.IsContentNode() ) rPam.GetPoint()->nContent.Assign( rNd.GetContentNode(), nSttContent ); else if( bCorrToContent ) - rPam.Move( fnMoveForward, fnGoContent ); + rPam.Move( fnMoveForward, GoInContent ); else rPam.GetPoint()->nContent.Assign( nullptr, 0 ); @@ -99,7 +99,7 @@ void SwUndRng::SetPaM( SwPaM & rPam, bool bCorrToContent ) const if( rPam.GetNode().IsContentNode() ) rPam.GetPoint()->nContent.Assign( rPam.GetNode().GetContentNode(), nEndContent ); else if( bCorrToContent ) - rPam.Move( fnMoveBackward, fnGoContent ); + rPam.Move( fnMoveBackward, GoInContent ); else rPam.GetPoint()->nContent.Assign( nullptr, 0 ); } diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 02694f9e9bd0..4a942a94859e 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -517,9 +517,9 @@ void SwUndoTableToText::UndoImpl(::sw::UndoRedoContext & rContext) pPam->GetPoint()->nNode = *pTableNd->EndOfSectionNode(); pPam->SetMark(); pPam->GetPoint()->nNode = *pPam->GetNode().StartOfSectionNode(); - pPam->Move( fnMoveForward, fnGoContent ); + pPam->Move( fnMoveForward, GoInContent ); pPam->Exchange(); - pPam->Move( fnMoveBackward, fnGoContent ); + pPam->Move( fnMoveBackward, GoInContent ); ClearFEShellTabCols(); } @@ -677,7 +677,7 @@ void SwUndoTableToText::RepeatImpl(::sw::RepeatContext & rContext) { // move cursor out of table pPam->GetPoint()->nNode = *pTableNd->EndOfSectionNode(); - pPam->Move( fnMoveForward, fnGoContent ); + pPam->Move( fnMoveForward, GoInContent ); pPam->SetMark(); pPam->DeleteMark(); @@ -767,7 +767,7 @@ void SwUndoTextToTable::UndoImpl(::sw::UndoRedoContext & rContext) { pPos->nNode = nTableNd; pPos->nContent.Assign(pPos->nNode.GetNode().GetContentNode(), 0); - if (aPam.Move(fnMoveBackward, fnGoContent)) + if (aPam.Move(fnMoveBackward, GoInContent)) { SwNodeIndex & rIdx = aPam.GetPoint()->nNode; @@ -2928,7 +2928,7 @@ void SwUndoSplitTable::UndoImpl(::sw::UndoRedoContext & rContext) SwNodeIndex const idx(pDoc->GetNodes(), nTableNode + nOffset); { SwPaM pam(idx); - pam.Move(fnMoveBackward, fnGoContent); + pam.Move(fnMoveBackward, GoInContent); ::PaMCorrAbs(*pPam, *pam.GetPoint()); } diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx index 50674f81a7ef..26baa8ccaca3 100644 --- a/sw/source/core/undo/untblk.cxx +++ b/sw/source/core/undo/untblk.cxx @@ -184,7 +184,7 @@ void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext) MoveToUndoNds(rPam, m_pUndoNodeIndex.get()); if( !bSttWasTextNd ) - rPam.Move( fnMoveBackward, fnGoContent ); + rPam.Move( fnMoveBackward, GoInContent ); } } diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index c180ebb7a8d8..13baf57da8cd 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -409,7 +409,7 @@ static void GetFormatAndCreateCursorFromRangeRep( // set cursor to top left box of range auto pUnoCursor = pTableFormat->GetDoc()->CreateUnoCursor(aPos, true); - pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->Move( fnMoveForward, GoInNode ); pUnoCursor->SetRemainInSection( false ); // #i80314# @@ -419,7 +419,7 @@ static void GetFormatAndCreateCursorFromRangeRep( { pUnoCursor->SetMark(); pUnoCursor->GetPoint()->nNode = *pBRBox->GetSttNd(); - pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->Move( fnMoveForward, GoInNode ); SwUnoTableCursor* pCursor = dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); // HACK: remove pending actions for old style tables @@ -2650,7 +2650,7 @@ bool SwChartDataSequence::ExtendTo( bool bExtendCol, pUnoTableCursor->SetMark(); pUnoTableCursor->GetPoint()->nNode = *pNewEndBox->GetSttNd(); pUnoTableCursor->GetMark()->nNode = *pNewStartBox->GetSttNd(); - pUnoTableCursor->Move( fnMoveForward, fnGoNode ); + pUnoTableCursor->Move( fnMoveForward, GoInNode ); pUnoTableCursor->MakeBoxSels(); } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 462b19df73b6..1671fe18d3cb 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -227,7 +227,7 @@ void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc, { SwPosition const aPos(*pBox->GetSttNd()); SwPaM aPam(aPos); - aPam.Move(fnMoveForward, fnGoNode); + aPam.Move(fnMoveForward, GoInNode); o_rpPaM = lcl_createPamCopy(aPam); } } diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 846fe4252a70..958c321c3d2c 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1314,7 +1314,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a else { //without access to the layout the last node of the body will be used as anchor position - aPam.Move( fnMoveBackward, fnGoDoc ); + aPam.Move( fnMoveBackward, GoInDoc ); } //anchor position has to be inserted after the text attribute has been inserted aNewAnchor.SetAnchor( aPam.GetPoint() ); @@ -1335,7 +1335,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a else { //without access to the layout the last node of the body will be used as anchor position - aPam.Move( fnMoveBackward, fnGoDoc ); + aPam.Move( fnMoveBackward, GoInDoc ); } //the RES_TXTATR_FLYCNT needs to be added now SwTextNode *pNd = aPam.GetNode().GetTextNode(); diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 656d86851cfe..855d7521bac1 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1932,7 +1932,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& { SwNode& rNode = pDoc->GetNodes().GetEndOfContent(); SwPaM aPam(rNode); - aPam.Move( fnMoveBackward, fnGoDoc ); + aPam.Move( fnMoveBackward, GoInDoc ); aAnchor.SetAnchor( aPam.Start() ); aSet.Put(aAnchor); } @@ -2721,7 +2721,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan SwNode& rNode = pDoc->GetNodes().GetEndOfContent(); SwPaM aPam(rNode); - aPam.Move( fnMoveBackward, fnGoDoc ); + aPam.Move( fnMoveBackward, GoInDoc ); static sal_uInt16 const aFrameAttrRange[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, @@ -3235,7 +3235,7 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursor() throw( uno const SwStartNode* pOwnStartNode = rNode.FindSttNodeByType(SwFlyStartNode); SwPaM aPam(rNode); - aPam.Move(fnMoveForward, fnGoNode); + aPam.Move(fnMoveForward, GoInNode); SwTableNode* pTableNode = aPam.GetNode().FindTableNode(); SwContentNode* pCont = nullptr; while( pTableNode ) @@ -3294,7 +3294,7 @@ uno::Reference< container::XEnumeration > SwXTextFrame::createEnumeration() thr return nullptr; SwPosition aPos(pFormat->GetContent().GetContentIdx()->GetNode()); auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos)); - pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->Move(fnMoveForward, GoInNode); return SwXParagraphEnumeration::Create(this, pUnoCursor, CURSOR_FRAME); } diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index fe5e28b09b06..5b3ecbddbe4e 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -437,7 +437,7 @@ SwXFootnote::createTextCursor() throw (uno::RuntimeException, std::exception) SwXTextCursor *const pXCursor = new SwXTextCursor(*GetDoc(), this, CURSOR_FOOTNOTE, aPos); auto& rUnoCursor(pXCursor->GetCursor()); - rUnoCursor.Move(fnMoveForward, fnGoNode); + rUnoCursor.Move(fnMoveForward, GoInNode); const uno::Reference< text::XTextCursor > xRet = static_cast<text::XWordCursor*>(pXCursor); return xRet; @@ -484,7 +484,7 @@ SwXFootnote::createEnumeration() throw (uno::RuntimeException, std::exception) SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote(); SwPosition aPos( *pTextFootnote->GetStartNode() ); auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos)); - pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->Move(fnMoveForward, GoInNode); return SwXParagraphEnumeration::Create(this, pUnoCursor, CURSOR_FOOTNOTE); } diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 3886968cd67d..20e8bd602a2c 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1406,10 +1406,10 @@ SwXDocumentIndex::getAnchor() throw (uno::RuntimeException, std::exception) if (pIdx && pIdx->GetNode().GetNodes().IsDocNodes()) { SwPaM aPaM(*pIdx); - aPaM.Move( fnMoveForward, fnGoContent ); + aPaM.Move( fnMoveForward, GoInContent ); aPaM.SetMark(); aPaM.GetPoint()->nNode = *pIdx->GetNode().EndOfSectionNode(); - aPaM.Move( fnMoveBackward, fnGoContent ); + aPaM.Move( fnMoveBackward, GoInContent ); xRet = SwXTextRange::CreateXTextRange(*pSectionFormat->GetDoc(), *aPaM.GetMark(), aPaM.GetPoint()); } diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index c5b1f69ade1c..ff6f37e30085 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -977,7 +977,7 @@ SwXTextCursor::gotoStart(sal_Bool Expand) throw (uno::RuntimeException, std::exc SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); if (CURSOR_BODY == m_pImpl->m_eType) { - rUnoCursor.Move( fnMoveBackward, fnGoDoc ); + rUnoCursor.Move( fnMoveBackward, GoInDoc ); //check, that the cursor is not in a table SwTableNode * pTableNode = rUnoCursor.GetNode().FindTableNode(); SwContentNode * pCNode = nullptr; @@ -1033,7 +1033,7 @@ SwXTextCursor::gotoEnd(sal_Bool Expand) throw (uno::RuntimeException, std::excep SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); if (CURSOR_BODY == m_pImpl->m_eType) { - rUnoCursor.Move( fnMoveForward, fnGoDoc ); + rUnoCursor.Move( fnMoveForward, GoInDoc ); } else if ( (CURSOR_FRAME == m_pImpl->m_eType) || (CURSOR_TBLTEXT == m_pImpl->m_eType) diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index ee4e4e995a12..f05434a718d8 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -589,7 +589,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl() throw (container::NoSuchElementE (CURSOR_SELECTION_IN_TABLE != m_eCursorType)) && pTableNode) { aNewCursor->GetPoint()->nNode = pTableNode->EndOfSectionIndex(); - aNewCursor->Move(fnMoveForward, fnGoNode); + aNewCursor->Move(fnMoveForward, GoInNode); } else { @@ -612,7 +612,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl() throw (container::NoSuchElementE { // this is a foreign table: go to end rUnoCursor.GetPoint()->nNode = pTableNode->EndOfSectionIndex(); - if (!rUnoCursor.Move(fnMoveForward, fnGoNode)) + if (!rUnoCursor.Move(fnMoveForward, GoInNode)) { return nullptr; } diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index 113fb9bab06c..3e38c6b9e8f4 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -111,7 +111,7 @@ uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor() SwXTextCursor *const pXCursor = new SwXTextCursor(*GetDoc(), this, CURSOR_REDLINE, aPos); auto& rUnoCursor(pXCursor->GetCursor()); - rUnoCursor.Move(fnMoveForward, fnGoNode); + rUnoCursor.Move(fnMoveForward, GoInNode); // #101929# prevent a newly created text cursor from running inside a table // because table cells have their own XText. @@ -160,7 +160,7 @@ uno::Reference<container::XEnumeration> SwXRedlineText::createEnumeration() { SolarMutexGuard aGuard; SwPaM aPam(aNodeIndex); - aPam.Move(fnMoveForward, fnGoNode); + aPam.Move(fnMoveForward, GoInNode); auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start())); return SwXParagraphEnumeration::Create(this, pUnoCursor, CURSOR_REDLINE); } @@ -542,7 +542,7 @@ uno::Reference< container::XEnumeration > SwXRedline::createEnumeration() throw if(!pNodeIndex) return nullptr; SwPaM aPam(*pNodeIndex); - aPam.Move(fnMoveForward, fnGoNode); + aPam.Move(fnMoveForward, GoInNode); auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start())); return SwXParagraphEnumeration::Create(this, pUnoCursor, CURSOR_REDLINE); } @@ -573,7 +573,7 @@ uno::Reference< text::XTextCursor > SwXRedline::createTextCursor() throw( uno:: SwXTextCursor *const pXCursor = new SwXTextCursor(*pDoc, this, CURSOR_REDLINE, aPos); auto& rUnoCursor(pXCursor->GetCursor()); - rUnoCursor.Move(fnMoveForward, fnGoNode); + rUnoCursor.Move(fnMoveForward, GoInNode); // is here a table? SwTableNode* pTableNode = rUnoCursor.GetNode().FindTableNode(); diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 8d1857443d7f..8482e2690934 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -446,11 +446,11 @@ SwXTextSection::getAnchor() throw (uno::RuntimeException, std::exception) pIdx->GetNode().GetNodes().IsDocNodes() ) { SwPaM aPaM(*pIdx); - aPaM.Move( fnMoveForward, fnGoContent ); + aPaM.Move( fnMoveForward, GoInContent ); const SwEndNode* pEndNode = pIdx->GetNode().EndOfSectionNode(); SwPaM aEnd(*pEndNode); - aEnd.Move( fnMoveBackward, fnGoContent ); + aEnd.Move( fnMoveBackward, GoInContent ); xRet = SwXTextRange::CreateXTextRange(*pSectFormat->GetDoc(), *aPaM.Start(), aEnd.Start()); } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index d66ebe26d500..6c71f8efe400 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -982,7 +982,7 @@ uno::Reference<text::XTextCursor> SwXCell::createTextCursor() throw( uno::Runtim SwXTextCursor* const pXCursor = new SwXTextCursor(*GetDoc(), this, CURSOR_TBLTEXT, aPos); auto& rUnoCursor(pXCursor->GetCursor()); - rUnoCursor.Move(fnMoveForward, fnGoNode); + rUnoCursor.Move(fnMoveForward, GoInNode); return static_cast<text::XWordCursor*>(pXCursor); } @@ -1126,7 +1126,7 @@ uno::Reference<container::XEnumeration> SwXCell::createEnumeration() throw( uno: const SwStartNode* pSttNd = pBox->GetSttNd(); SwPosition aPos(*pSttNd); auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos)); - pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->Move(fnMoveForward, GoInNode); // remember table and start node for later travelling // (used in export of tables in tables) SwTable const*const pTable(&pSttNd->FindTableNode()->GetTable()); @@ -1505,7 +1505,7 @@ SwXTextTableCursor::SwXTextTableCursor(SwFrameFormat* pFormat, SwTableBox* pBox) const SwStartNode* pSttNd = pBox->GetSttNd(); SwPosition aPos(*pSttNd); m_pUnoCursor = pDoc->CreateUnoCursor(aPos, true); - m_pUnoCursor->Move( fnMoveForward, fnGoNode ); + m_pUnoCursor->Move( fnMoveForward, GoInNode ); SwUnoTableCursor& rTableCursor = dynamic_cast<SwUnoTableCursor&>(*m_pUnoCursor); rTableCursor.MakeBoxSels(); } @@ -2288,14 +2288,14 @@ uno::Reference<table::XCellRange> GetRangeByName( SwPosition aPos(*pSttNd); // set cursor to the upper-left cell of the range auto pUnoCursor(pFormat->GetDoc()->CreateUnoCursor(aPos, true)); - pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->Move(fnMoveForward, GoInNode); pUnoCursor->SetRemainInSection(false); const SwTableBox* pBRBox(pTable->GetTableBox(rBRName)); if(!pBRBox) return nullptr; pUnoCursor->SetMark(); pUnoCursor->GetPoint()->nNode = *pBRBox->GetSttNd(); - pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->Move( fnMoveForward, GoInNode ); SwUnoTableCursor* pCursor = dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); // HACK: remove pending actions for selecting old style tables UnoActionRemoveContext aRemoveContext(*pCursor); @@ -2673,13 +2673,13 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An SwPosition aPos(*pSttNd); // set cursor to top left cell auto pUnoCursor(pDoc->CreateUnoCursor(aPos, true)); - pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->Move( fnMoveForward, GoInNode ); pUnoCursor->SetRemainInSection( false ); const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false); pUnoCursor->SetMark(); pUnoCursor->GetPoint()->nNode = *pBRBox->GetSttNd(); - pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->Move( fnMoveForward, GoInNode ); SwUnoTableCursor& rCursor = dynamic_cast<SwUnoTableCursor&>(*pUnoCursor); // HACK: remove pending actions for selecting old style tables UnoActionRemoveContext aRemoveContext(rCursor); @@ -2874,7 +2874,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) SwPosition aPos(*pSttNd); // set cursor to top left cell auto pUnoCursor(pDoc->CreateUnoCursor(aPos, true)); - pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->Move( fnMoveForward, GoInNode ); pUnoCursor->SetRemainInSection( false ); const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false); @@ -2882,7 +2882,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) const SwStartNode* pLastNd = pBRBox->GetSttNd(); pUnoCursor->GetPoint()->nNode = *pLastNd; - pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->Move( fnMoveForward, GoInNode ); SwUnoTableCursor& rCursor = dynamic_cast<SwUnoTableCursor&>(*pUnoCursor); // HACK: remove pending actions for selecting old style tables UnoActionRemoveContext aRemoveContext(rCursor); @@ -3399,14 +3399,14 @@ SwXCellRange::getCellRangeByPosition( SwPosition aPos(*pSttNd); // set cursor in the upper-left cell of the range auto pUnoCursor(pFormat->GetDoc()->CreateUnoCursor(aPos, true)); - pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->Move( fnMoveForward, GoInNode ); pUnoCursor->SetRemainInSection( false ); const SwTableBox* pBRBox = pTable->GetTableBox( sBRName ); if(pBRBox) { pUnoCursor->SetMark(); pUnoCursor->GetPoint()->nNode = *pBRBox->GetSttNd(); - pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->Move( fnMoveForward, GoInNode ); SwUnoTableCursor* pCursor = dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); // HACK: remove pending actions for selecting old style tables UnoActionRemoveContext aRemoveContext(*pCursor); @@ -4079,7 +4079,7 @@ void SwXTableRows::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) std::shared_ptr<SwUnoTableCursor> const pUnoCursor( std::dynamic_pointer_cast<SwUnoTableCursor>( pFrameFormat->GetDoc()->CreateUnoCursor(aPos, true))); - pUnoCursor->Move( fnMoveForward, fnGoNode ); + pUnoCursor->Move( fnMoveForward, GoInNode ); { // remove actions - TODO: why? UnoActionRemoveContext aRemoveContext(pUnoCursor->GetDoc()); @@ -4105,7 +4105,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) SwPosition aPos(*pSttNd); // set cursor to the upper-left cell of the range auto pUnoCursor(pFrameFormat->GetDoc()->CreateUnoCursor(aPos, true)); - pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->Move(fnMoveForward, GoInNode); pUnoCursor->SetRemainInSection( false ); const OUString sBLName = sw_GetCellName(0, nIndex + nCount - 1); const SwTableBox* pBLBox = pTable->GetTableBox( sBLName ); @@ -4113,7 +4113,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw uno::RuntimeException("Illegal arguments", static_cast<cppu::OWeakObject*>(this)); pUnoCursor->SetMark(); pUnoCursor->GetPoint()->nNode = *pBLBox->GetSttNd(); - pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->Move(fnMoveForward, GoInNode); SwUnoTableCursor* pCursor = dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); { // HACK: remove pending actions for selecting old style tables @@ -4230,7 +4230,7 @@ void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) SwPosition aPos(*pSttNd); UnoActionContext aAction(pFrameFormat->GetDoc()); auto pUnoCursor(pFrameFormat->GetDoc()->CreateUnoCursor(aPos, true)); - pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->Move(fnMoveForward, GoInNode); { // remove actions - TODO: why? @@ -4259,7 +4259,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) SwPosition aPos(*pSttNd); // set cursor to the upper-left cell of the range auto pUnoCursor(pFrameFormat->GetDoc()->CreateUnoCursor(aPos, true)); - pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->Move(fnMoveForward, GoInNode); pUnoCursor->SetRemainInSection(false); const OUString sTRName = sw_GetCellName(nIndex + nCount - 1, 0); const SwTableBox* pTRBox = pTable->GetTableBox(sTRName); @@ -4267,7 +4267,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw uno::RuntimeException("Cell not found", static_cast<cppu::OWeakObject*>(this)); pUnoCursor->SetMark(); pUnoCursor->GetPoint()->nNode = *pTRBox->GetSttNd(); - pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->Move(fnMoveForward, GoInNode); SwUnoTableCursor* pCursor = dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); { // HACK: remove pending actions for selecting old style tables diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 43b29b5c4086..391fa0c2b624 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1275,7 +1275,7 @@ SwXText::Impl::finishOrAppendParagraph( m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_START , nullptr); // find end node, go backward - don't skip tables because the new // paragraph has to be the last node - //aPam.Move( fnMoveBackward, fnGoNode ); + //aPam.Move( fnMoveBackward, GoInNode ); SwPosition aInsertPosition( SwNodeIndex( *pStartNode->EndOfSectionNode(), -1 ) ); SwPaM aPam(aInsertPosition); @@ -1293,7 +1293,7 @@ SwXText::Impl::finishOrAppendParagraph( m_pDoc->ResetAttrs(aPam); // in case of finishParagraph the PaM needs to be moved to the // previous paragraph - aPam.Move( fnMoveBackward, fnGoNode ); + aPam.Move( fnMoveBackward, GoInNode ); try { @@ -1700,7 +1700,7 @@ SwXText::convertToTextFrame( { // has to be in a block to remove the SwIndexes before // DelFullPara is called SwPaM aMovePam( aStartPam.GetNode() ); - if (aMovePam.Move( fnMoveForward, fnGoContent )) + if (aMovePam.Move( fnMoveForward, GoInContent )) { // move the anchor to the next paragraph SwFormatAnchor aNewAnchor(rNewFrame.GetFrameFormat()->GetAnchor()); @@ -1958,10 +1958,10 @@ void SwXText::Impl::ConvertCell( // aStartCellPam has to point to the start of the new (previous) node // aEndCellPam has to point to the end of the new (previous) node aStartCellPam.DeleteMark(); - aStartCellPam.Move(fnMoveBackward, fnGoNode); + aStartCellPam.Move(fnMoveBackward, GoInNode); aStartCellPam.GetPoint()->nContent = 0; aEndCellPam.DeleteMark(); - aEndCellPam.Move(fnMoveBackward, fnGoNode); + aEndCellPam.Move(fnMoveBackward, GoInNode); aEndCellPam.GetPoint()->nContent = aEndCellPam.GetNode().GetTextNode()->Len(); } @@ -2461,7 +2461,7 @@ SwXTextCursor * SwXBodyText::CreateTextCursor(const bool bIgnoreTables) // the cursor has to skip tables contained in this text SwPaM aPam(GetDoc()->GetNodes().GetEndOfContent()); - aPam.Move( fnMoveBackward, fnGoDoc ); + aPam.Move( fnMoveBackward, GoInDoc ); if (!bIgnoreTables) { SwTableNode * pTableNode = aPam.GetNode().FindTableNode(); @@ -2558,7 +2558,7 @@ throw (uno::RuntimeException, std::exception) SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); SwPosition aPos(rNode); auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos)); - pUnoCursor->Move(fnMoveBackward, fnGoDoc); + pUnoCursor->Move(fnMoveBackward, GoInDoc); return SwXParagraphEnumeration::Create(this, pUnoCursor, CURSOR_BODY); } @@ -2739,7 +2739,7 @@ SwXHeadFootText::createTextCursor() throw (uno::RuntimeException, std::exception SwXTextCursor *const pXCursor = new SwXTextCursor(*GetDoc(), this, (m_pImpl->m_bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER, aPos); auto& rUnoCursor(pXCursor->GetCursor()); - rUnoCursor.Move(fnMoveForward, fnGoNode); + rUnoCursor.Move(fnMoveForward, GoInNode); // save current start node to be able to check if there is content // after the table - otherwise the cursor would be in the body text! @@ -2792,7 +2792,7 @@ throw (uno::RuntimeException, std::exception) SwNode& rNode = rHeadFootFormat.GetContent().GetContentIdx()->GetNode(); SwPosition aPos(rNode); SwPaM aHFPam(aPos); - aHFPam.Move(fnMoveForward, fnGoNode); + aHFPam.Move(fnMoveForward, GoInNode); SwStartNode *const pOwnStartNode = aHFPam.GetNode().FindSttNodeByType( (m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode); SwStartNode *const p1 = aPam.GetNode().FindSttNodeByType( @@ -2820,7 +2820,7 @@ throw (uno::RuntimeException, std::exception) const SwNode& rNode = rFlyContent.GetContentIdx()->GetNode(); SwPosition aPos(rNode); auto pUnoCursor(GetDoc()->CreateUnoCursor(aPos)); - pUnoCursor->Move(fnMoveForward, fnGoNode); + pUnoCursor->Move(fnMoveForward, GoInNode); return SwXParagraphEnumeration::Create(this, pUnoCursor, (m_pImpl->m_bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER); } diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index 907ea407ffc9..3399572a9184 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -174,7 +174,7 @@ sal_uLong SwASCWriter::WriteStream() bTstFly = false; // Testing once is enough } - if( !pCurPam->Move( fnMoveForward, fnGoNode ) ) + if( !pCurPam->Move( fnMoveForward, GoInNode ) ) break; if( bShowProgress ) diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 0487085b4cba..001151de98d2 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -799,9 +799,9 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const OUString* pRealFileName ) else { pPam = new SwPaM( *pPam, pPam ); - pPam->Move( fnMoveBackward, fnGoDoc ); + pPam->Move( fnMoveBackward, GoInDoc ); pPam->SetMark(); - pPam->Move( fnMoveForward, fnGoDoc ); + pPam->Move( fnMoveForward, GoInDoc ); } } // pPam is still the current Cursor !! @@ -813,14 +813,14 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const OUString* pRealFileName ) pPam = new SwPaM( pOutDoc->GetNodes().GetEndOfContent() ); if( pOutDoc->IsClipBoard() ) { - pPam->Move( fnMoveBackward, fnGoDoc ); + pPam->Move( fnMoveBackward, GoInDoc ); pPam->SetMark(); - pPam->Move( fnMoveForward, fnGoDoc ); + pPam->Move( fnMoveForward, GoInDoc ); } else { pPam->SetMark(); - pPam->Move( fnMoveBackward, fnGoDoc ); + pPam->Move( fnMoveBackward, GoInDoc ); } } diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 2d6d590508dc..938a77fee396 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -1411,7 +1411,7 @@ void SwHTMLParser::StripTrailingPara() m_pPam->SetMark(); m_pPam->DeleteMark(); m_pDoc->GetNodes().Delete( m_pPam->GetPoint()->nNode ); - m_pPam->Move( fnMoveBackward, fnGoNode ); + m_pPam->Move( fnMoveBackward, GoInNode ); } else if( pCNd && pCNd->IsTextNode() && m_pTable ) { diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 0be738dedaf9..36f2fc18873e 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -798,7 +798,7 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() ) else if( !IsNewDoc() ) { if( pPos->nContent.GetIndex() ) // dann gabs am Ende kein <P>, - m_pPam->Move( fnMoveForward, fnGoNode ); // als zum naechsten Node + m_pPam->Move( fnMoveForward, GoInNode ); // als zum naechsten Node SwTextNode* pTextNode = pPos->nNode.GetNode().GetTextNode(); SwNodeIndex aPrvIdx( pPos->nNode ); if( pTextNode && pTextNode->CanJoinPrev( &aPrvIdx ) && diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index 64a5edd0a9b1..6072cc57d724 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -62,7 +62,7 @@ bool DocxExportFilter::exportDocument() // get the correct SwPaM* then... SwPaM aPam( pDoc->GetNodes().GetEndOfContent() ); aPam.SetMark(); - aPam.Move( fnMoveBackward, fnGoDoc ); + aPam.Move( fnMoveBackward, GoInDoc ); SwPaM *pCurPam = new SwPaM( *aPam.End(), *aPam.Start() ); diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index 26236dec21e8..34bdd46ed466 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -70,7 +70,7 @@ sal_Bool RtfExportFilter::filter(const uno::Sequence< beans::PropertyValue >& aD // we get SwPaM for the entire document; copy&paste is handled internally, not via UNO SwPaM aPam(pDoc->GetNodes().GetEndOfContent()); aPam.SetMark(); - aPam.Move(fnMoveBackward, fnGoDoc); + aPam.Move(fnMoveBackward, GoInDoc); auto pCurPam = o3tl::make_unique<SwPaM>(*aPam.End(), *aPam.Start()); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 6312f985ff33..e88d7cfa09d2 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -1070,7 +1070,7 @@ void SwWW8ImplReader::StopAnlToRestart(sal_uInt8 nNewType, bool bGoBack) if (bGoBack) { SwPosition aTmpPos(*m_pPaM->GetPoint()); - m_pPaM->Move(fnMoveBackward, fnGoContent); + m_pPaM->Move(fnMoveBackward, GoInContent); m_pCtrlStck->SetAttr(*m_pPaM->GetPoint(), RES_FLTR_NUMRULE); *m_pPaM->GetPoint() = aTmpPos; } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 9a707b88e0ed..a73c1a18e04b 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -806,7 +806,7 @@ void wwSectionManager::CreateSep(const long nTextPos, bool /*bMustHaveBreak*/) { bool insert = true; SwPaM pam( *mrReader.m_pLastAnchorPos ); - if( pam.Move(fnMoveBackward, fnGoNode)) + if( pam.Move(fnMoveBackward, GoInNode)) if( SwTextNode* txtNode = pam.GetPoint()->nNode.GetNode().GetTextNode()) if( txtNode->Len() == 0 ) insert = false; diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 15da4400bd80..99b46aba24fe 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -479,7 +479,7 @@ Reference<XTextCursor> XMLRedlineImportHelper::CreateRedlineTextSection( SwPosition aPos(*pRedlineNode); SwXTextCursor *const pXCursor = new SwXTextCursor(*pDoc, pXText, CURSOR_REDLINE, aPos); - pXCursor->GetCursor().Move(fnMoveForward, fnGoNode); + pXCursor->GetCursor().Move(fnMoveForward, GoInNode); // cast to avoid ambiguity xReturn = static_cast<text::XWordCursor*>(pXCursor); } diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 8343a1c4aa60..d7d066d9d71a 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -110,7 +110,7 @@ static void lcl_EnsureValidPam( SwPaM& rPam ) rPam.GetPoint()->nNode = *rPam.GetDoc()->GetNodes().GetEndOfContent().StartOfSectionNode(); ++ rPam.GetPoint()->nNode; - rPam.Move( fnMoveForward, fnGoContent ); // go into content + rPam.Move( fnMoveForward, GoInContent ); // go into content } } diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx index 8b48c376fd03..104255043df5 100644 --- a/sw/source/uibase/lingu/hhcwrp.cxx +++ b/sw/source/uibase/lingu/hhcwrp.cxx @@ -535,7 +535,7 @@ void SwHHCWrapper::Convert() // get PaM that points to the start of the document SwNode& rNode = m_pView->GetDocShell()->GetDoc()->GetNodes().GetEndOfContent(); SwPaM aPam(rNode); - aPam.Move( fnMoveBackward, fnGoDoc ); // move to start of document + aPam.Move( fnMoveBackward, GoInDoc ); // move to start of document pSttPos = aPam.GetPoint(); //! using a PaM here makes sure we will get only text nodes SwTextNode *pTextNode = pSttPos->nNode.GetNode().GetTextNode(); diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 357c18e3b74f..6d6eb8c2f28a 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -444,9 +444,9 @@ IMPL_LINK_TYPED( SwInputWindow, SelTableCellsNotify, SwWrtShell&, rCaller, void pWrtShell->StartAllAction(); SwPaM aPam( *pWrtShell->GetStackCursor()->GetPoint() ); - aPam.Move( fnMoveBackward, fnGoSection ); + aPam.Move( fnMoveBackward, GoInSection ); aPam.SetMark(); - aPam.Move( fnMoveForward, fnGoSection ); + aPam.Move( fnMoveForward, GoInSection ); IDocumentContentOperations& rIDCO = pWrtShell->getIDocumentContentOperations(); rIDCO.DeleteRange( aPam ); |