sc/source/ui/inc/dbfunc.hxx | 2 +- sc/source/ui/view/dbfunc.cxx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 0c0795f059191e0c3980b65b1621a27f988fced3 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Oct 31 15:31:28 2024 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Oct 31 16:51:39 2024 +0100 tdf#163486: PVS: parameter is always rewritten Since commit 1e589375228b4dcee4a38122b34aea0720f888c0 Author: Szymon Kłos <szymon.k...@collabora.com> Date: Wed Aug 10 14:43:51 2022 +0200 Make Autofilter MessageBoxes async V763 Parameter 'nCol' is always rewritten in function body before being used. Change-Id: Ibb8a8b63887d06913fffe310a6754fdbba8c61ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175875 Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx index 4ab5688a2b0c..0c2d77d38461 100644 --- a/sc/source/ui/inc/dbfunc.hxx +++ b/sc/source/ui/inc/dbfunc.hxx @@ -37,7 +37,7 @@ private: void GetSelectedMemberList(ScDPUniqueStringSet& rEntries, tools::Long& rDimension); static void ModifiedAutoFilter(ScDocShell* pDocSh); static void ApplyAutoFilter(ScDocShell* pDocSh, ScViewData* pViewData, ScDBData* pDBData, - SCCOL nCol, SCROW nRow, SCTAB nTab, ScQueryParam aParam); + SCROW nRow, SCTAB nTab, ScQueryParam aParam); DECL_STATIC_LINK(ScDBFunc, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*); diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index 0f24677ab25c..9e2712fd2221 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -352,17 +352,17 @@ void ScDBFunc::ToggleAutoFilter() xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0)); // "StarCalc" xBox->set_default_response(RET_YES); xBox->SetInstallLOKNotifierHdl(LINK(this, ScDBFunc, InstallLOKNotifierHdl)); - xBox->runAsync(xBox, [pDocSh, pViewData, pDBData, nCol, nRow, nTab, aParam] (sal_Int32 nResult) { + xBox->runAsync(xBox, [pDocSh, pViewData, pDBData, nRow, nTab, aParam] (sal_Int32 nResult) { if (nResult == RET_YES) { pDBData->SetHeader( true ); //! Undo ?? } - ApplyAutoFilter(pDocSh, pViewData, pDBData, nCol, nRow, nTab, aParam); + ApplyAutoFilter(pDocSh, pViewData, pDBData, nRow, nTab, aParam); }); } else - ApplyAutoFilter(pDocSh, pViewData, pDBData, nCol, nRow, nTab, aParam); + ApplyAutoFilter(pDocSh, pViewData, pDBData, nRow, nTab, aParam); } else { @@ -381,7 +381,7 @@ IMPL_STATIC_LINK_NOARG(ScDBFunc, InstallLOKNotifierHdl, void*, vcl::ILibreOffice } void ScDBFunc::ApplyAutoFilter(ScDocShell* pDocSh, ScViewData* pViewData, ScDBData* pDBData, - SCCOL nCol, SCROW nRow, SCTAB nTab, ScQueryParam aParam) + SCROW nRow, SCTAB nTab, ScQueryParam aParam) { ScDocument& rDoc = pViewData->GetDocument(); ScRange aRange; @@ -391,7 +391,7 @@ void ScDBFunc::ApplyAutoFilter(ScDocShell* pDocSh, ScViewData* pViewData, ScDBDa pDBData->SetAutoFilter(true); - for (nCol=aParam.nCol1; nCol<=aParam.nCol2; nCol++) + for (SCCOL nCol=aParam.nCol1; nCol<=aParam.nCol2; nCol++) { ScMF nFlag = rDoc.GetAttr(nCol, nRow, nTab, ATTR_MERGE_FLAG)->GetValue(); rDoc.ApplyAttr(nCol, nRow, nTab, ScMergeFlagAttr(nFlag | ScMF::Auto));