chart2/source/tools/AxisHelper.cxx                                |    3 --
 cui/source/tabpages/numpages.cxx                                  |    5 +--
 filter/source/svg/svgfilter.cxx                                   |    3 --
 filter/source/xsltfilter/OleHandler.cxx                           |    3 --
 fpicker/source/office/RemoteFilesDialog.cxx                       |    3 --
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |    3 --
 framework/source/uiconfiguration/uiconfigurationmanager.cxx       |    3 --
 include/comphelper/sequenceashashmap.hxx                          |    2 -
 include/oox/export/drawingml.hxx                                  |    4 +--
 include/oox/ppt/pptshape.hxx                                      |    2 -
 l10ntools/source/lngmerge.cxx                                     |    3 --
 lotuswordpro/source/filter/lwplayout.cxx                          |    4 ---
 lotuswordpro/source/filter/lwpstory.cxx                           |    3 --
 sc/source/filter/excel/xechart.cxx                                |    4 +--
 sc/source/filter/inc/xechart.hxx                                  |    8 +++---
 sc/source/filter/inc/xichart.hxx                                  |    4 +--
 sc/source/ui/unoobj/appluno.cxx                                   |    5 ---
 scripting/source/stringresource/stringresource.cxx                |    3 --
 sfx2/source/control/templatelocalview.cxx                         |    9 ++----
 sfx2/source/doc/new.cxx                                           |    3 --
 slideshow/source/engine/slideoverlaybutton.cxx                    |    4 +--
 starmath/source/document.cxx                                      |    3 --
 stoc/source/inspect/introspection.cxx                             |    3 --
 svtools/source/uno/unoevent.cxx                                   |   13 
+++-------
 svx/source/sidebar/nbdtmg.cxx                                     |    3 --
 sw/source/core/unocore/unodraw.cxx                                |    3 --
 sw/source/ui/vba/vbacontentcontrollistentry.cxx                   |    2 -
 sw/source/uibase/docvw/srcedtw.cxx                                |    5 +--
 sw/source/uibase/shells/basesh.cxx                                |    3 --
 test/source/unoapixml_test.cxx                                    |    2 -
 toolkit/source/controls/unocontrolmodel.cxx                       |   10 
+------
 ucb/source/cacher/contentresultsetwrapper.cxx                     |    4 ---
 ucb/source/ucp/hierarchy/hierarchycontent.cxx                     |    5 +--
 unotools/source/misc/ZipPackageHelper.cxx                         |    6 +---
 vcl/unx/gtk3/gtkframe.cxx                                         |    3 --
 writerfilter/source/dmapper/FontTable.cxx                         |    3 --
 writerfilter/source/dmapper/TableData.hxx                         |    2 -
 writerperfect/source/writer/EPUBExportFilter.cxx                  |    6 +---
 xmloff/source/chart/SchXMLAxisContext.cxx                         |    3 --
 39 files changed, 57 insertions(+), 103 deletions(-)

