include/svx/grfflt.hxx            |    2 +-
 svx/source/dialog/grfflt.cxx      |    6 +++---
 sw/source/core/layout/colfrm.cxx  |    2 +-
 sw/source/ui/dialog/macassgn.cxx  |    2 +-
 sw/source/uibase/inc/macassgn.hxx |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 83214471da19abfdd75d254b95c4687c926f478c
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jan 28 19:31:30 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Jan 28 22:14:53 2024 +0100

    cid#1545317 try silencing Use after free harder
    
    Change-Id: Ib7a062d7b405e8b888a7826d9b25fdf786efdc0e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162668
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index 96351c020b3a..3d8e1d12c9f7 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -98,7 +98,7 @@ static void lcl_RemoveColumns(SwLayoutFrame *pCont, 
sal_uInt16 nCnt, const SwFra
     {
         SwColumnFrame *pTmp = static_cast<SwColumnFrame*>(pColumn->GetPrev());
         pColumn->Cut();
-        assert(pSave != pColumn && "we will deref pSave later, so shouldn't be 
deleted here"); (void)pSave;
+        assert(pColumn != pSave && "we will deref pSave later, so shouldn't be 
deleted here"); (void)pSave;
         SwFrame::DestroyFrame(pColumn); //format is going to be destroyed in 
the DTor if needed.
         pColumn = pTmp;
     }
commit d0eb98a4b3acf510e2e6aa6bb39e866d0977fc40
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jan 28 19:19:58 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Jan 28 22:14:43 2024 +0100

    cid#1588086 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1588075 COPY_INSTEAD_OF_MOVE
    cid#1588074 COPY_INSTEAD_OF_MOVE
    
    Change-Id: Ia621e7aafd5e0b009b8c97deeace8708897dad4f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162667
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/include/svx/grfflt.hxx b/include/svx/grfflt.hxx
index 731ef94bcdcb..13710ae4de55 100644
--- a/include/svx/grfflt.hxx
+++ b/include/svx/grfflt.hxx
@@ -32,7 +32,7 @@ public:
 
     /// this will execute a dialog and then call function f with the output of 
the filtering operation
     static void     ExecuteGrfFilterSlot( SfxRequest const & rReq, const 
GraphicObject& rInputObject,
-                        std::function<void(GraphicObject)> f);
+                        const std::function<void(const GraphicObject&)>& f);
     static void     DisableGraphicFilterSlots( SfxItemSet& rSet );
 };
 
diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx
index 562e0d52c990..9c7f1a9c92ba 100644
--- a/svx/source/dialog/grfflt.cxx
+++ b/svx/source/dialog/grfflt.cxx
@@ -35,11 +35,11 @@
 
 static void handleGraphicFilterDialog(const 
VclPtr<AbstractGraphicFilterDialog>& pDlg,
         const Graphic& aInputGraphic,
-        std::function<void(GraphicObject)> f);
+        const std::function<void(const GraphicObject&)>& f);
 
 void SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest const & rReq,
                         const GraphicObject& rInputObject,
-                        std::function<void(GraphicObject)> f)
+                        const std::function<void(const GraphicObject&)>& f)
 {
     Graphic aInputGraphic = rInputObject.GetGraphic();
 
@@ -260,7 +260,7 @@ void SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest 
const & rReq,
 
 static void handleGraphicFilterDialog(const 
VclPtr<AbstractGraphicFilterDialog>& pDlg,
         const Graphic& aInputGraphic,
-        std::function<void(GraphicObject)> f)
+        const std::function<void(const GraphicObject&)>& f)
 {
     pDlg->StartExecuteAsync(
         [pDlg, aInputGraphic, f] (sal_Int32 nResult)->void
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index fed86baa024f..fe059dc04993 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -101,7 +101,7 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType 
eType )
 }
 
 void SwMacroAssignDlg::INetFormatDlg(weld::Window* pParent, SwWrtShell& rSh, 
const SvxMacroItem& rItem,
-                                     std::function<void(const SvxMacroItem&)> 
onItemSelectedFunc )
+                                     const std::function<void(const 
SvxMacroItem&)>& onItemSelectedFunc )
 {
     SfxItemSetFixed<RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, 
SID_EVENTCONFIG> aSet( rSh.GetAttrPool() );
     aSet.Put( rItem );
diff --git a/sw/source/uibase/inc/macassgn.hxx 
b/sw/source/uibase/inc/macassgn.hxx
index 0975a35a6fed..29da5e6eb7a8 100644
--- a/sw/source/uibase/inc/macassgn.hxx
+++ b/sw/source/uibase/inc/macassgn.hxx
@@ -41,7 +41,7 @@ class SwMacroAssignDlg
 public:
     static SfxEventNamesItem AddEvents(DlgEventType eType);
     static void INetFormatDlg(weld::Window* pParent, SwWrtShell& rSh, const 
SvxMacroItem& rItem,
-                              std::function<void(const SvxMacroItem&)> 
onItemSelectedFunc);
+                              const std::function<void(const SvxMacroItem&)>& 
onItemSelectedFunc);
 };
 
 #endif

Reply via email to