loplugin:moveit

make the plugin more conservative, so we see less false+
(although we also miss some possibilities in the process)

Change-Id: I91b1806271e7f802d7459834ab7bcc569047da3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137342
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 8ad9e3f..d08460b 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -4714,7 +4714,7 @@ void SbUnoStructRefObject::implCreateDbgProperties()
    QuickInsert( xVarRef.get() );

    // Id == -3: output the Methods
    xVarRef = new SbUnoProperty( ID_DBG_METHODS, SbxSTRING, SbxSTRING, aProp, -3, false, false );
    xVarRef = new SbUnoProperty( ID_DBG_METHODS, SbxSTRING, SbxSTRING, std::move(aProp), -3, false, false );
    QuickInsert( xVarRef.get() );
}

diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx
index 002c54e..174f93d 100644
--- a/chart2/source/controller/main/DragMethod_PieSegment.cxx
+++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx
@@ -142,8 +142,8 @@ void DragMethod_PieSegment::createSdrDragEntries()

    if( pObj && pPV )
    {
        const basegfx::B2DPolyPolygon aNewPolyPolygon(pObj->TakeXorPoly());
        addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPolyPolygon(aNewPolyPolygon)));
        basegfx::B2DPolyPolygon aNewPolyPolygon(pObj->TakeXorPoly());
        addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPolyPolygon(std::move(aNewPolyPolygon))));
    }
}
} //namespace chart
diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
index 34efccf..fb6aeab 100644
--- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
+++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx
@@ -216,7 +216,7 @@ void DragMethod_RotateDiagram::CreateOverlayGeometry(

    std::unique_ptr<sdr::overlay::OverlayPolyPolygonStripedAndFilled> pNew(
        new sdr::overlay::OverlayPolyPolygonStripedAndFilled(
            aPolyPolygon));
            std::move(aPolyPolygon)));

    insertNewlyCreatedOverlayObjectForSdrDragMethod(
        std::move(pNew),
diff --git a/compilerplugins/clang/moveit.cxx b/compilerplugins/clang/moveit.cxx
index 5beb347..116e5dd 100644
--- a/compilerplugins/clang/moveit.cxx
+++ b/compilerplugins/clang/moveit.cxx
@@ -16,6 +16,8 @@
#include "config_clang.h"
#include "plugin.hxx"
#include "check.hxx"
#include <unordered_set>
#include <unordered_map>

/*
Look for local variables that can be std::move'd into parameters.
@@ -40,92 +42,9 @@ public:
    {
        std::string fn(handler.getMainFileName());
        loplugin::normalizeDotDotInFilePath(fn);
        // false +
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/basctl/source/basicide/moduldlg.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/basic/source/classes/sbunoobj.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn,
                                        SRCDIR "/connectivity/source/drivers/dbase/dindexnode.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(
                fn, SRCDIR "/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(
                fn, SRCDIR "/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(
                fn, SRCDIR "/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/drawinglayer/source/tools/emfphelperdata.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/editeng/source/items/frmitems.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/emfio/source/reader/mtftools.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/filter/source/msfilter/msdffimp.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/filter/source/msfilter/escherex.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sc/source/ui/view/hintwin.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sc/source/core/tool/scmatrix.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sd/source/filter/eppt/epptso.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sdext/source/pdfimport/pdfparse/pdfparse.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sfx2/source/control/dispatch.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svgio/source/svgreader/svgcharacternode.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svx/source/svdraw/textchainflow.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svx/source/unodraw/unoshtxt.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svx/source/diagram/IDiagramHelper.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svx/source/sdr/overlay/overlaytools.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svx/source/svdraw/svddrgmt.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn,
                                        SRCDIR "/svx/source/svdraw/svdotextpathdecomposition.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR
                                        "/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svx/source/xml/xmlgrhlp.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sw/source/core/SwNumberTree/SwNumberTree.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sw/source/core/bastyp/calc.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sw/source/core/edit/edattr.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sw/source/core/fields/expfld.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sw/source/uibase/docvw/edtwin.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sw/source/uibase/uiview/viewling.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sw/source/core/layout/paintfrm.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sw/source/uibase/docvw/DashedLine.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/source/gdi/gradient.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/source/graphic/GraphicObject.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/source/graphic/GraphicObject2.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/source/filter/svm/SvmConverter.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/source/outdev/font.cxx"))
            return false;
        if (loplugin::hasPathnamePrefix(
                fn, SRCDIR "/writerfilter/source/dmapper/DomainMapperTableHandler.cxx"))
            return false;
        //        // false +
        //        if (loplugin::hasPathnamePrefix(fn, SRCDIR "/basctl/source/basicide/moduldlg.cxx"))
        //            return false;
        return true;
    }

@@ -133,13 +52,36 @@ public:
    {
        if (preRun())
            TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
        for (auto const& pair : m_possibles)
        {
            auto const& possible = pair.second;
            report(DiagnosticsEngine::Warning, "can std::move this var into this param",
                   possible.argExpr->getBeginLoc());
            report(DiagnosticsEngine::Note, "passing to this param",
                   possible.calleeParmVarDecl->getBeginLoc());
            report(DiagnosticsEngine::Note, "local var declared here",
                   possible.localVarDecl->getBeginLoc());
            report(DiagnosticsEngine::Note, "type declared here",
                   possible.recordDecl->getBeginLoc());
        }
    }

    bool VisitCXXMemberCallExpr(const CXXMemberCallExpr*);
    bool VisitCXXConstructExpr(const CXXConstructExpr*);
    bool VisitDeclRefExpr(const DeclRefExpr*);

private:
    bool isInterestingType(QualType);
    struct Possible
    {
        const Expr* argExpr;
        const ParmVarDecl* calleeParmVarDecl;
        const VarDecl* localVarDecl;
        const CXXRecordDecl* recordDecl;
        const DeclRefExpr* dre;
    };
    std::unordered_map<const VarDecl*, Possible> m_possibles;
    std::unordered_set<const VarDecl*> m_rejected;
};

bool MoveIt::VisitCXXMemberCallExpr(const CXXMemberCallExpr* topExpr)
@@ -182,19 +124,11 @@ bool MoveIt::VisitCXXMemberCallExpr(const CXXMemberCallExpr* topExpr)
        if (!isInterestingType(localVarDecl->getType()))
            continue;

        report(DiagnosticsEngine::Warning, "can std::move this var into this param",
               argExpr->getBeginLoc());
        report(DiagnosticsEngine::Note, "passing to this param", parmVarDecl->getBeginLoc());
        report(DiagnosticsEngine::Note, "local var declared here", localVarDecl->getBeginLoc());
        report(DiagnosticsEngine::Note, "type declared here", recordDecl->getBeginLoc());
        //        parmVarDecl->getType()->dump();
    }
        if (m_rejected.count(localVarDecl))
            continue;

    //    StringRef aFileName = getFilenameOfLocation(
    //        compiler.getSourceManager().getSpellingLoc(parmVarDecl->getBeginLoc()));
    //    if (loplugin::hasPathnamePrefix(aFileName,
    //                                    SRCDIR "/svx/source/sidebar/line/LineWidthValueSet.cxx"))
    //        return true;
        m_possibles[localVarDecl] = Possible{ argExpr, parmVarDecl, localVarDecl, recordDecl, dre };
    }

    return true;
}
@@ -241,20 +175,33 @@ bool MoveIt::VisitCXXConstructExpr(const CXXConstructExpr* topExpr)
        if (!isInterestingType(localVarDecl->getType()))
            continue;

        report(DiagnosticsEngine::Warning, "can std::move this var into this param",
               argExpr->getBeginLoc());
        report(DiagnosticsEngine::Note, "passing to this param", parmVarDecl->getBeginLoc());
        report(DiagnosticsEngine::Note, "local var declared here", localVarDecl->getBeginLoc());
        report(DiagnosticsEngine::Note, "type declared here", recordDecl->getBeginLoc());
        //        parmVarDecl->getType()->dump();
        if (m_rejected.count(localVarDecl))
            continue;

        m_possibles[localVarDecl] = Possible{ argExpr, parmVarDecl, localVarDecl, recordDecl, dre };
    }

    //    StringRef aFileName = getFilenameOfLocation(
    //        compiler.getSourceManager().getSpellingLoc(parmVarDecl->getBeginLoc()));
    //    if (loplugin::hasPathnamePrefix(aFileName,
    //                                    SRCDIR "/svx/source/sidebar/line/LineWidthValueSet.cxx"))
    //        return true;
    return true;
}

/// If we have pushed a possibility, and then we see that possibility again,
/// then we cannot std::move it, because it is being referenced after being moved.
///
bool MoveIt::VisitDeclRefExpr(const DeclRefExpr* declRefExpr)
{
    if (ignoreLocation(declRefExpr))
        return true;
    const VarDecl* localVarDecl = dyn_cast<VarDecl>(declRefExpr->getDecl());
    if (!localVarDecl)
        return true;
    auto it = m_possibles.find(localVarDecl);
    if (it == m_possibles.end())
        return true;
    // ignoring the DeclRefExpr* for the expression where we found the Possible
    if (it->second.dre == declRefExpr)
        return true;
    m_possibles.erase(it);
    m_rejected.insert(localVarDecl);
    return true;
}

diff --git a/compilerplugins/clang/test/moveit.cxx b/compilerplugins/clang/test/moveit.cxx
index 06424a6..dfe64c4 100644
--- a/compilerplugins/clang/test/moveit.cxx
+++ b/compilerplugins/clang/test/moveit.cxx
@@ -16,23 +16,36 @@
struct Movable
{
    std::shared_ptr<int> x;

    void method1();
};

namespace test1
namespace test1a
{
struct F
{
    // expected-note@+1 {{passing to this param [loplugin:moveit]}}
    void call_by_value(Movable);
    // expected-note@+1 {{passing to this param [loplugin:moveit]}}
    F(Movable);
    void foo()
    {
        // expected-note@+2 {{local var declared here [loplugin:moveit]}}
        // expected-note@+1 {{local var declared here [loplugin:moveit]}}
        Movable m;
        // expected-error@+1 {{can std::move this var into this param [loplugin:moveit]}}
        call_by_value(m);
    }
};
}

namespace test1b
{
struct F
{
    // expected-note@+1 {{passing to this param [loplugin:moveit]}}
    F(Movable);
    void foo()
    {
        // expected-note@+1 {{local var declared here [loplugin:moveit]}}
        Movable m;
        // expected-error@+1 {{can std::move this var into this param [loplugin:moveit]}}
        F a(m);
        (void)a;
@@ -57,4 +70,19 @@ struct F
};
}

// No error expected, because referencing after call
namespace test3
{
struct F
{
    F(Movable);
    void foo()
    {
        Movable m;
        F a(m);
        m.method1();
    }
};
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index 6983000..67dfdbe 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -1610,7 +1610,7 @@ namespace emfio
        else
        {
            UpdateLineStyle();
            mpGDIMetaFile->AddAction( new MetaPolyLineAction( rPolygon, maLineStyle.aLineInfo ) );
            mpGDIMetaFile->AddAction( new MetaPolyLineAction( std::move(rPolygon), maLineStyle.aLineInfo ) );
        }
    }

@@ -1640,7 +1640,7 @@ namespace emfio
        else
        {
            UpdateLineStyle();
            mpGDIMetaFile->AddAction( new MetaPolyLineAction( rPolygon, maLineStyle.aLineInfo ) );
            mpGDIMetaFile->AddAction( new MetaPolyLineAction( std::move(rPolygon), maLineStyle.aLineInfo ) );
        }
    }

diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 7d5c094..17c93f6 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1775,7 +1775,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(const uno::Reference<beans
                {
                    EscherGraphicProvider aProvider;
                    SvMemoryStream aMemStrm;
                    GraphicObject aGraphicObject(aGraphic);
                    GraphicObject aGraphicObject(std::move(aGraphic));

                    if (aProvider.GetBlibID(aMemStrm, aGraphicObject, nullptr, pGraphicAttr.get(), bOOxmlExport))
                    {
@@ -3757,8 +3757,8 @@ bool EscherPropertyContainer::CreateBlipPropertiesforOLEControl(const uno::Refer
    if ( !pShape )
        return false;

    const Graphic aGraphic(SdrExchangeView::GetObjGraphic(*pShape));
    const GraphicObject aGraphicObject(aGraphic);
    Graphic aGraphic(SdrExchangeView::GetObjGraphic(*pShape));
    const GraphicObject aGraphicObject(std::move(aGraphic));

    if (!aGraphicObject.GetUniqueID().isEmpty())
    {
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index e39c67f..5a5d893 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1461,7 +1461,7 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
                    }
                    else
                    {
                        rSet.Put(XFillBitmapItem(OUString(), aGraf));
                        rSet.Put(XFillBitmapItem(OUString(), std::move(aGraf)));
                        rSet.Put(XFillBmpTileItem(false));
                    }
                }
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 1cc3391..d88bf07 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -2684,7 +2684,7 @@ void ScMatrixImpl::MatConcat(SCSIZE nMaxCol, SCSIZE nMaxRow, const ScMatrixRef& 
        xMat1->ExecuteOperation(
                std::pair<size_t, size_t>(0, 0),
                std::pair<size_t, size_t>(nMaxRow - 1, nMaxCol - 1),
                aDoubleFunc, aBoolFunc, aStringFunc, aEmptyFunc);
                std::move(aDoubleFunc), std::move(aBoolFunc), std::move(aStringFunc), std::move(aEmptyFunc));

    std::vector<svl::SharedString> aSharedString(nMaxCol*nMaxRow);

@@ -2749,7 +2749,7 @@ void ScMatrixImpl::MatConcat(SCSIZE nMaxCol, SCSIZE nMaxRow, const ScMatrixRef& 
        xMat2->ExecuteOperation(
                std::pair<size_t, size_t>(0, 0),
                std::pair<size_t, size_t>(nMaxRow - 1, nMaxCol - 1),
                aDoubleFunc2, aBoolFunc2, aStringFunc2, aEmptyFunc2);
                std::move(aDoubleFunc2), std::move(aBoolFunc2), std::move(aStringFunc2), std::move(aEmptyFunc2));

    aString.clear();

diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index cfd632d..12fed3e 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -238,7 +238,7 @@ void AnnotationHdl::CreateB2dIAObject()
                        aPolyPolygon.append(rPolygon);

                    pOverlayObject.reset(new sdr::overlay::OverlayPolyPolygon(
                            aPolyPolygon,
                            std::move(aPolyPolygon),
                            rCustomAnnotationMarker.maLineColor,
                            rCustomAnnotationMarker.mnLineWidth,
                            rCustomAnnotationMarker.maFillColor));
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index eee1a759..8764afd 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1547,7 +1547,7 @@ private:
                SdrPathObj* pPathObj = new SdrPathObj(
                    rModel,
                    SdrObjKind::PathLine,
                    aPathPoly);
                    std::move(aPathPoly));
                pPathObj->SetMergedItem(XLineStyleItem(drawing::LineStyle_SOLID));
                pPathObj->SetMergedItem(XLineColorItem(OUString(), COL_BLACK));

diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index a094040..4a50714 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -755,7 +755,7 @@ void BackingWindow::dispatchURL( const OUString& i_rURL,
        // dispatch the URL
        if ( xDispatch.is() )
        {
            std::unique_ptr<ImplDelayedDispatch> pDisp(new ImplDelayedDispatch( xDispatch, aDispatchURL, i_rArgs ));
            std::unique_ptr<ImplDelayedDispatch> pDisp(new ImplDelayedDispatch( xDispatch, std::move(aDispatchURL), i_rArgs ));
            if( Application::PostUserEvent( Link<void*,void>( nullptr, implDispatchDelayed ), pDisp.get() ) )
                pDisp.release();
        }
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 87c0816..8ce8c83 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2611,7 +2611,7 @@ void EnhancedCustomShape2d::CreateSubPath(
            SdrPathObjUniquePtr pFill(new SdrPathObj(
                mrSdrObjCustomShape.getSdrModelFromSdrObject(),
                SdrObjKind::Polygon,
                aClosedPolyPolygon));
                std::move(aClosedPolyPolygon)));
            SfxItemSet aTempSet(*this);
            aTempSet.Put(makeSdrShadowItem(false));
            aTempSet.Put(XLineStyleItem(drawing::LineStyle_NONE));
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index 04d685c..748492a 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -535,7 +535,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject(
                    p3DObj = new E3dExtrudeObj(
                        rSdrObjCustomShape.getSdrModelFromSdrObject(),
                        a3DDefaultAttr,
                        aPolyPoly,
                        std::move(aPolyPoly),
                        0);

                    p3DObj->NbcSetLayer( pShape2d->GetLayer() );
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 7b53511..93117639 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -921,7 +921,7 @@ static SdrObject* CreateSdrObjectFromParagraphOutlines(
        pRet = new SdrPathObj(
            rSdrObjCustomShape.getSdrModelFromSdrObject(),
            SdrObjKind::Polygon,
            aPolyPoly);
            std::move(aPolyPoly));

        SfxItemSet aSet(rSdrObjCustomShape.GetMergedItemSet());
        aSet.ClearItem( SDRATTR_TEXTDIRECTION );    //SJ: vertical writing is not required, by removing this item no outliner is created
diff --git a/svx/source/diagram/IDiagramHelper.cxx b/svx/source/diagram/IDiagramHelper.cxx
index c090c88..672c748 100644
--- a/svx/source/diagram/IDiagramHelper.cxx
+++ b/svx/source/diagram/IDiagramHelper.cxx
@@ -237,7 +237,7 @@ void OverlayDiagramPrimitive::create2DDecomposition(
    // top/left, would require alternative creation)
    rContainer.push_back(
        new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D(
            aPolyPolygon,
            std::move(aPolyPolygon),
            aLineAttribute));

    // top-left line pattern (as grep-here-sign to signal
@@ -264,7 +264,7 @@ void OverlayDiagramPrimitive::create2DDecomposition(
        new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
            std::move(aPolygonLapDown),
            aLineAttribute,
            aStrokeAttribute));
            std::move(aStrokeAttribute)));

    // add text last. May use darker text color, go for same color
    // as accentuation line for now
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
index 48ace0a..0043f7f 100644
--- a/svx/source/dialog/contwnd.cxx
+++ b/svx/source/dialog/contwnd.cxx
@@ -62,7 +62,7 @@ void ContourWindow::SetPolyPolygon(const tools::PolyPolygon& rPolyPoly)
        SdrPathObj* pPathObj = new SdrPathObj(
            *pModel,
            SdrObjKind::PathFill,
            aPolyPolygon);
            std::move(aPolyPolygon));

        SfxItemSet aSet(pModel->GetItemPool());

diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx
index c27d955..ef5a7b6 100644
--- a/svx/source/engine3d/dragmt3d.cxx
+++ b/svx/source/engine3d/dragmt3d.cxx
@@ -259,7 +259,7 @@ void E3dDragMethod::CreateOverlayGeometry(
    {
        std::unique_ptr<sdr::overlay::OverlayPolyPolygonStripedAndFilled> pNew(
            new sdr::overlay::OverlayPolyPolygonStripedAndFilled(
                aResult));
                std::move(aResult)));

        insertNewlyCreatedOverlayObjectForSdrDragMethod(
            std::move(pNew),
diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx
index 3675b66..fadb645 100644
--- a/svx/source/engine3d/extrud3d.cxx
+++ b/svx/source/engine3d/extrud3d.cxx
@@ -205,7 +205,7 @@ std::unique_ptr<SdrAttrObj,SdrObjectFreeOp> E3dExtrudeObj::GetBreakObj()
    {
    // create PathObj
        basegfx::B2DPolyPolygon aPoly = TransformToScreenCoor(aBackSide);
        std::unique_ptr<SdrPathObj,SdrObjectFreeOp> pPathObj(new SdrPathObj(getSdrModelFromSdrObject(), SdrObjKind::PolyLine, aPoly));
        std::unique_ptr<SdrPathObj,SdrObjectFreeOp> pPathObj(new SdrPathObj(getSdrModelFromSdrObject(), SdrObjKind::PolyLine, std::move(aPoly)));

        SfxItemSet aSet(GetObjectItemSet());
        aSet.Put(XLineStyleItem(css::drawing::LineStyle_SOLID));
diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx
index 1d8b4350..9e01fa4 100644
--- a/svx/source/engine3d/lathe3d.cxx
+++ b/svx/source/engine3d/lathe3d.cxx
@@ -186,7 +186,7 @@ std::unique_ptr<SdrAttrObj,SdrObjectFreeOp> E3dLatheObj::GetBreakObj()
    // create PathObj
    basegfx::B3DPolyPolygon aLathePoly3D(basegfx::utils::createB3DPolyPolygonFromB2DPolyPolygon(maPolyPoly2D));
    basegfx::B2DPolyPolygon aTransPoly(TransformToScreenCoor(aLathePoly3D));
    std::unique_ptr<SdrPathObj,SdrObjectFreeOp> pPathObj(new SdrPathObj(getSdrModelFromSdrObject(), SdrObjKind::PolyLine, aTransPoly));
    std::unique_ptr<SdrPathObj,SdrObjectFreeOp> pPathObj(new SdrPathObj(getSdrModelFromSdrObject(), SdrObjKind::PolyLine, std::move(aTransPoly)));

    // Set Attribute
    SfxItemSet aSet(GetObjectItemSet());
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 64a86bc..deebb7c 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -189,7 +189,7 @@ void Impl3DMirrorConstructOverlay::SetMirrorAxis(Point aMirrorAxisA, Point aMirr
                    aPolyPolygon.transform(aMatrixTransform);

                    std::unique_ptr<sdr::overlay::OverlayPolyPolygonStripedAndFilled> pNew(new sdr::overlay::OverlayPolyPolygonStripedAndFilled(
                        aPolyPolygon));
                        std::move(aPolyPolygon)));
                    xTargetOverlay->add(*pNew);
                    maObjects.append(std::move(pNew));
                }
@@ -742,7 +742,7 @@ void E3dView::ImpCreateSingle3DObjectFlat(E3dScene* pScene, SdrObject* pObj, boo
        aPolyPoly2D.transform(rLatheMat);
        // ctor E3dLatheObj expects coordinates with y-axis down
        aPolyPoly2D.transform(aFlipVerticalMat);
        p3DObj = new E3dLatheObj(pObj->getSdrModelFromSdrObject(), aDefault, aPolyPoly2D);
        p3DObj = new E3dLatheObj(pObj->getSdrModelFromSdrObject(), aDefault, std::move(aPolyPoly2D));
    }

    // Set attribute
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index d97dfeb..2a7bc58 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -1257,7 +1257,7 @@ namespace svx
        }
        Reference< XDispatch > xDispatcher = _rxProvider->queryDispatch( aFeatureURL, OUString(), 0xFF );
        if ( xDispatcher.is() )
            return new FmTextControlFeature( xDispatcher, aFeatureURL, _nSlot, this );
            return new FmTextControlFeature( xDispatcher, std::move(aFeatureURL), _nSlot, this );
        return nullptr;
    }

diff --git a/svx/source/mnuctrls/smarttagmenu.cxx b/svx/source/mnuctrls/smarttagmenu.cxx
index 8d42583..3a78b57 100644
--- a/svx/source/mnuctrls/smarttagmenu.cxx
+++ b/svx/source/mnuctrls/smarttagmenu.cxx
@@ -102,7 +102,7 @@ void SmartTagMenuController::statusChanged( const css::frame::FeatureStateEvent&
        else if ( aProperty.Name == "RangeText" )
            aProperty.Value >>= aRangeText;
    }
    m_pSmartTagItem.reset( new SvxSmartTagItem( TypedWhichId<SvxSmartTagItem>(0), aActionComponents, aActionIndices, aStringKeyMaps, xTextRange, xController, aLocale, aApplicationName, aRangeText ) );
    m_pSmartTagItem.reset( new SvxSmartTagItem( TypedWhichId<SvxSmartTagItem>(0), aActionComponents, aActionIndices, aStringKeyMaps, xTextRange, xController, std::move(aLocale), aApplicationName, aRangeText ) );
    FillMenu();
}

diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index 2e668b4..daadd83 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -81,7 +81,7 @@ namespace sdr::contact
            double fCornerRadiusY;
            drawinglayer::primitive2d::calculateRelativeCornerRadius(
                rCaptionObj.GetEckenradius(), aObjectRange, fCornerRadiusX, fCornerRadiusY);
            const basegfx::B2DPolygon aTail(rCaptionObj.getTailPolygon());
            basegfx::B2DPolygon aTail(rCaptionObj.getTailPolygon());

            // create primitive. Always create one (even if invisible) to let the decomposition
            // of SdrCaptionPrimitive2D create needed invisible elements for HitTest and BoundRect
@@ -89,7 +89,7 @@ namespace sdr::contact
                new drawinglayer::primitive2d::SdrCaptionPrimitive2D(
                    aObjectMatrix,
                    aAttribute,
                    aTail,
                    std::move(aTail),
                    fCornerRadiusX,
                    fCornerRadiusY));

diff --git a/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx b/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx
index ab95878..a0e26c5b 100644
--- a/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx
@@ -38,7 +38,7 @@ namespace sdr::contact

        void ViewContactOfSdrEdgeObj::createViewIndependentPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const
        {
            const basegfx::B2DPolygon aEdgeTrack(GetEdgeObj().getEdgeTrack());
            basegfx::B2DPolygon aEdgeTrack(GetEdgeObj().getEdgeTrack());

            // what to do when no EdgeTrack is provided (HitTest and selectability) ?
            OSL_ENSURE(0 != aEdgeTrack.count(), "Connectors with no geometry are not allowed (!)");
@@ -56,7 +56,7 @@ namespace sdr::contact
            const drawinglayer::primitive2d::Primitive2DReference xReference(
                new drawinglayer::primitive2d::SdrConnectorPrimitive2D(
                    aAttribute,
                    aEdgeTrack));
                    std::move(aEdgeTrack)));

            rVisitor.visit(xReference);
        }
diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index 8798d40..e264448 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -199,8 +199,8 @@ namespace sdr::contact
                new drawinglayer::primitive2d::SdrPathPrimitive2D(
                    aObjectMatrix,
                    aAttribute,
                    aUnitPolyPolygon,
                    aUnitDefinitionPolyPolygon));
                    std::move(aUnitPolyPolygon),
                    std::move(aUnitDefinitionPolyPolygon)));

            rVisitor.visit(xReference);
        }
diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx
index 6e29d9c..d2f01ad 100644
--- a/svx/source/sdr/overlay/overlaytools.cxx
+++ b/svx/source/sdr/overlay/overlaytools.cxx
@@ -81,7 +81,7 @@ void OverlayStaticRectanglePrimitive::create2DDecomposition(Primitive2DContainer

        // create fill primitive
        const Primitive2DReference aFill(
            new PolyPolygonColorPrimitive2D(aPolyPolygon, maFillColor));
            new PolyPolygonColorPrimitive2D(std::move(aPolyPolygon), maFillColor));

        aPrimitive2DSequence = Primitive2DContainer(2);
        aPrimitive2DSequence[0] = aFill;
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index 511f8ee..1a54596 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -515,7 +515,7 @@ sal_uInt32 SlideBackgroundFillPrimitive2D::getPrimitive2DID() const
                    pNew = new SdrContourTextPrimitive2D(
                        &rText.getSdrText(),
                        rText.getOutlinerParaObject(),
                        aScaledUnitPolyPolygon,
                        std::move(aScaledUnitPolyPolygon),
                        rObjectTransform);
                }
                else
@@ -536,7 +536,7 @@ sal_uInt32 SlideBackgroundFillPrimitive2D::getPrimitive2DID() const
                pNew = new SdrPathTextPrimitive2D(
                    &rText.getSdrText(),
                    rText.getOutlinerParaObject(),
                    aScaledPolyPolygon,
                    std::move(aScaledPolyPolygon),
                    rText.getSdrFormTextAttribute());
            }
            else
diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
index 386800a..1d44b8f 100644
--- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
@@ -327,7 +327,7 @@ namespace drawinglayer::primitive2d
            return new SdrPathTextPrimitive2D(
                getSdrText(),
                getOutlinerParaObject(),
                aNewPolyPolygon,
                std::move(aNewPolyPolygon),
                getSdrFormTextAttribute());
        }

diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 9791df7..e2a7f2e 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -101,7 +101,7 @@ ImplConnectMarkerOverlay::ImplConnectMarkerOverlay(const SdrCreateView& rView, S
                aTempPolyPoly.append(aTempPoly);

                std::unique_ptr<sdr::overlay::OverlayPolyPolygonStripedAndFilled> pNew2(new sdr::overlay::OverlayPolyPolygonStripedAndFilled(
                    aTempPolyPoly));
                    std::move(aTempPolyPoly)));
                xTargetOverlay->add(*pNew2);
                maObjects.append(std::move(pNew2));
            }
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 895a3d8..2789f62 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -121,7 +121,7 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragEntryPolyPolygon::createP
        const double fTransparence(SvtOptionsDrawinglayer::GetTransparentSelectionPercent() * 0.01);

        aRetval[1] = new drawinglayer::primitive2d::PolyPolygonSelectionPrimitive2D(
            aCopy,
            std::move(aCopy),
            aHilightColor,
            fTransparence,
            3.0,
@@ -463,7 +463,7 @@ void SdrDragMethod::createSdrDragEntries_PolygonDrag()

    if(aResult.count())
    {
        addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPolyPolygon(aResult)));
        addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPolyPolygon(std::move(aResult))));
    }
}

@@ -1220,7 +1220,7 @@ void SdrDragObjOwn::createSdrDragEntries()

    if(aDragPolyPolygon.count())
    {
        addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPolyPolygon(aDragPolyPolygon)));
        addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPolyPolygon(std::move(aDragPolyPolygon))));
    }
}

@@ -2881,7 +2881,7 @@ void SdrDragCrook::createSdrDragEntries()

        if(aDragRaster.count())
        {
            addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPolyPolygon(aDragRaster)));
            addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPolyPolygon(std::move(aDragRaster))));
        }
    }

@@ -3412,7 +3412,7 @@ void SdrDragDistort::createSdrDragEntries()

        if(aDragRaster.count())
        {
            addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPolyPolygon(aDragRaster)));
            addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPolyPolygon(std::move(aDragRaster))));
        }
    }

diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 50a7940..dd00da8 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1120,7 +1120,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
    // #i73441# check insert list before taking actions
    if(pInsOL)
    {
        SdrPathObj* pPath = new SdrPathObj(pAttrObj->getSdrModelFromSdrObject(), SdrObjKind::PathFill, aMergePolyPolygonA);
        SdrPathObj* pPath = new SdrPathObj(pAttrObj->getSdrModelFromSdrObject(), SdrObjKind::PathFill, std::move(aMergePolyPolygonA));
        ImpCopyAttributes(pAttrObj, pPath);
        pInsOL->InsertObject(pPath, nInsPos);
        if( bUndo )
@@ -1413,7 +1413,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly)
            }
        }

        SdrPathObj* pPath = new SdrPathObj(pAttrObj->getSdrModelFromSdrObject(), eKind, aPolyPolygon);
        SdrPathObj* pPath = new SdrPathObj(pAttrObj->getSdrModelFromSdrObject(), eKind, std::move(aPolyPolygon));

        // attributes of the lowest object
        ImpCopyAttributes(pAttrObj, pPath);
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 659fae0..6756e96 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -991,7 +991,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaPolyPolygonAction const & rAct)
        SdrPathObj* pPath = new SdrPathObj(
            *mpModel,
            SdrObjKind::Polygon,
            aSource);
            std::move(aSource));
        SetAttributes(pPath);
        InsertObj(pPath, false);
    }
@@ -1157,7 +1157,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaHatchAction const & rAct )
    SdrPathObj* pPath = new SdrPathObj(
        *mpModel,
        SdrObjKind::Polygon,
        aSource);
        std::move(aSource));
    // #i125211# Use the ranges from the SdrObject to create a new empty SfxItemSet
    SfxItemSet aHatchAttr(mpModel->GetItemPool(), pPath->GetMergedItemSet().GetRanges());
    css::drawing::HatchStyle eStyle;
@@ -1248,7 +1248,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction const & rAct, GDIMetaF
                    SdrPathObj* pPath = new SdrPathObj(
                        *mpModel,
                        SdrObjKind::Polygon,
                        aSource);
                        std::move(aSource));
                    // #i125211# Use the ranges from the SdrObject to create a new empty SfxItemSet
                    SfxItemSet aGradAttr(mpModel->GetItemPool(), pPath->GetMergedItemSet().GetRanges());
                    XGradient aXGradient;
@@ -1481,7 +1481,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaTransparentAction const & rAct)
    SdrPathObj* pPath = new SdrPathObj(
        *mpModel,
        SdrObjKind::Polygon,
        aSource);
        std::move(aSource));
    SetAttributes(pPath);
    pPath->SetMergedItem(XFillTransparenceItem(rAct.GetTransparence()));
    InsertObj(pPath, false);
@@ -1504,7 +1504,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaGradientExAction const & rAct)
    SdrPathObj* pPath = new SdrPathObj(
        *mpModel,
        SdrObjKind::Polygon,
        aSource);
        std::move(aSource));
    // #i125211# Use the ranges from the SdrObject to create a new empty SfxItemSet
    SfxItemSet aGradientAttr(mpModel->GetItemPool(), pPath->GetMergedItemSet().GetRanges());
    const css::awt::GradientStyle aXGradientStyle(getXGradientStyleFromGradientStyle(rGradient.GetStyle()));
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 0688688..d503d68 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -2454,7 +2454,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(bool bForceLineDash)
                aLinePolygonPart = new SdrPathObj(
                    getSdrModelFromSdrObject(),
                    SdrObjKind::PathFill,
                    aMergedLineFillPolyPolygon);
                    std::move(aMergedLineFillPolyPolygon));

                // correct item properties
                aSet.Put(XLineWidthItem(0));
@@ -2477,7 +2477,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(bool bForceLineDash)
                aLineHairlinePart = new SdrPathObj(
                    getSdrModelFromSdrObject(),
                    SdrObjKind::PathLine,
                    aMergedHairlinePolyPolygon);
                    std::move(aMergedHairlinePolyPolygon));

                aSet.Put(XLineWidthItem(0));
                aSet.Put(XFillStyleItem(drawing::FillStyle_NONE));
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index 7da06746..a9b2a6d 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -366,7 +366,7 @@ SdrObjectUniquePtr SdrTextObj::ImpConvertContainedTextToSdrPathObjs(bool bToPoly
                    pPathObj = new SdrPathObj(
                        getSdrModelFromSdrObject(),
                        SdrObjKind::PathLine,
                        aPolyPolygon);
                        std::move(aPolyPolygon));
                }

                // copy basic information from original
@@ -435,7 +435,7 @@ SdrPathObjUniquePtr SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon&
    SdrPathObjUniquePtr pPathObj(new SdrPathObj(
        getSdrModelFromSdrObject(),
        ePathKind,
        aB2DPolyPolygon));
        std::move(aB2DPolyPolygon)));

    if(bBezier)
    {
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 9f9cd2c..13a75fd 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -1023,7 +1023,7 @@ void ImpSdrPdfImport::ImportPath(std::unique_ptr<vcl::pdf::PDFiumPageObject> con

    if (!mbLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(aPolyPoly))
    {
        SdrPathObj* pPath = new SdrPathObj(*mpModel, SdrObjKind::Polygon, aPolyPoly);
        SdrPathObj* pPath = new SdrPathObj(*mpModel, SdrObjKind::Polygon, std::move(aPolyPoly));
        SetAttributes(pPath);
        InsertObj(pPath, false);
    }
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index b85141dd..d5a647d 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -1116,7 +1116,7 @@ std::unique_ptr<XLineStartItem> XLineStartItem::checkForUniqueItem( SdrModel* pM
                // force a closed polygon
                basegfx::B2DPolyPolygon aNew(maPolyPolygon);
                aNew.setClosed(true);
                pTempItem.reset(new XLineStartItem( aUniqueName, aNew ));
                pTempItem.reset(new XLineStartItem( aUniqueName, std::move(aNew) ));
                pLineStartItem = pTempItem.get();
            }
        }
@@ -1355,7 +1355,7 @@ std::unique_ptr<XLineEndItem> XLineEndItem::checkForUniqueItem( SdrModel* pModel
                // force a closed polygon
                basegfx::B2DPolyPolygon aNew(maPolyPolygon);
                aNew.setClosed(true);
                pTempItem.reset(new XLineEndItem( aUniqueName, aNew ));
                pTempItem.reset(new XLineEndItem( aUniqueName, std::move(aNew) ));
                pLineEndItem = pTempItem.get();
            }
        }
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index e6d8105..978b8ee 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -635,7 +635,7 @@ size_t SwSetExpFieldType::GetSeqFieldList(SwSeqFieldList& rList,
            SeqFieldLstElem aNew(
                    pNd->GetExpandText(pLayout),
                    static_cast<SwSetExpField*>(pF->GetField())->GetSeqNumber() );
            rList.InsertSort( aNew );
            rList.InsertSort( std::move(aNew) );
        }
    }
    return rList.Count();
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 86dde18..caf1c0b 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -205,7 +205,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)

                Graphic aGraphic = *pGraphic;

                CompressGraphicsDialog aDialog(GetView().GetFrameWeld(), aGraphic, aSize, aCropRectangle, GetView().GetViewFrame()->GetBindings());
                CompressGraphicsDialog aDialog(GetView().GetFrameWeld(), std::move(aGraphic), aSize, aCropRectangle, GetView().GetViewFrame()->GetBindings());
                if (aDialog.run() == RET_OK)
                {
                    rSh.StartAllAction();
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index d608999..96ff503 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -2063,7 +2063,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
                                                      aActionIndicesSequence );

                     uno::Reference <frame::XController> xController = GetView().GetController();
                     const lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetAppLanguageTag() ) );
                     lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetAppLanguageTag() ) );
                     const OUString& aApplicationName( rSmartTagMgr.GetApplicationName() );
                     const OUString aRangeText = xRange->getString();

@@ -2073,7 +2073,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
                                                  aStringKeyMaps,
                                                  xRange,
                                                  xController,
                                                  aLocale,
                                                  std::move(aLocale),
                                                  aApplicationName,
                                                  aRangeText );

diff --git a/vcl/source/filter/svm/SvmConverter.cxx b/vcl/source/filter/svm/SvmConverter.cxx
index 2e7ed8f..4127d13 100644
--- a/vcl/source/filter/svm/SvmConverter.cxx
+++ b/vcl/source/filter/svm/SvmConverter.cxx
@@ -523,13 +523,13 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )

                if( bFatLine )
                {
                    const tools::Polygon aPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
                    tools::Polygon aPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );

                    rMtf.AddAction( new MetaPushAction( vcl::PushFlags::LINECOLOR ) );
                    rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
                    rMtf.AddAction( new MetaPolygonAction( aPoly ) );
                    rMtf.AddAction( new MetaPopAction() );
                    rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) );
                    rMtf.AddAction( new MetaPolyLineAction( std::move(aPoly), aLineInfo ) );
                }
                else
                    rMtf.AddAction( new MetaEllipseAction( aRect ) );
@@ -550,7 +550,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                    rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
                    rMtf.AddAction( new MetaPolygonAction( aPoly ) );
                    rMtf.AddAction( new MetaPopAction() );
                    rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) );
                    rMtf.AddAction( new MetaPolyLineAction( std::move(aPoly), aLineInfo ) );
                }
                else
                    rMtf.AddAction( new MetaArcAction( aRect, aPt, aPt1 ) );
@@ -571,7 +571,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                    rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
                    rMtf.AddAction( new MetaPolygonAction( aPoly ) );
                    rMtf.AddAction( new MetaPopAction() );
                    rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) );
                    rMtf.AddAction( new MetaPolyLineAction( std::move(aPoly), aLineInfo ) );
                }
                else
                    rMtf.AddAction( new MetaPieAction( aRect, aPt, aPt1 ) );
@@ -809,7 +809,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                    if ( nUnicodeCommentActionNumber == i )
                        ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
                    ClampRange(aStr, nIndex, nLen, &aDXAry);
                    rMtf.AddAction( new MetaTextArrayAction( aPt, aStr, aDXAry, nIndex, nLen ) );
                    rMtf.AddAction( new MetaTextArrayAction( aPt, aStr, std::move(aDXAry), nIndex, nLen ) );
                }

                if (nActionSize < 24)
@@ -985,7 +985,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                if( bIntersect )
                    aRegion.Intersect( aRect );

                rMtf.AddAction( new MetaClipRegionAction( aRegion, bClip ) );
                rMtf.AddAction( new MetaClipRegionAction( std::move(aRegion), bClip ) );
            }
            break;

@@ -1088,7 +1088,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                aGrad.SetOfsY( nOfsY );
                aGrad.SetStartIntensity( nIntensityStart );
                aGrad.SetEndIntensity( nIntensityEnd );
                rMtf.AddAction( new MetaGradientAction( aRect, aGrad ) );
                rMtf.AddAction( new MetaGradientAction( aRect, std::move(aGrad) ) );
            }
            break;

@@ -1101,7 +1101,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                ReadPolyPolygon( rIStm, aPolyPoly );
                rIStm.ReadInt16( nTrans ).ReadInt32( nFollowingActionCount );
                ImplSkipActions( rIStm, nFollowingActionCount );
                rMtf.AddAction( new MetaTransparentAction( aPolyPoly, nTrans ) );
                rMtf.AddAction( new MetaTransparentAction( std::move(aPolyPoly), nTrans ) );

                i = SkipActions(i, nFollowingActionCount, nActions);
            }
@@ -1122,7 +1122,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                aSerializer.readGradient(aGradient);
                rIStm.ReadInt32( nFollowingActionCount );
                ImplSkipActions( rIStm, nFollowingActionCount );
                rMtf.AddAction( new MetaFloatTransparentAction( aMtf, aPos, aSize, aGradient ) );
                rMtf.AddAction( new MetaFloatTransparentAction( aMtf, aPos, aSize, std::move(aGradient) ) );

                i = SkipActions(i, nFollowingActionCount, nActions);
            }
@@ -1138,7 +1138,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                ReadHatch( rIStm, aHatch );
                rIStm.ReadInt32( nFollowingActionCount );
                ImplSkipActions( rIStm, nFollowingActionCount );
                rMtf.AddAction( new MetaHatchAction( aPolyPoly, aHatch ) );
                rMtf.AddAction( new MetaHatchAction( std::move(aPolyPoly), aHatch ) );

                i = SkipActions(i, nFollowingActionCount, nActions);
            }
@@ -1210,7 +1210,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                aSerializer.readGradient(aGradient);
                rIStm.ReadInt32( nFollowingActionCount );
                ImplSkipActions( rIStm, nFollowingActionCount );
                rMtf.AddAction( new MetaGradientExAction( aPolyPoly, aGradient ) );
                rMtf.AddAction( new MetaGradientExAction( std::move(aPolyPoly), std::move(aGradient) ) );

                i = SkipActions(i, nFollowingActionCount, nActions);
            }
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index b4e7db9..67949fc 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -530,7 +530,7 @@ void Gradient::DrawLinearGradientToMetafile(tools::Rectangle const& rRect, GDIMe
    aPoly[3] = aRect.BottomLeft();
    aPoly.Rotate( aCenter, nAngle );

    rMetaFile.AddAction( new MetaPolygonAction( aPoly ) );
    rMetaFile.AddAction( new MetaPolygonAction( std::move(aPoly) ) );

}