diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index aa1863387418..2fcbfb7372cb 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -4062,7 +4062,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) Any aUnoAny = pUnoObj->getUnoAny(); if( aUnoAny.getValueTypeClass() == TypeClass_INTERFACE ) - x = aUnoAny; + x = std::move(aUnoAny); pElem = pDflt; } } diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx index bd0b557d4e78..e042144747ba 100644 --- a/chart2/source/view/main/PropertyMapper.cxx +++ b/chart2/source/view/main/PropertyMapper.cxx @@ -113,7 +113,7 @@ void PropertyMapper::setMappedProperties( { //do not set empty anys because of performance (otherwise SdrAttrObj::ItemChange will take much longer) pNames[nN] = rTarget; - pValues[nN] = aAny; + pValues[nN] = std::move(aAny); ++nN; } } diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index 58e4105d6bd0..aac936b07270 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -251,7 +251,7 @@ bool OPropertyContainerHelper::convertFastPropertyValue( { // we were able to query the given XInterface-derivee for the interface // which is required for this property - aNewRequestedValue = aProperlyTyped; + aNewRequestedValue = std::move(aProperlyTyped); } } @@ -292,7 +292,7 @@ bool OPropertyContainerHelper::convertFastPropertyValue( if (bModified) { _rOldValue = *pPropContainer; - _rConvertedValue = aNewRequestedValue; + _rConvertedValue = std::move(aNewRequestedValue); } } break; diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx index 73e6af6c2a1a..113a96ea57f1 100644 --- a/connectivity/source/commontools/dbexception.cxx +++ b/connectivity/source/commontools/dbexception.cxx @@ -229,10 +229,10 @@ void SQLExceptionInfo::append( TYPE _eType, const OUString& _rErrorMessage, cons // append if (pLastException) - pLastException->NextException = aAppend; + pLastException->NextException = std::move(aAppend); else { - m_aContent = aAppend; + m_aContent = std::move(aAppend); m_eType = _eType; } } diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx index 7166de42a233..552a8142d491 100644 --- a/dbaccess/source/core/api/statement.cxx +++ b/dbaccess/source/core/api/statement.cxx @@ -230,7 +230,7 @@ sal_Bool OStatementBase::convertFastPropertyValue(Any & rConvertedValue, Any & r Any aCurrentValue = m_xAggregateAsSet->getPropertyValue( sPropName ); if ( aCurrentValue != rValue ) { - rOldValue = aCurrentValue; + rOldValue = std::move(aCurrentValue); rConvertedValue = rValue; bModified = true; } diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx index 57318d84e964..fd29d71b9e97 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx @@ -143,7 +143,7 @@ void OXMLDataSourceSetting::addValue(const OUString& _sValue) { sal_Int32 nPos = m_aInfoSequence.getLength(); m_aInfoSequence.realloc(nPos+1); - m_aInfoSequence.getArray()[nPos] = aValue; + m_aInfoSequence.getArray()[nPos] = std::move(aValue); } } diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index d0a464a4d2c1..740605cac13a 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -1223,7 +1223,7 @@ void ODBExport::GetConfigurationSettings(Sequence& aProps) aProps.realloc(nLength + 1); auto pProps = aProps.getArray(); pProps[nLength].Name = "layout-settings"; - pProps[nLength].Value = aValue; + pProps[nLength].Value = std::move(aValue); } } catch(const Exception&) diff --git a/desktop/source/deployment/manager/dp_commandenvironments.cxx b/desktop/source/deployment/manager/dp_commandenvironments.cxx index 1252cf94e29a..0d87a0ac5f1d 100644 --- a/desktop/source/deployment/manager/dp_commandenvironments.cxx +++ b/desktop/source/deployment/manager/dp_commandenvironments.cxx @@ -224,11 +224,11 @@ void SilentCheckPrerequisitesCommandEnv::handle( else if ((request >>= platformExc) || (request >>= depExc)) { - m_Exception = request; + m_Exception = std::move(request); } else { - m_UnknownException = request; + m_UnknownException = std::move(request); } } diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index aa224fd18981..fb833a29f76d 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -358,7 +358,7 @@ namespace pcr OUString aValueStr; _rValue >>= aValueStr; xStringResourceManager->setString( aPureIdStr, aValueStr ); - aValue = aPropertyValue; // set value to force modified + aValue = std::move(aPropertyValue); // set value to force modified } } // StringItemList? diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 1e5c327539a0..f49d8bba1dd5 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -746,7 +746,7 @@ bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset ) } } - m_aLastKnownValue = aNewValue; + m_aLastKnownValue = std::move(aNewValue); } // add the new value to the list diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx index fa106da8483e..2a8f2e20d56f 100644 --- a/forms/source/component/Currency.cxx +++ b/forms/source/component/Currency.cxx @@ -197,7 +197,7 @@ bool OCurrencyModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) return false; } } - m_aSaveValue = aControlValue; + m_aSaveValue = std::move(aControlValue); } return true; } diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx index a349cd064cd1..6958a2b3b40b 100644 --- a/forms/source/component/Date.cxx +++ b/forms/source/component/Date.cxx @@ -250,7 +250,7 @@ bool ODateModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) return false; } } - m_aSaveValue = aControlValue; + m_aSaveValue = std::move(aControlValue); return true; } diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 520bdffc7799..05ad52cb2561 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -835,7 +835,7 @@ bool OFormattedModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) return false; } } - m_aSaveValue = aControlValue; + m_aSaveValue = std::move(aControlValue); return true; } diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 3ff86a4eb189..35e63a69e935 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -428,10 +428,10 @@ namespace frm case PROPERTY_ID_SELECT_VALUE : { // Any from connectivity::ORowSetValue - Any _rCurrentValue = getCurrentSingleValue(); - if (_rCurrentValue != _rValue) + Any aCurrentValue = getCurrentSingleValue(); + if (aCurrentValue != _rValue) { - _rOldValue = _rCurrentValue; + _rOldValue = std::move(aCurrentValue); _rConvertedValue = _rValue; bModified = true; } @@ -1943,7 +1943,7 @@ namespace frm if (bModified) { - m_aCurrentSelection = aValue; + m_aCurrentSelection = std::move(aValue); m_aChangeIdle.Start(); } } diff --git a/forms/source/component/Numeric.cxx b/forms/source/component/Numeric.cxx index fd1697c296b0..201bcdbd79f1 100644 --- a/forms/source/component/Numeric.cxx +++ b/forms/source/component/Numeric.cxx @@ -146,7 +146,7 @@ bool ONumericModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) return false; } } - m_aSaveValue = aControlValue; + m_aSaveValue = std::move(aControlValue); } return true; } diff --git a/forms/source/component/Pattern.cxx b/forms/source/component/Pattern.cxx index acd0d419e18e..e1c3cbfe4bca 100644 --- a/forms/source/component/Pattern.cxx +++ b/forms/source/component/Pattern.cxx @@ -152,7 +152,7 @@ bool OPatternModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) return false; } - m_aLastKnownValue = aNewValue; + m_aLastKnownValue = std::move(aNewValue); return true; } diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx index b98d0fe24f11..c6c590334fab 100644 --- a/forms/source/component/Time.cxx +++ b/forms/source/component/Time.cxx @@ -258,7 +258,7 @@ bool OTimeModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) return false; } } - m_aSaveValue = aControlValue; + m_aSaveValue = std::move(aControlValue); return true; } diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index 67ef5bfec6e2..259629dafb0b 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -749,7 +749,7 @@ void OInterfaceContainer::approveNewElement( const Reference< XPropertySet >& _r { _pElement->xPropertySet = _rxObject; _pElement->xChild = std::move(xChild); - _pElement->aElementTypeInterface = aCorrectType; + _pElement->aElementTypeInterface = std::move(aCorrectType); _pElement->xInterface = Reference< XInterface >( _rxObject, UNO_QUERY ); // normalized XInterface } } diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index aa9568700a5c..02e72be1696d 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -1864,7 +1864,7 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL XFrameImpl::getProp } void SAL_CALL XFrameImpl::setPropertyValue(const OUString& sProperty, - const css::uno::Any& aValue ) + const css::uno::Any& rValue) { // TODO look for e.g. readonly props and reject setProp() call! @@ -1881,7 +1881,7 @@ void SAL_CALL XFrameImpl::setPropertyValue(const OUString& sProperty, css::uno::Any aCurrentValue = impl_getPropertyValue(aPropInfo.Handle); - bool bWillBeChanged = (aCurrentValue != aValue); + bool bWillBeChanged = (aCurrentValue != rValue); if (! bWillBeChanged) return; @@ -1889,14 +1889,14 @@ void SAL_CALL XFrameImpl::setPropertyValue(const OUString& sProperty, aEvent.PropertyName = aPropInfo.Name; aEvent.Further = false; aEvent.PropertyHandle = aPropInfo.Handle; - aEvent.OldValue = aCurrentValue; - aEvent.NewValue = aValue; + aEvent.OldValue = std::move(aCurrentValue); + aEvent.NewValue = rValue; aEvent.Source = m_xBroadcaster; if (impl_existsVeto(aEvent)) throw css::beans::PropertyVetoException(); - impl_setPropertyValue(aPropInfo.Handle, aValue); + impl_setPropertyValue(aPropInfo.Handle, rValue); impl_notifyChangeListener(aEvent); } diff --git a/framework/source/uiconfiguration/globalsettings.cxx b/framework/source/uiconfiguration/globalsettings.cxx index 41d4861390b8..df9b16352607 100644 --- a/framework/source/uiconfiguration/globalsettings.cxx +++ b/framework/source/uiconfiguration/globalsettings.cxx @@ -175,7 +175,7 @@ bool GlobalSettings_Access::GetToolbarStateInfo( GlobalSettings::StateInfo eStat else if ( eStateInfo == GlobalSettings::STATEINFO_DOCKED ) a = xNameAccess->getByName( m_aPropDocked ); - aValue = a; + aValue = std::move(a); return true; } } diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index ac470c6f4d58..2210b52edbcf 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -740,7 +740,7 @@ Any ConfigurationAccess_WindowState::impl_insertCacheAndReturnSequence( const OU // put value into the return sequence PropertyValue pv; pv.Name = m_aPropArray[i]; - pv.Value = a; + pv.Value = std::move(a); aPropVec.push_back(pv); } } diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 607a60cb281f..24faa9814d4a 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -1617,7 +1617,7 @@ bool LngSvcMgr::SaveCfgSvcs( std::u16string_view rServiceName ) DBG_ASSERT( aCfgAny.hasValue(), "missing value for 'Any' type" ); OUString aCfgLocaleStr( LanguageTag::convertToBcp47( rLocale)); - pValue->Value = aCfgAny; + pValue->Value = std::move(aCfgAny); pValue->Name = aNodeName + "/" + aCfgLocaleStr; pValue++; } diff --git a/oox/source/ppt/animationspersist.cxx b/oox/source/ppt/animationspersist.cxx index 450e3da0065f..fdeba46d557a 100644 --- a/oox/source/ppt/animationspersist.cxx +++ b/oox/source/ppt/animationspersist.cxx @@ -141,7 +141,6 @@ namespace oox::ppt { if( maShapeTarget.mnType == XML_dgm ) sShapeName = maShapeTarget.msSubShapeId; - Any rTarget; ::oox::drawingml::ShapePtr pShape = pSlide->getShape( sShapeName ); SAL_WARN_IF( !pShape, "oox.ppt", "failed to locate Shape" ); @@ -156,9 +155,10 @@ namespace oox::ppt { SAL_WARN_IF( !xShape.is(), "oox.ppt", "fail to get XShape from shape" ); if( xShape.is() ) { - rTarget <<= xShape; - maShapeTarget.convert(rTarget, nSubType); - aTarget = rTarget; + Any aTmpTarget; + aTmpTarget <<= xShape; + maShapeTarget.convert(aTmpTarget, nSubType); + aTarget = std::move(aTmpTarget); } } break; diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx index e2b5203c079b..c143424a875b 100644 --- a/reportdesign/source/filter/xml/xmlControlProperty.cxx +++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx @@ -162,12 +162,12 @@ void OXMLControlProperty::addValue(const OUString& _sValue) aValue = convertString(m_aPropType, _sValue); if ( !m_bIsList ) - m_aSetting.Value = aValue; + m_aSetting.Value = std::move(aValue); else { sal_Int32 nPos = m_aSequence.getLength(); m_aSequence.realloc(nPos+1); - m_aSequence.getArray()[nPos] = aValue; + m_aSequence.getArray()[nPos] = std::move(aValue); } } diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 939a3ef8fbde..eb834838734f 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -371,7 +371,7 @@ uno::Any SAL_CALL GeometryHandler::getPropertyValue(const OUString & PropertyNam break; case USER_DEF_FUNCTION: if ( !sDataField.isEmpty() && PROPERTY_ID_FORMULALIST == nId ) - aPropertyValue = aDataField; + aPropertyValue = std::move(aDataField); break; case COUNTER: if ( PROPERTY_ID_SCOPE == nId && impl_isCounterFunction_throw(sDataField,m_sScope) ) diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 149b43d5efe2..1fa4beb1466c 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -4072,7 +4072,7 @@ void OReportController::impl_fillState_nothrow(const OUString& _sProperty,dbaui: uno::Any aTemp2 = xProp->getPropertyValue(_sProperty); if ( aIter == aSelection.begin() ) { - aTemp = aTemp2; + aTemp = std::move(aTemp2); } else if ( aTemp != aTemp2 ) break; @@ -4083,7 +4083,7 @@ void OReportController::impl_fillState_nothrow(const OUString& _sProperty,dbaui: } } if ( aIter == aSelection.end() ) - _rState.aValue = aTemp; + _rState.aValue = std::move(aTemp); } void OReportController::impl_zoom_nothrow() diff --git a/sc/source/core/data/dpfilteredcache.cxx b/sc/source/core/data/dpfilteredcache.cxx index 08942141377e..55fcafb26698 100644 --- a/sc/source/core/data/dpfilteredcache.cxx +++ b/sc/source/core/data/dpfilteredcache.cxx @@ -307,9 +307,7 @@ void ScDPFilteredCache::filterTable(const vector& rCriteria, Sequence for (SCCOL nCol = 0; nCol < nColSize; ++nCol) { OUString str = getFieldName( nCol); - Any any; - any <<= str; - pRow[nCol] = any; + pRow[nCol] <<= str; } tableData.push_back(headerRow); diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx index ce960a9f7a96..4dde075e4364 100644 --- a/sc/source/core/tool/addincol.cxx +++ b/sc/source/core/tool/addincol.cxx @@ -1497,7 +1497,7 @@ void ScUnoAddInCall::ExecuteCall() uno::Any* pDest = aRealArgs.getArray(); pDest = std::copy_n(std::cbegin(aArgs), nCallPos, pDest); - *pDest = aCallerAny; + *pDest = std::move(aCallerAny); std::copy(std::next(std::cbegin(aArgs), nCallPos), std::cend(aArgs), std::next(pDest)); ExecuteCallWithArgs( aRealArgs ); diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index a32a996ec339..fff197680f86 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -1495,7 +1495,7 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, bool bCursor aProperties.realloc( nCount + 1 ); auto pProperties = aProperties.getArray(); pProperties[ nCount ].Name = pEntry->aName; - pProperties[ nCount ].Value = aVal; + pProperties[ nCount ].Value = std::move(aVal); ++nCount; } } diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx index fbc8680ea374..dd0465eb0198 100644 --- a/scripting/source/dlgprov/dlgevtatt.cxx +++ b/scripting/source/dlgprov/dlgevtatt.cxx @@ -584,7 +584,7 @@ namespace dlgprov Reference< XWindow > xWindow( m_xControl, UNO_QUERY ); pArgs[0] <<= xWindow; } - pArgs[1] = aEventObject; + pArgs[1] = std::move(aEventObject); aRet = xMethod->invoke( aHandlerObject, Args ); bHandled = true; } @@ -598,7 +598,7 @@ namespace dlgprov if( bHandled ) { if( pRet ) - *pRet = aRet; + *pRet = std::move(aRet); } else { diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx index 683007e7c825..bcf53854ebf6 100644 --- a/scripting/source/protocolhandler/scripthandler.cxx +++ b/scripting/source/protocolhandler/scripthandler.cxx @@ -264,7 +264,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification( css::frame::DispatchResultEvent aEvent; aEvent.Source = getXWeak(); - aEvent.Result = invokeResult; + aEvent.Result = std::move(invokeResult); aEvent.State = aState; try diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index 0e8acbcc3677..7c02c658a134 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -475,7 +475,7 @@ ReadOnlyEventsNameContainer::ReadOnlyEventsNameContainer( const Sequence< OUStri if ( eventMethodToDescriptor( rSrc, evtDesc, sCodeName ) ) { aDesc <<= evtDesc; - m_hEvents[ rSrc ] = aDesc; + m_hEvents[ rSrc ] = std::move(aDesc); } } } diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index 416ba2e9efdd..68abaa7933bb 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -2162,7 +2162,7 @@ void AnimationImporter::importAnimateKeyPoints( const Atom* pAtom, const Referen if (importAttributeValue(pValue, aValue2) && aFormula.isEmpty()) aValue2 >>= aFormula; } - aValuesRange[nKeyTime] = aValue1; + aValuesRange[nKeyTime] = std::move(aValue1); } } } @@ -2599,7 +2599,7 @@ void AnimationImporter::importPropertySetContainer( const Atom* pAtom, PropertyS { Any aAny; (void)importAttributeValue( pChildAtom, aAny ); - rSet.maProperties[ pChildAtom->getInstance() ] = aAny; + rSet.maProperties[ pChildAtom->getInstance() ] = std::move(aAny); } else { diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index d8a8eccf5cdc..fd7384f379bb 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -2905,12 +2905,10 @@ void SAL_CALL SlideshowImpl::setUsePen( sal_Bool bMouseAsPen ) try { // For Pencolor; - Any aValue; - if( mbUsePen ) - aValue <<= mnUserPaintColor; beans::PropertyValue aPenProp; aPenProp.Name = "UserPaintColor"; - aPenProp.Value = aValue; + if( mbUsePen ) + aPenProp.Value <<= mnUserPaintColor; mxShow->setProperty( aPenProp ); //for StrokeWidth : diff --git a/sd/source/ui/unoidl/randomnode.cxx b/sd/source/ui/unoidl/randomnode.cxx index 98ff26f2b95f..a11b73a8dc67 100644 --- a/sd/source/ui/unoidl/randomnode.cxx +++ b/sd/source/ui/unoidl/randomnode.cxx @@ -458,7 +458,7 @@ Reference< XEnumeration > SAL_CALL RandomAnimationNode::createEnumeration() Any aTarget( mxFirstNode->getTarget() ); if( aTarget.hasValue() ) { - maTarget = aTarget; + maTarget = std::move(aTarget); mxFirstNode.clear(); } } @@ -523,7 +523,7 @@ Reference< XAnimationNode > SAL_CALL RandomAnimationNode::appendChild( const Ref { Any aTarget( xAnimate->getTarget() ); if( aTarget.hasValue() ) - maTarget = aTarget; + maTarget = std::move(aTarget); } if( !maTarget.hasValue() && !mxFirstNode.is() ) diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 29fa907ae32e..d8a24baebcc0 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -2044,7 +2044,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, css::uno::Any& rAny ) nSubId |= CONVERT_TWIPS; aItem.getItem()->QueryValue( aState, static_cast(nSubId) ); } - rAny = aState; + rAny = std::move(aState); return SfxItemState::DEFAULT; } diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 1a4661b7740e..984bd83c96c7 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -825,7 +825,7 @@ void SfxDispatchController_Impl::addStatusListener(const css::uno::Reference< cs if ( bVisible ) { aEvent.IsEnabled = eState != SfxItemState::DISABLED; - aEvent.State = aState; + aEvent.State = std::move(aState); } else { @@ -915,7 +915,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt aEvent.Source = static_cast(pDispatch); aEvent.IsEnabled = eState != SfxItemState::DISABLED; aEvent.Requery = false; - aEvent.State = aState; + aEvent.State = std::move(aState); if (pDispatcher && pDispatcher->GetFrame()) { diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 9d10e990edd3..917d403b2445 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -1783,13 +1783,11 @@ SfxDocumentMetaData::getDocumentStatistics() css::beans::NamedValue stat; stat.Name = OUString::createFromAscii(s_stdStats[i]); sal_Int32 val; - css::uno::Any any; if (!::sax::Converter::convertNumber(val, text, 0) || (val < 0)) { val = 0; SAL_WARN("sfx.doc", "Invalid number: " << text); } - any <<= val; - stat.Value = any; + stat.Value <<= val; stats.push_back(stat); } diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx index 647884064ea9..9871aee361c0 100644 --- a/stoc/source/security/file_policy.cxx +++ b/stoc/source/security/file_policy.cxx @@ -442,14 +442,14 @@ void FilePolicy::refresh() Sequence< Any > perms( userPermissions[ userId ] ); sal_Int32 len = perms.getLength(); perms.realloc( len +1 ); - perms.getArray()[ len ] = perm; + perms.getArray()[ len ] = std::move(perm); userPermissions[ userId ] = std::move(perms); } else { sal_Int32 len = defaultPermissions.getLength(); defaultPermissions.realloc( len +1 ); - defaultPermissions.getArray()[ len ] = perm; + defaultPermissions.getArray()[ len ] = std::move(perm); } token = reader.assureToken(); // next permissions token diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx index b6d5869994b5..16668b7e9e3b 100644 --- a/svtools/source/filter/DocumentToGraphicRenderer.cxx +++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx @@ -90,7 +90,7 @@ DocumentToGraphicRenderer::DocumentToGraphicRenderer( const ReferenceQueryValue( a ); - pArgs[0].Value = a; + pArgs[0].Value = std::move(a); } const Reference xProvider(m_xFrame, UNO_QUERY); diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 09ca10c3265d..b41583a78a38 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1513,7 +1513,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( PropertyValue rPropVal; rPropVal.Name = pEntry->aName; - rPropVal.Value = aVal; + rPropVal.Value = std::move(aVal); rPropVal.Handle = -1; rPropVal.State = beans::PropertyState_DEFAULT_VALUE; @@ -1705,7 +1705,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( PropertyValue rPropVal; rPropVal.Name = pEntry->aName; - rPropVal.Value = aVal; + rPropVal.Value = std::move(aVal); rPropVal.Handle = -1; rPropVal.State = PropertyState_DIRECT_VALUE; @@ -1809,7 +1809,7 @@ void SwAccessibleParagraph::_getSupplementalAttributesImpl( PropertyValue rPropVal; rPropVal.Name = rEntry.aName; - rPropVal.Value = aVal; + rPropVal.Value = std::move(aVal); rPropVal.Handle = -1; rPropVal.State = beans::PropertyState_DEFAULT_VALUE; diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 5e1f0e26ddeb..c6085b368871 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -758,7 +758,7 @@ SwXParagraph::GetPropertyValuesTolerant_Impl( } } - rResult.Value = aValue; + rResult.Value = std::move(aValue); rResult.Result = beans::TolerantPropertySetResultType::SUCCESS; nIdx++; diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 2518a9a5678c..2dfb37aa7a12 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -4176,7 +4176,7 @@ uno::Sequence< uno::Any > SwXAutoStyle::GetPropertyValues_Impl( } // add value - pValues[i] = aTarget; + pValues[i] = std::move(aTarget); } return aRet; diff --git a/test/source/sheet/databaseimportdescriptor.cxx b/test/source/sheet/databaseimportdescriptor.cxx index ffcae42567a6..c55188b8f092 100644 --- a/test/source/sheet/databaseimportdescriptor.cxx +++ b/test/source/sheet/databaseimportdescriptor.cxx @@ -45,7 +45,7 @@ void DatabaseImportDescriptor::testDatabaseImportDescriptorProperties() CPPUNIT_ASSERT_EQUAL_MESSAGE(aMsgGet.getStr(), u""_ustr, aValue); aNewValue <<= u"New"_ustr; - rPropValue.Value = aNewValue; + rPropValue.Value = std::move(aNewValue); aOldValue = rPropValue.Value; aOldValue >>= aValue; @@ -63,7 +63,7 @@ void DatabaseImportDescriptor::testDatabaseImportDescriptorProperties() CPPUNIT_ASSERT_MESSAGE(aMsgGet.getStr(), !aValue); aNewValue <<= true; - rPropValue.Value = aNewValue; + rPropValue.Value = std::move(aNewValue); aOldValue = rPropValue.Value; aOldValue >>= aValue; diff --git a/test/source/style/xstyleloader.cxx b/test/source/style/xstyleloader.cxx index 50dd629c254d..4a2182f96af1 100644 --- a/test/source/style/xstyleloader.cxx +++ b/test/source/style/xstyleloader.cxx @@ -73,9 +73,7 @@ void XStyleLoader::testLoadStylesFromStream() aOptions.realloc(nLength + 1); beans::PropertyValue aInputStream; aInputStream.Name = "InputStream"; - uno::Any aTmp; - aTmp <<= xInputStream; - aInputStream.Value = aTmp; + aInputStream.Value <<= xInputStream; aOptions.getArray()[nLength] = std::move(aInputStream); xStyleLoader->loadStylesFromURL(u"private:stream"_ustr, aOptions); diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx index 82f6294dc888..1770cab7bd73 100644 --- a/toolkit/source/controls/formattedcontrol.cxx +++ b/toolkit/source/controls/formattedcontrol.cxx @@ -235,15 +235,13 @@ namespace toolkit } } - void UnoControlFormattedFieldModel::impl_updateCachedFormatKey_nothrow(std::unique_lock& rGuard) { Any aFormatKey; getFastPropertyValue( rGuard, aFormatKey, BASEPROPERTY_FORMATKEY ); - m_aCachedFormat = aFormatKey; + m_aCachedFormat = std::move(aFormatKey); } - void UnoControlFormattedFieldModel::dispose( ) { UnoControlModel::dispose(); diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index 08207a61ae64..49f7a0a363df 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -967,7 +967,7 @@ void UnoControlModel::read( const css::uno::Reference< css::io::XObjectInputStre if ( maData.find( nPropId ) != maData.end() ) { aProps.getArray()[i] = GetPropertyName( nPropId ); - aValues.getArray()[i] = aValue; + aValues.getArray()[i] = std::move(aValue); } else { diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index 64a34df8d70d..e5be74883fa0 100644 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.cxx @@ -759,8 +759,7 @@ void transferProperties( { rCurrValue.Name = rCurrProp.Name; rCurrValue.Handle = rCurrProp.Handle; - rCurrValue.Value = aValue; -// rCurrValue.State = + rCurrValue.Value = std::move(aValue); nWritePos++; } diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index 145ba022ffd4..b9323e654bf9 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -1105,7 +1105,7 @@ Reference< XPropertySetInfo > SAL_CALL PersistentPropertySet::getPropertySetInfo // virtual void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aPropertyName, - const Any& aValue ) + const Any& rValue ) { std::unique_lock aCGuard(m_aMutex); @@ -1136,13 +1136,13 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty = xRootHierNameAccess->getByHierarchicalName( aValueName ); // Check value type. - if ( aOldValue.getValueType() != aValue.getValueType() ) + if ( aOldValue.getValueType() != rValue.getValueType() ) { throw IllegalArgumentException(); } // Write value - xNameReplace->replaceByName( u"Value"_ustr, aValue ); + xNameReplace->replaceByName( u"Value"_ustr, rValue ); // Write state ( Now it is a directly set value ) xNameReplace->replaceByName( @@ -1167,8 +1167,8 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty aEvt.PropertyName = aPropertyName; aEvt.PropertyHandle = nHandle; aEvt.Further = false; - aEvt.OldValue = aOldValue; - aEvt.NewValue = aValue; + aEvt.OldValue = std::move(aOldValue); + aEvt.NewValue = rValue; notifyPropertyChangeEvent( aCGuard, aEvt ); } diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index 9f00dea6d14b..a526be72b8ae 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -1173,7 +1173,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( rValue.Name, rValue.Value ); aEvent.PropertyName = rValue.Name; - aEvent.OldValue = aOldValue; + aEvent.OldValue = std::move(aOldValue); aEvent.NewValue = rValue.Value; aChanges.getArray()[ nChanged ] = aEvent; diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index ef46dd186af4..818dafeaaec4 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -1221,7 +1221,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( rValue.Name, rValue.Value ); aEvent.PropertyName = rValue.Name; - aEvent.OldValue = aOldValue; + aEvent.OldValue = std::move(aOldValue); aEvent.NewValue = rValue.Value; aChanges.getArray()[ nChanged ] = aEvent; diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 0eb051e95859..6580c8af6b67 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -1225,7 +1225,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( rValue.Name, rValue.Value ); aEvent.PropertyName = rValue.Name; - aEvent.OldValue = aOldValue; + aEvent.OldValue = std::move(aOldValue); aEvent.NewValue = rValue.Value; aChanges.getArray()[ nChanged ] = aEvent; diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx b/ucb/source/ucp/webdav-curl/webdavcontent.cxx index d0e656a3be0c..6590d3ee7c08 100644 --- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx @@ -1944,7 +1944,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( rName, rValue.Value ); aEvent.PropertyName = rName; - aEvent.OldValue = aOldValue; + aEvent.OldValue = std::move(aOldValue); aEvent.NewValue = rValue.Value; aChanges.getArray()[ nChanged ] = aEvent; diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx index c69487117e00..f6cc30e0b49f 100644 --- a/unotools/source/ucbhelper/ucblockbytes.cxx +++ b/unotools/source/ucbhelper/ucblockbytes.cxx @@ -605,7 +605,7 @@ void SAL_CALL Moderator::run() { salhelper::ConditionModifier aMod(m_aRes); m_aResultType = aResultType; - m_aResult = aResult; + m_aResult = std::move(aResult); m_nIOErrorCode = nIOErrorCode; } } diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 373c355141a1..cd571bab3562 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -366,7 +366,7 @@ void SchXMLPlotAreaContext::startFastElement (sal_Int32 /*nElement*/, } } } - mrSeriesDefaultsAndStyles.maDeepDefault = aDeepProperty; + mrSeriesDefaultsAndStyles.maDeepDefault = std::move(aDeepProperty); xProp->getPropertyValue(u"NumberOfLines"_ustr) >>= mnNumOfLinesProp; xProp->getPropertyValue(u"Volume"_ustr) >>= mbStockHasVolume; diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index 27ed06144f54..a99ddff236ef 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -812,7 +812,7 @@ void SvXMLUnitConverter::convertPropertySet(uno::Sequence& beans::PropertyValue aValue; aValue.Name = rProp.Name; - aValue.Value = aPropertyValue; + aValue.Value = std::move(aPropertyValue); aPropsVec.push_back(aValue); } rProps = comphelper::containerToSequence(aPropsVec); diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index b30585b5541f..2a987ad78e6c 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -994,7 +994,7 @@ public: if (!rValue.hasValue() || rValue.get() < any.get()) { - rValue = any; + rValue = std::move(any); } return true; } diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx index 396ae42abd49..57ea1415c0a5 100644 --- a/xmloff/source/style/XMLFontStylesContext.cxx +++ b/xmloff/source/style/XMLFontStylesContext.cxx @@ -89,7 +89,7 @@ void XMLFontStyleContextFontFace::SetAttribute( sal_Int32 nElement, case XML_ELEMENT(STYLE, XML_FONT_CHARSET): if( GetStyles()->GetEncodingHdl().importXML( rValue, aAny, rUnitConv ) ) - aEnc = aAny; + aEnc = std::move(aAny); break; default: SvXMLStyleContext::SetAttribute( nElement, rValue ); diff --git a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx index 94d15dd2f196..c46eecefd3e2 100644 --- a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx +++ b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx @@ -100,7 +100,6 @@ void XMLIndexSimpleEntryContext::FillPropertyValues( // directly into the slots. Subclasses will have to know they can // only use slot so-and-so. - Any aAny; auto pValues = rValues.getArray(); // token type @@ -111,10 +110,9 @@ void XMLIndexSimpleEntryContext::FillPropertyValues( if (m_bCharStyleNameOK) { pValues[1].Name = "CharacterStyleName"; - aAny <<= GetImport().GetStyleDisplayName( + pValues[1].Value <<= GetImport().GetStyleDisplayName( XmlStyleFamily::TEXT_TEXT, m_sCharStyleName ); - pValues[1].Value = aAny; } } diff --git a/xmloff/source/text/XMLIndexSpanEntryContext.cxx b/xmloff/source/text/XMLIndexSpanEntryContext.cxx index abf7a3eb4eb9..da97744256de 100644 --- a/xmloff/source/text/XMLIndexSpanEntryContext.cxx +++ b/xmloff/source/text/XMLIndexSpanEntryContext.cxx @@ -54,10 +54,8 @@ void XMLIndexSpanEntryContext::FillPropertyValues( // content auto pValues = rValues.getArray(); - Any aAny; - aAny <<= sContent.makeStringAndClear(); pValues[m_nValues-1].Name = "Text"; - pValues[m_nValues-1].Value = aAny; + pValues[m_nValues-1].Value <<= sContent.makeStringAndClear(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 3f75fa118311..fcaf900b8f41 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -2967,7 +2967,6 @@ void XMLBibliographyFieldImportContext::startFastElement( auto nToken = aIter.getToken() & TOKEN_MASK; PropertyValue aValue; aValue.Name = MapBibliographyFieldName(nToken); - Any aAny; // special treatment for bibliography type // biblio vs bibilio: #96658#; also read old documents @@ -2979,8 +2978,7 @@ void XMLBibliographyFieldImportContext::startFastElement( nTmp, aIter.toView(), aBibliographyDataTypeMap)) { - aAny <<= static_cast(nTmp); - aValue.Value = aAny; + aValue.Value <<= static_cast(nTmp); aValues.push_back(aValue); } @@ -2992,8 +2990,7 @@ void XMLBibliographyFieldImportContext::startFastElement( { aStringValue = GetImport().GetAbsoluteReference(aStringValue); } - aAny <<= aStringValue; - aValue.Value = aAny; + aValue.Value <<= aStringValue; aValues.push_back(aValue); }