accessibility/source/extended/accessibletabbar.cxx                 |    6 --
 accessibility/source/helper/acc_factory.cxx                        |    2 
 basic/source/runtime/runtime.cxx                                   |    2 
 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx |    2 
 chart2/source/tools/WrappedPropertySet.cxx                         |    2 
 connectivity/source/drivers/file/FConnection.cxx                   |    2 
 cppuhelper/source/component_context.cxx                            |    2 
 cppuhelper/source/servicemanager.cxx                               |    4 -
 desktop/source/deployment/misc/dp_update.cxx                       |    2 
 extensions/source/update/check/updatehdl.cxx                       |    2 
 filter/source/msfilter/svdfppt.cxx                                 |    2 
 forms/source/component/Grid.cxx                                    |    2 
 forms/source/helper/controlfeatureinterception.cxx                 |    2 
 framework/source/fwe/helper/propertysetcontainer.cxx               |    2 
 framework/source/layoutmanager/toolbarlayoutmanager.cxx            |    2 
 libreofficekit/source/gtk/lokdocview.cxx                           |   29 
++++++----
 linguistic/source/spelldsp.cxx                                     |    4 -
 oox/source/ole/axcontrol.cxx                                       |    2 
 reportdesign/source/core/sdr/RptObject.cxx                         |    5 -
 sc/source/core/tool/formulaparserpool.cxx                          |    2 
 sc/source/filter/xml/xmlexprt.cxx                                  |    2 
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx       |    2 
 sd/source/console/PresenterPaneContainer.cxx                       |    2 
 sd/source/core/CustomAnimationEffect.cxx                           |    2 
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx          |    2 
 sd/source/ui/unoidl/unosrch.cxx                                    |    2 
 sdext/source/minimizer/graphiccollector.cxx                        |    2 
 sfx2/source/appl/sfxhelp.cxx                                       |    4 -
 sfx2/source/doc/SfxDocumentMetaData.cxx                            |    2 
 sfx2/source/view/lokcharthelper.cxx                                |    2 
 slideshow/source/engine/animationnodes/animationcommandnode.cxx    |    2 
 stoc/source/servicemanager/servicemanager.cxx                      |    2 
 svx/source/fmcomp/fmgridif.cxx                                     |    2 
 svx/source/form/fmshimp.cxx                                        |    4 -
 svx/source/table/svdotable.cxx                                     |    2 
 sw/source/uibase/uiview/viewling.cxx                               |    2 
 vcl/unx/gtk3/gtkframe.cxx                                          |    8 +-
 xmloff/source/core/xmlexp.cxx                                      |    4 -
 xmloff/source/core/xmlimp.cxx                                      |    2 
 xmloff/source/draw/shapeexport.cxx                                 |    2 
 xmloff/source/forms/layerexport.cxx                                |    2 
 xmloff/source/transform/PersAttrListTContext.cxx                   |    2 
 xmlscript/source/xml_helper/xml_impctx.cxx                         |    2 
 43 files changed, 70 insertions(+), 66 deletions(-)

