sc/source/core/data/table2.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit 03fdb8319f2c156ff39deee819810934aae237c3 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat Feb 10 19:25:21 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sun Feb 11 20:56:01 2024 +0100 cid#1559961 silence Free of address-of expression Change-Id: I853b16d84a865a915e6489f38db3737d0efe59e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163232 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index fc34eb3b60ea..b0f2fa1537b5 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1022,12 +1022,10 @@ void ScTable::TransposeClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, static void lcl_SetTransposedPatternInRows(ScTable* pTransClip, SCROW nAttrRow1, SCROW nAttrRow2, SCCOL nCol1, SCROW nRow1, SCROW nCombinedStartRow, SCCOL nCol, - const ScPatternAttr& rPatternAttr, bool bIncludeFiltered, + const CellAttributeHolder& rPatternHolder, bool bIncludeFiltered, const std::vector<SCROW>& rFilteredRows, SCROW nRowDestOffset) { - const CellAttributeHolder aPatternHolder(&rPatternAttr); - for (SCROW nRow = nAttrRow1; nRow <= nAttrRow2; nRow++) { size_t nFilteredRowAdjustment = 0; @@ -1048,7 +1046,7 @@ static void lcl_SetTransposedPatternInRows(ScTable* pTransClip, SCROW nAttrRow1, pTransClip->SetPattern( static_cast<SCCOL>(nCol1 + nRow - nRow1 - nFilteredRowAdjustment + nRowDestOffset), - static_cast<SCROW>(nCombinedStartRow + nCol - nCol1), aPatternHolder); + static_cast<SCROW>(nCombinedStartRow + nCol - nCol1), rPatternHolder); } } @@ -1072,8 +1070,9 @@ void ScTable::TransposeColPatterns(ScTable* pTransClip, SCCOL nCol1, SCCOL nCol, { // Set pattern in cells from nAttrRow1 to nAttrRow2 // no borders or merge items involved - use pattern as-is + const CellAttributeHolder aPatternHolder(pPattern); lcl_SetTransposedPatternInRows(pTransClip, nAttrRow1, nAttrRow2, nCol1, nRow1, - nCombinedStartRow, nCol, *pPattern, + nCombinedStartRow, nCol, aPatternHolder, bIncludeFiltered, rFilteredRows, nRowDestOffset); } else @@ -1116,8 +1115,9 @@ void ScTable::TransposeColPatterns(ScTable* pTransClip, SCCOL nCol1, SCCOL nCol, } // Set pattern in cells from nAttrRow1 to nAttrRow2 + const CellAttributeHolder aPatternHolder(&aNewPattern); lcl_SetTransposedPatternInRows(pTransClip, nAttrRow1, nAttrRow2, nCol1, nRow1, - nCombinedStartRow, nCol, aNewPattern, + nCombinedStartRow, nCol, aPatternHolder, bIncludeFiltered, rFilteredRows, nRowDestOffset); } }