summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2022-03-11 16:57:00 +0100
committerLászló Németh <nemeth@numbertext.org>2022-03-12 18:41:51 +0100
commit128d3b454467e34538903b2eab45e866f976b314 (patch)
tree33774a2858e916c143c50900f3b5d5f2f74cf037 /sw
parent8c94a17e408db8a0d27101ce07345fc640bef64d (diff)
tdf#73125 sw: add Insert/Delete Comment Manage Changes action icons
If the listed redline change contains only a comment. Note: filter actions haven't been extended, because tracked comments are still handled as text insertion/deletion, and their redlines joined with the tracked text changes around their placeholder character, i.e. not all tracked comments got new action icons. Change-Id: Ie78e18a48b9a71c3789fca1406e5d87ab95952bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131387 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/bitmaps.hlst2
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx10
2 files changed, 10 insertions, 2 deletions
diff --git a/sw/inc/bitmaps.hlst b/sw/inc/bitmaps.hlst
index e24b79abc6cc..91de45e5d4fb 100644
--- a/sw/inc/bitmaps.hlst
+++ b/sw/inc/bitmaps.hlst
@@ -30,6 +30,8 @@ inline constexpr OUStringLiteral BMP_REDLINE_MOVED_INSERTION = u"cmd/sc_paste.pn
inline constexpr OUStringLiteral BMP_REDLINE_MOVED_DELETION = u"cmd/sc_cut.png";
inline constexpr OUStringLiteral BMP_REDLINE_ROW_INSERTION = u"cmd/sc_insertrows.png";
inline constexpr OUStringLiteral BMP_REDLINE_ROW_DELETION = u"cmd/sc_deleterows.png";
+inline constexpr OUStringLiteral BMP_REDLINE_COMMENT_INSERTION = u"cmd/sc_insertannotation.png";
+inline constexpr OUStringLiteral BMP_REDLINE_COMMENT_DELETION = u"cmd/sc_deleteannotation.png";
inline constexpr OUStringLiteral RID_BMP_DB = u"sw/res/sx01.png";
inline constexpr OUStringLiteral RID_BMP_DBTABLE = u"sw/res/sx02.png";
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 8d59072d7b7a..b18123d89ec9 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -308,12 +308,18 @@ OUString SwRedlineAcceptDlg::GetActionImage(const SwRangeRedline& rRedln, sal_uI
? OUString(BMP_REDLINE_ROW_INSERTION)
: rRedln.IsMoved()
? OUString(BMP_REDLINE_MOVED_INSERTION)
- : OUString(BMP_REDLINE_INSERTED);
+ : ( rRedln.GetText().getLength() == 1 &&
+ rRedln.GetText()[0] == CH_TXTATR_INWORD )
+ ? 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)
- : OUString(BMP_REDLINE_DELETED);
+ : ( rRedln.GetText().getLength() == 1 &&
+ rRedln.GetText()[0] == CH_TXTATR_INWORD )
+ ? OUString(BMP_REDLINE_COMMENT_DELETION)
+ : OUString(BMP_REDLINE_DELETED);
case RedlineType::Format: return BMP_REDLINE_FORMATTED;
case RedlineType::ParagraphFormat: return BMP_REDLINE_FORMATTED;
case RedlineType::Table: return BMP_REDLINE_TABLECHG;