sw/inc/bitmaps.hlst                |    2 ++
 sw/source/uibase/misc/redlndlg.cxx |   10 ++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 128d3b454467e34538903b2eab45e866f976b314
Author:     László Németh <nem...@numbertext.org>
AuthorDate: Fri Mar 11 16:57:00 2022 +0100
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Sat Mar 12 18:41:51 2022 +0100

    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 <nem...@numbertext.org>

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;

Reply via email to