diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx index 5cf427133a9e..7f5b87d1fb6d 100644 --- a/chart2/source/controller/main/ObjectHierarchy.cxx +++ b/chart2/source/controller/main/ObjectHierarchy.cxx @@ -400,7 +400,7 @@ void ObjectHierarchy::createDataSeriesTree( } if( ! aSeriesSubContainer.empty()) - m_aChildMap[ aSeriesOID ] = aSeriesSubContainer; + m_aChildMap[ aSeriesOID ] = std::move(aSeriesSubContainer); } } } diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index dfd7fa53f677..b648b987cbb7 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -277,7 +277,7 @@ bool MimeConfigurationHelper::GetVerbByShortcut( const OUString& aVerbShortcut, && ( xVerbsProps->getByName(sVerbFlags) >>= aTempDescr.VerbFlags ) && ( xVerbsProps->getByName(sVerbAttributes) >>= aTempDescr.VerbAttributes ) ) { - aDescriptor = aTempDescr; + aDescriptor = std::move(aTempDescr); bResult = true; } } diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index a503e4312e9d..da4df844336f 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -316,7 +316,7 @@ void SvxNotebookbarConfigPage::searchNodeandAttribute(std::vector pOldFilter = rMedium.GetFilter(); - if ( pOldFilter ) + std::shared_ptr pFilter = rMedium.GetFilter(); + if ( pFilter ) { - if( !IsFilterInstalled_Impl( pOldFilter ) ) - pOldFilter = nullptr; + if( !IsFilterInstalled_Impl( pFilter ) ) + pFilter = nullptr; else { const SfxStringItem* pSalvageItem = rMedium.GetItemSet().GetItem(SID_DOC_SALVAGE, false); - if ( ( pOldFilter->GetFilterFlags() & SfxFilterFlags::PACKED ) && pSalvageItem ) + if ( ( pFilter->GetFilterFlags() & SfxFilterFlags::PACKED ) && pSalvageItem ) // Salvage is always done without packing - pOldFilter = nullptr; + pFilter = nullptr; } } - std::shared_ptr pFilter = pOldFilter; - bool bPreview = rMedium.IsPreview_Impl(); const SfxStringItem* pReferer = rMedium.GetItemSet().GetItem(SID_REFERER, false); if ( bPreview && rMedium.IsRemote() && ( !pReferer || !pReferer->GetValue().match("private:searchfolder:") ) ) diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 6b18b2fab1de..54659137d7a2 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -880,7 +880,7 @@ namespace drawinglayer::primitive2d attribute::FillGradientAttribute aFillFloatTransGradient; // try line style - const attribute::SdrLineAttribute aLine(createNewSdrLineAttribute(rSet)); + attribute::SdrLineAttribute aLine(createNewSdrLineAttribute(rSet)); if(!aLine.isDefault()) { @@ -906,7 +906,8 @@ namespace drawinglayer::primitive2d aShadow = createNewSdrShadowAttribute(rSet); return attribute::SdrLineFillShadowAttribute3D( - aLine, aFill, aLineStartEnd, aShadow, aFillFloatTransGradient); + std::move(aLine), std::move(aFill), std::move(aLineStartEnd), + std::move(aShadow), std::move(aFillFloatTransGradient)); } return attribute::SdrLineFillShadowAttribute3D(); diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 10b48f851443..cd3588270162 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -892,7 +892,7 @@ sal_uInt32 SlideBackgroundFillPrimitive2D::getPrimitive2DID() const return std::move(rContent); Primitive2DContainer aRetval(2); aRetval[0] = new GlowPrimitive2D(rGlow.getColor(), rGlow.getRadius(), Primitive2DContainer(rContent)); - aRetval[1] = new GroupPrimitive2D(Primitive2DContainer(rContent)); + aRetval[1] = new GroupPrimitive2D(Primitive2DContainer(std::move(rContent))); return aRetval; } diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index ecf91d57bbfd..aac57a638d7e 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -169,7 +169,7 @@ rtl::Reference Content::create( uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( aURI.getUri() ); - return new Content( rxContext, pProvider, xId, xPackage, aURI, std::move(aProps) ); + return new Content( rxContext, pProvider, xId, xPackage, std::move(aURI), std::move(aProps) ); } else { @@ -191,7 +191,7 @@ rtl::Reference Content::create( else aInfo.Type = getContentType( aURI.getScheme(), false ); - return new Content( rxContext, pProvider, xId, xPackage, aURI, aInfo ); + return new Content( rxContext, pProvider, xId, xPackage, std::move(aURI), std::move(aInfo) ); } } diff --git a/vcl/inc/widgetdraw/WidgetDefinitionReader.hxx b/vcl/inc/widgetdraw/WidgetDefinitionReader.hxx index c0c806839092..5a9bbac76d4c 100644 --- a/vcl/inc/widgetdraw/WidgetDefinitionReader.hxx +++ b/vcl/inc/widgetdraw/WidgetDefinitionReader.hxx @@ -28,7 +28,7 @@ private: WidgetDefinition& rWidgetDefinition, ControlType eType); SAL_DLLPRIVATE void readPart(tools::XmlWalker& rWalker, - std::shared_ptr rpPart); + const std::shared_ptr& rpPart); SAL_DLLPRIVATE void readDrawingDefinition(tools::XmlWalker& rWalker, diff --git a/vcl/source/filter/svm/SvmConverter.cxx b/vcl/source/filter/svm/SvmConverter.cxx index 0e9277dc9240..d14adcc30640 100644 --- a/vcl/source/filter/svm/SvmConverter.cxx +++ b/vcl/source/filter/svm/SvmConverter.cxx @@ -643,7 +643,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) else { nLastPolygonAction = rMtf.GetActionSize(); - rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) ); + rMtf.AddAction(new MetaPolyPolygonAction(std::move(aPolyPoly))); } } } diff --git a/vcl/source/font/FeatureCollector.cxx b/vcl/source/font/FeatureCollector.cxx index 8d53af174a0c..3e8e2e76e8a5 100644 --- a/vcl/source/font/FeatureCollector.cxx +++ b/vcl/source/font/FeatureCollector.cxx @@ -181,7 +181,7 @@ void FeatureCollector::collectForTable(hb_tag_t aTableTag) } if (aDefinition) - rFeature.m_aDefinition = aDefinition; + rFeature.m_aDefinition = std::move(aDefinition); } } diff --git a/vcl/source/gdi/WidgetDefinitionReader.cxx b/vcl/source/gdi/WidgetDefinitionReader.cxx index cb5d3a83828f..16c588883262 100644 --- a/vcl/source/gdi/WidgetDefinitionReader.cxx +++ b/vcl/source/gdi/WidgetDefinitionReader.cxx @@ -332,7 +332,7 @@ void WidgetDefinitionReader::readDefinition(tools::XmlWalker& rWalker, } void WidgetDefinitionReader::readPart(tools::XmlWalker& rWalker, - std::shared_ptr rpPart) + const std::shared_ptr& rpPart) { rWalker.children(); while (rWalker.isValid()) diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index d472aaaadcfd..aa92b2f50b28 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -411,7 +411,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co { Graphic aGraphic = rFilter.ImportUnloadedGraphic(*pIStm); if (!aGraphic.IsNone()) - aVCLGraphic = aGraphic; + aVCLGraphic = std::move(aGraphic); } if (aVCLGraphic.IsNone()) error = rFilter.ImportGraphic(aVCLGraphic, aPath, *pIStm, GRFILTER_FORMAT_DONTKNOW, nullptr, GraphicFilterImportFlags::NONE); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index dcb68b9cf142..108ad423454c 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1758,8 +1758,6 @@ void Window::ImplNewInputContext() SalInputContext aNewContext; const vcl::Font& rFont = rInputContext.GetFont(); const OUString& rFontName = rFont.GetFamilyName(); - rtl::Reference pFontInstance; - aNewContext.mpFont = nullptr; if (!rFontName.isEmpty()) { OutputDevice *pFocusWinOutDev = pFocusWin->GetOutDev(); @@ -1773,11 +1771,10 @@ void Window::ImplNewInputContext() else aSize.setHeight( (12*pFocusWin->GetOutDev()->mnDPIY)/72 ); } - pFontInstance = pFocusWin->GetOutDev()->mxFontCache->GetFontInstance( + aNewContext.mpFont = + pFocusWin->GetOutDev()->mxFontCache->GetFontInstance( pFocusWin->GetOutDev()->mxFontCollection.get(), rFont, aSize, static_cast(aSize.Height()) ); - if ( pFontInstance ) - aNewContext.mpFont = pFontInstance; } aNewContext.mnOptions = rInputContext.GetOptions(); pFocusWin->ImplGetFrame()->SetInputContext( &aNewContext );