basctl/source/basicide/idedataprovider.cxx        |   12 ++++++------
 basctl/source/basicide/objectbrowser.cxx          |   10 ++++++----
 cui/source/tabpages/textanim.cxx                  |    3 +--
 cui/source/tabpages/tpbitmap.cxx                  |    4 ++--
 cui/source/tabpages/tpline.cxx                    |    3 +--
 sc/source/ui/inc/mtrindlg.hxx                     |    4 ++--
 sd/source/ui/animations/CustomAnimationDialog.cxx |    2 +-
 svx/source/gengal/gengal.cxx                      |    1 -
 svx/source/tbxctrls/linemetricbox.hxx             |    2 +-
 9 files changed, 20 insertions(+), 21 deletions(-)

New commits:
commit 12ad8f566c47a240aff296e32863552ea76e7fb6
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Oct 18 19:44:43 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Oct 19 12:40:47 2025 +0200

    cid#1667095 silence Overflowed constant
    
    and
    
    cid#1667086 Overflowed constant
    cid#1667082 Overflowed constant
    cid#1667076 Overflowed constant
    cid#1667070 Overflowed constant
    cid#1667068 Overflowed constant
    cid#1667080 Dereference null return value
    
    Change-Id: I81fd492043666c4e305da31025e7b5e43ba3ba1a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192652
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index 64474a67b1cb..3460b0cdf772 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -359,8 +359,7 @@ bool SvxTextAnimationPage::FillItemSet( SfxItemSet* rAttrs)
         sal_Int64 nValue = 0;
         if( eState == TRISTATE_TRUE )
         {
-            nValue = m_xMtrFldAmount->get_value(FieldUnit::NONE);
-            nValue = -nValue;
+            nValue = 
o3tl::saturating_toggle_sign(m_xMtrFldAmount->get_value(FieldUnit::NONE));
         }
         else
         {
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index c9867a9dfac4..16d716554b5b 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -229,8 +229,8 @@ bool SvxBitmapTabPage::FillItemSet( SfxItemSet* rAttrs )
                 sal_Int64 nHeightPercent = 
m_xBitmapHeight->get_value(FieldUnit::NONE);
                 if (m_xTsbScale->get_sensitive() && m_xTsbScale->get_state() 
== TRISTATE_TRUE)
                 {
-                    aSetBitmapSize.setWidth( -nWidthPercent );
-                    aSetBitmapSize.setHeight( -nHeightPercent );
+                    
aSetBitmapSize.setWidth(o3tl::saturating_toggle_sign(nWidthPercent));
+                    
aSetBitmapSize.setHeight(o3tl::saturating_toggle_sign(nHeightPercent));
                 }
                 else if (!m_bLogicalSize)
                 {
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 7210c9e78647..81a4a713887f 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -531,10 +531,9 @@ bool SvxLineTabPage::FillItemSet( SfxItemSet* rAttrs )
     }
 
     // Transparency
-    sal_uInt16 nVal = m_xMtrTransparent->get_value(FieldUnit::PERCENT);
     if( m_xMtrTransparent->get_value_changed_from_saved() )
     {
-        XLineTransparenceItem aItem( nVal );
+        XLineTransparenceItem 
aItem(m_xMtrTransparent->get_value(FieldUnit::PERCENT));
         pOld = GetOldItem( *rAttrs, XATTR_LINETRANSPARENCE );
         if ( !pOld || !( *static_cast<const XLineTransparenceItem*>(pOld) == 
aItem ) )
         {
diff --git a/sc/source/ui/inc/mtrindlg.hxx b/sc/source/ui/inc/mtrindlg.hxx
index 1b3edfca9382..97ac41a303fb 100644
--- a/sc/source/ui/inc/mtrindlg.hxx
+++ b/sc/source/ui/inc/mtrindlg.hxx
@@ -39,8 +39,8 @@ public:
 private:
     std::unique_ptr<weld::MetricSpinButton> m_xEdValue;
     std::unique_ptr<weld::CheckButton> m_xBtnDefVal;
-    int nDefaultValue;
-    int nCurrentValue;
+    sal_Int64 nDefaultValue;
+    sal_Int64 nCurrentValue;
 
     DECL_LINK(SetDefValHdl, weld::Toggleable&, void);
     DECL_LINK(ModifyHdl, weld::MetricSpinButton&, void);
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx 
b/sd/source/ui/animations/CustomAnimationDialog.cxx
index f769f5b87c06..a02024ceb09e 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -521,7 +521,7 @@ void SdRotationPropertyBox::updateMenu()
 {
     sal_Int64 nValue = mxMetric->get_value(FieldUnit::DEGREE);
     bool bDirection = nValue >= 0;
-    nValue = (nValue < 0 ? -nValue : nValue);
+    if (nValue < 0) nValue = o3tl::saturating_toggle_sign(nValue);
 
     mxControl->set_item_active(u"90"_ustr, nValue == 90);
     mxControl->set_item_active(u"180"_ustr, nValue == 180);
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index 3ad6b93f03d6..5158b16e0ab2 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -160,7 +160,6 @@ void GalApp::Init()
             OUString envVar( u"OOO_INSTALL_PREFIX"_ustr);
             osl_setEnvironment(envVar.pData, installPrefix.pData);
         }
-        SAL_INFO("svx", "OOO_INSTALL_PREFIX=" << getenv( "OOO_INSTALL_PREFIX" 
) );
 
         uno::Reference<uno::XComponentContext> xComponentContext
             = ::cppu::defaultBootstrap_InitialComponentContext();
diff --git a/svx/source/tbxctrls/linemetricbox.hxx 
b/svx/source/tbxctrls/linemetricbox.hxx
index 81f19a1c641e..79be63904a13 100644
--- a/svx/source/tbxctrls/linemetricbox.hxx
+++ b/svx/source/tbxctrls/linemetricbox.hxx
@@ -27,7 +27,7 @@ class SvxMetricField final : public InterimItemWindow
 {
 private:
     std::unique_ptr<weld::MetricSpinButton> m_xWidget;
-    int             nCurValue;
+    sal_Int64       nCurValue;
     MapUnit         eDestPoolUnit;
     FieldUnit       eDlgUnit;
     css::uno::Reference< css::frame::XFrame > mxFrame;
commit 91a219d84718ec99c1629a4451d9615c2f2c027e
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Oct 18 19:35:58 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Oct 19 12:40:40 2025 +0200

    cid#1667139 Unchecked return value
    
    Change-Id: I7d4b3a2cbd3d63e067087385bd19564c32ad5709
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192651
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/basctl/source/basicide/objectbrowser.cxx 
b/basctl/source/basicide/objectbrowser.cxx
index 6caaec06d336..d970f905627e 100644
--- a/basctl/source/basicide/objectbrowser.cxx
+++ b/basctl/source/basicide/objectbrowser.cxx
@@ -1176,8 +1176,10 @@ IMPL_LINK(ObjectBrowser, OnRightTreeSelect, 
weld::TreeView&, rTree, void)
     }
 
     auto xLeftIter = m_xLeftTreeView->make_iterator();
-    m_xLeftTreeView->get_selected(xLeftIter.get());
-    auto pLeftSymbol = GetSymbolForIter(*xLeftIter, *m_xLeftTreeView, 
m_aLeftTreeSymbolIndex);
+    std::shared_ptr<const IdeSymbolInfo> pLeftSymbol
+        = m_xLeftTreeView->get_selected(xLeftIter.get())
+              ? GetSymbolForIter(*xLeftIter, *m_xLeftTreeView, 
m_aLeftTreeSymbolIndex)
+              : nullptr;
 
     auto xRightIter = rTree.make_iterator();
     if (!rTree.get_selected(xRightIter.get()))
commit 55ec4cbab8b69bd303534b121b687b8c84efce60
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Oct 18 19:30:00 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Oct 19 12:40:33 2025 +0200

    cid#1667146 Variable copied when it could be moved
    
    and
    
    cid#1667145 Variable copied when it could be moved
    cid#1667144 Variable copied when it could be moved
    cid#1667143 Variable copied when it could be moved
    cid#1667142 Variable copied when it could be moved
    cid#1667141 Variable copied when it could be moved
    cid#1667140 Variable copied when it could be moved
    
    Change-Id: I5e4acc28071623a8676d83521f445c3c127de6ae
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192650
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/basctl/source/basicide/idedataprovider.cxx 
b/basctl/source/basicide/idedataprovider.cxx
index 2c8e39fade5c..a8e9ac03f074 100644
--- a/basctl/source/basicide/idedataprovider.cxx
+++ b/basctl/source/basicide/idedataprovider.cxx
@@ -159,7 +159,7 @@ void ImplGetMembersOfUnoType(SymbolInfoList& rMembers, 
const IdeSymbolInfo& rNod
                 pNode->aParameters.push_back(std::move(aParam));
             }
 
-            rMembers.push_back(pNode);
+            rMembers.push_back(std::move(pNode));
         }
 
         for (const auto& xField : xTypeClass->getFields())
@@ -213,7 +213,7 @@ void ImplGetMembersOfUnoType(SymbolInfoList& rMembers, 
const IdeSymbolInfo& rNod
                 }
             }
 
-            rMembers.push_back(pMember);
+            rMembers.push_back(std::move(pMember));
         }
     }
     catch (const Exception& e)
