comphelper/source/misc/lok.cxx                        |    2 +-
 drawinglayer/source/primitive2d/textlayoutdevice.cxx  |    7 +++----
 include/comphelper/lok.hxx                            |    2 +-
 include/drawinglayer/primitive2d/textlayoutdevice.hxx |   10 +++++-----
 include/vcl/outdev.hxx                                |    4 ++--
 sc/source/ui/condformat/condformatmgr.cxx             |    8 ++++----
 vcl/source/outdev/EmphasisMarks.cxx                   |    7 +++----
 7 files changed, 19 insertions(+), 21 deletions(-)

New commits:
commit 06aaed0fd7e44f6c54331851e276dfb51dc561bb
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Aug 15 19:59:16 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 16 09:29:43 2024 +0200

    cid#1616498 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1616499 COPY_INSTEAD_OF_MOVE
    
    Change-Id: I21b089cab036902a7ba5b725a6eae0f1212f2b31
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171923
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 4be9e5744d07..07de005ad281 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -318,7 +318,7 @@ void statusIndicatorFinish()
         pStatusIndicatorCallback(pStatusIndicatorCallbackData, 
statusIndicatorCallbackType::Finish, 0, nullptr);
 }
 
-void setAnyInputCallback(std::function<bool(void*)> pAnyInputCallback, void* 
pData)
+void setAnyInputCallback(const std::function<bool(void*)>& pAnyInputCallback, 
void* pData)
 {
     g_pAnyInputCallback = pAnyInputCallback;
     g_pAnyInputCallbackData = pData;
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx 
b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 51c75f433ad6..67f1311a8010 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -381,9 +381,8 @@ TextLayouterDevice::getSalLayout(const OUString& rText, 
sal_uInt32 nIndex, sal_u
 
 void TextLayouterDevice::createEmphasisMarks(
     SalLayout& rSalLayout, TextEmphasisMark aTextEmphasisMark, bool bAbove,
-    std::function<void(const basegfx::B2DPoint&, const 
basegfx::B2DPolyPolygon&, bool,
-                       const tools::Rectangle&, const tools::Rectangle&)>
-        aCallback) const
+    const std::function<void(const basegfx::B2DPoint&, const 
basegfx::B2DPolyPolygon&, bool,
+                             const tools::Rectangle&, const 
tools::Rectangle&)>& rCallback) const
 {
     FontEmphasisMark nEmphasisMark(FontEmphasisMark::NONE);
     double fEmphasisHeight(getTextHeight() * (250.0 / 1000.0));
@@ -412,7 +411,7 @@ void TextLayouterDevice::createEmphasisMarks(
         nEmphasisMark |= FontEmphasisMark::PosBelow;
 
     mrDevice.createEmphasisMarks(nEmphasisMark, 
static_cast<tools::Long>(fEmphasisHeight),
-                                 rSalLayout, aCallback);
+                                 rSalLayout, rCallback);
 }
 
 // helper methods for vcl font handling
diff --git a/include/comphelper/lok.hxx b/include/comphelper/lok.hxx
index a497912c4a6f..d1aa6804f534 100644
--- a/include/comphelper/lok.hxx
+++ b/include/comphelper/lok.hxx
@@ -134,7 +134,7 @@ COMPHELPER_DLLPUBLIC void statusIndicatorFinish();
 
 COMPHELPER_DLLPUBLIC void setBlockedCommandList(const char* 
blockedCommandList);
 
-COMPHELPER_DLLPUBLIC void setAnyInputCallback(std::function<bool(void*)> 
pAnyInputCallback,
+COMPHELPER_DLLPUBLIC void setAnyInputCallback(const 
std::function<bool(void*)>& pAnyInputCallback,
                                               void* pData);
 COMPHELPER_DLLPUBLIC bool anyInput();
 }
diff --git a/include/drawinglayer/primitive2d/textlayoutdevice.hxx 
b/include/drawinglayer/primitive2d/textlayoutdevice.hxx
index 5a0849100142..5eb70003d0d4 100644
--- a/include/drawinglayer/primitive2d/textlayoutdevice.hxx
+++ b/include/drawinglayer/primitive2d/textlayoutdevice.hxx
@@ -125,11 +125,11 @@ public:
                                             const basegfx::B2DPoint& 
rStartPoint,
                                             const KernArray& rDXArray,
                                             std::span<const sal_Bool> 
pKashidaAry) const;
-    void
-    createEmphasisMarks(SalLayout& rSalLayout, TextEmphasisMark 
aTextEmphasisMark, bool bAbove,
-                        std::function<void(const basegfx::B2DPoint&, const 
basegfx::B2DPolyPolygon&,
-                                           bool, const tools::Rectangle&, 
const tools::Rectangle&)>
-                            aCallback) const;
+    void createEmphasisMarks(
+        SalLayout& rSalLayout, TextEmphasisMark aTextEmphasisMark, bool bAbove,
+        const std::function<void(const basegfx::B2DPoint&, const 
basegfx::B2DPolyPolygon&, bool,
+                                 const tools::Rectangle&, const 
tools::Rectangle&)>& rCallback)
+        const;
 };
 
 // helper methods for vcl font handling
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 2564193c0cf4..8d0d0c0bf5a9 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1237,8 +1237,8 @@ public:
         FontEmphasisMark nFontEmphasisMark,
         tools::Long nEmphasisHeight,
         SalLayout& rSalLayout,
