chart2/source/controller/main/ChartController_Properties.cxx |   11 ++++++-----
 sw/source/core/text/porlay.cxx                               |    2 +-
 vcl/source/window/brdwin.cxx                                 |    6 ++----
 3 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 218e4641c4e2e0f894afab40b0e789636e73ad4c
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Mar 8 08:26:20 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Mar 8 14:50:12 2024 +0100

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

diff --git a/chart2/source/controller/main/ChartController_Properties.cxx 
b/chart2/source/controller/main/ChartController_Properties.cxx
index 79b6159d4a6e..f6a259c64d8f 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -703,17 +703,17 @@ void ChartController::executeDlg_ObjectProperties( const 
OUString& rSelectedObje
 {
     OUString aObjectCID = lcl_getFormatCIDforSelectedCID( rSelectedObjectCID );
 
-    auto aUndoGuard = std::make_shared<UndoGuard>(
+    auto xUndoGuard = std::make_shared<UndoGuard>(
         ActionDescriptionProvider::createDescription(
             ActionDescriptionProvider::ActionType::Format,
             ObjectNameProvider::getName( ObjectIdentifier::getObjectType( 
aObjectCID ))),
         m_xUndoManager );
 
-    ChartController::executeDlg_ObjectProperties_withUndoGuard( aUndoGuard, 
aObjectCID, false );
+    
ChartController::executeDlg_ObjectProperties_withUndoGuard(std::move(xUndoGuard),
 aObjectCID, false );
 }
 
 void ChartController::executeDlg_ObjectProperties_withUndoGuard(
-    std::shared_ptr<UndoGuard> aUndoGuard,const OUString& rObjectCID, bool 
bSuccessOnUnchanged )
+    std::shared_ptr<UndoGuard> xUndoGuard, const OUString& rObjectCID, bool 
bSuccessOnUnchanged )
 {
     //return true if the properties were changed successfully
     if( rObjectCID.isEmpty() )
@@ -793,14 +793,15 @@ void 
ChartController::executeDlg_ObjectProperties_withUndoGuard(
         }
 
         //open the dialog
-        SfxTabDialogController::runAsync(aDlgPtr, [aDlgPtr, xChartDoc, 
pItemConverter, bSuccessOnUnchanged, aUndoGuard] (int nResult)
+        SfxTabDialogController::runAsync(aDlgPtr, [aDlgPtr, xChartDoc, 
pItemConverter,bSuccessOnUnchanged,
+                                                   
xUndoGuard=std::move(xUndoGuard)] (int nResult)
         {
             if (nResult == RET_OK || (bSuccessOnUnchanged && 
aDlgPtr->DialogWasClosedWithOK())) {
                 const SfxItemSet* pOutItemSet = aDlgPtr->GetOutputItemSet();
                 if(pOutItemSet) {
                     ControllerLockGuardUNO aCLGuard(xChartDoc);
                     (void)pItemConverter->ApplyItemSet(*pOutItemSet); //model 
should be changed now
-                    aUndoGuard->commit();
+                    xUndoGuard->commit();
                 }
             }
         });
commit 718e5188f4d3f15e64dd2796aa96d8c127627306
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Mar 8 08:25:28 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Mar 8 14:50:06 2024 +0100

    cid#1592989 Dereference after null check
    
    Change-Id: I34276f9324e994fa1ea174719b60d492b1e595f3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164563
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index d1de4daffac5..677da2047d1b 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -2007,12 +2007,10 @@ void ImplBorderWindow::FlashWindow() const
     // Use OS features to bring user attention to this window: find topmost 
one and FlashWindow
     vcl::Window* pMyParent = mpWindowImpl->mpParent;
     while (pMyParent && pMyParent->mpWindowImpl && 
pMyParent->mpWindowImpl->mpParent)
-    {
         pMyParent = pMyParent->mpWindowImpl->mpParent;
-    }
-    if (pMyParent) {
+
+    if (pMyParent && pMyParent->mpWindowImpl)
         pMyParent->mpWindowImpl->mpFrame->FlashWindow();
-    }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 10b70bf512f9c6d48a34f3cfa44233db63875aea
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Mar 8 08:23:25 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Mar 8 14:50:00 2024 +0100

    cid#1592988 Uninitialized scalar field
    
    Change-Id: Iabdca9248c22e6e296086dd0892c9d395269f588
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164562
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 2ba2fcf75fb4..50aaa43b7745 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -835,7 +835,7 @@ void SwLineLayout::dumpAsXml(xmlTextWriterPtr pWriter, 
const OUString& rText,
 
 void SwLineLayout::ResetFlags()
 {
-    m_bFormatAdj = m_bDummy = m_bEndHyph = m_bMidHyph = m_bFly
+    m_bFormatAdj = m_bDummy = m_bEndHyph = m_bMidHyph = m_bLastHyph = m_bFly
     = m_bRest = m_bBlinking = m_bClipping = m_bContent = m_bRedline
     = m_bRedlineEnd = m_bForcedLeftMargin = m_bHanging = false;
     m_eRedlineEnd = RedlineType::None;

Reply via email to