New commits:
commit 2bafc7384ba546f810abbfe17ff25ff78c7ff88c
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Oct 22 08:28:57 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Oct 22 11:56:02 2024 +0200

    cid#1545605 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1545841 COPY_INSTEAD_OF_MOVE
    cid#1554682 COPY_INSTEAD_OF_MOVE
    cid#1554686 COPY_INSTEAD_OF_MOVE
    cid#1554715 COPY_INSTEAD_OF_MOVE
    cid#1554750 COPY_INSTEAD_OF_MOVE
    cid#1554759 COPY_INSTEAD_OF_MOVE
    cid#1554770 COPY_INSTEAD_OF_MOVE
    cid#1554779 COPY_INSTEAD_OF_MOVE
    cid#1554794 COPY_INSTEAD_OF_MOVE
    cid#1554800 COPY_INSTEAD_OF_MOVE
    cid#1554826 COPY_INSTEAD_OF_MOVE
    cid#1554836 COPY_INSTEAD_OF_MOVE
    cid#1554862 COPY_INSTEAD_OF_MOVE
    cid#1554865 COPY_INSTEAD_OF_MOVE
    cid#1554872 COPY_INSTEAD_OF_MOVE
    cid#1554883 COPY_INSTEAD_OF_MOVE
    cid#1554906 COPY_INSTEAD_OF_MOVE
    cid#1554921 COPY_INSTEAD_OF_MOVE
    cid#1554926 COPY_INSTEAD_OF_MOVE
    cid#1554946 COPY_INSTEAD_OF_MOVE
    cid#1554956 COPY_INSTEAD_OF_MOVE
    cid#1554970 COPY_INSTEAD_OF_MOVE
    cid#1554986 COPY_INSTEAD_OF_MOVE
    cid#1554991 COPY_INSTEAD_OF_MOVE
    cid#1555013 COPY_INSTEAD_OF_MOVE
    cid#1555037 COPY_INSTEAD_OF_MOVE
    cid#1555050 COPY_INSTEAD_OF_MOVE
    cid#1555057 COPY_INSTEAD_OF_MOVE
    cid#1555066 COPY_INSTEAD_OF_MOVE
    cid#1555067 COPY_INSTEAD_OF_MOVE
    cid#1555083 COPY_INSTEAD_OF_MOVE
    cid#1555097 COPY_INSTEAD_OF_MOVE
    cid#1555135 COPY_INSTEAD_OF_MOVE
    cid#1555140 COPY_INSTEAD_OF_MOVE
    cid#1555146 COPY_INSTEAD_OF_MOVE
    cid#1555148 COPY_INSTEAD_OF_MOVE
    cid#1555149 COPY_INSTEAD_OF_MOVE
    cid#1555155 COPY_INSTEAD_OF_MOVE
    cid#1555157 COPY_INSTEAD_OF_MOVE
    cid#1555168 COPY_INSTEAD_OF_MOVE
    cid#1555195 COPY_INSTEAD_OF_MOVE
    cid#1555196 COPY_INSTEAD_OF_MOVE
    cid#1555237 COPY_INSTEAD_OF_MOVE
    
    Change-Id: I90531c19c28dca77fe99c72efdfc0972c311da98
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175377
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/accessibility/source/extended/accessibletabbar.cxx 
b/accessibility/source/extended/accessibletabbar.cxx
index 9942ab4f21fa..55318298d1ae 100644
--- a/accessibility/source/extended/accessibletabbar.cxx
+++ b/accessibility/source/extended/accessibletabbar.cxx
@@ -349,10 +349,7 @@ namespace accessibility
         return Application::GetSettings().GetLanguageTag().getLocale();
     }
 
-
     // XAccessibleComponent
-
-
     Reference< XAccessible > AccessibleTabBar::getAccessibleAtPoint( const 
awt::Point& rPoint )
     {
         OExternalLockGuard aGuard( this );
@@ -370,7 +367,7 @@ namespace accessibility
                     Point aPos = VCLUnoHelper::ConvertToVCLPoint(rPoint);
                     if ( aRect.Contains( aPos ) )
                     {
-                        xChild = xAcc;
+                        xChild = std::move(xAcc);
                         break;
                     }
                 }
@@ -380,7 +377,6 @@ namespace accessibility
         return xChild;
     }
 
-
     void AccessibleTabBar::grabFocus(  )
     {
         OExternalLockGuard aGuard( this );
diff --git a/accessibility/source/helper/acc_factory.cxx 
b/accessibility/source/helper/acc_factory.cxx
index f6d861f4c5ee..d7df60d69ae0 100644
--- a/accessibility/source/helper/acc_factory.cxx
+++ b/accessibility/source/helper/acc_factory.cxx
@@ -319,7 +319,7 @@ Reference< XAccessibleContext > 
AccessibleFactory::createAccessibleContext( VCLX
                 if ( pWindow->GetType() == WindowType::MENUBARWINDOW ||
                     ( xCont.is() && xCont->getAccessibleRole() == 
AccessibleRole::POPUP_MENU ) )
                 {
-                    xContext = xCont;
+                    xContext = std::move(xCont);
                 }
             }
         }
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 55d59da942ec..b62378fb2474 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1205,7 +1205,7 @@ void SbiRuntime::PushForEach()
         else if (aAny >>= xIndexAccess)
         {
             p->eForType = ForType::EachXIndexAccess;
-            p->xIndexAccess = xIndexAccess;
+            p->xIndexAccess = std::move(xIndexAccess);
             p->nCurCollectionIndex = 0;
         }
         else if ( isVBAEnabled() && pUnoObj->isNativeCOMObject() )
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index cc00f5f300ba..1337ee3337e5 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -545,7 +545,7 @@ bool DataPointItemConverter::ApplySpecialItem(
                     GetPropertySet()->getPropertyValue( u"Symbol"_ustr ) >>= 
aSymbol;
                     if( aSymbol.Graphic != xGraphic )
                     {
-                        aSymbol.Graphic = xGraphic;
+                        aSymbol.Graphic = std::move(xGraphic);
                         GetPropertySet()->setPropertyValue( u"Symbol"_ustr , 
uno::Any( aSymbol ));
                         bChanged = true;
                     }
diff --git a/chart2/source/tools/WrappedPropertySet.cxx 
b/chart2/source/tools/WrappedPropertySet.cxx
index 9eee3f8632e8..073fd67aeae8 100644
--- a/chart2/source/tools/WrappedPropertySet.cxx
+++ b/chart2/source/tools/WrappedPropertySet.cxx
@@ -66,7 +66,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL 
WrappedPropertySet::getPropertySet
         {
             xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( 
getInfoHelper() );
             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
-            m_xInfo = xInfo;
+            m_xInfo = std::move(xInfo);
         }
     }
     else