New commits:
commit 9c2c815d853a626d4329a7e8a2e99671bdb38f44
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Dec 9 21:28:43 2023 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Dec 10 11:57:27 2023 +0100

    cid#1545987 std::swap COPY_INSTEAD_OF_MOVE
    
    Change-Id: I34413f941aa5eded457ad5a3a5ffb4c9e1104590
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160521
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/toolkit/source/controls/unocontrolmodel.cxx 
b/toolkit/source/controls/unocontrolmodel.cxx
index 0868fc2f6a26..fea09b486d63 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -1336,14 +1336,8 @@ void UnoControlModel::ImplEnsureHandleOrder( const 
sal_Int32 _nCount, sal_Int32*
                 if ( _nFirstHandle == *pLaterHandles )
                 {
                     // indeed it is -> exchange the both places in the 
sequences
-                    sal_Int32 nHandle( *_pHandles );
-                    *_pHandles = *pLaterHandles;
-                    *pLaterHandles = nHandle;
-
-                    uno::Any aValue( *_pValues );
-                    *_pValues = *pLaterValues;
-                    *pLaterValues = aValue;
-
+                    std::swap(*_pHandles, *pLaterHandles);
+                    std::swap(*_pValues, *pLaterValues);
                     break;
                     // this will leave the inner loop, and continue with the 
outer loop.
                     // Note that this means we will encounter the 
_nSecondHandle handle, again, once we reached
commit 5d3d7cd6568340cb6bd6243c8e0d73f4bc4fd5ed
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Dec 9 20:30:23 2023 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Dec 10 11:57:12 2023 +0100

    cid#1546281 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1546278 COPY_INSTEAD_OF_MOVE
    cid#1546276 COPY_INSTEAD_OF_MOVE
    cid#1546247 COPY_INSTEAD_OF_MOVE
    cid#1546244 COPY_INSTEAD_OF_MOVE
    cid#1546243 COPY_INSTEAD_OF_MOVE
    cid#1546220 COPY_INSTEAD_OF_MOVE
    cid#1546209 COPY_INSTEAD_OF_MOVE
    cid#1546207 COPY_INSTEAD_OF_MOVE
    cid#1546206 COPY_INSTEAD_OF_MOVE
    cid#1546205 COPY_INSTEAD_OF_MOVE
    cid#1546197 COPY_INSTEAD_OF_MOVE
    cid#1546180 COPY_INSTEAD_OF_MOVE
    cid#1546172 COPY_INSTEAD_OF_MOVE
    cid#1546165 COPY_INSTEAD_OF_MOVE
    cid#1546164 COPY_INSTEAD_OF_MOVE
    cid#1546158 COPY_INSTEAD_OF_MOVE
    cid#1546151 COPY_INSTEAD_OF_MOVE
    cid#1546135 COPY_INSTEAD_OF_MOVE
    cid#1546132 COPY_INSTEAD_OF_MOVE
    cid#1546129 COPY_INSTEAD_OF_MOVE
    cid#1546128 COPY_INSTEAD_OF_MOVE
    cid#1546122 COPY_INSTEAD_OF_MOVE
    cid#1546117 COPY_INSTEAD_OF_MOVE
    cid#1546113 COPY_INSTEAD_OF_MOVE
    cid#1546106 COPY_INSTEAD_OF_MOVE
    cid#1546099 COPY_INSTEAD_OF_MOVE
    cid#1546091 COPY_INSTEAD_OF_MOVE
    cid#1546085 COPY_INSTEAD_OF_MOVE
    cid#1546069 COPY_INSTEAD_OF_MOVE
    cid#1546063 COPY_INSTEAD_OF_MOVE
    cid#1546062 COPY_INSTEAD_OF_MOVE
    cid#1546058 COPY_INSTEAD_OF_MOVE
    cid#1546056 COPY_INSTEAD_OF_MOVE
    cid#1546051 COPY_INSTEAD_OF_MOVE
    cid#1546040 COPY_INSTEAD_OF_MOVE
    cid#1546030 COPY_INSTEAD_OF_MOVE
    cid#1546028 COPY_INSTEAD_OF_MOVE
    cid#1546015 COPY_INSTEAD_OF_MOVE
    cid#1546001 COPY_INSTEAD_OF_MOVE
    
    Change-Id: Ib954c92a300fc323b29f27880fdf8bc46ed98862
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160520
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/chart2/source/tools/AxisHelper.cxx 
b/chart2/source/tools/AxisHelper.cxx
index e8e90c5e429f..899dfe24fa48 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -78,8 +78,7 @@ ScaleData AxisHelper::createDefaultScale()
     aScaleData.AxisType = chart2::AxisType::REALNUMBER;
     aScaleData.AutoDateAxis = true;
     aScaleData.ShiftedCategoryPosition = false;
-    Sequence< SubIncrement > aSubIncrements{ SubIncrement() };
-    aScaleData.IncrementData.SubIncrements = aSubIncrements;
+    aScaleData.IncrementData.SubIncrements = { SubIncrement() };
     return aScaleData;
 }
 
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index d1cb79341281..caf44cb7ecfd 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -659,9 +659,8 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl, 
ValueSet*, void)
                 }
                 if(pList && pList->IsAvailable( pLevelSettings->sBulletFont ) )
                 {
-                    FontMetric aFontMetric = pList->Get(
-                        pLevelSettings->sBulletFont,WEIGHT_NORMAL, 
ITALIC_NONE);
-                    vcl::Font aFont(aFontMetric);
+                    vcl::Font aFont(pList->Get(
+                        pLevelSettings->sBulletFont,WEIGHT_NORMAL, 
ITALIC_NONE));
                     aFmt.SetBulletFont(&aFont);
                 }
                 else
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index dfe94a1c0ac9..d84591d0c155 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -603,9 +603,8 @@ bool SVGFilter::filterWriterOrCalc( const Sequence< 
PropertyValue >& rDescriptor
     // Select only one draw page
     uno::Reference< drawing::XDrawPagesSupplier > xDrawPagesSupplier( 
mxSrcDoc, uno::UNO_QUERY );
     uno::Reference<drawing::XDrawPages> xDrawPages = 
xDrawPagesSupplier->getDrawPages();
-    uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPages->getByIndex(0), 
uno::UNO_QUERY );
     mSelectedPages.resize( 1 );
-    mSelectedPages[0] = xDrawPage;
+    mSelectedPages[0].set(xDrawPages->getByIndex(0), uno::UNO_QUERY);
 
     bool bGotSelection = xSelection->getSelection() >>= maShapeSelection;
 
diff --git a/filter/source/xsltfilter/OleHandler.cxx 
b/filter/source/xsltfilter/OleHandler.cxx
index 3253c91251a1..2327290b5e97 100644
--- a/filter/source/xsltfilter/OleHandler.cxx
+++ b/filter/source/xsltfilter/OleHandler.cxx
@@ -49,10 +49,9 @@ namespace XSLT
             m_rootStream = createTempFile();
             Sequence<Any> args{ Any(m_rootStream->getInputStream()) };
 