@@ -295,7 +295,7 @@ void ImplGetMembersOfBasicModule(SymbolInfoList& rMembers, 
const IdeSymbolInfo&
                     }
                 }
 
-                rMembers.push_back(pMember);
+                rMembers.push_back(std::move(pMember));
             }
         }
     }
@@ -325,7 +325,7 @@ void ImplGetChildrenOfBasicLibrary(SymbolInfoList& 
rChildren, const IdeSymbolInf
             }
             pNode->sParentName = rParent.sName;
             pNode->sIdentifier = rParent.sIdentifier + u":" + rLibName;
-            rChildren.push_back(pNode);
+            rChildren.push_back(std::move(pNode));
         }
     }
     else if (rParent.eKind == IdeSymbolKind::LIBRARY)
@@ -547,7 +547,7 @@ void IdeDataProvider::AddDocumentNodesWithModules()
                 {
                     pDocNode->sOriginLocation = rDoc.getDocument()->getURL();
                 }
-                m_aAllTopLevelNodes.push_back(pDocNode);
+                m_aAllTopLevelNodes.push_back(std::move(pDocNode));
             }
         }
     }
@@ -580,7 +580,7 @@ SymbolInfoList IdeDataProvider::GetTopLevelNodes()
         auto pLoadingNode = 