diff --git a/connectivity/source/drivers/file/FConnection.cxx 
b/connectivity/source/drivers/file/FConnection.cxx
index cc55b54ba8e7..fe43ed6477ed 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -179,7 +179,7 @@ void OConnection::construct(const OUString& url,const 
Sequence< PropertyValue >&
             {
                 Reference<XContent> 
xParent(Reference<XChild>(aFile.get(),UNO_QUERY_THROW)->getParent(),UNO_QUERY_THROW);
                 Reference<XContentIdentifier> xIdent = 
xParent->getIdentifier();
-                m_xContent = xParent;
+                m_xContent = std::move(xParent);
 
                 ::ucbhelper::Content aParent(xIdent->getContentIdentifier(), 
Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext());
                 m_xDir = aParent.createDynamicCursor(aProps, 
::ucbhelper::INCLUDE_DOCUMENTS_ONLY );
diff --git a/cppuhelper/source/component_context.cxx 
b/cppuhelper/source/component_context.cxx
index 48d8f2ea579d..0ec1fd291de2 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -547,7 +547,7 @@ extern "C" { static void s_createComponentContext_v(va_list 
* pParam)
     }
     else
     {
-        xContext = xDelegate;
+        xContext = std::move(xDelegate);
     }
 
     *ppContext = pTarget2curr->mapInterface(xContext.get(), 
cppu::UnoType<decltype(xContext)>::get());
diff --git a/cppuhelper/source/servicemanager.cxx 
b/cppuhelper/source/servicemanager.cxx
index 295ca5a034e9..58abbc4ab9d4 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -1961,8 +1961,8 @@ void cppuhelper::ServiceManager::preloadImplementations() 
{
             if (!rEntry.second->constructorName.isEmpty() && fpFactory)
                 rEntry.second->constructorFn = 
WrapperConstructorFn(reinterpret_cast<ImplementationConstructorFn 
*>(fpFactory));
 
-            rEntry.second->factory1 = xSCFactory;
-            rEntry.second->factory2 = xSSFactory;
+            rEntry.second->factory1 = std::move(xSCFactory);
+            rEntry.second->factory2 = std::move(xSSFactory);
             rEntry.second->status = Data::Implementation::STATUS_LOADED;
 
         }
diff --git a/desktop/source/deployment/misc/dp_update.cxx 
b/desktop/source/deployment/misc/dp_update.cxx
index e78f40c2aff4..5c55ecef74a3 100644
--- a/desktop/source/deployment/misc/dp_update.cxx
+++ b/desktop/source/deployment/misc/dp_update.cxx
@@ -169,7 +169,7 @@ void getDefaultUpdateInfos(
                 dp_misc::GREATER)
             {
                 j->second.version = v;
-                j->second.info = node;
+                j->second.info = std::move(node);
             }
         }
     }
diff --git a/extensions/source/update/check/updatehdl.cxx 
b/extensions/source/update/check/updatehdl.cxx
index 1579e69c4e70..711a86e3cd6c 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -804,7 +804,7 @@ bool UpdateHandler::showWarning( const OUString 
&rWarningText ) const
     aDescriptor.Type              = awt::WindowClass_MODALTOP;
     aDescriptor.WindowServiceName = "warningbox";
     aDescriptor.ParentIndex       = -1;
-    aDescriptor.Parent            = xPeer;
+    aDescriptor.Parent            = std::move(xPeer);
     aDescriptor.Bounds            = awt::Rectangle( 10, 10, 250, 150 );
     aDescriptor.WindowAttributes  = nWindowAttributes;
 
diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index d1705e9eb1cf..141f4fed9a20 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1726,7 +1726,7 @@ bool PPTConvertOCXControls::InsertControl(
                     {
                         xControlShape->setControl( xControlModel );
                         if (pShape)
-                            *pShape = xShape;
+                            *pShape = std::move(xShape);
                         bRetValue = true;
                     }
                 }
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index 724c5a4a240b..6040549af736 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -284,7 +284,7 @@ sal_Bool SAL_CALL OGridControlModel::select(const Any& 
rElement)
     }
     if ( xSel != m_xSelection )
     {
-        m_xSelection = xSel;
+        m_xSelection = std::move(xSel);
         aGuard.clear();
         m_aSelectListeners.notifyEach( 
&XSelectionChangeListener::selectionChanged, EventObject( *this ) );
         return true;
diff --git a/forms/source/helper/controlfeatureinterception.cxx 
b/forms/source/helper/controlfeatureinterception.cxx
index c83b61308395..924a1a0041fc 100644
--- a/forms/source/helper/controlfeatureinterception.cxx
+++ b/forms/source/helper/controlfeatureinterception.cxx
@@ -99,7 +99,7 @@ namespace frm
                 break;
             }
 
-            xChainWalk = xSlave;
+            xChainWalk = std::move(xSlave);
         }
     }
 
diff --git a/framework/source/fwe/helper/propertysetcontainer.cxx 
b/framework/source/fwe/helper/propertysetcontainer.cxx
index c766b40db56b..e2768f1cec64 100644
--- a/framework/source/fwe/helper/propertysetcontainer.cxx
+++ b/framework/source/fwe/helper/propertysetcontainer.cxx
@@ -126,7 +126,7 @@ void SAL_CALL PropertySetContainer::replaceByIndex( 
sal_Int32 Index, const css::
             static_cast<OWeakObject *>(this), 2 );
     }
 
-    m_aPropertySetVector[ Index ] = aPropertySetElement;
+    m_aPropertySetVector[ Index ] = std::move(aPropertySetElement);
 }
 
 // XIndexAccess
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx 
b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 6e75d3c2691a..a4f6a70e651f 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -516,7 +516,7 @@ bool ToolbarLayoutManager::createToolbar( const OUString& 
rResourceURL )
                     // Reuse a local entry so we are able to use the latest
                     // UI changes for this document.
                     implts_setElementData(rElement, xDockWindow);
