sc/inc/document.hxx                |    4 ++--
 sc/source/ui/miscdlgs/solvrdlg.cxx |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit b6fb0d791cbfed88bb76df6188f6c0af459c03cb
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jun 16 17:10:40 2024 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Jun 17 17:28:54 2024 +0200

    cid#1603805 COPY_INSTEAD_OF_MOVE
    
    Change-Id: Ieb2c72dbdfec8431bd23da8a5e4844f3c1a5b74e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168958
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit c003f792183b63ca3f282a6fd53ceae0167f2a5e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168942
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 3d412761be39..30b7524a2b6e 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1983,8 +1983,8 @@ public:
     bool               Solver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
                                SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
                                const OUString& sValStr, double& nX, bool setNA 
= true);
-    ScGoalSeekSettings GetGoalSeekSettings() { return maGoalSeekSettings; }
-    void               SetGoalSeekSettings(ScGoalSeekSettings aNewSettings) { 
maGoalSeekSettings = aNewSettings; }
+    const ScGoalSeekSettings& GetGoalSeekSettings() { return 
maGoalSeekSettings; }
+    void               SetGoalSeekSettings(const ScGoalSeekSettings& 
rNewSettings) { maGoalSeekSettings = rNewSettings; }
 
     SC_DLLPUBLIC void           ApplySelectionPattern( const ScPatternAttr& 
rAttr, const ScMarkData& rMark,
                                                        ScEditDataArray* 
pDataArray = nullptr, bool* pIsChanged = nullptr );
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx 
b/sc/source/ui/miscdlgs/solvrdlg.cxx
index 4f1b38f1f857..b05b243965cb 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -96,14 +96,14 @@ void ScSolverDlg::Init()
     OUString aStr(theFormulaCell.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention()));
 
     // If Goal Seek settings are stored in the document, restore them
-    ScGoalSeekSettings aSettings = pDoc->GetGoalSeekSettings();
-    if (aSettings.bDefined)
+    const ScGoalSeekSettings& rSettings = pDoc->GetGoalSeekSettings();
+    if (rSettings.bDefined)
     {
-        OUString 
sFormulaString(aSettings.aFormulaCell.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention()));
-        OUString 
sVariableString(aSettings.aVariableCell.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention()));
+        OUString 
sFormulaString(rSettings.aFormulaCell.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention()));
+        OUString 
sVariableString(rSettings.aVariableCell.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention()));
         m_xEdFormulaCell->SetText(sFormulaString);
         m_xEdVariableCell->SetText(sVariableString);
-        m_xEdTargetVal->set_text(aSettings.sTargetValue);
+        m_xEdTargetVal->set_text(rSettings.sTargetValue);
     }
     else
     {

Reply via email to