sc/source/filter/oox/stylesbuffer.cxx             |    9 +++------
 sc/source/ui/docshell/docfunc.cxx                 |    2 +-
 sc/source/ui/inc/docfunc.hxx                      |    2 +-
 sfx2/source/view/classificationhelper.cxx         |    5 ++---
 slideshow/source/engine/eventmultiplexer.cxx      |    8 ++++----
 slideshow/source/inc/eventmultiplexer.hxx         |    8 ++++----
 sot/source/sdstor/ucbstorage.cxx                  |    6 ++----
 svx/source/fmcomp/fmgridif.cxx                    |    3 +--
 svx/source/unodraw/unoshcol.cxx                   |    3 +--
 sw/source/filter/ww8/docxattributeoutput.cxx      |    6 ++----
 sw/source/ui/vba/vbacontentcontrol.cxx            |    2 +-
 sw/source/uibase/uno/loktxdoc.cxx                 |    4 +---
 sw/source/uibase/uno/unoatxt.cxx                  |    3 +--
 ucb/source/core/ucbcmds.cxx                       |    8 +++-----
 vcl/source/app/htmltransferable.cxx               |    2 +-
 vcl/source/window/menu.cxx                        |    5 +----
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |    2 +-
 writerfilter/source/dmapper/StyleSheetTable.cxx   |    6 ++----
 xmlhelp/source/cxxhelp/provider/db.cxx            |    3 +--
 xmloff/source/style/xmlimppr.cxx                  |    3 +--
 xmloff/source/text/XMLIndexTOCContext.cxx         |    3 +--
 xmloff/source/text/txtvfldi.cxx                   |    3 +--
 22 files changed, 36 insertions(+), 60 deletions(-)

New commits:
commit 95e12eaebc00be5385e0abef2c5e70b7729af6f4
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Dec 10 15:55:31 2023 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Dec 10 20:27:43 2023 +0100

    cid#1545789 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1545791 COPY_INSTEAD_OF_MOVE
    cid#1545800 COPY_INSTEAD_OF_MOVE
    cid#1545806 COPY_INSTEAD_OF_MOVE
    cid#1545817 COPY_INSTEAD_OF_MOVE
    cid#1545832 COPY_INSTEAD_OF_MOVE
    cid#1545834 COPY_INSTEAD_OF_MOVE
    cid#1545841 COPY_INSTEAD_OF_MOVE
    cid#1545848 COPY_INSTEAD_OF_MOVE
    cid#1545852 COPY_INSTEAD_OF_MOVE
    cid#1545854 COPY_INSTEAD_OF_MOVE
    cid#1545864 COPY_INSTEAD_OF_MOVE
    cid#1545875 COPY_INSTEAD_OF_MOVE
    cid#1545882 COPY_INSTEAD_OF_MOVE
    cid#1545900 COPY_INSTEAD_OF_MOVE
    cid#1545901 COPY_INSTEAD_OF_MOVE
    cid#1545908 COPY_INSTEAD_OF_MOVE
    cid#1545921 COPY_INSTEAD_OF_MOVE
    cid#1546054 COPY_INSTEAD_OF_MOVE
    cid#1546145 COPY_INSTEAD_OF_MOVE
    cid#1546146 COPY_INSTEAD_OF_MOVE
    
    Change-Id: I8b23d0457cb293aa0e33593131224c1cdd1d8eb1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160545
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/filter/oox/stylesbuffer.cxx 
b/sc/source/filter/oox/stylesbuffer.cxx
index 2310f324e27a..f31cde38bcff 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1510,12 +1510,9 @@ void Border::importDxfBorder( sal_Int32 nElement, 
SequenceInputStream& rStrm )
 
 void Border::finalizeImport( bool bRTL )
 {
-    if ( bRTL )
-    {
-        BorderLineModel aTmp = maModel.maLeft;
-        maModel.maLeft = maModel.maRight;
-        maModel.maRight = aTmp;
-    }
+    if (bRTL)
+        std::swap(maModel.maLeft, maModel.maRight);
+
     maApiData.mbBorderUsed = maModel.maLeft.mbUsed || maModel.maRight.mbUsed 
|| maModel.maTop.mbUsed || maModel.maBottom.mbUsed;
     maApiData.mbDiagUsed   = maModel.maDiagonal.mbUsed;
 
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 1a8d902bea19..50dc53ec546f 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -5773,7 +5773,7 @@ void ScDocFunc::EndListAction()
 }
 
 bool ScDocFunc::InsertSparklines(ScRange const& rDataRange, ScRange const& 
rSparklineRange,
-                                std::shared_ptr<sc::SparklineGroup> 
pSparklineGroup)
+                                 const std::shared_ptr<sc::SparklineGroup>& 
pSparklineGroup)
 {
     std::vector<sc::SparklineData> aSparklineDataVector;
 
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index aa9755566ef3..e1f0bb9eaa34 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -245,7 +245,7 @@ public:
     void ConvertFormulaToValue( const ScRange& rRange, bool bInteraction );
 
     SC_DLLPUBLIC bool InsertSparklines(ScRange const& rDataRange, ScRange 
const& rSparklineRange,
-                                       std::shared_ptr<sc::SparklineGroup> 
pSparklineGroup);
+                                       const 
std::shared_ptr<sc::SparklineGroup>& pSparklineGroup);
 
     SC_DLLPUBLIC bool DeleteSparkline(ScAddress const& rAddress);
     SC_DLLPUBLIC bool DeleteSparklineGroup(std::shared_ptr<sc::SparklineGroup> 
const& pSparklineGroup, SCTAB nTab);
diff --git a/sfx2/source/view/classificationhelper.cxx 
b/sfx2/source/view/classificationhelper.cxx
index e9556e88c19e..be22b263fb78 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -394,10 +394,9 @@ void SfxClassificationHelper::Impl::parsePolicy()
             aPath = aLocalized;
     }
 
