[Libreoffice-commits] core.git: sw/source
László Németh (via logerrit)
logerrit at kemper.freedesktop.org
Mon Apr 20 14:42:45 UTC 2020
sw/source/core/doc/DocumentRedlineManager.cxx | 34 ++++++++++++++------------
1 file changed, 19 insertions(+), 15 deletions(-)
New commits:
commit 66b39ca79b36da8d5e151deab17a0fb7690eebe6
Author: László Németh <nemeth at numbertext.org>
AuthorDate: Mon Apr 20 12:46:58 2020 +0200
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Mon Apr 20 16:42:08 2020 +0200
tdf#131147 don't store redline ExtraData during Undo
to avoid of unwanted redline changes and assertion.
Breaking redlines and storing extra data (formatting
changes) need only for change tracking during editing,
not in an ongoing Undo process.
Regression from commit dc9a0b124272a6dc0a8d875d51b6f882e60a8a04
(tdf#127101 Change tracking: reject format at paragraph join).
Change-Id: Id78251bc14821cc82d8f3d34eec63ba7bac68df0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92559
Tested-by: Jenkins
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index 3d8435efd262..b8b85c984546 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -2030,25 +2030,29 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
pTextNode = pTextNd->GetTextNode();
if (pTextNode && pDelNode != pTextNode )
{
- bCompress = true;
-
- // split redline to store ExtraData per paragraphs
SwPosition aPos(aIdx);
- SwRangeRedline* pPar = new SwRangeRedline( *pNewRedl );
- pPar->SetStart( aPos );
- pNewRedl->SetEnd( aPos );
- // get extradata for reset formatting of the modified paragraph
- SwRedlineExtraData_FormatColl* pExtraData = lcl_CopyStyle(aPos, *pStt, false);
- if (pExtraData)
+ if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- std::unique_ptr<SwRedlineExtraData_FormatColl> xRedlineExtraData;
- if (!bFirst)
- pExtraData->SetFormatAll(false);
- xRedlineExtraData.reset(pExtraData);
- pPar->SetExtraData( xRedlineExtraData.get() );
+ bCompress = true;
+
+ // split redline to store ExtraData per paragraphs
+ SwRangeRedline* pPar = new SwRangeRedline( *pNewRedl );
+ pPar->SetStart( aPos );
+ pNewRedl->SetEnd( aPos );
+
+ // get extradata for reset formatting of the modified paragraph
+ SwRedlineExtraData_FormatColl* pExtraData = lcl_CopyStyle(aPos, *pStt, false);
+ if (pExtraData)
+ {
+ std::unique_ptr<SwRedlineExtraData_FormatColl> xRedlineExtraData;
+ if (!bFirst)
+ pExtraData->SetFormatAll(false);
+ xRedlineExtraData.reset(pExtraData);
+ pPar->SetExtraData( xRedlineExtraData.get() );
+ }
+ mpRedlineTable->Insert( pPar );
}
- mpRedlineTable->Insert( pPar );
// modify paragraph formatting
lcl_CopyStyle(*pStt, aPos);
More information about the Libreoffice-commits
mailing list