From 3a14b2040ecd95a23acbc3e8d0f8087505135f11 Mon Sep 17 00:00:00 2001 From: László Németh Date: Wed, 16 Mar 2022 14:29:34 +0100 Subject: tdf#148032 sw: add redline comment for tracked comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tracked insertion/deletion of comments were shown as plain text insertion/deletion in that case, too, when there is no other text change in the redline (only the invisible placeholder character CH_TXTATR_INWORD of the comment). This was fixed by the new action icons of the Manage Changes dialog window before, but for better accessibility, now redline of a newly inserted/deleted comment gets also a redline comment "Comment added"/"Comment deleted", shown in Manage Changes dialog window with the Comment added/Comment deleted action icons, as suggested by Heiko Tietze. Note: because the redline comment (at least the tracked insertions) are stored in the document, this is a back-compatible solution. Follow-up to commit 128d3b454467e34538903b2eab45e866f976b314 "tdf#73125 sw: add Insert/Delete Comment Manage Changes action icons". Change-Id: I7a9e82ae1b9519e4883956f69de0aafc289f7f99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131659 Tested-by: Jenkins Reviewed-by: László Németh --- sw/source/uibase/misc/redlndlg.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sw/source/uibase') diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index b18123d89ec9..538467c8561c 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -308,16 +308,14 @@ OUString SwRedlineAcceptDlg::GetActionImage(const SwRangeRedline& rRedln, sal_uI ? OUString(BMP_REDLINE_ROW_INSERTION) : rRedln.IsMoved() ? OUString(BMP_REDLINE_MOVED_INSERTION) - : ( rRedln.GetText().getLength() == 1 && - rRedln.GetText()[0] == CH_TXTATR_INWORD ) + : rRedln.IsAnnotation() ? OUString(BMP_REDLINE_COMMENT_INSERTION) : OUString(BMP_REDLINE_INSERTED); case RedlineType::Delete: return bRowChanges ? OUString(BMP_REDLINE_ROW_DELETION) : rRedln.IsMoved() ? OUString(BMP_REDLINE_MOVED_DELETION) - : ( rRedln.GetText().getLength() == 1 && - rRedln.GetText()[0] == CH_TXTATR_INWORD ) + : rRedln.IsAnnotation() ? OUString(BMP_REDLINE_COMMENT_DELETION) : OUString(BMP_REDLINE_DELETED); case RedlineType::Format: return BMP_REDLINE_FORMATTED; -- cgit