-                    rElement.m_xUIElement = xUIElement;
+                    rElement.m_xUIElement = std::move(xUIElement);
                     bVisible = rElement.m_bVisible;
                     bFloating = rElement.m_bFloating;
                 }
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index a66697f61789..32bdb21803d1 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -236,13 +236,13 @@ static Reference< XDictionaryEntry > 
lcl_GetRulingDictionaryEntry(
         Reference< XDictionaryEntry > xNegEntry( SearchDicList( xDList,
                 rWord, nLanguage, false, true ) );
         if (xNegEntry.is())
-            xRes = xNegEntry;
+            xRes = std::move(xNegEntry);
         else
         {
             Reference< XDictionaryEntry > xPosEntry( SearchDicList( xDList,
                     rWord, nLanguage, true, true ) );
             if (xPosEntry.is())
-                xRes = xPosEntry;
+                xRes = std::move(xPosEntry);
         }
     }
 
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 189f62ab249a..990b94e350a1 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -2740,7 +2740,7 @@ Reference< XControlModel > 
EmbeddedForm::convertAndInsert( const EmbeddedControl
 
         // convert the control properties
         if( rControl.convertProperties( xCtrlModel, maControlConv ) )
-            xRet = xCtrlModel;
+            xRet = std::move(xCtrlModel);
         // insert the control into the form
         Reference< XIndexContainer > xFormIC( createXForm(), UNO_SET_THROW );
         rnCtrlIndex = xFormIC->getCount();
diff --git a/reportdesign/source/core/sdr/RptObject.cxx 
b/reportdesign/source/core/sdr/RptObject.cxx
index d899534957d0..e6d0496a9548 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -1201,18 +1201,17 @@ uno::Reference< style::XStyle> getUsedStyle(const 
uno::Reference< report::XRepor
     uno::Reference<container::XNameAccess> xStyles = 
_xReport->getStyleFamilies();
     uno::Reference<container::XNameAccess> 
xPageStyles(xStyles->getByName(u"PageStyles"_ustr),uno::UNO_QUERY);
 
-    uno::Reference< style::XStyle> xReturn;
     const uno::Sequence< OUString> aSeq = xPageStyles->getElementNames();
     for(const OUString& rName : aSeq)
     {
         uno::Reference< style::XStyle> 
xStyle(xPageStyles->getByName(rName),uno::UNO_QUERY);
         if ( xStyle->isInUse() )
         {
-            xReturn = xStyle;
+            return xStyle;
             break;
         }
     }
-    return xReturn;
+    return nullptr;
 }
 
 
diff --git a/sc/source/core/tool/formulaparserpool.cxx 
b/sc/source/core/tool/formulaparserpool.cxx
index 4b04a0343136..559530aa24e4 100644
--- a/sc/source/core/tool/formulaparserpool.cxx
+++ b/sc/source/core/tool/formulaparserpool.cxx
@@ -72,7 +72,7 @@ ScParserFactoryMap::ScParserFactoryMap() :
             // store factory in the map
             OUString aNamespace = xParser->getSupportedNamespace();
             if( !aNamespace.isEmpty() )
-                maFactories[ aNamespace ] = xCompFactory;
+                maFactories[ aNamespace ] = std::move(xCompFactory);
         }
         catch( Exception& )
         {
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index b37565d34dbf..6d9ea0460f37 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2498,7 +2498,7 @@ void ScXMLExport::collectAutoStyles()
                 OUString sName( rTextEntry.maName );
                 GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::TEXT_TEXT, 
OUString(), std::move(aPropStates));
                 GetAutoStylePool()->RegisterName(XmlStyleFamily::TEXT_TEXT, 
sName);
-                xPrevCursorProp = xCursorProp;
+                xPrevCursorProp = std::move(xCursorProp);
                 aPrevPos = aPos;
             }
         }
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx 
b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index bed4ddb69669..fa51d4818983 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1035,7 +1035,7 @@ void ScShapeChildren::FillShapes(const tools::Rectangle& 
aPixelPaintRect, const
             if(!aClippedPixelPaintRect.GetIntersection(aRect).IsEmpty())
             {
                 ScShapeChild aShape;
-                aShape.mxShape = xShape;
+                aShape.mxShape = std::move(xShape);
                 aShape.mnRangeId = nRangeId;
                 if (pObj->GetLayer().anyOf(SC_LAYER_INTERN, SC_LAYER_FRONT))
                 {
diff --git a/sd/source/console/PresenterPaneContainer.cxx 
b/sd/source/console/PresenterPaneContainer.cxx
index c844fb010430..ba8f8e53c6ca 100644
--- a/sd/source/console/PresenterPaneContainer.cxx
+++ b/sd/source/console/PresenterPaneContainer.cxx
@@ -112,7 +112,7 @@ PresenterPaneContainer::SharedPaneDescriptor
         {
             Reference<awt::XWindow> xWindow (rxPane->getWindow());
             pDescriptor->mxContentWindow = xWindow;
-            pDescriptor->mxPaneId = xPaneId;
+            pDescriptor->mxPaneId = std::move(xPaneId);
             pDescriptor->mxPane = rxPane;
             pDescriptor->mxPane->SetTitle(pDescriptor->msTitle);
 
diff --git a/sd/source/core/CustomAnimationEffect.cxx 
b/sd/source/core/CustomAnimationEffect.cxx
index 80082a3a5dfe..4122b08548f9 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -2542,7 +2542,7 @@ void 
EffectSequenceHelper::createTextGroupParagraphEffects( const CustomAnimatio
         }
 
         ParagraphTarget aTarget;
-        aTarget.Shape = xTarget;
+        aTarget.Shape = std::move(xTarget);
 
         for( const auto i : aParaList )
         {
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx 
b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index ee332d9c252b..3fba334ce872 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -280,7 +280,7 @@ uno::Reference<XAccessible > SAL_CALL
                     && (aPoint.X < aBBox.X+aBBox.Width)
                     && (aPoint.Y < aBBox.Y+aBBox.Height) )
                 {
-                    xChildAtPosition = xChild;
+                    xChildAtPosition = std::move(xChild);
                     break;
                 }
             }
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index 6f93ed4c61c9..545dcb8a4283 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -621,7 +621,7 @@ uno::Reference< drawing::XShape >  
SdUnoSearchReplaceShape::GetShape( const uno:
                     if(!xParent.is() || xText.get() == xParent.get())
                         return xShape;
 
-                    xText = xParent;
+                    xText = std::move(xParent);
                 }
             } while( !xShape.is() );
         }
diff --git a/sdext/source/minimizer/graphiccollector.cxx 
b/sdext/source/minimizer/graphiccollector.cxx
index ec7171a89ecf..61cf80142824 100644
--- a/sdext/source/minimizer/graphiccollector.cxx
+++ b/sdext/source/minimizer/graphiccollector.cxx
@@ -171,7 +171,7 @@ static void ImpAddFillBitmapEntity( const Reference< 
XComponentContext >& rxMSF,
                     }
                     GraphicCollector::GraphicUser aUser;
                     aUser.mxPropertySet = rxPropertySet;
-                    aUser.mxGraphic = xGraphic;
+                    aUser.mxGraphic = std::move(xGraphic);
                     aUser.mbFillBitmap = true;
                     aUser.maLogicalSize = aLogicalSize;
                     aUser.mxPagePropertySet = rxPagePropertySet;
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 851d3b9f5307..47411f419f12 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -575,8 +575,8 @@ static SfxHelpWindow_Impl* impl_createHelp(Reference< 
XFrame2 >& rHelpTask   ,
 
     xHelpContent->setName(u"OFFICE_HELP"_ustr);
 
-    rHelpTask    = xHelpTask;
-    rHelpContent = xHelpContent;
+    rHelpTask    = std::move(xHelpTask);
+    rHelpContent = std::move(xHelpContent);
     return pHelpWindow;
 }
 
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx 
b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 73b270e78f54..5f19e4988d8f 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -1928,7 +1928,7 @@ SfxDocumentMetaData::loadFromStorage(
     css::uno::Reference<css::lang::XMultiComponentFactory> xMsf (
         m_xContext->getServiceManager());
     css::xml::sax::InputSource input;
-    input.aInputStream = xInStream;
+    input.aInputStream = std::move(xInStream);
 
     sal_uInt64 version = SotStorage::GetVersion( xStorage );
     // Oasis is also the default (0)
diff --git a/sfx2/source/view/lokcharthelper.cxx 
b/sfx2/source/view/lokcharthelper.cxx
index f8b31f7c4f10..f6dd091ebd87 100644
--- a/sfx2/source/view/lokcharthelper.cxx
+++ b/sfx2/source/view/lokcharthelper.cxx
@@ -62,7 +62,7 @@ css::uno::Reference<css::frame::XDispatch>& 
LokChartHelper::GetXDispatcher()
             ::css::uno::Reference< ::css::frame::XDispatch > xDispatcher( 
xChartController, uno::UNO_QUERY );
             if( xDispatcher.is() )
             {
-                mxDispatcher = xDispatcher;
+                mxDispatcher = std::move(xDispatcher);
             }
         }
     }
diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.cxx 
b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
index 121989fa246e..e73f68490f9d 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
@@ -95,7 +95,7 @@ AnimationCommandNode::AnimationCommandNode( 
uno::Reference<animations::XAnimatio
                                               uno::UNO_QUERY );
     ShapeSharedPtr pShape( 
getContext().mpSubsettableShapeManager->lookupShape( xShape ) );
     mpShape = ::std::dynamic_pointer_cast< IExternalMediaShapeBase >( pShape );
-    mxShape = xShape;
+    mxShape = std::move(xShape);
 }
 
 void AnimationCommandNode::dispose()
diff --git a/stoc/source/servicemanager/servicemanager.cxx 
b/stoc/source/servicemanager/servicemanager.cxx
index 2aa0ed4ca6d7..be529abef58e 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -671,7 +671,7 @@ void OServiceManager::setPropertyValue(
     }
 
     MutexGuard aGuard( m_aMutex );
-    m_xContext = xContext;
+    m_xContext = std::move(xContext);
 }
 
 Any OServiceManager::getPropertyValue(const OUString& PropertyName)
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 5c9b79f50a75..b3fe21c0cc0f 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -2529,7 +2529,7 @@ void 
FmXGridPeer::releaseDispatchProviderInterceptor(const Reference< css::frame
             }
         }
 
-        xChainWalk = xSlave;
+        xChainWalk = std::move(xSlave);
     }
     // our interceptor chain has changed and we're alive ?
     if (!isDesignMode())
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 1b91ac1585bd..dca4a634ceee 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -2072,7 +2072,7 @@ void FmXFormShell::startListening_Lock()
                                     break;
                             }
                         }
-                        m_xNavigationController = xParent;
+                        m_xNavigationController = std::move(xParent);
                     }
                     break;
 
@@ -2522,7 +2522,7 @@ void FmXFormShell::UpdateForms_Lock(bool _bInvalidate)
     if ( m_xForms != xForms )
     {
         RemoveElement_Lock( m_xForms );
-        m_xForms = xForms;
+        m_xForms = std::move(xForms);
         AddElement_Lock(m_xForms);
     }
 
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 610cfcc748de..b300c4284c38 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -402,7 +402,7 @@ SdrTableObjImpl& SdrTableObjImpl::operator=( const 
SdrTableObjImpl& rSource )
     }
 
     // set that TableStyle
-    mxTableStyle = xNewTableStyle;
+    mxTableStyle = std::move(xNewTableStyle);
 
     // Apply Style to Cells
     ApplyCellStyles();
