summaryrefslogtreecommitdiff
path: root/cpputools/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-04-29 12:10:13 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-05-03 14:49:37 +0200
commitcdc5a0d824775275d6e2074608d1d93f2dc19e14 (patch)
tree82a2fb324eb31874f489d3764d529068ce5b2529 /cpputools/source
parent01a9f402db5840801e0eb004112bf19d5225f32c (diff)
tdf#148683 sw: fix crash on deleting text with redlining enabled, but hidden
Regression from commit 32902f66e7749b2d06d13f50416be5323a0c0ea9 (sw_redlinehide: make layout based Show/Hide mode the default, 2018-11-30), deleting some text in the middle of the paragraph with the bugdoc results in an assertion failure in the SwDrawTextInfo ctor. Normally this doesn't happen on text deletion as we already have a mechanism for truncating no longer needed lines in SwTextFrame::Format_(), though that only checks the length of the current line. Fix the problem by extending this mechanism to also check the remaining lines: if change tracking is on and the total of all line lengths is more than the string length of the text frame, then time to re-calculate. It seems this is not needed in practice when redlining is disabled, though we might want to enable this for the non-redline case as well in the future. (cherry picked from commit 515bf5d4afa3a8ed413fd6f17f66fa98b6dbf29e) Conflicts: sw/qa/core/text/text.cxx sw/CppunitTest_sw_core_text.mk Change-Id: Iede03e11daceb3c2b614a301e21560b075a60c01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133702 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'cpputools/source')
0 files changed, 0 insertions, 0 deletions