From c8a7a6d600c2fb0ebe84c97553b2754936122023 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Wed, 27 Apr 2022 14:43:45 +0200 Subject: better debug font compare in SalLayoutGlyphsImpl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pointer comparison can be false even though the contents match. Change-Id: I584d30fdc7f311fd1a6058ae3cef98ce8b243f86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133529 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- vcl/source/gdi/impglyphitem.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx index 92703432d8bb..5896d5bfeb7c 100644 --- a/vcl/source/gdi/impglyphitem.cxx +++ b/vcl/source/gdi/impglyphitem.cxx @@ -134,7 +134,8 @@ SalLayoutGlyphsImpl* SalLayoutGlyphsImpl::cloneCharRange(sal_Int32 index, sal_In #ifdef DBG_UTIL bool SalLayoutGlyphsImpl::isEqual(const SalLayoutGlyphsImpl* other) const { - if (GetFont()->mxFontMetric != other->GetFont()->mxFontMetric) + if (!GetFont()->mxFontMetric->CompareDeviceIndependentFontAttributes( + *other->GetFont()->mxFontMetric)) return false; if (GetFlags() != other->GetFlags()) return false; -- cgit