-            Reference<XNameContainer> cont(
+            m_storage.set(
                  
Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), 
UNO_QUERY_THROW)
                      
->createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", args), 
UNO_QUERY);
-            m_storage = cont;
         }
     }
 
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index 2b7dbd3d46db..ad23cc0dd888 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -684,8 +684,7 @@ IMPL_LINK ( RemoteFilesDialog, EditServiceMenuHdl, const 
OUString&, rIdent, void
 
                         if ( pPasswordRequest->isPassword() )
                         {
-                            OUString aNewPass = 
pPasswordRequest->getPassword();
-                            Sequence<OUString> aPasswd { aNewPass };
+                            Sequence<OUString> aPasswd { 
pPasswordRequest->getPassword() };
 
                             m_xMasterPasswd->addPersistent(
                                 sUrl, sUserName, aPasswd, xInteractionHandler 
);
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 65e12c8f8dd3..4b03c4b18d69 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -1195,13 +1195,12 @@ void SAL_CALL 
ModuleUIConfigurationManager::replaceSettings( const OUString& Res
             rElementType.bModified = true;
 
             Reference< XUIConfigurationManager > xThis(this);
-            Reference< XInterface > xIfac( xThis, UNO_QUERY );
 
             // Create event to notify listener about replaced element settings
             ui::ConfigurationEvent aEvent;
             aEvent.ResourceURL = ResourceURL;
             aEvent.Accessor <<= xThis;
-            aEvent.Source = xIfac;
+            aEvent.Source.set(xThis, UNO_QUERY);
             aEvent.ReplacedElement <<= xOldSettings;
             aEvent.Element <<= pDataSettings->xSettings;
 
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index b678f7b0635c..54034b67e8ed 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -967,14 +967,13 @@ void SAL_CALL UIConfigurationManager::replaceSettings( 
const OUString& ResourceU
         rElementType.bModified = true;
 
         Reference< XUIConfigurationManager > xThis(this);
-        Reference< XInterface > xIfac( xThis, UNO_QUERY );
 
         // Create event to notify listener about replaced element settings
         ConfigurationEvent aEvent;
 
         aEvent.ResourceURL = ResourceURL;
         aEvent.Accessor <<= xThis;
-        aEvent.Source = xIfac;
+        aEvent.Source.set(xThis, UNO_QUERY);
         aEvent.ReplacedElement <<= xOldSettings;
         aEvent.Element <<= pDataSettings->xSettings;
 
diff --git a/include/comphelper/sequenceashashmap.hxx 
b/include/comphelper/sequenceashashmap.hxx
index f5af2e28de50..35c068ed30d4 100644
--- a/include/comphelper/sequenceashashmap.hxx
+++ b/include/comphelper/sequenceashashmap.hxx
@@ -45,7 +45,7 @@ struct OUStringAndHashCode
     OUString maString;
     sal_Int32 mnHashCode;
 
-    OUStringAndHashCode(OUString s) : maString(s), 
mnHashCode(maString.hashCode()) {}
+    OUStringAndHashCode(OUString s) : maString(std::move(s)), 
mnHashCode(maString.hashCode()) {}
 };
 struct OUStringAndHashCodeEqual
 {
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index dcbb1b544390..5f7d0565cb50 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -269,7 +269,7 @@ public:
     };
 
     GraphicExport(sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase* 
pFilterBase, DocumentType eDocumentType)
-        : mpFS(pFS)
+        : mpFS(std::move(pFS))
         , mpFilterBase(pFilterBase)
         , meDocumentType(eDocumentType)
     {}
@@ -353,7 +353,7 @@ protected:
 public:
     DrawingML( ::sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase* 
pFB, DocumentType eDocumentType = DOCUMENT_PPTX, DMLTextExport* pTextExport = 
nullptr )
         : meDocumentType( eDocumentType ), mpTextExport(pTextExport), 
mpFS(std::move( pFS )), mpFB( pFB ), mbIsBackgroundDark( false ), 
mbPlaceholder(false) {}
-    void SetFS( ::sax_fastparser::FSHelperPtr pFS ) { mpFS = pFS; }
+    void SetFS(const ::sax_fastparser::FSHelperPtr& pFS) { mpFS = pFS; }
     const ::sax_fastparser::FSHelperPtr& GetFS() const { return mpFS; }
     ::oox::core::XmlFilterBase* GetFB() { return mpFB; }
     DocumentType GetDocumentType() const { return meDocumentType; }
diff --git a/include/oox/ppt/pptshape.hxx b/include/oox/ppt/pptshape.hxx
index fd5268ea0a89..eb77b667dd74 100644
--- a/include/oox/ppt/pptshape.hxx
+++ b/include/oox/ppt/pptshape.hxx
@@ -73,7 +73,7 @@ public:
 
     ShapeLocation getShapeLocation() const { return meShapeLocation; };
     void setReferenced( bool bReferenced ){ mbReferenced = bReferenced; };
-    void setPlaceholder( oox::drawingml::ShapePtr pPlaceholder ) { 
mpPlaceholder = pPlaceholder; }
+    void setPlaceholder(const oox::drawingml::ShapePtr& pPlaceholder) { 
mpPlaceholder = pPlaceholder; }
     void setModelId( const OUString& rId ) { msModelId = rId; }
 
     /// Flags shape as having a non-empty spPr tag
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 4eaa94940c19..7d3587e68067 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -142,8 +142,7 @@ void LngParser::ReadLine(std::string_view rLine_in,
     {
         OString sLang(o3tl::trim(o3tl::getToken(rLine_in, 0, '=')));
         if (!sLang.isEmpty()) {
-            OString sText(o3tl::getToken(rLine_in,1, '"'));
-            rText_inout[sLang] = sText;
+            rText_inout[sLang] = OString(o3tl::getToken(rLine_in, 1, '"'));
         }
     }
 }
diff --git a/lotuswordpro/source/filter/lwplayout.cxx 
b/lotuswordpro/source/filter/lwplayout.cxx
index 78eacd9c285a..8a1c85074f80 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -498,9 +498,7 @@ void LwpHeadLayout::RegisterStyle()
         //if the layout is relative to para, the layout will be registered in 
para
         if (!xLayout->IsRelativeAnchored())
             xLayout->DoRegisterStyle();
-        rtl::Reference<LwpVirtualLayout> xNext(
-            dynamic_cast<LwpVirtualLayout*>(xLayout->GetNext().obj().get()));
-        xLayout = xNext;
+        
xLayout.set(dynamic_cast<LwpVirtualLayout*>(xLayout->GetNext().obj().get()));
     }
 }
 
diff --git a/lotuswordpro/source/filter/lwpstory.cxx 
b/lotuswordpro/source/filter/lwpstory.cxx
index acc0beebcf4b..540afd3dc661 100644
--- a/lotuswordpro/source/filter/lwpstory.cxx
+++ b/lotuswordpro/source/filter/lwpstory.cxx
@@ -117,8 +117,7 @@ void LwpStory::XFConvert(XFContentContainer* pCont)
 
         //Get the xfcontainer for the next para
         pParaCont = xPara->GetXFContainer();
-        rtl::Reference<LwpPara> 
xNext(dynamic_cast<LwpPara*>(xPara->GetNext().obj().get()));
-        xPara = xNext;
+        xPara.set(dynamic_cast<LwpPara*>(xPara->GetNext().obj().get()));
     }
 
     //process frame which anchor is to cell after converter all the para
