summaryrefslogtreecommitdiff
path: root/svx/source/dialog
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2023-03-01 14:12:53 +0100
committerAndreas Heinisch <andreas.heinisch@yahoo.de>2023-03-04 10:55:06 +0000
commitabb2151dc915defbc12dcf78bd01ae69f2f1f292 (patch)
tree4408bf098d7f5623975bd917d2fd530e4ad43ae9 /svx/source/dialog
parentfa8a60c76117cdd0f4290fb5afbe7f5c1463d801 (diff)
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.heinisch@yahoo.de>
Diffstat (limited to 'svx/source/dialog')
-rw-r--r--svx/source/dialog/charmap.cxx12
-rw-r--r--svx/source/dialog/searchcharmap.cxx12
2 files changed, 24 insertions, 0 deletions
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