sc/inc/scabstdlg.hxx | 2 +- sc/source/ui/attrdlg/scdlgfact.cxx | 2 +- sc/source/ui/inc/tabbgcolordlg.hxx | 2 +- sc/source/ui/miscdlgs/tabbgcolordlg.cxx | 4 ++-- sc/source/ui/view/tabvwshf.cxx | 3 +-- 5 files changed, 6 insertions(+), 7 deletions(-)
New commits: commit 2a47a549935e274eebf8ee9dcf2d60a4c41cb238 Author: Michael Weghorn <[email protected]> AuthorDate: Wed Dec 31 01:32:02 2025 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Thu Jan 1 14:39:54 2026 +0100 sc: Use return value for ScTabBgColorDlg::GetSelectedColor Let the method return the color instead of using an out param. Change-Id: I1349d8d4032f407a87cc337016dc75cd0dc56efb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196343 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index a2f51e384450..d3a4914f5d5f 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -376,7 +376,7 @@ class AbstractScTabBgColorDlg : public VclAbstractDialog protected: virtual ~AbstractScTabBgColorDlg() override = default; public: - virtual void GetSelectedColor( Color& rColor ) const = 0; + virtual Color GetSelectedColor() const = 0; }; class AbstractScImportOptionsDlg : public VclAbstractDialog diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 67ee17a4da49..8fbd059e1b96 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -779,7 +779,7 @@ class AbstractScTabBgColorDlg_Impl { public: using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE; - void GetSelectedColor(Color& rColor) const override { m_pDlg->GetSelectedColor(rColor); } + Color GetSelectedColor() const override { return m_pDlg->GetSelectedColor(); } }; } diff --git a/sc/source/ui/inc/tabbgcolordlg.hxx b/sc/source/ui/inc/tabbgcolordlg.hxx index 8137558b75e1..8193f7d63262 100644 --- a/sc/source/ui/inc/tabbgcolordlg.hxx +++ b/sc/source/ui/inc/tabbgcolordlg.hxx @@ -32,7 +32,7 @@ public: const Color& rDefaultColor); virtual ~ScTabBgColorDlg() override; - void GetSelectedColor( Color& rColor ) const; + Color GetSelectedColor() const; class ScTabBgColorValueSet : public SvxColorValueSet { diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx index f319c1d8b005..93c1d73a1a37 100644 --- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx +++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx @@ -61,9 +61,9 @@ ScTabBgColorDlg::~ScTabBgColorDlg() { } -void ScTabBgColorDlg::GetSelectedColor( Color& rColor ) const +Color ScTabBgColorDlg::GetSelectedColor() const { - rColor = m_aTabBgColor; + return m_aTabBgColor; } void ScTabBgColorDlg::FillPaletteLB() diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 51348c5fb34f..dd4dd12dba98 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -1277,8 +1277,7 @@ bool ScTabViewShell::DoTableBackgroundDialog(sal_Int32 nResult, const VclPtr<Abs SCTAB nCurrentTab = rViewData.CurrentTabForData(); SCTAB nTabSelCount = rMark.GetSelectCount(); bool bDone = false; /// temp - Color aSelectedColor; - pDlg->GetSelectedColor(aSelectedColor); + Color aSelectedColor = pDlg->GetSelectedColor(); std::unique_ptr<ScUndoTabColorInfo::List> pTabColorList(new ScUndoTabColorInfo::List); if ( nTabSelCount > 1 )