diff --git a/sc/source/filter/excel/xechart.cxx 
b/sc/source/filter/excel/xechart.cxx
index b09f370dd20f..0926be90e5f2 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -1152,7 +1152,7 @@ XclExpChText::XclExpChText( const XclExpChRoot& rRoot ) :
 {
 }
 
-void XclExpChText::SetFont( XclExpChFontRef xFont, model::ComplexColor const& 
rComplexColor, sal_uInt32 nColorId )
+void XclExpChText::SetFont(const XclExpChFontRef& xFont, model::ComplexColor 
const& rComplexColor, sal_uInt32 nColorId)
 {
     mxFont = xFont;
     maData.maTextComplexColor = rComplexColor;
@@ -2922,7 +2922,7 @@ XclExpChAxis::XclExpChAxis( const XclExpChRoot& rRoot, 
sal_uInt16 nAxisType ) :
     maData.mnType = nAxisType;
 }
 
-void XclExpChAxis::SetFont( XclExpChFontRef xFont, model::ComplexColor const& 
rComplexColor, sal_uInt32 nColorId )
+void XclExpChAxis::SetFont(const XclExpChFontRef& xFont, model::ComplexColor 
const& rComplexColor, sal_uInt32 nColorId)
 {
     mxFont = xFont;
     if( mxTick )
diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx
index fb1eefca85f4..8d2ef1bed71a 100644
--- a/sc/source/filter/inc/xechart.hxx
+++ b/sc/source/filter/inc/xechart.hxx
@@ -473,7 +473,7 @@ public:
     virtual             ~XclExpChFontBase();
 
     /** Derived classes set font color and color identifier to internal data 
structures. */
-    virtual void SetFont( XclExpChFontRef xFont, const model::ComplexColor& 
rComplexColor, sal_uInt32 nColorId ) = 0;
+    virtual void SetFont(const XclExpChFontRef& xFont, const 
model::ComplexColor& rComplexColor, sal_uInt32 nColorId) = 0;
     /** Derived classes set text rotation to internal data structures. */
     virtual void        SetRotation( sal_uInt16 nRotation ) = 0;
 
@@ -496,7 +496,7 @@ public:
     explicit            XclExpChText( const XclExpChRoot& rRoot );
 
     /** Sets font color and color identifier to internal data structures. */
-    virtual void SetFont( XclExpChFontRef xFont, model::ComplexColor const& 
rComplexColor, sal_uInt32 nColorId ) override;
+    virtual void SetFont(const XclExpChFontRef& xFont, model::ComplexColor 
const& rComplexColor, sal_uInt32 nColorId) override;
     /** Sets text rotation to internal data structures. */
     virtual void        SetRotation( sal_uInt16 nRotation ) override;
 
@@ -1020,7 +1020,7 @@ public:
     explicit            XclExpChAxis( const XclExpChRoot& rRoot, sal_uInt16 
nAxisType );
 
     /** Sets font color and color identifier to internal data structures. */
-    virtual void SetFont( XclExpChFontRef xFont, model::ComplexColor const& 
rComplexColor, sal_uInt32 nColorId ) override;
+    virtual void SetFont(const XclExpChFontRef& xFont, model::ComplexColor 
const& rComplexColor, sal_uInt32 nColorId) override;
     /** Sets text rotation to internal data structures. */
     virtual void        SetRotation( sal_uInt16 nRotation ) override;
 
@@ -1137,7 +1137,7 @@ public:
     /** Removes the last created data series object from the series list. */
     void                RemoveLastSeries();
     /** Stores a CHTEXT group that describes a data point label. */
-    void                SetDataLabel( XclExpChTextRef const & xText );
+    void                SetDataLabel(const XclExpChTextRef& xText);
     /** Sets the plot area position and size to manual mode. */
     void                SetManualPlotArea();
 
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index e26ed4a0cfae..8feb17470b11 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -665,7 +665,7 @@ public:
     /** Sets this object to the specified data point position. */
     void                SetPointPos( const XclChDataPointPos& rPointPos, 
sal_uInt16 nFormatIdx );
     /** Sets type and text formatting for a data point label (CHTEXT group). */
-    void         SetDataLabel( XclImpChTextRef xLabel ) { mxLabel = xLabel; }
+    void         SetDataLabel(const XclImpChTextRef& xLabel) { mxLabel = 
xLabel; }
 
     /** Updates default data format for series group. */
     void                UpdateGroupFormat( const XclChExtTypeInfo& rTypeInfo );
@@ -788,7 +788,7 @@ public:
     /** Sets a data point or series format (CHDATAFORMAT group) for this 
series. */
     void                SetDataFormat( const XclImpChDataFormatRef& xDataFmt );
     /** Sets a label text (CHTEXT group) attached  to a series or data point. 
*/
-    void                SetDataLabel( const XclImpChTextRef& xLabel );
+    void                SetDataLabel(const XclImpChTextRef& xLabel);
     /** Adds error bar settings from the passed series to the own series. */
     void                AddChildSeries( const XclImpChSeries& rSeries );
     /** Updates missing series formatting by using default formatting from 
axes sets. */
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 3b12dc9da756..6a6a12d181a1 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -332,10 +332,7 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( 
const OUString& aProp
             uno::Sequence<OUString> aSeq(nCount);
             OUString* pAry = aSeq.getArray();
             for (size_t i=0; i<nCount; ++i)
-            {
-                OUString aEntry((*pUserList)[i].GetString());
-                pAry[i] = aEntry;
-            }
+                pAry[i] = (*pUserList)[i].GetString();
             aRet <<= aSeq;
         }
     }
