connectivity/source/commontools/TPrivilegesResultSet.cxx   |    2 +-
 drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx |    4 ++--
 editeng/source/editeng/impedit4.cxx                        |    2 +-
 libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx   |    3 +--
 sd/source/ui/animations/CustomAnimationList.cxx            |    5 ++---
 sd/source/ui/presenter/CanvasUpdateRequester.cxx           |    2 +-
 sfx2/source/commandpopup/CommandPopup.cxx                  |    2 +-
 svx/source/dialog/ClassificationDialog.cxx                 |    2 +-
 sw/source/uibase/dbui/dbmgr.cxx                            |    4 +++-
 sw/source/uibase/dbui/mmconfigitem.cxx                     |    2 +-
 10 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 1313be884c4ded639a5f53694c82a1cf2e77fe70
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Aug 11 08:35:56 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Aug 12 09:41:36 2025 +0200

    cid#1659737 Dereference after null check
    
    Change-Id: I2a3da97e7a9bceedb3b9940d5625010ab215fdaf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189334
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 12915e58f976..4590c401f156 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1334,7 +1334,9 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
                     sPrefix = aEntry.GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
                 }
 
-                OUString 
sExt(comphelper::string::stripStart(pStoreToFilter->GetDefaultExtension(), 
'*'));
+                OUString sExt;
+                if (pStoreToFilter)
+                    sExt = 
comphelper::string::stripStart(pStoreToFilter->GetDefaultExtension(), '*');
                 aTempFile.reset( new utl::TempFileNamed(sLeading, 
sColumnData.isEmpty(), sExt, &sPrefix, true) );
                 if( !aTempFile->IsValid() )
                 {
commit b928f62ed143025dc9c7a70835957521bfc38fbb
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Aug 11 20:43:54 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Aug 12 09:41:25 2025 +0200

    cid#1659896 Variable copied when it could be moved
    
    and
    
    cid#1659895 Variable copied when it could be moved
    cid#1659894 Variable copied when it could be moved
    cid#1659892 Variable copied when it could be moved
    cid#1659882 Variable copied when it could be moved
    cid#1659877 Variable copied when it could be moved
    cid#1659874 Variable copied when it could be moved
    cid#1659872 Variable copied when it could be moved
    cid#1659870 Variable copied when it could be moved
    
    Change-Id: I963902e34580f6b6f911bbf47ddf88f6bbe76b5a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189387
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/connectivity/source/commontools/TPrivilegesResultSet.cxx 
b/connectivity/source/commontools/TPrivilegesResultSet.cxx
index 0003cedbcdbf..28f361a7def5 100644
--- a/connectivity/source/commontools/TPrivilegesResultSet.cxx
+++ b/connectivity/source/commontools/TPrivilegesResultSet.cxx
@@ -70,7 +70,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< 
XDatabaseMetaData>&
         aRow[6] = ODatabaseMetaDataResultSet::getDropValue();
         aRows.push_back(aRow);
         aRow[6] = new ORowSetValueDecorator(u"REFERENCE"_ustr);
-        aRows.push_back(aRow);
+        aRows.push_back(std::move(aRow));
 
         setRows(std::move(aRows));
     }
diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx 
b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
index 672c78463a7d..473d836dc462 100644
--- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
@@ -747,8 +747,8 @@ using namespace com::sun::star;
 
             if(getLast3DDecomposition().empty())
             {
-                const Primitive3DContainer 
aNewSequence(impCreate3DDecomposition(rViewInformation));
-                const_cast< PolygonTubePrimitive3D* 
>(this)->maLast3DDecomposition = aNewSequence;
+                Primitive3DContainer 
aNewSequence(impCreate3DDecomposition(rViewInformation));
+                const_cast< PolygonTubePrimitive3D* 
>(this)->maLast3DDecomposition = std::move(aNewSequence);
             }
 
             return getLast3DDecomposition();
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index b8e9e0a0de81..c5a1f97ed464 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2197,7 +2197,7 @@ void ImpEditEngine::AddPortion(
     rToFill.push_back(aPortion);
 
     //save the spelled portions for later use
-    mpSpellInfo->aLastSpellPortions.push_back(aPortion);
+    mpSpellInfo->aLastSpellPortions.push_back(std::move(aPortion));
     mpSpellInfo->aLastSpellContentSelections.push_back(rSel);
 }
 
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
index 6a883137e4c7..d923149f7b74 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
@@ -199,8 +199,7 @@ void gtv_calc_header_bar_configure(GtvCalcHeaderBar* bar, 
const boost::property_
                 if (nSize >= bar->m_nPositionPixel)
                 {
                     const int nScrolledSize = nSize - bar->m_nPositionPixel;
-                    GtvCalcHeaderBarPrivateImpl::Header aHeader(nScrolledSize, 
rValue.second.get<std::string>("text"));
-                    priv->m_aHeaders.push_back(aHeader);
+                    priv->m_aHeaders.emplace_back(nScrolledSize, 
rValue.second.get<std::string>("text"));
                 }
             }
         }
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx 
b/sd/source/ui/animations/CustomAnimationList.cxx
index 8df6d31588fd..c1d1a9dddc99 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -1130,9 +1130,8 @@ EffectSequence CustomAnimationList::getSelection() const
 
     mxTreeView->selected_foreach([this, &aSelection](weld::TreeIter& rEntry){
         CustomAnimationListEntryItem* pEntry = 
weld::fromId<CustomAnimationListEntryItem*>(mxTreeView->get_id(rEntry));
-        CustomAnimationEffectPtr pEffect(pEntry->getEffect());
-        if (pEffect)
-            aSelection.push_back(pEffect);
+        if (CustomAnimationEffectPtr pEffect = pEntry->getEffect())
+            aSelection.push_back(std::move(pEffect));
 
         // if the selected effect is not expanded and has children
         // we say that the children are automatically selected
diff --git a/sd/source/ui/presenter/CanvasUpdateRequester.cxx 
b/sd/source/ui/presenter/CanvasUpdateRequester.cxx
index 2271ba78154e..0b98d4bde8f3 100644
--- a/sd/source/ui/presenter/CanvasUpdateRequester.cxx
+++ b/sd/source/ui/presenter/CanvasUpdateRequester.cxx
@@ -62,7 +62,7 @@ std::shared_ptr<CanvasUpdateRequester> 
CanvasUpdateRequester::Instance (
             }
             else
             {
-                std::shared_ptr<CanvasUpdateRequester> const pNew(
+                std::shared_ptr<CanvasUpdateRequester> pNew(
                         new CanvasUpdateRequester(rxSharedCanvas), Deleter());
                 it->second = pNew;
                 return pNew;
diff --git a/sfx2/source/commandpopup/CommandPopup.cxx 
b/sfx2/source/commandpopup/CommandPopup.cxx
index 9f63d4cf522a..d1ff9826ae09 100644
--- a/sfx2/source/commandpopup/CommandPopup.cxx
+++ b/sfx2/source/commandpopup/CommandPopup.cxx
@@ -97,7 +97,7 @@ void MenuContentHandler::gatherMenuContent(
         if (xIndexContainer.is())
             gatherMenuContent(xIndexContainer, aNewContent);
 
-        rMenuContent.m_aSubMenuContent.push_back(aNewContent);
+        rMenuContent.m_aSubMenuContent.push_back(std::move(aNewContent));
     }
 }
 
diff --git a/svx/source/dialog/ClassificationDialog.cxx 
b/svx/source/dialog/ClassificationDialog.cxx
index 757eba262807..a7be530f7bc3 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -362,7 +362,7 @@ void ClassificationDialog::readRecentlyUsed()
                 aWalker.next();
             }
             aWalker.parent();
-            m_aRecentlyUsedValuesCollection.push_back(aResults);
+            m_aRecentlyUsedValuesCollection.push_back(std::move(aResults));
         }
         aWalker.next();
     }
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx 
b/sw/source/uibase/dbui/mmconfigitem.cxx
index d8b507fa6d2d..c81800b799e1 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -1164,7 +1164,7 @@ void SwMailMergeConfigItem::SetColumnAssignment( const 
SwDBData& rDBData,
         aAssignment.aDBData = rDBData;
         aAssignment.aDBColumnAssignments = rList;
         aAssignment.bColumnAssignmentsChanged = true;
-        m_pImpl->m_aAddressDataAssignments.push_back(aAssignment);
+        m_pImpl->m_aAddressDataAssignments.push_back(std::move(aAssignment));
     }
     m_pImpl->SetModified();
 }

Reply via email to