sw/source/core/txtnode/fntcache.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 8155efc399f12bffbbab23a2efc67e172bf08e9c Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Dec 20 16:04:00 2021 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Thu Dec 23 10:32:02 2021 +0100 sw: fix SwTextGlyphsKey::operator==() It assumed that the length of our text and the RHS's text is the same, but that may not be true. Originally introduced in commit c7b83934fcf4120c1a4cba8e1eaf9c7aef9edc82 (tdf#119992 sw: compare sub-strings in SwTextGlyphsKey comparison, 2018-10-12). Change-Id: I0361ec001aaffdbad6814bbbfefec6eaeb367f10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127163 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins (cherry picked from commit 0aca74c0acc3e1c3f6099f47bfe9bfedfa7bf86d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127258 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index f2c18d7b1ce9..93e83c2013e9 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -91,7 +91,8 @@ bool SwTextGlyphsKey::operator==(SwTextGlyphsKey const & rhs) const { bool b = m_pOutputDevice.get() == rhs.m_pOutputDevice.get() && m_nIndex == rhs.m_nIndex - && m_nLength == rhs.m_nLength; + && m_nLength == rhs.m_nLength + && m_aText.getLength() == rhs.m_aText.getLength(); if (!b) return false; if(m_nLength >= 0 && m_nIndex >= 0 && m_nIndex + m_nLength <= m_aText.getLength())