diff --git a/scripting/source/stringresource/stringresource.cxx 
b/scripting/source/stringresource/stringresource.cxx
index 79090c6eeaad..d568af7a1b47 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -417,8 +417,7 @@ void StringResourceImpl::newLocale( const Locale& locale )
         for( const auto& rEntry : rSourceMap )
         {
             OUString aId  = rEntry.first;
-            OUString aStr = rEntry.second;
-            rTargetMap[ aId ] = aStr;
+            rTargetMap[ aId ] = rEntry.second;
         }
 
         const IdToIndexMap& rSourceIndexMap = pCopyFromItem->m_aIdToIndexMap;
diff --git a/sfx2/source/control/templatelocalview.cxx 
b/sfx2/source/control/templatelocalview.cxx
index bd5fd7f649c2..ada15399951e 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -116,17 +116,14 @@ void TemplateLocalView::Populate()
 
         for (sal_uInt16 j = 0; j < nEntries; ++j)
         {
-            OUString aName = mpDocTemplates->GetName(i,j);
-            OUString aURL = mpDocTemplates->GetPath(i,j);
-
             TemplateItemProperties aProperties;
             aProperties.nId = j+1;
             aProperties.nDocId = j;
             aProperties.nRegionId = i;
-            aProperties.aName = aName;
-            aProperties.aPath = aURL;
+            aProperties.aName = mpDocTemplates->GetName(i, j);
+            aProperties.aPath = mpDocTemplates->GetPath(i, j);
             aProperties.aRegionName = aRegionName;
-            aProperties.aThumbnail = TemplateLocalView::fetchThumbnail(aURL,
+            aProperties.aThumbnail = 
TemplateLocalView::fetchThumbnail(aProperties.aPath,
                                                                           
mnThumbnailWidth,
                                                                           
mnThumbnailHeight);
 
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index a4d2153f6684..4f7ad39b4e11 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -40,10 +40,9 @@
 
 void SfxPreviewWin_Impl::SetObjectShell(SfxObjectShell const * pObj)
 {
-    std::shared_ptr<GDIMetaFile> xFile = pObj
+    xMetaFile = pObj
         ? pObj->GetPreviewMetaFile()
         : std::shared_ptr<GDIMetaFile>();
-    xMetaFile = xFile;
     Invalidate();
 }
 
diff --git a/slideshow/source/engine/slideoverlaybutton.cxx 
b/slideshow/source/engine/slideoverlaybutton.cxx
index 40ade676b383..7dfc2d1af305 100644
--- a/slideshow/source/engine/slideoverlaybutton.cxx
+++ b/slideshow/source/engine/slideoverlaybutton.cxx
@@ -58,8 +58,8 @@ 
SlideOverlayButton::SlideOverlayButton(css::uno::Reference<css::rendering::XBitm
                                        const UnoViewContainer& rViewContainer)
     : mxIconBitmap(std::move(xIconBitmap))
     , mrEventMultiplexer(rEventMultiplexer)
-    , mpPosition(pPosition)
-    , mClickHandler(clickHandler)
+    , mpPosition(std::move(pPosition))
+    , mClickHandler(std::move(clickHandler))
     , mrScreenUpdater(rScreenUpdater)
 {
     for (const auto& pView : rViewContainer)
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index ff28f448cbbd..fc2481f3d2ab 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -716,8 +716,7 @@ bool SmDocShell::Save()
         if( mpTree )
             ArrangeFormula();
 
-        Reference<css::frame::XModel> xModel(GetModel());
-        SmXMLExportWrapper aEquation(xModel);
+        SmXMLExportWrapper aEquation(GetModel());
         aEquation.SetFlat(false);
         return aEquation.Export(*GetMedium());
     }
diff --git a/stoc/source/inspect/introspection.cxx 
b/stoc/source/inspect/introspection.cxx
index eb06b6656830..08bd1485deba 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -1776,8 +1776,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> 
Implementation::inspect(
                         Property& rProp = rAllPropArray[ rPropCount ];
                         rProp.Name = xField->getName();
                         rProp.Handle = rPropCount;
-                        Type aFieldType( xPropType->getTypeClass(), 
xPropType->getName() );
-                        rProp.Type = aFieldType;
+                        rProp.Type = Type(xPropType->getTypeClass(), 
xPropType->getName());
                         FieldAccessMode eAccessMode = xField->getAccessMode();
                         rProp.Attributes = (eAccessMode == 
FieldAccessMode_READONLY ||
                                             eAccessMode == 
FieldAccessMode_CONST)
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx
index 2266d65f2ded..1a4b6f4baa38 100644
--- a/svtools/source/uno/unoevent.cxx
+++ b/svtools/source/uno/unoevent.cxx
@@ -173,13 +173,11 @@ void getMacroFromAny(
         if (eType == STARBASIC)
         {
             // create macro and return
-            SvxMacro aMacro(sMacroVal, sLibVal, eType);
-            rMacro = aMacro;
+            rMacro = SvxMacro(sMacroVal, sLibVal, eType);
         }
         else if (eType == EXTENDED_STYPE)
         {
-            SvxMacro aMacro(sScriptVal, sScript);
-            rMacro = aMacro;
+            rMacro = SvxMacro(sScriptVal, sScript);
         }
         else
         {
@@ -334,13 +332,10 @@ void SvEventDescriptor::getByName(
     const SvMacroItemId nEvent )
 {
     const SvxMacroItem& rItem = getMacroItem();
-    if( rItem.HasMacro( nEvent ) )
+    if (rItem.HasMacro(nEvent))
         rMacro = rItem.GetMacro(nEvent);
     else
-    {
-        SvxMacro aEmptyMacro("", "");
-        rMacro = aEmptyMacro;
-    }
+        rMacro = SvxMacro("", "");
 }
 
 SvDetachedEventDescriptor::SvDetachedEventDescriptor(
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index b572d49f8adf..85fd6dcf285a 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -809,8 +809,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uInt1
                 }
                 if(pList && pList->IsAvailable( pLevelSettings->sBulletFont ) )
                 {
-                    FontMetric aFontMetric = 
pList->Get(pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE);
-                    vcl::Font aFont(aFontMetric);
+                    vcl::Font 
aFont(pList->Get(pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE));
                     aFmt.SetBulletFont(&aFont);
                 }
                 else
diff --git a/sw/source/core/unocore/unodraw.cxx 
b/sw/source/core/unocore/unodraw.cxx
index a229c1f2031f..739869e2ee8a 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1542,8 +1542,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& 
rPropertyName)
                         else
                         {
                             // return nothing
-                            uno::Any aAny;
-                            aRet = aAny;
+                            aRet = uno::Any();
                         }
                     }
                 }
diff --git a/sw/source/ui/vba/vbacontentcontrollistentry.cxx 
b/sw/source/ui/vba/vbacontentcontrollistentry.cxx
index 73f5e9d0a2cf..c3071f0c4b6e 100644
--- a/sw/source/ui/vba/vbacontentcontrollistentry.cxx
+++ b/sw/source/ui/vba/vbacontentcontrollistentry.cxx
@@ -17,7 +17,7 @@ SwVbaContentControlListEntry::SwVbaContentControlListEntry(
     const uno::Reference<uno::XComponentContext>& rContext, 
std::shared_ptr<SwContentControl> pCC,
     size_t nZIndex)
     : SwVbaContentControlListEntry_BASE(rParent, rContext)
-    , m_pCC(pCC)
+    , m_pCC(std::move(pCC))
     , m_nZIndex(nZIndex)
 {
 }
diff --git a/sw/source/uibase/docvw/srcedtw.cxx 
b/sw/source/uibase/docvw/srcedtw.cxx
index 75cfe7bbd256..b4196d97f1bf 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -956,11 +956,10 @@ void SwSrcEditWindow::SetFont()
     }
     const SvxFontListItem* pFontListItem =
         static_cast<const SvxFontListItem* 
>(m_pSrcView->GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ));
-    const FontList*  pList = pFontListItem->GetFontList();
-    FontMetric aFontMetric = pList->Get(sFontName,WEIGHT_NORMAL, ITALIC_NONE);
+    const FontList* pList = pFontListItem->GetFontList();
+    vcl::Font aFont(pList->Get(sFontName, WEIGHT_NORMAL, ITALIC_NONE));
 
     const vcl::Font& rFont = GetTextEngine()->GetFont();
