diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:48:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:48:25 +0000 |
commit | 9c0049cfae49c8e4ddef9125a69db2ad134c10c6 (patch) | |
tree | 812a86c0eee63dfc5ace12f2622ed3ce9cd3d680 /sw/source/core/edit | |
parent | Releasing progress-linux version 4:24.2.3-2~progress7.99u1. (diff) | |
download | libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.tar.xz libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.zip |
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/source/core/edit')
-rw-r--r-- | sw/source/core/edit/autofmt.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/edglss.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/edit/ednumber.cxx | 12 |
3 files changed, 16 insertions, 6 deletions
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 6fafe1310d..2082fa3ae4 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1710,7 +1710,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) const_cast<SwTextNode*>(m_pCurTextFrame->GetTextNodeForParaProps())->SetAttrListLevel(nLvl); // start new list - m_pDoc->SetNumRule(m_aDelPam, aRule, true, m_pEditShell->GetLayout()); + m_pDoc->SetNumRule(m_aDelPam, aRule, SwDoc::SetNumRuleMode::CreateNewList, m_pEditShell->GetLayout()); m_aDelPam.DeleteMark(); *m_aDelPam.GetPoint() = m_pCurTextFrame->MapViewToModelPos(TextFrameIndex(0)); diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx index 80310bab4f..b5dc871a6e 100644 --- a/sw/source/core/edit/edglss.cxx +++ b/sw/source/core/edit/edglss.cxx @@ -229,6 +229,14 @@ bool SwEditShell::CopySelToDoc( SwDoc& rInsDoc ) // but we want to copy the table and the start node before // the first cell as well. aPaM.Start()->Assign(*oSelectAll->first); + if (SwSectionNode const* pSection = oSelectAll->first->GetSectionNode()) + { + if (aPaM.End()->GetNodeIndex() < pSection->EndOfSectionIndex()) + { + // include section end so that section is copied + aPaM.End()->Assign(*oSelectAll->first->GetNodes()[pSection->EndOfSectionIndex() + 1]); + } + } } bRet = GetDoc()->getIDocumentContentOperations().CopyRange( aPaM, aPos, SwCopyFlags::CheckPosInFly) || bRet; diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index c272aa5f8e..65391d376b 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -355,7 +355,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos) // change numbering rule - changed numbering rule is not applied at <aPaM> SwPaM aPaM(pos); - GetDoc()->SetNumRule(aPaM, aRule, false, GetLayout(), OUString(), false); + GetDoc()->SetNumRule(aPaM, aRule, SwDoc::SetNumRuleMode::DontSetItem, GetLayout(), OUString()); } EndAllAction(); @@ -751,8 +751,9 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule, for (SwPaM& rPaM : pCursor->GetRingContainer()) { OUString sListId = GetDoc()->SetNumRule(rPaM, rRule, - bCreateNewList, GetLayout(), sContinuedListId, - true, bResetIndentAttrs ); + (bCreateNewList ? SwDoc::SetNumRuleMode::CreateNewList : SwDoc::SetNumRuleMode::Default) + | (bResetIndentAttrs ? SwDoc::SetNumRuleMode::ResetIndentAttrs : SwDoc::SetNumRuleMode::Default), + GetLayout(), sContinuedListId); //tdf#87548 On creating a new list for a multi-selection only //create a single new list for the multi-selection, not one per selection @@ -768,8 +769,9 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule, else { GetDoc()->SetNumRule( *pCursor, rRule, - bCreateNewList, GetLayout(), rContinuedListId, - true, bResetIndentAttrs ); + (bCreateNewList ? SwDoc::SetNumRuleMode::CreateNewList : SwDoc::SetNumRuleMode::Default) + | (bResetIndentAttrs ? SwDoc::SetNumRuleMode::ResetIndentAttrs : SwDoc::SetNumRuleMode::Default), + GetLayout(), rContinuedListId); GetDoc()->SetCounted( *pCursor, true, GetLayout() ); } GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::INSATTR, nullptr ); |