sw/source/core/layout/tabfrm.cxx | 2 +- sw/source/core/text/atrstck.cxx | 3 +-- sw/source/core/unocore/unomap.cxx | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-)
New commits: commit 80f3ab2f2cf1d1b21f020760fbd4a1155cd2b406 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Wed Mar 13 16:24:50 2024 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Wed Mar 13 16:25:29 2024 +0100 sw: convert OSL_ENSURE to assert To avoid spurious -Warray-bounds from GCC 13.2.1 Change-Id: I26aba84a6ceda79ffc111c925c8be96df8b186dd diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index 048878292fc0..0eb8d74e89c6 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -472,8 +472,7 @@ void SwAttrHandler::Pop( const SwTextAttr& rAttr ) void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr ) { - OSL_ENSURE( nAttr < RES_TXTATR_WITHEND_END, - "I cannot activate this attribute, nWhich >= RES_TXTATR_WITHEND_END" ); + assert(nAttr < RES_TXTATR_WITHEND_END); const sal_uInt16 nStackPos = StackPos[ nAttr ]; const SwTextAttr* pTopAt = GetTop(nStackPos); diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index ea8bb59f5cdd..e6ca2ce998af 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -73,7 +73,7 @@ using namespace ::com::sun::star::beans; o3tl::span<const SfxItemPropertyMapEntry> SwUnoPropertyMapProvider::GetPropertyMapEntries(sal_uInt16 nPropertyId) { - OSL_ENSURE(nPropertyId < PROPERTY_MAP_END, "Id ?" ); + assert(nPropertyId < PROPERTY_MAP_END); if( m_aMapEntriesArr[ nPropertyId ].empty() ) { switch(nPropertyId) commit 9af1d710e51af114b6a1110ade295f3eaa93f1d3 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Mar 12 16:21:57 2024 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Wed Mar 13 11:49:50 2024 +0100 tdf#157241 sw: layout: inconsistent conditions in lcl_RecalcSplitLine() A mistake, when checking before the condition is "if (pTab == &rTab)" but when checking after it is "if (pTab)" - the latter is correct as the former is checked *inside* the block, after resolving to top-level table. This caused erroneously setting rIsFootnoteGrowth = true in SwTabFrame::MakeAll() of tab 939 in the bugdoc, when in fact the footnote container shrunk from 5 to 2 footnotes. (regression from commit c303981cfd95ce1c3881366023d5495ae2edce97) Change-Id: Ib4cad9fef0e500ebe7a3636c2371a4108b32fb5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164717 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 7d3b439de357c8e97c0a73f6f63e67ec980e432d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164733 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 2fa450193fbf6013144bdf436076aa4971c3a12e) diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index bbea3ddbb6f0..a7ac10b65bd4 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -667,7 +667,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, SwRowFrame& rFollowLine, { SwContentFrame const*const pAnchor = pFootnote->GetRef(); SwTabFrame const* pTab = pAnchor->FindTabFrame(); - if (pTab == &rTab) + if (pTab) { while (pTab->GetUpper()->IsInTab()) {