connectivity/source/commontools/TTableHelper.cxx |   21 +++++++++------------
 cui/source/customize/SvxToolbarConfigPage.cxx    |    6 +++---
 include/sfx2/inputdlg.hxx                        |    2 +-
 scripting/source/provider/ActiveMSPList.cxx      |    9 +++------
 sfx2/source/dialog/inputdlg.cxx                  |    4 ++--
 svgio/source/svgreader/svgmasknode.cxx           |   12 ++++++------
 svx/source/sidebar/nbdtmg.cxx                    |    3 +--
 7 files changed, 25 insertions(+), 32 deletions(-)

New commits:
commit e8248b5e4b19df8ba469d1ca3a762960c1a053b5
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Dec 18 21:11:56 2023 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Dec 19 09:42:03 2023 +0100

    cid#1545222 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1545241 COPY_INSTEAD_OF_MOVE
    cid#1545303 COPY_INSTEAD_OF_MOVE
    cid#1545315 COPY_INSTEAD_OF_MOVE
    cid#1545319 COPY_INSTEAD_OF_MOVE
    cid#1545322 COPY_INSTEAD_OF_MOVE
    
    Change-Id: I284ba6e395f72abd7939667a8367ac99ab64194d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160955
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/connectivity/source/commontools/TTableHelper.cxx 
b/connectivity/source/commontools/TTableHelper.cxx
index 8d6cee126977..27c874636069 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -200,21 +200,17 @@ namespace
     void lcl_collectColumnDescs_throw( const Reference< XResultSet >& 
_rxResult, std::vector< ColumnDesc >& _out_rColumns )
     {
         Reference< XRow > xRow( _rxResult, UNO_QUERY_THROW );
-        OUString sName;
-        OrdinalPosition nOrdinalPosition( 0 );
         while ( _rxResult->next() )
         {
-            sName = xRow->getString( 4 );           // COLUMN_NAME
-            sal_Int32       nField5 = xRow->getInt(5);
-            OUString aField6 = xRow->getString(6);
-            sal_Int32       nField7 = xRow->getInt(7)
-                        ,   nField9 = xRow->getInt(9)
-                        ,   nField11= xRow->getInt(11);
-            OUString  sField12 = xRow->getString(12)
-                            ,sField13 = xRow->getString(13);
-            nOrdinalPosition = xRow->getInt( 17 );  // ORDINAL_POSITION
-            _out_rColumns.emplace_back(sName, nField5, aField6, nField7, 
nField9,
-                                       nField11, sField12, sField13, 
nOrdinalPosition);
+            _out_rColumns.emplace_back(xRow->getString(4), // COLUMN_NAME,
+                                       xRow->getInt(5),
+                                       xRow->getString(6),
+                                       xRow->getInt(7),
+                                       xRow->getInt(9),
+                                       xRow->getInt(11),
+                                       xRow->getString(12),
+                                       xRow->getString(13),
+                                       xRow->getInt(17));  // ORDINAL_POSITION
         }
     }
 
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx 
b/cui/source/customize/SvxToolbarConfigPage.cxx
index 035059ea8e83..1997de819d29 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -553,9 +553,9 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const 
OUString&, rIdent, void)
         SvxConfigEntry* pEntry
             = 
weld::fromId<SvxConfigEntry*>(m_xContentsListBox->get_id(nActEntry));
 
-        css::uno::Reference<css::graphic::XGraphic> backup = 
pEntry->GetBackupGraphic();
-
-        css::uno::Sequence<css::uno::Reference<css::graphic::XGraphic>> 
aGraphicSeq{ backup };
+        css::uno::Sequence<css::uno::Reference<css::graphic::XGraphic>> 
aGraphicSeq{
+            pEntry->GetBackupGraphic()
+        };
 
         css::uno::Sequence<OUString> aURLSeq{ pEntry->GetCommand() };
 
diff --git a/include/sfx2/inputdlg.hxx b/include/sfx2/inputdlg.hxx
index 840844d1827a..8abab28fc7e1 100644
--- a/include/sfx2/inputdlg.hxx
+++ b/include/sfx2/inputdlg.hxx
@@ -30,7 +30,7 @@ public:
     void HideHelpBtn();
     void SetEntryMessageType(weld::EntryMessageType aType);
     void SetTooltip(const OUString& rStr);
-    void setCheckEntry(std::function<bool(OUString)> aFunc);
+    void setCheckEntry(const std::function<bool(OUString)>& rFunc);
 };
 
 #endif // INCLUDED_SFX2_SOURCE_INC_INPUTDLG_HXX
diff --git a/scripting/source/provider/ActiveMSPList.cxx 
b/scripting/source/provider/ActiveMSPList.cxx
index fbd2b2b05331..8ff88be99512 100644
--- a/scripting/source/provider/ActiveMSPList.cxx
+++ b/scripting/source/provider/ActiveMSPList.cxx
@@ -275,19 +275,16 @@ ActiveMSPList::createNonDocMSPs()
     OUString serviceName("com.sun.star.script.provider.MasterScriptProvider");
 
     Sequence< Any > args{ Any(userDirString) };