-        std::function<void(const basegfx::B2DPoint&, const 
basegfx::B2DPolyPolygon&,
-            bool, const tools::Rectangle&, const tools::Rectangle&)> 
aCallback) const;
+        const std::function<void(const basegfx::B2DPoint&, const 
basegfx::B2DPolyPolygon&,
+            bool, const tools::Rectangle&, const tools::Rectangle&)>& 
rCallback) const;
 
     // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
     SAL_DLLPRIVATE bool         ImplIsAntiparallel() const ;
diff --git a/vcl/source/outdev/EmphasisMarks.cxx 
b/vcl/source/outdev/EmphasisMarks.cxx
index 2e1d57f93d9f..5e3ab5694bb2 100644
--- a/vcl/source/outdev/EmphasisMarks.cxx
+++ b/vcl/source/outdev/EmphasisMarks.cxx
@@ -25,9 +25,8 @@
 
 void OutputDevice::createEmphasisMarks(
     FontEmphasisMark nEmphasisMark, tools::Long nEmphasisHeight, SalLayout& 
rSalLayout,
-    std::function<void(const basegfx::B2DPoint&, const 
basegfx::B2DPolyPolygon&, bool,
-                       const tools::Rectangle&, const tools::Rectangle&)>
-        aCallback) const
+    const std::function<void(const basegfx::B2DPoint&, const 
basegfx::B2DPolyPolygon&, bool,
+                             const tools::Rectangle&, const 
tools::Rectangle&)>& rCallback) const
 {
     // tooling method to create geometry data for EmphasisMarks. It does the 
same
     // as OutputDevice::ImplDrawEmphasisMarks, but feeds the data into the
@@ -91,7 +90,7 @@ void OutputDevice::createEmphasisMarks(
             aOutPoint.adjustY(aAdjPoint.Y() - nEmphasisHeight2);
 
             // use callback to propagate the data to where it was requested 
from
-            aCallback(aOutPoint, aShape, aEmphasisMark.IsShapePolyLine(), 
aEmphasisMark.GetRect1(),
+            rCallback(aOutPoint, aShape, aEmphasisMark.IsShapePolyLine(), 
aEmphasisMark.GetRect1(),
                       aEmphasisMark.GetRect2());
         }
     }
commit 523465dbcc147178188bc3446a0eccf580c001ac
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Aug 15 17:44:54 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 16 09:29:30 2024 +0200

    tidy up some unnecessary this use
    
    Change-Id: I490817b99cb95dac216b89369e91ccb48c64f358
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171918
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/ui/condformat/condformatmgr.cxx 
b/sc/source/ui/condformat/condformatmgr.cxx
index 33ccc466d2ff..20b5fd732dec 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -163,7 +163,7 @@ 
ScCondFormatManagerDlg::ScCondFormatManagerDlg(weld::Window* pParent, ScDocument
         m_xDialog->set_window_state(aDlgOpt.GetWindowState());
 
     UpdateButtonSensitivity();
-    this->EntryFocus(*m_xTreeView);
+    EntryFocus(*m_xTreeView);
 }
 
 ScCondFormatManagerDlg::~ScCondFormatManagerDlg()
@@ -311,14 +311,14 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, EntryFocus, 
weld::TreeView&, void)
         if (conditionType == ScConditionMode::Direct) // Formula conditions
         {
             m_xConditionalType->set_active(1);
-            this->ComboHdl(*m_xConditionalType);
+            ComboHdl(*m_xConditionalType);
             m_xConditionalFormula->SetText(
                 conditionEntry->GetExpression(conditionEntry->GetSrcPos(), 0));
         }
         else
         {
             m_xConditionalType->set_active(0);
-            this->ComboHdl(*m_xConditionalType);
+            ComboHdl(*m_xConditionalType);
             
m_xConditionalCellValue->set_active(static_cast<int>(conditionType));
         }
     }
@@ -327,7 +327,7 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, EntryFocus, 
weld::TreeView&, void)
         const ScCondDateFormatEntry* dateEntry = dynamic_cast<const 
ScCondDateFormatEntry*>(entry);
         auto dateType = dateEntry->GetDateType();
         m_xConditionalType->set_active(2);
-        this->ComboHdl(*m_xConditionalType);
+        ComboHdl(*m_xConditionalType);
         m_xConditionalDate->set_active(dateType);
     }
 }

Reply via email to