svx/source/dialog/charmap.cxx       |   12 ++++++++++++
 svx/source/dialog/searchcharmap.cxx |   12 ++++++++++++
 2 files changed, 24 insertions(+)

New commits:
commit abb2151dc915defbc12dcf78bd01ae69f2f1f292
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Wed Mar 1 14:12:53 2023 +0100
Commit:     Andreas Heinisch <andreas.heini...@yahoo.de>
CommitDate: Sat Mar 4 10:55:06 2023 +0000

    tdf#141319 - Special Characters Dialog: mark empty/unused cells
    
    Change-Id: I123aef9f9763b2ae88c4b4f6748b69f9d9c394af
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148051
    Tested-by: Jenkins
    Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de>

diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 7dd37c43e106..4c17ce11c98a 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -627,6 +627,18 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& 
rRenderContext, int n1,
         }
         rRenderContext.SetTextColor(aTextCol);
     }
+
+    // tdf#141319 - mark empty/unused cells
+    if (n2 - n1 < ROW_COUNT * COLUMN_COUNT)
+    {
+        rRenderContext.SetFillColor(rStyleSettings.GetDisableColor());
+        for (i = n2 - n1 + 1; i < ROW_COUNT * COLUMN_COUNT; i++)
+        {
+            Point pix = MapIndexToPixel(i + n1);
+            rRenderContext.DrawRect(
+                tools::Rectangle(Point(pix.X(), pix.Y()), Size(nX + 2, nY + 
2)));
+        }
+    }
 }
 
 
diff --git a/svx/source/dialog/searchcharmap.cxx 
b/svx/source/dialog/searchcharmap.cxx
index 76a3a1a5f767..ea2ae309735a 100644
--- a/svx/source/dialog/searchcharmap.cxx
+++ b/svx/source/dialog/searchcharmap.cxx
@@ -283,6 +283,18 @@ void SvxSearchCharSet::DrawChars_Impl(vcl::RenderContext& 
rRenderContext, int n1
         }
         rRenderContext.SetTextColor(aTextCol);
     }
+
+    // tdf#141319 - mark empty/unused cells
+    if (n2 - n1 < ROW_COUNT * COLUMN_COUNT)
+    {
+        rRenderContext.SetFillColor(rStyleSettings.GetDisableColor());
+        for (i = n2 - n1 + 1; i < ROW_COUNT * COLUMN_COUNT; i++)
+        {
+            Point pix = MapIndexToPixel(i + n1);
+            rRenderContext.DrawRect(
+                tools::Rectangle(Point(pix.X(), pix.Y()), Size(nX + 2, nY + 
2)));
+        }
+    }
 }
 
 sal_UCS4 SvxSearchCharSet::GetSelectCharacter() const

Reply via email to