-    Reference< provider::XScriptProvider > userMsp( 
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( 
serviceName, args, m_xContext ), UNO_QUERY );
     // should check if provider reference is valid
-    m_hMsps[ userDirString ] = userMsp;
+    m_hMsps[ userDirString ].set( 
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( 
serviceName, args, m_xContext ), UNO_QUERY );
 
     args = { Any(shareDirString) };
-    Reference< provider::XScriptProvider > shareMsp( 
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( 
serviceName, args, m_xContext ), UNO_QUERY );
     // should check if provider reference is valid
-    m_hMsps[ shareDirString ] = shareMsp;
+    m_hMsps[ shareDirString ].set( 
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( 
serviceName, args, m_xContext ), UNO_QUERY );
 
     args = { Any(bundledDirString) };
-    Reference< provider::XScriptProvider > bundledMsp( 
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( 
serviceName, args, m_xContext ), UNO_QUERY );
     // should check if provider reference is valid
-    m_hMsps[ bundledDirString ] = bundledMsp;
+    m_hMsps[ bundledDirString ].set( 
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( 
serviceName, args, m_xContext ), UNO_QUERY );
 }
 
 } // namespace func_provider
diff --git a/sfx2/source/dialog/inputdlg.cxx b/sfx2/source/dialog/inputdlg.cxx
index 243f2fa092e4..99f1b122bc25 100644
--- a/sfx2/source/dialog/inputdlg.cxx
+++ b/sfx2/source/dialog/inputdlg.cxx
@@ -51,9 +51,9 @@ void InputDialog::SetTooltip(const OUString& rStr)
     m_xOk->set_tooltip_text(rStr);
 }
 
-void InputDialog::setCheckEntry(std::function<bool(OUString)> aFunc)
+void InputDialog::setCheckEntry(const std::function<bool(OUString)>& rFunc)
 {
-    mCheckEntry = aFunc;
+    mCheckEntry = rFunc;
     m_xEntry->connect_changed(LINK(this, InputDialog, EntryChangedHdl));
 }
 
diff --git a/svgio/source/svgreader/svgmasknode.cxx 
b/svgio/source/svgreader/svgmasknode.cxx
index b0ba0cdf1deb..2f827aaee12d 100644
--- a/svgio/source/svgreader/svgmasknode.cxx
+++ b/svgio/source/svgreader/svgmasknode.cxx
@@ -268,12 +268,12 @@ namespace svgio::svgreader
                     // embed content to a ModifiedColorPrimitive2D since the 
definitions
                     // how content is used as alpha is special for Svg
                     {
-                        drawinglayer::primitive2d::Primitive2DReference 
xInverseMask(
-                            new 
drawinglayer::primitive2d::ModifiedColorPrimitive2D(
-                                std::move(aMaskTarget),
-                                
std::make_shared<basegfx::BColorModifier_luminance_to_alpha>()));
-
-                        aMaskTarget = 
drawinglayer::primitive2d::Primitive2DContainer { xInverseMask };
+                        aMaskTarget = 
drawinglayer::primitive2d::Primitive2DContainer {
+                            drawinglayer::primitive2d::Primitive2DReference(
+                                new 
drawinglayer::primitive2d::ModifiedColorPrimitive2D(
+                                    std::move(aMaskTarget),
+                                    
std::make_shared<basegfx::BColorModifier_luminance_to_alpha>()))
+                        };
                     }
 
                     // prepare new content
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 85fd6dcf285a..52fa87c9fe7c 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -730,8 +730,7 @@ void OutlineTypeMgr::ReplaceNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uIn
         if( eNumType == SVX_NUM_CHAR_SPECIAL)
         {
             sal_UCS4 cChar = aFmt.GetBulletChar();
-            OUString sChar(&cChar, 1);
-            _pSet->sBulletChar = sChar;
+            _pSet->sBulletChar = OUString(&cChar, 1);
             if ( aFmt.GetBulletFont() )
                 _pSet->sBulletFont = aFmt.GetBulletFont()->GetFamilyName();
             _pSet->nNumberType = eNumType;
commit 30fa383f27d9eed05d699681afb1ce76fb4248f9
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Dec 18 21:08:41 2023 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Dec 19 09:41:51 2023 +0100

    emplace_back instead of push_back
    
    Change-Id: I1ea43002aba460fb81f4b2e710a19f0c3fe87c64
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160954
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/connectivity/source/commontools/TTableHelper.cxx 
b/connectivity/source/commontools/TTableHelper.cxx
index 31e240469402..8d6cee126977 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -213,7 +213,8 @@ namespace
             OUString  sField12 = xRow->getString(12)
                             ,sField13 = xRow->getString(13);
             nOrdinalPosition = xRow->getInt( 17 );  // ORDINAL_POSITION
-            _out_rColumns.push_back( ColumnDesc( 
sName,nField5,aField6,nField7,nField9,nField11,sField12,sField13, 
nOrdinalPosition ) );
+            _out_rColumns.emplace_back(sName, nField5, aField6, nField7, 
nField9,
+                                       nField11, sField12, sField13, 
nOrdinalPosition);
         }
     }
 

Reply via email to