summaryrefslogtreecommitdiff
path: root/sw/source/core/doc
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2021-12-11 14:24:24 +0100
committerLászló Németh <nemeth@numbertext.org>2021-12-13 21:37:50 +0100
commitdaf0526ee637a46eec34cc9d086d5c53a1368d51 (patch)
tree8776d3402c38d2809f31d6c6ead012ce217aa93e /sw/source/core/doc
parent22403c7cca1df40915ecc61f273c4c7bbb276048 (diff)
tdf#146208 sw DOCX: fix crash at Redo of tracked table changes
Importing DOCX tables with tracked row deletion and insertion, accepting them, Undo, and accepting them again (or Redo) crashed LibreOffice, related to the missing Undo support of deletions in SwExtraRedlineTable. SwTableRowRedline is not used for DOCX export since commit dbc2bdffbec9b3f7eba485652cdd43634458b5a6 "tdf#145091 DOCX: don't export obsolete table row change data", so it's possible to switch off deletion of row changes in SwExtraRedlineTable to fix crashing, keeping SwTableRowRedline only to fix the round-trip of the original row change Date temporarily. Change-Id: I6ac571656e45c4299a07a63646bb28d6d1fcd081 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126662 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 6a9cf64ea7509aac258f290cc1f204fd1ce1f974) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126748
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r--sw/source/core/doc/docredln.cxx25
1 files changed, 0 insertions, 25 deletions
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 96f3742ce8f1..0d0b7fa621e2 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -172,31 +172,6 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc& rDoc, const SwTable& rT
}
}
}
- else
- {
- const SwTableRowRedline* pTableRowRedline = dynamic_cast<const SwTableRowRedline*>(pExtraRedline);
- if (pTableRowRedline)
- {
- const SwTableLine *pRedTabLine = &pTableRowRedline->GetTableLine();
- const SwTableBoxes &rRedTabBoxes = pRedTabLine->GetTabBoxes();
- const SwTable& rRedTable = rRedTabBoxes[0]->GetSttNd()->FindTableNode()->GetTable();
- if ( &rRedTable == &rTable )
- {
- // Redline for this table
- const SwRedlineData& aRedlineData = pTableRowRedline->GetRedlineData();
- const RedlineType nRedlineType = aRedlineData.GetType();
-
- // Check if this redline object type should be deleted
- if (RedlineType::Any == nRedlineTypeToDelete || nRedlineTypeToDelete == nRedlineType)
-
- {
- DeleteAndDestroy( nCurRedlinePos );
- bChg = true;
- continue; // don't increment position after delete
- }
- }
- }
- }
++nCurRedlinePos;
}