sc/source/core/data/subtotalparam.cxx | 7 ++----- sc/source/ui/docshell/dbdocfun.cxx | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-)
New commits: commit 08e0f5245b532ec323a222870c74aafd4dcb2135 Author: Balazs Varga <[email protected]> AuthorDate: Thu Dec 11 09:16:16 2025 +0100 Commit: Balazs Varga <[email protected]> CommitDate: Thu Jan 29 09:33:49 2026 +0100 Table Style: fix dangling reference leading to undefined behavior after commit: 5ec4c2397d6099ade3347478f5e2e291eee59198 Change-Id: Id619a22b1a1d66f5653c9d9c5ce3a2d7edab6dbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195427 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Balazs Varga <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196776 Tested-by: Balazs Varga <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198002 Tested-by: Jenkins diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 9aa821ac9b26..8e81d3d36f86 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -286,7 +286,7 @@ bool ScDBDocFunc::RenameDBRange( const OUString& rOld, const OUString& rNew ) ScDocShellModificator aModificator( rDocShell ); std::unique_ptr<ScDBData> pNewData(new ScDBData(rNew, **iterOld)); - + OUString aUndoName = rOld; std::unique_ptr<ScDBCollection> pUndoColl( new ScDBCollection( *pDocColl ) ); rDoc.PreprocessDBDataUpdate(); @@ -304,7 +304,7 @@ bool ScDBDocFunc::RenameDBRange( const OUString& rOld, const OUString& rNew ) if (bUndo) { rDocShell.GetUndoManager()->AddUndoAction( - std::make_unique<ScUndoDBData>( rDocShell, rOld, std::move(pUndoColl), + std::make_unique<ScUndoDBData>( rDocShell, aUndoName, std::move(pUndoColl), rNew, std::make_unique<ScDBCollection>( *pDocColl ) ) ); } else commit f1f0c14ffae2a74a5c770fd4e89128a05ed0a1dc Author: Balazs Varga <[email protected]> AuthorDate: Fri Dec 5 12:23:36 2025 +0100 Commit: Balazs Varga <[email protected]> CommitDate: Thu Jan 29 09:33:40 2026 +0100 Table Styles: fix not removed total function in case of 0 new value. Remove/reset total functions or labels if have no any new ones. Change-Id: Ibac6d172b7d3ed0146e35177f7c8831ad34974b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195075 Reviewed-by: Balazs Varga <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196775 Tested-by: Balazs Varga <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198001 Tested-by: Jenkins diff --git a/sc/source/core/data/subtotalparam.cxx b/sc/source/core/data/subtotalparam.cxx index be9a95fc6767..448968d81efb 100644 --- a/sc/source/core/data/subtotalparam.cxx +++ b/sc/source/core/data/subtotalparam.cxx @@ -171,8 +171,7 @@ void ScSubTotalParam::SetCustFuncs(sal_uInt16 nGroup, sal_uInt16 nCount ) { OSL_ENSURE((nGroup <= MAXSUBTOTAL), "ScSubTotalParam::SetCustFuncs(): nGroup > MAXSUBTOTAL!"); - OSL_ENSURE((nCount > 0), "ScSubTotalParam::SetCustFuncs(): nCount == 0!"); - if (!(nCount > 0 && nGroup <= MAXSUBTOTAL)) + if (nGroup > MAXSUBTOTAL) return; aGroups[nGroup].AllocCustFuncs(nCount); @@ -185,9 +184,7 @@ void ScSubTotalParam::SetSubLabels(sal_uInt16 nGroup, sal_uInt16 nCount ) { OSL_ENSURE((nGroup <= MAXSUBTOTAL), "ScSubTotalParam::SetSubLabels(): nGroup > MAXSUBTOTAL!"); - OSL_ENSURE((nCount > 0), "ScSubTotalParam::SetSubLabels(): nCount == 0!"); - - if (!(nCount > 0 && nGroup <= MAXSUBTOTAL)) + if (nGroup > MAXSUBTOTAL) return; aGroups[nGroup].AllocSubLabels(nCount);
