diff options
-rw-r--r-- | sw/inc/cshtyp.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/crsr/paminit.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/frmedt/fetab.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/pamtyp.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/inputwin.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/move.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/select.cxx | 4 |
10 files changed, 22 insertions, 23 deletions
diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx index 44d9dcc2b333..1dbe447ce5c4 100644 --- a/sw/inc/cshtyp.hxx +++ b/sw/inc/cshtyp.hxx @@ -46,9 +46,10 @@ extern SwPosPara fnParaStart, fnParaEnd; // Direction-parameter for MoveSection. typedef SwMoveFnCollection* SwPosSection; typedef bool (*SwWhichSection)( SwPaM&, SwPosSection ); -extern SwWhichSection fnSectionCurr; extern SwPosSection fnSectionStart, fnSectionEnd; +bool GoCurrSection( SwPaM&, SwPosSection); + // Direction-parameter for MoveTable typedef SwMoveFnCollection* SwPosTable; typedef bool (*SwWhichTable)( SwPaM&, SwPosTable, bool bInReadOnly ); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 2236caf56762..7b501f44e371 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1517,7 +1517,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) } *m_pCurrentCursor->GetPoint() = *m_pCurrentCursor->GetMark(); - (*fnSectionCurr)( *m_pCurrentCursor, fnPosSect ); + GoCurrSection( *m_pCurrentCursor, fnPosSect ); } } diff --git a/sw/source/core/crsr/paminit.cxx b/sw/source/core/crsr/paminit.cxx index 23cd6cad6031..c36fe9ec2ed1 100644 --- a/sw/source/core/crsr/paminit.cxx +++ b/sw/source/core/crsr/paminit.cxx @@ -50,7 +50,6 @@ SwWhichPara fnParaNext = &GoNextPara; SwPosPara fnParaStart = &aFwrd; SwPosPara fnParaEnd = &aBwrd; -SwWhichSection fnSectionCurr = &GoCurrSection; SwPosSection fnSectionStart = &aFwrd; SwPosSection fnSectionEnd = &aBwrd; diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 8d19c739f2ab..08de9c18ed86 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -2136,7 +2136,7 @@ static bool lcl_GoTableRow( SwCursorShell* pShell, bool bUp ) // go to beginning end of table box SwPosSection fnPosSect = bUp ? fnSectionStart : fnSectionEnd; - pShell->MoveSection( fnSectionCurr, fnPosSect ); + pShell->MoveSection( GoCurrSection, fnPosSect ); // and go up/down into next content return bUp ? pShell->Up() : pShell->Down(); diff --git a/sw/source/core/inc/pamtyp.hxx b/sw/source/core/inc/pamtyp.hxx index 0a56ac677829..4588e6cfe59b 100644 --- a/sw/source/core/inc/pamtyp.hxx +++ b/sw/source/core/inc/pamtyp.hxx @@ -46,7 +46,6 @@ SwContentNode* GoPreviousNds( SwNodeIndex * pIdx, bool ); bool GoPrevPara( SwPaM&, SwPosPara); bool GoCurrPara( SwPaM&, SwPosPara); bool GoNextPara( SwPaM&, SwPosPara); -bool GoCurrSection( SwPaM&, SwPosSection); // Typedefiniton fuer Funktionen typedef bool (*GoNd)( SwNode*, SwIndex*, sal_uInt16 ); diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index ff6f37e30085..76f3bc996e9a 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -1015,7 +1015,7 @@ SwXTextCursor::gotoStart(sal_Bool Expand) throw (uno::RuntimeException, std::exc || (CURSOR_FOOTNOTE== m_pImpl->m_eType) || (CURSOR_REDLINE == m_pImpl->m_eType)) { - rUnoCursor.MoveSection(fnSectionCurr, fnSectionStart); + rUnoCursor.MoveSection(GoCurrSection, fnSectionStart); } else if (CURSOR_META == m_pImpl->m_eType) { @@ -1042,7 +1042,7 @@ SwXTextCursor::gotoEnd(sal_Bool Expand) throw (uno::RuntimeException, std::excep || (CURSOR_FOOTNOTE== m_pImpl->m_eType) || (CURSOR_REDLINE == m_pImpl->m_eType)) { - rUnoCursor.MoveSection( fnSectionCurr, fnSectionEnd); + rUnoCursor.MoveSection( GoCurrSection, fnSectionEnd); } else if (CURSOR_META == m_pImpl->m_eType) { diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 4990f5c2e346..1c637baec29d 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -1640,7 +1640,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) // at the beginning of the table's cell a '=' -> // call EditRow (F2-functionality) rSh.Push(); - if( !rSh.MoveSection( fnSectionCurr, fnSectionStart) && + if( !rSh.MoveSection( GoCurrSection, fnSectionStart) && !rSh.IsTableBoxTextFormat() ) { // is at the beginning of the box @@ -1649,7 +1649,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) rSh.SwapPam(); else rSh.SttSelect(); - rSh.MoveSection( fnSectionCurr, fnSectionEnd ); + rSh.MoveSection( GoCurrSection, fnSectionEnd ); rSh.Pop(); rSh.EndSelect(); sFormulaEntry = "="; @@ -2357,7 +2357,7 @@ KEYINPUT_CHECKTABLE_INSDEL: rSh.UnSelectFrame(); rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); - rSh.MoveSection( fnSectionCurr, fnSectionEnd ); + rSh.MoveSection( GoCurrSection, fnSectionEnd ); } eKeyState = KS_InsChar; } @@ -2380,7 +2380,7 @@ KEYINPUT_CHECKTABLE_INSDEL: rSh.UnSelectFrame(); rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); - rSh.MoveSection( fnSectionCurr, fnSectionEnd ); + rSh.MoveSection( GoCurrSection, fnSectionEnd ); eKeyState = KS_End; } break; diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 6d6eb8c2f28a..669457dbf4d1 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -254,9 +254,9 @@ void SwInputWindow::ShowWin() if( !pWrtShell->SwCursorShell::HasSelection() ) { - pWrtShell->MoveSection( fnSectionCurr, fnSectionStart ); + pWrtShell->MoveSection( GoCurrSection, fnSectionStart ); pWrtShell->SetMark(); - pWrtShell->MoveSection( fnSectionCurr, fnSectionEnd ); + pWrtShell->MoveSection( GoCurrSection, fnSectionEnd ); } if( pWrtShell->SwCursorShell::HasSelection() ) { @@ -497,9 +497,9 @@ void SwInputWindow::DelBoxContent() pWrtShell->ClearMark(); pWrtShell->Pop( false ); pWrtShell->Push(); - pWrtShell->MoveSection( fnSectionCurr, fnSectionStart ); + pWrtShell->MoveSection( GoCurrSection, fnSectionStart ); pWrtShell->SetMark(); - pWrtShell->MoveSection( fnSectionCurr, fnSectionEnd ); + pWrtShell->MoveSection( GoCurrSection, fnSectionEnd ); pWrtShell->SwEditShell::Delete(); pWrtShell->EndAllAction(); } diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index 7125044c7d13..f71b3ecd61b2 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -204,7 +204,7 @@ bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable, SttSelect(); } // Table cell ? - if ( !bBoxSelection && (MoveSection( fnSectionCurr, fnSectionStart) + if ( !bBoxSelection && (MoveSection( GoCurrSection, fnSectionStart) || bDontMoveRegion)) { if ( pMoveTable ) @@ -239,14 +239,14 @@ bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable, const FrameTypeFlags nFrameType = GetFrameType(nullptr,false); if ( FrameTypeFlags::FLY_ANY & nFrameType ) { - if( MoveSection( fnSectionCurr, fnSectionStart ) ) + if( MoveSection( GoCurrSection, fnSectionStart ) ) return true; else if ( FrameTypeFlags::FLY_FREE & nFrameType || bDontMoveRegion ) return false; } if(( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FOOTNOTE ) & nFrameType ) { - if ( MoveSection( fnSectionCurr, fnSectionStart ) ) + if ( MoveSection( GoCurrSection, fnSectionStart ) ) return true; else if ( bKeepArea ) return true; @@ -263,7 +263,7 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable) if ( IsCursorInTable() ) { - if ( MoveSection( fnSectionCurr, fnSectionEnd ) || + if ( MoveSection( GoCurrSection, fnSectionEnd ) || MoveTable( fnTableCurr, fnTableEnd ) ) return true; } @@ -272,14 +272,14 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable) const FrameTypeFlags nFrameType = GetFrameType(nullptr,false); if ( FrameTypeFlags::FLY_ANY & nFrameType ) { - if ( MoveSection( fnSectionCurr, fnSectionEnd ) ) + if ( MoveSection( GoCurrSection, fnSectionEnd ) ) return true; else if ( FrameTypeFlags::FLY_FREE & nFrameType ) return false; } if(( FrameTypeFlags::HEADER | FrameTypeFlags::FOOTER | FrameTypeFlags::FOOTNOTE ) & nFrameType ) { - if ( MoveSection( fnSectionCurr, fnSectionEnd) ) + if ( MoveSection( GoCurrSection, fnSectionEnd) ) return true; else if ( bKeepArea ) return true; diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index 4defb8b64f99..90e5c98b0f0b 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -147,9 +147,9 @@ long SwWrtShell::SelAll() pEndPos.reset(new SwPosition( *pTmpCursor->GetMark() )); } Push(); - bool bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart); + bool bIsFullSel = !MoveSection( GoCurrSection, fnSectionStart); SwapPam(); - bIsFullSel &= !MoveSection( fnSectionCurr, fnSectionEnd); + bIsFullSel &= !MoveSection( GoCurrSection, fnSectionEnd); Pop(false); GoStart(true, &bMoveTable, false, !bIsFullSel); } |