std::make_shared<IdeSymbolInfo>(u"[Initializing...]",
                                                             
IdeSymbolKind::PLACEHOLDER, u"");
         pLoadingNode->bSelectable = false;
-        aNodes.push_back(pLoadingNode);
+        aNodes.push_back(std::move(pLoadingNode));
         return aNodes;
     }
 
diff --git a/basctl/source/basicide/objectbrowser.cxx 
b/basctl/source/basicide/objectbrowser.cxx
index d5cbfc7ea505..6caaec06d336 100644
--- a/basctl/source/basicide/objectbrowser.cxx
+++ b/basctl/source/basicide/objectbrowser.cxx
@@ -1054,8 +1054,8 @@ void ObjectBrowser::NavigateToMacroSource(const 
IdeSymbolInfo& rSymbol)
                  "NavigateToMacroSource: Document is alive, dispatching 
SID_BASICIDE_SHOWSBX.");
 
         // Pass the method name so it navigates to the exact line
-        SbxItem aSbxItem(SID_BASICIDE_ARG_SBX, aDoc, rSymbol.sOriginLibrary, 
rSymbol.sOriginModule,
-                         rSymbol.sName, basctl::SBX_TYPE_METHOD);
+        SbxItem aSbxItem(SID_BASICIDE_ARG_SBX, std::move(aDoc), 
rSymbol.sOriginLibrary,
+                         rSymbol.sOriginModule, rSymbol.sName, 
basctl::SBX_TYPE_METHOD);
 
         SfxViewFrame& rViewFrame = m_pShell->GetViewFrame();
         if (SfxDispatcher* pDispatcher = rViewFrame.GetDispatcher())

Reply via email to