-    vcl::Font aFont(aFontMetric);
     Size aSize(rFont.GetFontSize());
     //font height is stored in point and set in twip
     aSize.setHeight(
diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index 57e7c8299546..f4fe850450f0 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -902,8 +902,7 @@ void UpdateFieldContent(SfxRequest& rReq, SwWrtShell& 
rWrtSh)
         });
 
     comphelper::SequenceAsHashMap aMap(aField);
-    auto aName = aMap["Name"].get<OUString>();
-    rRefmark.GetRefName() = aName;
+    rRefmark.GetRefName() = aMap["Name"].get<OUString>();
 
     OUString aContent = aMap["Content"].get<OUString>();
     auto pTextRefMark = const_cast<SwTextRefMark*>(rRefmark.GetTextRefMark());
diff --git a/test/source/unoapixml_test.cxx b/test/source/unoapixml_test.cxx
index 23dc826cbc97..f604634efd6a 100644
--- a/test/source/unoapixml_test.cxx
+++ b/test/source/unoapixml_test.cxx
@@ -22,7 +22,7 @@ using namespace css;
 using namespace css::uno;
 
 UnoApiXmlTest::UnoApiXmlTest(OUString path)
-    : UnoApiTest(path)
+    : UnoApiTest(std::move(path))
 {
 }
 
diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx 
b/ucb/source/cacher/contentresultsetwrapper.cxx
index d4b32024b9a2..b5a9907129d9 100644
--- a/ucb/source/cacher/contentresultsetwrapper.cxx
+++ b/ucb/source/cacher/contentresultsetwrapper.cxx
@@ -77,9 +77,7 @@ void 
ContentResultSetWrapper::impl_init_xPropertySetOrigin(std::unique_lock<std:
     if( m_xPropertySetOrigin.is() )
         return;
 
-    Reference< XPropertySet > xOrig( m_xResultSetOrigin, UNO_QUERY );
-
-    m_xPropertySetOrigin = xOrig;
+    m_xPropertySetOrigin.set(m_xResultSetOrigin, UNO_QUERY);
     OSL_ENSURE( m_xPropertySetOrigin.is(), "interface XPropertySet is 
required" );
 }
 
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx 
b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index 885dc8663911..8d3e5f927e9b 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -1566,11 +1566,10 @@ void HierarchyContent::transfer(
     // 1) Create new child content.
 
 
-    OUString aType = xSource->isFolder()
+    ucb::ContentInfo aContentInfo;
+    aContentInfo.Type = xSource->isFolder()
         ? HIERARCHY_FOLDER_CONTENT_TYPE
         : HIERARCHY_LINK_CONTENT_TYPE;
-    ucb::ContentInfo aContentInfo;
-    aContentInfo.Type = aType;
     aContentInfo.Attributes = 0;
 
     // Note: The static cast is okay here, because its sure that
diff --git a/unotools/source/misc/ZipPackageHelper.cxx 
b/unotools/source/misc/ZipPackageHelper.cxx
index 8bbd7513184b..2f8045a3a185 100644
--- a/unotools/source/misc/ZipPackageHelper.cxx
+++ b/unotools/source/misc/ZipPackageHelper.cxx
@@ -63,17 +63,15 @@ ZipPackageHelper::ZipPackageHelper(
         Any(beans::NamedValue("StorageFormat", Any(ZIP_STORAGE_FORMAT_STRING)))
     };
 
-    Reference< XHierarchicalNameAccess > xHNameAccess(
+    mxHNameAccess.set(
         mxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
             "com.sun.star.packages.comp.ZipPackage",
             aArguments, mxContext ), UNO_QUERY);
-    mxHNameAccess = xHNameAccess;
 
     if( !mxHNameAccess.is() )
         return;
 
-    Reference<XSingleServiceFactory> xFactory(mxHNameAccess, UNO_QUERY);
-    mxFactory = xFactory;
+    mxFactory.set(mxHNameAccess, UNO_QUERY);
 
     // get root zip folder
     mxHNameAccess->getByHierarchicalName( "/" ) >>= mxRootFolder;
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index f996b4359b1d..8bbc5354fb56 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -5395,8 +5395,7 @@ GdkDragAction 
GtkInstDropTarget::signalDragMotion(GtkDropTargetAsync *context, G
             xTransferable = new GtkDnDTransferable(pDrop);
 #endif
         }
-        css::uno::Sequence<css::datatransfer::DataFlavor> aFormats = 
xTransferable->getTransferDataFlavors();
-        aEvent.SupportedDataFlavors = aFormats;
+        aEvent.SupportedDataFlavors = xTransferable->getTransferDataFlavors();
         fire_dragEnter(aEvent);
         m_bInDrag = true;
     }
diff --git a/writerfilter/source/dmapper/FontTable.cxx 
b/writerfilter/source/dmapper/FontTable.cxx
index 588eb841013c..0b5f6c6747dc 100644
--- a/writerfilter/source/dmapper/FontTable.cxx
+++ b/writerfilter/source/dmapper/FontTable.cxx
@@ -271,11 +271,10 @@ EmbeddedFontHandler::~EmbeddedFontHandler()
 
 void EmbeddedFontHandler::lcl_attribute( Id name, Value& val )
 {
-    OUString sValue = val.getString();
     switch( name )
     {
         case NS_ooxml::LN_CT_FontRel_fontKey:
-            m_fontKey = sValue;
+            m_fontKey = val.getString();
             break;
         case NS_ooxml::LN_CT_Rel_id:
             break;
diff --git a/writerfilter/source/dmapper/TableData.hxx 
b/writerfilter/source/dmapper/TableData.hxx
index 53b99ed7c7fd..9c75eedc4e91 100644
--- a/writerfilter/source/dmapper/TableData.hxx
+++ b/writerfilter/source/dmapper/TableData.hxx
@@ -324,7 +324,7 @@ public:
 
        @param pProperties    properties of the row to be ended
      */
-    void endRow(TablePropertyMapPtr pProperties)
+    void endRow(const TablePropertyMapPtr& pProperties)
     {
         mpRow->insertProperties(pProperties);
         mRows.push_back(mpRow);
diff --git a/writerperfect/source/writer/EPUBExportFilter.cxx 
b/writerperfect/source/writer/EPUBExportFilter.cxx
index 8ac55af19f59..68cc4cbbb41c 100644
--- a/writerperfect/source/writer/EPUBExportFilter.cxx
+++ b/writerperfect/source/writer/EPUBExportFilter.cxx
@@ -160,11 +160,9 @@ void 
EPUBExportFilter::CreateMetafiles(std::vector<exp::FixedLayoutPage>& rPageM
         SvMemoryStream aMemoryStream;
         SvmWriter aWriter(aMemoryStream);
         aWriter.Write(rGDIMetaFile);
-        uno::Sequence<sal_Int8> aSequence(static_cast<const 
sal_Int8*>(aMemoryStream.GetData()),
-                                          aMemoryStream.Tell());
-
         exp::FixedLayoutPage aPage;
-        aPage.aMetafile = aSequence;
+        aPage.aMetafile = uno::Sequence<sal_Int8>(
+            static_cast<const sal_Int8*>(aMemoryStream.GetData()), 
aMemoryStream.Tell());
         aPage.aCssPixels = aCss;
         aPage.aChapterNames = aRenderer.getChapterNames();
         rPageMetafiles.push_back(aPage);
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx 
b/xmloff/source/chart/SchXMLAxisContext.cxx
index ae55da90f8b5..63ef21582ff4 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -582,10 +582,9 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
SchXMLAxisContext::cre
     {
         case XML_ELEMENT(CHART, XML_TITLE):
         {
-            Reference< drawing::XShape > xTitleShape = getTitleShape();
             return new SchXMLTitleContext( m_rImportHelper, GetImport(),
                                                m_aCurrentAxis.aTitle,
-                                               xTitleShape );
+                                               getTitleShape() );
         }
         break;
 

Reply via email to