diff --git a/sw/source/uibase/uiview/viewling.cxx 
b/sw/source/uibase/uiview/viewling.cxx
index da7bd54a863c..1089d1cc4f10 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -764,7 +764,7 @@ bool SwView::ExecSpellPopup(const Point& rPt)
                                 {
                                     // Execute dispatch asynchronously
                                     ExecuteInfo* pExecuteInfo   = new 
ExecuteInfo;
-                                    pExecuteInfo->xDispatch     = xDispatch;
+                                    pExecuteInfo->xDispatch     = 
std::move(xDispatch);
                                     pExecuteInfo->aTargetURL    = 
std::move(aURL);
                                     Application::PostUserEvent( LINK(nullptr, 
AsyncExecute , ExecuteHdl_Impl), pExecuteInfo );
                                 }
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 600276791e69..87a05a95e0cd 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -5226,20 +5226,18 @@ gboolean 
GtkInstDropTarget::signalDragDrop(GtkDropTargetAsync* context, GdkDrop*
     if (!(mask & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)))
         aEvent.DropAction |= 
css::datatransfer::dnd::DNDConstants::ACTION_DEFAULT;
 
-    css::uno::Reference<css::datatransfer::XTransferable> xTransferable;
     // For LibreOffice internal D&D we provide the Transferable without Gtk
     // intermediaries as a shortcut, see tdf#100097 for how dbaccess depends 
on this
     if (GtkInstDragSource::g_ActiveDragSource)
-        xTransferable = 
GtkInstDragSource::g_ActiveDragSource->GetTransferable();
+        aEvent.Transferable = 
GtkInstDragSource::g_ActiveDragSource->GetTransferable();
     else
     {
 #if GTK_CHECK_VERSION(4,0,0)
-        xTransferable = new GtkDnDTransferable(drop);
+        aEvent.Transferable = new GtkDnDTransferable(drop);
 #else
-        xTransferable = new GtkDnDTransferable(context, time, pWidget, this);
+        aEvent.Transferable = new GtkDnDTransferable(context, time, pWidget, 
this);
 #endif
     }
-    aEvent.Transferable = xTransferable;
 
     fire_drop(aEvent);
 
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 4a3f9d44eb36..68974f2a09f5 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -692,7 +692,7 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< 
uno::Any >& aArgumen
         uno::Reference<beans::XPropertySet> xTmpPropertySet(
             xValue, UNO_QUERY );
         if( xTmpPropertySet.is() )
-            mxExportInfo = xTmpPropertySet;
+            mxExportInfo = std::move(xTmpPropertySet);
     }
 
     if( !mxExportInfo.is() )