-    std::unique_ptr<SvStream> pStream = 
utl::UcbStreamHelper::CreateStream(aPath, StreamMode::READ);
-    uno::Reference<io::XInputStream> xInputStream(new 
utl::OStreamWrapper(std::move(pStream)));
     xml::sax::InputSource aParserInput;
-    aParserInput.aInputStream = xInputStream;
+    std::unique_ptr<SvStream> pStream = 
utl::UcbStreamHelper::CreateStream(aPath, StreamMode::READ);
+    aParserInput.aInputStream.set(new utl::OStreamWrapper(std::move(pStream)));
 
     uno::Reference<xml::sax::XParser> xParser = 
xml::sax::Parser::create(xComponentContext);
     rtl::Reference<SfxClassificationParser> xClassificationParser(new 
SfxClassificationParser());
diff --git a/slideshow/source/engine/eventmultiplexer.cxx 
b/slideshow/source/engine/eventmultiplexer.cxx
index 80c4c13d9f46..a5135384b311 100644
--- a/slideshow/source/engine/eventmultiplexer.cxx
+++ b/slideshow/source/engine/eventmultiplexer.cxx
@@ -1285,15 +1285,15 @@ void EventMultiplexer::notifyHyperlinkClicked(
         { return pHandler.getHandler()->handleHyperlink( hyperLink ); } );
 }
 
-basegfx::B2DPoint 
EventMultiplexer::toMatrixPoint(uno::Reference<uno::XInterface> xInterface,
-                                                  basegfx::B2DPoint pnt)
+basegfx::B2DPoint EventMultiplexer::toMatrixPoint(const 
uno::Reference<uno::XInterface>& xInterface,
+                                                  const basegfx::B2DPoint& pnt)
 {
     uno::Reference<presentation::XSlideShowView> xView(xInterface, 
uno::UNO_QUERY_THROW);
     return mpImpl->toMatrixPoint(xView, pnt);
 }
 
