sw/source/core/txtnode/txtatr2.cxx | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-)
New commits: commit 81f724c6fc87ff78270bceb7476e22c344e1993c Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sun Dec 22 22:35:09 2024 +0200 Commit: Noel Grandin <noelgran...@gmail.com> CommitDate: Tue Dec 24 13:40:08 2024 +0100 convert some warnings in SwTextCharFormat to assert Change-Id: I665db920f11108c29ac0cbbf44090f6ff4847e1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179178 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx index c18a9f6d4e23..e57e612fad1f 100644 --- a/sw/source/core/txtnode/txtatr2.cxx +++ b/sw/source/core/txtnode/txtatr2.cxx @@ -75,11 +75,10 @@ SwTextCharFormat::~SwTextCharFormat( ) void SwTextCharFormat::TriggerNodeUpdate(const sw::LegacyModifyHint& rHint) { const auto nWhich = rHint.GetWhich(); - SAL_WARN_IF( - !isCHRATR(nWhich) && - RES_OBJECTDYING != nWhich && - RES_ATTRSET_CHG != nWhich && - RES_FMT_CHG != nWhich, "sw.core", "SwTextCharFormat::TriggerNodeUpdate: unknown hint type"); + assert( (isCHRATR(nWhich) || + RES_OBJECTDYING == nWhich || + RES_ATTRSET_CHG == nWhich || + RES_FMT_CHG == nWhich) && "SwTextCharFormat::TriggerNodeUpdate: unknown hint type"); if(m_pTextNode) { @@ -185,8 +184,8 @@ void SwTextINetFormat::SwClientNotify(const SwModify&, const SfxHint& rHint) return; auto pLegacy = static_cast<const sw::LegacyModifyHint*>(&rHint); const auto nWhich = pLegacy->GetWhich(); - OSL_ENSURE(isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich) - || (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich), + assert((isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich) + || (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich)) && "SwTextINetFormat::SwClientNotify: unknown hint."); if(!m_pTextNode) return; @@ -225,10 +224,10 @@ void SwTextRuby::SwClientNotify(const SwModify&, const SfxHint& rHint) return; auto pLegacy = static_cast<const sw::LegacyModifyHint*>(&rHint); const auto nWhich = pLegacy->GetWhich(); - SAL_WARN_IF( !isCHRATR(nWhich) - && (RES_OBJECTDYING == nWhich) - && (RES_ATTRSET_CHG == nWhich) - && (RES_FMT_CHG == nWhich), "sw.core", "SwTextRuby::SwClientNotify(): unknown legacy hint"); + assert( (isCHRATR(nWhich) + || (RES_OBJECTDYING == nWhich) + || (RES_ATTRSET_CHG == nWhich) + || (RES_FMT_CHG == nWhich)) && "SwTextRuby::SwClientNotify(): unknown legacy hint"); if(!m_pTextNode) return; SwUpdateAttr aUpdateAttr(GetStart(), *GetEnd(), nWhich);