@@ -1288,7 +1288,7 @@ ErrCode SvXMLExport::exportDoc( enum 
::xmloff::token::XMLTokenEnum eClass )
             SAL_WARN_IF(!xTmpDocHandler.is(), "xmloff.core", "can't 
instantiate OASIS transformer component" );
             if( xTmpDocHandler.is() )
             {
-                mxHandler = xTmpDocHandler;
+                mxHandler = std::move(xTmpDocHandler);
                 mxExtHandler.set( mxHandler, UNO_QUERY );
             }
         }
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index bcac90108c28..ab27e7110620 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -990,7 +990,7 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< 
uno::Any >& aArgumen
         uno::Reference<beans::XPropertySet> xTmpPropSet( xValue, UNO_QUERY );
         if( xTmpPropSet.is() )
         {
-            mxImportInfo = xTmpPropSet;
+            mxImportInfo = std::move(xTmpPropSet);
             uno::Reference< beans::XPropertySetInfo > xPropertySetInfo = 
mxImportInfo->getPropertySetInfo();
             if (xPropertySetInfo.is())
             {
diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index a72f327e0846..1551c418be2d 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -285,7 +285,7 @@ void XMLShapeExport::collectShapeAutoStyles(const 
uno::Reference< drawing::XShap
 
     uno::Reference< drawing::XShape > xCustomShapeReplacement = 
checkForCustomShapeReplacement( xShape );
     if ( xCustomShapeReplacement.is() )
-        aShapeInfo.xCustomShapeReplacement = xCustomShapeReplacement;
+        aShapeInfo.xCustomShapeReplacement = 
std::move(xCustomShapeReplacement);
 
     // first compute the shapes type
     ImpCalcShapeType(xShape, aShapeInfo.meShapeType);
diff --git a/xmloff/source/forms/layerexport.cxx 
b/xmloff/source/forms/layerexport.cxx
index 13785cd60156..0cc88c1f48cd 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -425,7 +425,7 @@ namespace xmloff
                     aContainerHistory.push(xLoop);
                     aIndexHistory.push(nChildPos);
 
-                    xLoop = xNextContainer;
+                    xLoop = std::move(xNextContainer);
                     nChildPos = -1; // will be incremented below
                 }
                 ++nChildPos;
diff --git a/xmloff/source/transform/PersAttrListTContext.cxx 
b/xmloff/source/transform/PersAttrListTContext.cxx
index ed5c7ee1f46f..9631c5ab585d 100644
--- a/xmloff/source/transform/PersAttrListTContext.cxx
+++ b/xmloff/source/transform/PersAttrListTContext.cxx
@@ -135,7 +135,7 @@ void XMLPersAttrListTContext::StartElement(
     }
     else if( pMutableAttrList )
     {
-        m_xAttrList = xAttrList;
+        m_xAttrList = std::move(xAttrList);
     }
     else
     {
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx 
b/xmlscript/source/xml_helper/xml_impctx.cxx
index 238a029a3fbc..90fbfab61c84 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -379,7 +379,7 @@ void DocumentHandlerImpl::initialize(
     {
         throw RuntimeException( u"missing root instance!"_ustr );
     }
-    m_xRoot = xRoot;
+    m_xRoot = std::move(xRoot);
 }
 
 // XNamespaceMapping
commit 28c187c8f91e09dbcc3b1037d5076a3b1f661391
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Oct 18 21:37:15 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Oct 22 11:55:53 2024 +0200

    cid#1606773 Check of thread-shared field evades lock acquisition
    
    Change-Id: Ia1d9d91f1ca76e5fcf311c51fc560a41e72338d0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175376
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index 5dddaa2d0e37..6d34f263733d 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -2456,6 +2456,25 @@ postCommandInThread (gpointer data)
     priv->m_pDocument->pClass->postUnoCommand(priv->m_pDocument, 
pLOEvent->m_pCommand, pLOEvent->m_pArguments, pLOEvent->m_bNotifyWhenFinished);
 }
 
+static void
+paintTile(LOKDocViewPrivate& priv,
+    unsigned char* pBuffer,
+    const GdkRectangle& rTileRectangle,
+    gint nTileSizePixelsScaled,
+    LOEvent* pLOEvent,
+    gint nScaleFactor)
+{
+    std::unique_lock<std::mutex> aGuard(g_aLOKMutex);
+    setDocumentView(priv->m_pDocument, priv->m_nViewId);
+
+    priv->m_pDocument->pClass->paintTile(priv->m_pDocument,
+                                         pBuffer,
+                                         nTileSizePixelsScaled, 
nTileSizePixelsScaled,
+                                         rTileRectangle.x, rTileRectangle.y,
+                                         pixelToTwip(nTileSizePixelsScaled, 
pLOEvent->m_fPaintTileZoom * nScaleFactor),
+                                         pixelToTwip(nTileSizePixelsScaled, 
pLOEvent->m_fPaintTileZoom * nScaleFactor));
+}
+
 static void
 paintTileInThread (gpointer data)
 {
@@ -2496,8 +2515,6 @@ paintTileInThread (gpointer data)
     aTileRectangle.x = pixelToTwip(nTileSizePixelsScaled, 
pLOEvent->m_fPaintTileZoom * nScaleFactor) * pLOEvent->m_nPaintTileY;
     aTileRectangle.y = pixelToTwip(nTileSizePixelsScaled, 
pLOEvent->m_fPaintTileZoom * nScaleFactor) * pLOEvent->m_nPaintTileX;
 
-    std::unique_lock<std::mutex> aGuard(g_aLOKMutex);
-    setDocumentView(priv->m_pDocument, priv->m_nViewId);
     std::stringstream ss;
     GTimer* aTimer = g_timer_new();
     gulong nElapsedMs;
@@ -2507,13 +2524,7 @@ paintTileInThread (gpointer data)
         << pixelToTwip(nTileSizePixelsScaled, pLOEvent->m_fPaintTileZoom * 
nScaleFactor) << ", "
         << pixelToTwip(nTileSizePixelsScaled, pLOEvent->m_fPaintTileZoom * 
nScaleFactor) << ")";
 
-    priv->m_pDocument->pClass->paintTile(priv->m_pDocument,
-                                         pBuffer,
-                                         nTileSizePixelsScaled, 
nTileSizePixelsScaled,
-                                         aTileRectangle.x, aTileRectangle.y,
-                                         pixelToTwip(nTileSizePixelsScaled, 
pLOEvent->m_fPaintTileZoom * nScaleFactor),
-                                         pixelToTwip(nTileSizePixelsScaled, 
pLOEvent->m_fPaintTileZoom * nScaleFactor));
-    aGuard.unlock();
+    paintTile(priv, pBuffer, aTileRectangle, nTileSizePixelsScaled, pLOEvent, 
nScaleFactor);
 
     g_timer_elapsed(aTimer, &nElapsedMs);
     ss << " rendered in " << (nElapsedMs / 1000.) << " milliseconds";

Reply via email to