sw/source/core/edit/edfcol.cxx | 4 ---- sw/source/core/edit/ednumber.cxx | 27 +-------------------------- 2 files changed, 1 insertion(+), 30 deletions(-)
New commits: commit fcbd1e8363f14fcbdcef9bb2a6bca8a2cb7644ac Author: Justin Luth <jl...@mail.com> AuthorDate: Tue Jun 28 07:25:57 2022 -0400 Commit: Justin Luth <jl...@mail.com> CommitDate: Thu Jun 30 00:19:11 2022 +0200 tdf#tdf#93747 tdf#145151 sw IsTableMode: revert obsolete one-offs I started playing whack-a-mole, patching functions for excessively selected cells. But now bug 145151 has fixed the selection process itself, so these avoidance clauses are now obsolete, so revert these 7.3 or 7.4 fixes. This keeps the unit tests in make CppunitTest_sw_uiwriter5 Change-Id: Ie7848b483d495d79c046b9f4293b605d2edea658 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136578 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 1d480f293fc5..aade2988c94b 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -2199,10 +2199,6 @@ void SwEditShell::SetTextFormatColl(SwTextFormatColl *pFormat, GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::SETFMTCOLL, &aRewriter); for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { - // If in table cells select mode, ignore the cells that aren't actually selected - if (IsTableMode() && !rPaM.HasMark()) - continue; - if ( !rPaM.HasReadonlySel( GetViewOptions()->IsFormView() ) ) { // store previous paragraph style for track changes diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index dd21abd149f6..4e9ca59c476b 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -152,10 +152,6 @@ bool SwEditShell::SelectionHasNumber() const bool bResult = false; for (SwPaM& rPaM : GetCursor()->GetRingContainer()) { - // If in table cells select mode, ignore the cells that aren't actually selected - if (IsTableMode() && !rPaM.HasMark()) - continue; - SwNodeOffset nStt = rPaM.Start()->nNode.GetIndex(); SwNodeOffset nEnd = rPaM.End()->nNode.GetIndex(); for (SwNodeOffset nPos = nStt; nPos<=nEnd; nPos++) @@ -191,9 +187,6 @@ bool SwEditShell::SelectionHasBullet() const bool bResult = false; for (SwPaM& rPaM : GetCursor()->GetRingContainer()) { - if (IsTableMode() && !rPaM.HasMark()) - continue; - SwNodeOffset nStt = rPaM.Start()->nNode.GetIndex(); SwNodeOffset nEnd = rPaM.End()->nNode.GetIndex(); for (SwNodeOffset nPos = nStt; nPos<=nEnd; nPos++) @@ -265,9 +258,6 @@ void SwEditShell::DelNumRules() GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr ); for (SwPaM& rPaM : pCursor->GetRingContainer()) { - if (IsTableMode() && !rPaM.HasMark()) - continue; - GetDoc()->DelNumRules(rPaM, GetLayout()); } GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr ); @@ -705,19 +695,7 @@ sal_uInt8 SwEditShell::GetNumLevel() const const SwNumRule* SwEditShell::GetNumRuleAtCurrCursorPos() const { - SwPaM* pCursor = GetCursor(); - if (IsTableMode() && pCursor->IsMultiSelection() ) - { - // Find the first valid position - for (SwPaM& rPaM : pCursor->GetRingContainer()) - { - if (!rPaM.HasMark()) - continue; - pCursor = &rPaM; - break; - } - } - SwPosition pos(*pCursor->GetPoint()); + SwPosition pos(*GetCursor()->GetPoint()); return SwDoc::GetNumRuleAtPos( pos, GetLayout() ); } @@ -774,9 +752,6 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule, OUString sContinuedListId(rContinuedListId); for (SwPaM& rPaM : pCursor->GetRingContainer()) { - if (IsTableMode() && !rPaM.HasMark()) - continue; - OUString sListId = GetDoc()->SetNumRule(rPaM, rRule, bCreateNewList, GetLayout(), sContinuedListId, true, bResetIndentAttrs );