-basegfx::B2DPoint 
EventMultiplexer::toNormalPoint(uno::Reference<uno::XInterface> xInterface,
-                                                  basegfx::B2DPoint pnt)
+basegfx::B2DPoint EventMultiplexer::toNormalPoint(const 
uno::Reference<uno::XInterface>& xInterface,
+                                                  const basegfx::B2DPoint& pnt)
 {
     uno::Reference<presentation::XSlideShowView> xView(xInterface, 
uno::UNO_QUERY_THROW);
     return mpImpl->toNormalPoint(xView, pnt);
diff --git a/slideshow/source/inc/eventmultiplexer.hxx 
b/slideshow/source/inc/eventmultiplexer.hxx
index 21fa333cd109..6c9afb2466e9 100644
--- a/slideshow/source/inc/eventmultiplexer.hxx
+++ b/slideshow/source/inc/eventmultiplexer.hxx
@@ -650,11 +650,11 @@ public:
     */
     void notifyHyperlinkClicked( OUString const& hyperLink );
 
-    basegfx::B2DPoint toMatrixPoint(css::uno::Reference<css::uno::XInterface> 
xInterface,
-                                    basegfx::B2DPoint pnt);
+    basegfx::B2DPoint toMatrixPoint(const 
css::uno::Reference<css::uno::XInterface>& xInterface,
+                                    const basegfx::B2DPoint& pnt);
 
-    basegfx::B2DPoint toNormalPoint(css::uno::Reference<css::uno::XInterface> 
xInterface,
-                                    basegfx::B2DPoint pnt);
+    basegfx::B2DPoint toNormalPoint(const 
css::uno::Reference<css::uno::XInterface>& xInterface,
+                                    const basegfx::B2DPoint& pnt);
 
 private:
     std::unique_ptr<EventMultiplexerImpl> mpImpl;
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index fbfafe9727f9..a6f83bb33d77 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1047,11 +1047,9 @@ sal_Int16 UCBStorageStream_Impl::Commit()
                 if ( m_aTempURL.isEmpty() && !( m_nMode & StreamMode::TRUNC ) )
                     throw RuntimeException();
 
-                // create wrapper to stream that is only used while reading 
inside package component
-                Reference < XInputStream > xStream = new 
FileStreamWrapper_Impl( m_aTempURL );
-
                 InsertCommandArgument aArg;
-                aArg.Data = xStream;
+                // create wrapper to stream that is only used while reading 
inside package component
+                aArg.Data.set(new FileStreamWrapper_Impl(m_aTempURL));
                 aArg.ReplaceExisting = true;
                 m_pContent->executeCommand( "insert", Any(aArg) );
 
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 7f367a2d99a3..46bb09029ddd 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -2495,8 +2495,7 @@ void 
FmXGridPeer::releaseDispatchProviderInterceptor(const Reference< css::frame
 
     if (m_xFirstDispatchInterceptor == _xInterceptor)
     {   // our chain will have a new first element
-        Reference< css::frame::XDispatchProviderInterceptor >  
xSlave(m_xFirstDispatchInterceptor->getSlaveDispatchProvider(), UNO_QUERY);
-        m_xFirstDispatchInterceptor = xSlave;
+        
m_xFirstDispatchInterceptor.set(m_xFirstDispatchInterceptor->getSlaveDispatchProvider(),
 UNO_QUERY);
     }
     // do this before removing the interceptor from the chain as we won't know 
it's slave afterwards)
 
diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx
index 42cf3fc5f164..be5d07d9b878 100644
--- a/svx/source/unodraw/unoshcol.cxx
+++ b/svx/source/unodraw/unoshcol.cxx
@@ -92,9 +92,8 @@ void SvxShapeCollection::dispose()
         // Create an event with this as sender
         try
         {
-            uno::Reference< uno::XInterface > xSource( uno::Reference< 
uno::XInterface >::query( static_cast<lang::XComponent *>(this) ) );
             document::EventObject aEvt;
-            aEvt.Source = xSource;
+            aEvt.Source = uno::Reference< uno::XInterface >::query( 
static_cast<lang::XComponent *>(this) );
             // inform all listeners to release this object
             // The listener container are automatically cleared
             std::unique_lock g(m_aMutex);
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index d84549d43066..10db254a711f 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -929,9 +929,8 @@ void SdtBlockHelper::GetSdtParamsFromGrabBag(const 
uno::Sequence<beans::Property
             aPropertyValue.Value >>= aGrabBag;
             for (const auto& rProp : std::as_const(aGrabBag))
             {
-                OUString sValue = rProp.Value.get<OUString>();
                 if (rProp.Name == "ooxml:CT_SdtPlaceholder_docPart_val")
-                    m_aPlaceHolderDocPart = sValue;
+                    m_aPlaceHolderDocPart = rProp.Value.get<OUString>();
             }
         }
         else if (aPropertyValue.Name == "ooxml:CT_SdtPr_color")
@@ -940,9 +939,8 @@ void SdtBlockHelper::GetSdtParamsFromGrabBag(const 
uno::Sequence<beans::Property
             aPropertyValue.Value >>= aGrabBag;
             for (const auto& rProp : std::as_const(aGrabBag))
             {
-                OUString sValue = rProp.Value.get<OUString>();
                 if (rProp.Name == "ooxml:CT_SdtColor_val")
-                    m_aColor = sValue;
+                    m_aColor = rProp.Value.get<OUString>();
             }
         }
         else if (aPropertyValue.Name == "ooxml:CT_SdtPr_appearance")
diff --git a/sw/source/ui/vba/vbacontentcontrol.cxx 
b/sw/source/ui/vba/vbacontentcontrol.cxx
index dc4e4afc236a..9cbf097090ee 100644
--- a/sw/source/ui/vba/vbacontentcontrol.cxx
+++ b/sw/source/ui/vba/vbacontentcontrol.cxx
@@ -37,7 +37,7 @@ SwVbaContentControl::SwVbaContentControl(const 
uno::Reference<XHelperInterface>&
                                          std::shared_ptr<SwContentControl> 
pContentControl)
     : SwVbaContentControl_BASE(rParent, rContext)
     , mxTextDocument(xTextDocument)
-    , m_pCC(pContentControl)
+    , m_pCC(std::move(pContentControl))
 {
     assert(m_pCC && "SwVbaContentControl created without a shared_ptr. Why 
would you do that?");
 }
diff --git a/sw/source/uibase/uno/loktxdoc.cxx 
b/sw/source/uibase/uno/loktxdoc.cxx
index 4843af4cf443..47527605f69a 100644
--- a/sw/source/uibase/uno/loktxdoc.cxx
+++ b/sw/source/uibase/uno/loktxdoc.cxx
@@ -450,9 +450,7 @@ void SwXTextDocument::getCommandValues(tools::JsonWriter& 
rJsonWriter, std::stri
             else
                 aValue = aToken;
         } while (nIndex >= 0);
-        OUString aDecodedValue
-            = INetURLObject::decode(aValue, 
INetURLObject::DecodeMechanism::WithCharset);
-        aMap[aKey] = aDecodedValue;
+        aMap[aKey] = INetURLObject::decode(aValue, 
INetURLObject::DecodeMechanism::WithCharset);
     } while (nParamIndex >= 0);
 
     if (o3tl::starts_with(rCommand, aTextFormFields))
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index 7ea3d9db4e40..22de9f34a175 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -961,8 +961,7 @@ void SwAutoTextEventDescriptor::getByName(
 
     // return empty macro, unless macro is found
     OUString sEmptyStr;
-    SvxMacro aEmptyMacro(sEmptyStr, sEmptyStr);
-    rMacro = aEmptyMacro;
+    rMacro = SvxMacro(sEmptyStr, sEmptyStr);
 
     if ( !pBlocks || pBlocks->GetError())
         return;
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index c8a102b9c1b2..5bcfb1f99ff9 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -886,15 +886,13 @@ uno::Reference< sdbc::XResultSet > getResultSet(
 {
     uno::Reference< sdbc::XResultSet > xResultSet;
 
-    uno::Sequence< beans::Property > aProps{ makeProperty("IsFolder", -1 /* 
unknown */),
-                                             makeProperty("IsDocument", -1 /* 
unknown */),
-                                             makeProperty("TargetURL", -1 /* 
unknown */) };
-
     ucb::OpenCommandArgument2 aArg;
     aArg.Mode       = ucb::OpenMode::ALL;
     aArg.Priority   = 0; // unused
     aArg.Sink       = nullptr;
-    aArg.Properties = aProps;
+    aArg.Properties = { makeProperty("IsFolder", -1 /* unknown */),
+                        makeProperty("IsDocument", -1 /* unknown */),
+                        makeProperty("TargetURL", -1 /* unknown */) };
 
     ucb::Command aOpenCommand( "open",
                                      -1,
diff --git a/vcl/source/app/htmltransferable.cxx 
b/vcl/source/app/htmltransferable.cxx
index 24f65fe929b1..27a67fb9b2f4 100644
--- a/vcl/source/app/htmltransferable.cxx
+++ b/vcl/source/app/htmltransferable.cxx
@@ -32,7 +32,7 @@ using namespace ::com::sun::star;
 namespace vcl::unohelper
 {
 HtmlTransferable::HtmlTransferable(OString sData)
-    : data(sData)
+    : data(std::move(sData))
 {
 }
 
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 3a66b962ebd6..0a065589a41f 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1684,10 +1684,7 @@ static OUString getShortenedString( const OUString& 
i_rLong, vcl::RenderContext
     if (nPos != -1)
     {
         if (nPos < aNonMnem.getLength() && i_rLong[nPos+1] == aNonMnem[nPos])
-        {
-            OUString aTmp = OUString::Concat(aNonMnem.subView(0, nPos)) + "~" 
+ aNonMnem.subView(nPos);
-            aNonMnem = aTmp;
-        }
+            aNonMnem = OUString::Concat(aNonMnem.subView(0, nPos)) + "~" + 
aNonMnem.subView(nPos);
     }
     return aNonMnem;
 }
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index b116bd1bc68d..95bec19736c8 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -252,7 +252,7 @@ public:
     void setFFDataHandler(FFDataHandler::Pointer_t pFFDataHandler) { 
m_pFFDataHandler = pFFDataHandler; }
     const FFDataHandler::Pointer_t& getFFDataHandler() const { return 
m_pFFDataHandler; }
 
-    void setFormControlHelper(FormControlHelper::Pointer_t pFormControlHelper) 
{ m_pFormControlHelper = pFormControlHelper; }
+    void setFormControlHelper(const FormControlHelper::Pointer_t& 
pFormControlHelper) { m_pFormControlHelper = pFormControlHelper; }
     const FormControlHelper::Pointer_t& getFormControlHelper() const { return 
m_pFormControlHelper; }
     const PropertyMapPtr& getProperties() const { return m_pProperties; }
 
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx 
b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 711a90290f4c..ea6ddae6d562 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -804,8 +804,7 @@ void 
StyleSheetTable::lcl_entry(writerfilter::Reference<Properties>::Pointer_t r
 {
     //create a new style entry
     OSL_ENSURE( !m_pImpl->m_pCurrentEntry, "current entry has to be NULL 
here");
-    StyleSheetEntryPtr pNewEntry( new StyleSheetEntry );
-    m_pImpl->m_pCurrentEntry = pNewEntry;
+    m_pImpl->m_pCurrentEntry = StyleSheetEntryPtr(new StyleSheetEntry);
     m_pImpl->m_rDMapper.PushStyleSheetProperties( 
m_pImpl->m_pCurrentEntry->m_pProperties.get() );
     ref->resolve(*this);
     m_pImpl->m_rDMapper.ProcessDeferredStyleCharacterProperties();
@@ -850,8 +849,7 @@ void 
StyleSheetTable::lcl_entry(writerfilter::Reference<Properties>::Pointer_t r
         xPropertySet->setPropertyValue("InteropGrabBag", 
uno::Any(comphelper::containerToSequence(aGrabBag)));
     }
 
-    StyleSheetEntryPtr pEmptyEntry;
-    m_pImpl->m_pCurrentEntry = pEmptyEntry;
+    m_pImpl->m_pCurrentEntry = StyleSheetEntryPtr();
 }
 /*-------------------------------------------------------------------------
     sorting helper
diff --git a/xmlhelp/source/cxxhelp/provider/db.cxx 
b/xmlhelp/source/cxxhelp/provider/db.cxx
index d60bff78ee63..e0c099c94410 100644
--- a/xmlhelp/source/cxxhelp/provider/db.cxx
+++ b/xmlhelp/source/cxxhelp/provider/db.cxx
@@ -119,8 +119,7 @@ void Hdf::createHashMap( bool bOptimizeForPerformance )
         if( bOptimizeForPerformance )
         {
             const char* pValSrc = pData + iPos;
-            OString aValStr( pValSrc, nValLen );
-            (*m_pStringToDataMap)[aOKeyStr] = aValStr;
+            (*m_pStringToDataMap)[aOKeyStr] = OString(pValSrc, nValLen);
         }
         else
         {
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index f72d6906e1ea..63f35df350ae 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -286,8 +286,7 @@ void SvXMLImportPropertyMapper::importXMLAttribute(
                 if( !xAttrContainer.is() )
                 {
                     // add an unknown attribute container to the properties
-                    Reference< XNameContainer > xNew( 
SvUnoAttributeContainer_CreateInstance(), UNO_QUERY );
-                    xAttrContainer = xNew;
+                    
xAttrContainer.set(SvUnoAttributeContainer_CreateInstance(), UNO_QUERY);
 
                     // find map entry and create new property state
                     if( -1 == nIndex )
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx 
b/xmloff/source/text/XMLIndexTOCContext.cxx
index 2e3f1e3a475b..6fe4bf0f1345 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -176,8 +176,7 @@ void XMLIndexTOCContext::startFastElement(
         if( xIfc.is() )
         {
             // get Property set
-            Reference<XPropertySet> xPropSet(xIfc, UNO_QUERY);
-            xTOCPropertySet = xPropSet;
+            xTOCPropertySet.set(xIfc, UNO_QUERY);
 
             // insert section
             // a) insert section
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 7855a2c5be59..e19589851cf6 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -868,8 +868,7 @@ bool XMLVariableDeclImportContext::FindFieldMaster(
             Reference<XInterface> xIfc =
                 xFactory->createInstance( sService );
             if (xIfc.is()) {
-                Reference<XPropertySet> xTmp( xIfc, UNO_QUERY );
-                xMaster = xTmp;
+                xMaster.set(xIfc, UNO_QUERY);
 
                 // set name
                 xMaster->setPropertyValue("Name", Any(sName));

Reply via email to