diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-13 18:46:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-16 09:16:01 +0200 |
commit | a447b5b6d1114111c92e5e3e3f3ae83d4c2f3bca (patch) | |
tree | 82c276f8d1e5364e5e5bcc0efda0e485411bee3a | |
parent | 578521ed67ff905bcd2e1b56f0fee6a0635b41e7 (diff) |
loplugin:moveit
Change-Id: Ic593974a44d9e327e0385c7ffaaa6d42576ae01a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135911
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
64 files changed, 240 insertions, 206 deletions
diff --git a/compilerplugins/clang/moveit.cxx b/compilerplugins/clang/moveit.cxx index 353359e28405..b9ae723def60 100644 --- a/compilerplugins/clang/moveit.cxx +++ b/compilerplugins/clang/moveit.cxx @@ -43,10 +43,36 @@ public: // false + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/basic/source/classes/sbunoobj.cxx")) return false; + if (loplugin::hasPathnamePrefix( + fn, SRCDIR "/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx")) + return false; + if (loplugin::hasPathnamePrefix( + fn, SRCDIR "/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx")) + return false; + if (loplugin::hasPathnamePrefix( + fn, SRCDIR "/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx")) + return false; + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/drawinglayer/source/tools/emfphelperdata.cxx")) + return false; + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sc/source/ui/view/hintwin.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 "/connectivity/source/drivers/dbase/dindexnode.cxx")) return false; @@ -66,6 +92,10 @@ public: 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 "/writerfilter/source/dmapper/DomainMapperTableHandler.cxx")) return false; diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx index 330156781422..bd2b7a467142 100644 --- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx +++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx @@ -147,7 +147,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) { ORowSetValue aValue; aValue.fill(i,*pType,xRow); - aRow.push_back(new ORowSetValueDecorator(aValue)); + aRow.push_back(new ORowSetValueDecorator(std::move(aValue))); } std::vector<std::shared_ptr<ExpressionNode>>::iterator aIter = aConditions.begin(); diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index 4ac8b1a41722..9e28a20d0682 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -571,9 +571,8 @@ void ODbaseIndex::CreateImpl() nRowsLeft = xSet->getRow(); xSet->beforeFirst(); - ORowSetValue atmpValue; - ONDXKey aKey(atmpValue, nType, 0); - ONDXKey aInsertKey(atmpValue, nType, 0); + ONDXKey aKey(ORowSetValue(), nType, 0); + ONDXKey aInsertKey(ORowSetValue(), nType, 0); // Create the index structure while (xSet->next()) { diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 1356aedb1a2c..78d98764828a 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -1246,7 +1246,7 @@ void SbaTableQueryBrowser::connectExternalDispatches() aURL.Complete = OUString::createFromAscii( pURLs[i] ); if ( m_xUrlTransformer.is() ) m_xUrlTransformer->parseStrict( aURL ); - m_aExternalFeatures[ nIds[ i ] ] = ExternalFeature( aURL ); + m_aExternalFeatures[ nIds[ i ] ] = ExternalFeature( std::move(aURL) ); } } diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx index 56e9464c16ee..45536a53124b 100644 --- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx @@ -88,14 +88,14 @@ namespace drawinglayer::primitive2d { rContainer.push_back( new PolygonStrokePrimitive2D( - aPolygon, + std::move(aPolygon), rLineAttribute)); } else { rContainer.push_back( new PolygonStrokePrimitive2D( - aPolygon, + std::move(aPolygon), rLineAttribute, rStrokeAttribute)); } diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx index a90e7aaf7c0e..8718660f1a40 100644 --- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx @@ -218,11 +218,11 @@ namespace drawinglayer::primitive2d // create a gray placeholder hairline polygon in object size basegfx::B2DRange aObjectRange(0.0, 0.0, 1.0, 1.0); aObjectRange.transform(getTransform()); - const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aObjectRange)); + basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aObjectRange)); const basegfx::BColor aGrayTone(0xc0 / 255.0, 0xc0 / 255.0, 0xc0 / 255.0); // The replacement object may also get a text like 'empty group' here later - Primitive2DReference xRetval(new PolygonHairlinePrimitive2D(aOutline, aGrayTone)); + Primitive2DReference xRetval(new PolygonHairlinePrimitive2D(std::move(aOutline), aGrayTone)); return xRetval; } diff --git a/drawinglayer/source/primitive2d/cropprimitive2d.cxx b/drawinglayer/source/primitive2d/cropprimitive2d.cxx index 964cda1def46..da28d9e41663 100644 --- a/drawinglayer/source/primitive2d/cropprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/cropprimitive2d.cxx @@ -138,7 +138,7 @@ namespace drawinglayer::primitive2d // create maskPrimitive with aMaskPolyPolygon and aMaskContentVector const Primitive2DReference xMask( new MaskPrimitive2D( - aMaskPolyPolygon, + std::move(aMaskPolyPolygon), Primitive2DContainer { xTransformPrimitive })); rVisitor.visit(xMask); diff --git a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx index bed0eb4914c0..96fd4e86dbf4 100644 --- a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx @@ -63,9 +63,9 @@ namespace drawinglayer::primitive2d { // use info to create a yellow 2d rectangle, similar to empty 3d scenes and/or groups const basegfx::B2DRange aLocal2DRange(getB2DRange(rViewInformation)); - const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aLocal2DRange)); + basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aLocal2DRange)); const basegfx::BColor aYellow(1.0, 1.0, 0.0); - rContainer.push_back(new PolygonHairlinePrimitive2D(aOutline, aYellow)); + rContainer.push_back(new PolygonHairlinePrimitive2D(std::move(aOutline), aYellow)); } Embedded3DPrimitive2D::Embedded3DPrimitive2D( diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx index 7100bac03ee8..5ca0b5852642 100644 --- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx @@ -229,7 +229,7 @@ namespace drawinglayer::primitive2d // add last inner polygon with last color rContainer.push_back( new PolyPolygonColorPrimitive2D( - aCombinedPolyPoly, + std::move(aCombinedPolyPoly), rEntries[rEntries.size() - 1].maBColor)); } diff --git a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx index fdb949e6e4df..1e86c907c406 100644 --- a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx @@ -124,7 +124,7 @@ namespace drawinglayer::primitive2d aNewLine.append(rMatrix * aEnd); // create hairline - rContainer.push_back(new PolygonHairlinePrimitive2D(aNewLine, aHatchColor)); + rContainer.push_back(new PolygonHairlinePrimitive2D(std::move(aNewLine), aHatchColor)); } } diff --git a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx index 07d6a7f2236f..56d53d8e73fc 100644 --- a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx @@ -52,7 +52,7 @@ namespace drawinglayer::primitive2d aLineA.append(aStartA); aLineA.append(aEndA); aLineA.transform(rViewInformation.getInverseObjectToViewTransformation()); - rContainer.push_back(new PolygonMarkerPrimitive2D(aLineA, getRGBColA(), getRGBColB(), getDiscreteDashLength())); + rContainer.push_back(new PolygonMarkerPrimitive2D(std::move(aLineA), getRGBColA(), getRGBColB(), getDiscreteDashLength())); const basegfx::B2DVector aPerpendicularNormalizedDirection(basegfx::getPerpendicular(aNormalizedDirection)); const basegfx::B2DPoint aStartB(aViewPosition - aPerpendicularNormalizedDirection); @@ -61,7 +61,7 @@ namespace drawinglayer::primitive2d aLineB.append(aStartB); aLineB.append(aEndB); aLineB.transform(rViewInformation.getInverseObjectToViewTransformation()); - rContainer.push_back(new PolygonMarkerPrimitive2D(aLineB, getRGBColA(), getRGBColB(), getDiscreteDashLength())); + rContainer.push_back(new PolygonMarkerPrimitive2D(std::move(aLineB), getRGBColA(), getRGBColB(), getDiscreteDashLength())); break; } @@ -111,7 +111,7 @@ namespace drawinglayer::primitive2d { basegfx::B2DPolygon aPart(aResult.getB2DPolygon(a)); aPart.transform(rViewInformation.getInverseObjectToViewTransformation()); - rContainer.push_back(new PolygonMarkerPrimitive2D(aPart, getRGBColA(), getRGBColB(), getDiscreteDashLength())); + rContainer.push_back(new PolygonMarkerPrimitive2D(std::move(aPart), getRGBColA(), getRGBColB(), getDiscreteDashLength())); } } diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx index d407556a2143..00ac96405b62 100644 --- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx @@ -104,8 +104,10 @@ void PolygonMarkerPrimitive2D::create2DDecomposition( basegfx::utils::applyLineDashing(getB2DPolygon(), aDash, &aDashedPolyPolyA, &aDashedPolyPolyB, 2.0 * fLogicDashLength); - rContainer.push_back(new PolyPolygonHairlinePrimitive2D(aDashedPolyPolyA, getRGBColorA())); - rContainer.push_back(new PolyPolygonHairlinePrimitive2D(aDashedPolyPolyB, getRGBColorB())); + rContainer.push_back( + new PolyPolygonHairlinePrimitive2D(std::move(aDashedPolyPolyA), getRGBColorA())); + rContainer.push_back( + new PolyPolygonHairlinePrimitive2D(std::move(aDashedPolyPolyB), getRGBColorB())); } else { @@ -257,14 +259,15 @@ void PolygonStrokePrimitive2D::create2DDecomposition( // put into single polyPolygon primitives to make clear that this is NOT meant // to be painted as a single tools::PolyPolygon (XORed as fill rule). Alternatively, a // melting process may be used here one day. - const basegfx::B2DPolyPolygon aNewPolyPolygon(aAreaPolyPolygon.getB2DPolygon(b)); + basegfx::B2DPolyPolygon aNewPolyPolygon(aAreaPolyPolygon.getB2DPolygon(b)); const basegfx::BColor aColor(getLineAttribute().getColor()); - rContainer.push_back(new PolyPolygonColorPrimitive2D(aNewPolyPolygon, aColor)); + rContainer.push_back( + new PolyPolygonColorPrimitive2D(std::move(aNewPolyPolygon), aColor)); } } else { - rContainer.push_back(new PolyPolygonHairlinePrimitive2D(aHairLinePolyPolygon, + rContainer.push_back(new PolyPolygonHairlinePrimitive2D(std::move(aHairLinePolyPolygon), getLineAttribute().getColor())); } } @@ -396,10 +399,10 @@ void PolygonWavePrimitive2D::create2DDecomposition( if (bHasWidth && bHasHeight) { // create waveline curve - const basegfx::B2DPolygon aWaveline( + basegfx::B2DPolygon aWaveline( basegfx::utils::createWaveline(getB2DPolygon(), getWaveWidth(), getWaveHeight())); - rContainer.push_back( - new PolygonStrokePrimitive2D(aWaveline, getLineAttribute(), getStrokeAttribute())); + rContainer.push_back(new PolygonStrokePrimitive2D(std::move(aWaveline), getLineAttribute(), + getStrokeAttribute())); } else { @@ -538,19 +541,19 @@ void PolygonStrokeArrowPrimitive2D::create2DDecomposition( } // add shaft - rContainer.push_back( - new PolygonStrokePrimitive2D(aLocalPolygon, getLineAttribute(), getStrokeAttribute())); + rContainer.push_back(new PolygonStrokePrimitive2D(std::move(aLocalPolygon), getLineAttribute(), + getStrokeAttribute())); if (aArrowA.count()) { rContainer.push_back( - new PolyPolygonColorPrimitive2D(aArrowA, getLineAttribute().getColor())); + new PolyPolygonColorPrimitive2D(std::move(aArrowA), getLineAttribute().getColor())); } if (aArrowB.count()) { rContainer.push_back( - new PolyPolygonColorPrimitive2D(aArrowB, getLineAttribute().getColor())); + new PolyPolygonColorPrimitive2D(std::move(aArrowB), getLineAttribute().getColor())); } } diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx index 2ad2a401aae7..95c43ddbb8bc 100644 --- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx @@ -482,7 +482,7 @@ namespace drawinglayer::primitive2d { basegfx::B2DPolygon aOutline(basegfx::utils::createUnitPolygon()); aOutline.transform(aNew2DTransform); - rContainer.push_back(new PolygonHairlinePrimitive2D(aOutline, basegfx::BColor(1.0, 0.0, 0.0))); + rContainer.push_back(new PolygonHairlinePrimitive2D(std::move(aOutline), basegfx::BColor(1.0, 0.0, 0.0))); } } diff --git a/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx b/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx index 5080a92a8cd6..65770945ebbf 100644 --- a/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx +++ b/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx @@ -84,7 +84,7 @@ namespace drawinglayer::primitive2d if(bFilled) { xReference = new PolyPolygonColorPrimitive2D( - aScaledOutline, + std::move(aScaledOutline), basegfx::BColor(0.0, 0.0, 0.0)); } else @@ -92,7 +92,7 @@ namespace drawinglayer::primitive2d const basegfx::BColor aGrayTone(0xc0 / 255.0, 0xc0 / 255.0, 0xc0 / 255.0); xReference = new PolyPolygonHairlinePrimitive2D( - aScaledOutline, + std::move(aScaledOutline), aGrayTone); } diff --git a/drawinglayer/source/primitive2d/textlineprimitive2d.cxx b/drawinglayer/source/primitive2d/textlineprimitive2d.cxx index 958a95653b7a..2c7978772a27 100644 --- a/drawinglayer/source/primitive2d/textlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textlineprimitive2d.cxx @@ -212,7 +212,7 @@ namespace drawinglayer::primitive2d } else { - aNewPrimitive = Primitive2DReference(new PolygonStrokePrimitive2D(aLine, aLineAttribute, aStrokeAttribute)); + aNewPrimitive = Primitive2DReference(new PolygonStrokePrimitive2D(std::move(aLine), aLineAttribute, std::move(aStrokeAttribute))); } // add primitive diff --git a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx index 20a3c23310d8..f7aedb3c9172 100644 --- a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx @@ -191,7 +191,7 @@ namespace drawinglayer::primitive2d // add primitive const attribute::LineAttribute aLineAttribute(getFontColor(), fStrikeoutHeight, basegfx::B2DLineJoin::NONE); Primitive2DContainer xRetval(1); - xRetval[0] = new PolygonStrokePrimitive2D(aStrikeoutLine, aLineAttribute); + xRetval[0] = new PolygonStrokePrimitive2D(std::move(aStrikeoutLine), aLineAttribute); if(bDoubleLine) { diff --git a/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx b/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx index a2ba512be73f..c09401995dd1 100644 --- a/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx @@ -85,12 +85,12 @@ namespace drawinglayer::primitive2d // I will take the last one here. The small overhead of two primitives will only be // used when UnifiedTransparencePrimitive2D is not handled directly. const basegfx::B2DRange aPolygonRange(getChildren().getB2DRange(rViewInformation)); - const basegfx::B2DPolygon aPolygon(basegfx::utils::createPolygonFromRect(aPolygonRange)); + basegfx::B2DPolygon aPolygon(basegfx::utils::createPolygonFromRect(aPolygonRange)); const basegfx::BColor aGray(getTransparence(), getTransparence(), getTransparence()); Primitive2DContainer aTransparenceContent(2); aTransparenceContent[0] = Primitive2DReference(new PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPolygon), aGray)); - aTransparenceContent[1] = Primitive2DReference(new PolygonHairlinePrimitive2D(aPolygon, aGray)); + aTransparenceContent[1] = Primitive2DReference(new PolygonHairlinePrimitive2D(std::move(aPolygon), aGray)); // create sub-transparence group with a gray-colored rectangular fill polygon rVisitor.visit(new TransparencePrimitive2D(Primitive2DContainer(getChildren()), std::move(aTransparenceContent))); diff --git a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx index 6e7e134f2fa2..4bc7211ae45c 100644 --- a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx @@ -201,11 +201,11 @@ namespace drawinglayer::primitive2d if(bNeedsClipping) { // embed to clipping; this is necessary for tiled fills - const basegfx::B2DPolyPolygon aPolyPolygon( + basegfx::B2DPolyPolygon aPolyPolygon( basegfx::utils::createPolygonFromRect(getLocalObjectRange())); const drawinglayer::primitive2d::Primitive2DReference xClippedFill( new drawinglayer::primitive2d::MaskPrimitive2D( - aPolyPolygon, + std::move(aPolyPolygon), { aRetval })); aRetval = xClippedFill; } diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx index d8d3cc9c8b3e..2ff7462b7a9f 100644 --- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx @@ -92,9 +92,8 @@ namespace drawinglayer::primitive3d aNewPolygon.setClosed(true); - const basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon); - const Primitive3DReference xRef(new PolyPolygonMaterialPrimitive3D(aNewPolyPolygon, m_aLineMaterial, false)); - m_aLineTubeList[a] = xRef; + basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon); + m_aLineTubeList[a] = new PolyPolygonMaterialPrimitive3D(std::move(aNewPolyPolygon), m_aLineMaterial, false); aLastLeft = aNextLeft; aLastRight = aNextRight; @@ -167,9 +166,8 @@ namespace drawinglayer::primitive3d aNewPolygon.setClosed(true); - const basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon); - const Primitive3DReference xRef(new PolyPolygonMaterialPrimitive3D(aNewPolyPolygon, m_aLineMaterial, false)); - m_aLineCapList[a] = xRef; + basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon); + m_aLineCapList[a] = new PolyPolygonMaterialPrimitive3D(std::move(aNewPolyPolygon), m_aLineMaterial, false); aLast = aNext; } @@ -254,12 +252,12 @@ namespace drawinglayer::primitive3d for (sal_uInt32 a = 0; a < nCount; ++a) { const basegfx::B3DPolygon& aPartPolygon(aSphere.getB3DPolygon(a)); - const basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon); + basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon); // need to create one primitive per Polygon since the primitive // is for planar PolyPolygons which is definitely not the case here m_aLineCapRoundList[a] = new PolyPolygonMaterialPrimitive3D( - aPartPolyPolygon, + std::move(aPartPolyPolygon), rMaterial, false); } @@ -306,8 +304,8 @@ namespace drawinglayer::primitive3d for(sal_uInt32 a(0); a < aSphere.count(); a++) { const basegfx::B3DPolygon& aPartPolygon(aSphere.getB3DPolygon(a)); - const basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon); - aResultVector.push_back(new PolyPolygonMaterialPrimitive3D(aPartPolyPolygon, rMaterial, false)); + basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon); + aResultVector.push_back(new PolyPolygonMaterialPrimitive3D(std::move(aPartPolyPolygon), rMaterial, false)); } } else @@ -453,8 +451,8 @@ namespace drawinglayer::primitive3d // create primitive if(aNewPolygon.count()) { - const basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon); - aResultVector.push_back(new PolyPolygonMaterialPrimitive3D(aNewPolyPolygon, rMaterial, false)); + basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon); + aResultVector.push_back(new PolyPolygonMaterialPrimitive3D(std::move(aNewPolyPolygon), rMaterial, false)); } if(bMiter && aMiterPolygon.count()) @@ -466,8 +464,8 @@ namespace drawinglayer::primitive3d } // create primitive - const basegfx::B3DPolyPolygon aMiterPolyPolygon(aMiterPolygon); - aResultVector.push_back(new PolyPolygonMaterialPrimitive3D(aMiterPolyPolygon, rMaterial, false)); + basegfx::B3DPolyPolygon aMiterPolyPolygon(aMiterPolygon); + aResultVector.push_back(new PolyPolygonMaterialPrimitive3D(std::move(aMiterPolyPolygon), rMaterial, false)); } // prepare next step @@ -601,7 +599,7 @@ using namespace com::sun::star; aSequence = getLineCapSegments(nSegments, aMaterial); } - aResultVector.push_back(new TransformPrimitive3D(aCapTrans, aSequence)); + aResultVector.push_back(new TransformPrimitive3D(std::move(aCapTrans), aSequence)); } else { @@ -638,7 +636,7 @@ using namespace com::sun::star; // line start edge, build transformed primitiveVector3D aResultVector.push_back( new TransformPrimitive3D( - aSphereTrans, + std::move(aSphereTrans), aNewList)); } } @@ -646,7 +644,7 @@ using namespace com::sun::star; // create line segments, build transformed primitiveVector3D aResultVector.push_back( new TransformPrimitive3D( - aTubeTrans, + std::move(aTubeTrans), getLineTubeSegments(nSegments, aMaterial))); if(bNoLineJoin || (!bClosed && bLast)) @@ -689,7 +687,7 @@ using namespace com::sun::star; aResultVector.push_back( new TransformPrimitive3D( - aBackCapTrans, + std::move(aBackCapTrans), aSequence)); } } diff --git a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx index ec6bfaf3c8a4..7690dd300f6e 100644 --- a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx +++ b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx @@ -144,8 +144,7 @@ namespace drawinglayer::primitive3d for(sal_uInt32 a(0); a < aScaledPolyPolygon.count(); a++) { - const Primitive3DReference xRef(new PolygonStrokePrimitive3D(aScaledPolyPolygon.getB3DPolygon(a), aLineAttribute, aStrokeAttribute)); - aRetval[a] = xRef; + aRetval[a] = new PolygonStrokePrimitive3D(aScaledPolyPolygon.getB3DPolygon(a), aLineAttribute, aStrokeAttribute); } if(0.0 != rLine.getTransparence()) @@ -185,7 +184,7 @@ namespace drawinglayer::primitive3d } const Primitive3DReference xRef(new PolyPolygonMaterialPrimitive3D( - aScaledPolyPolygon, + std::move(aScaledPolyPolygon), aSdr3DObjectAttribute.getMaterial(), aSdr3DObjectAttribute.getDoubleSided())); aRetval[a] = xRef; diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index de95df83dc8d..ed33bafdaa6a 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1501,9 +1501,11 @@ void VclMetafileProcessor2D::processPolygonHairlinePrimitive2D( basegfx::B2DPolygon aLeft, aRight; splitLinePolygon(rBasePolygon, aLeft, aRight); rtl::Reference<primitive2d::PolygonHairlinePrimitive2D> xPLeft( - new primitive2d::PolygonHairlinePrimitive2D(aLeft, rHairlinePrimitive.getBColor())); + new primitive2d::PolygonHairlinePrimitive2D(std::move(aLeft), + rHairlinePrimitive.getBColor())); rtl::Reference<primitive2d::PolygonHairlinePrimitive2D> xPRight( - new primitive2d::PolygonHairlinePrimitive2D(aRight, rHairlinePrimitive.getBColor())); + new primitive2d::PolygonHairlinePrimitive2D(std::move(aRight), + rHairlinePrimitive.getBColor())); processBasePrimitive2D(*xPLeft); processBasePrimitive2D(*xPRight); @@ -1551,10 +1553,12 @@ void VclMetafileProcessor2D::processPolygonStrokePrimitive2D( basegfx::B2DPolygon aLeft, aRight; splitLinePolygon(rBasePolygon, aLeft, aRight); rtl::Reference<primitive2d::PolygonStrokePrimitive2D> xPLeft( - new primitive2d::PolygonStrokePrimitive2D(aLeft, rStrokePrimitive.getLineAttribute(), + new primitive2d::PolygonStrokePrimitive2D(std::move(aLeft), + rStrokePrimitive.getLineAttribute(), rStrokePrimitive.getStrokeAttribute())); rtl::Reference<primitive2d::PolygonStrokePrimitive2D> xPRight( - new primitive2d::PolygonStrokePrimitive2D(aRight, rStrokePrimitive.getLineAttribute(), + new primitive2d::PolygonStrokePrimitive2D(std::move(aRight), + rStrokePrimitive.getLineAttribute(), rStrokePrimitive.getStrokeAttribute())); processBasePrimitive2D(*xPLeft); diff --git a/drawinglayer/source/processor3d/geometry2dextractor.cxx b/drawinglayer/source/processor3d/geometry2dextractor.cxx index 66c2b3be8aa0..6959df6405e6 100644 --- a/drawinglayer/source/processor3d/geometry2dextractor.cxx +++ b/drawinglayer/source/processor3d/geometry2dextractor.cxx @@ -90,7 +90,7 @@ namespace drawinglayer::processor3d { a2DHairline.transform(getObjectTransformation()); const basegfx::BColor aModifiedColor(maBColorModifierStack.getModifiedColor(rPrimitive.getBColor())); - const primitive2d::Primitive2DReference xRef(new primitive2d::PolygonHairlinePrimitive2D(a2DHairline, aModifiedColor)); + const primitive2d::Primitive2DReference xRef(new primitive2d::PolygonHairlinePrimitive2D(std::move(a2DHairline), aModifiedColor)); maPrimitive2DSequence.push_back(xRef); } break; @@ -105,7 +105,7 @@ namespace drawinglayer::processor3d { a2DFill.transform(getObjectTransformation()); const basegfx::BColor aModifiedColor(maBColorModifierStack.getModifiedColor(rPrimitive.getMaterial().getColor())); - const primitive2d::Primitive2DReference xRef(new primitive2d::PolyPolygonColorPrimitive2D(a2DFill, aModifiedColor)); + const primitive2d::Primitive2DReference xRef(new primitive2d::PolyPolygonColorPrimitive2D(std::move(a2DFill), aModifiedColor)); maPrimitive2DSequence.push_back(xRef); } break; diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx index 7157e7f2955b..950613f9f917 100644 --- a/drawinglayer/source/processor3d/shadow3dextractor.cxx +++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx @@ -155,7 +155,7 @@ namespace drawinglayer::processor3d a2DHairline.transform(getObjectTransformation()); mpPrimitive2DSequence->push_back( new primitive2d::PolygonHairlinePrimitive2D( - a2DHairline, + std::move(a2DHairline), basegfx::BColor())); } } @@ -186,7 +186,7 @@ namespace drawinglayer::processor3d a2DFill.transform(getObjectTransformation()); mpPrimitive2DSequence->push_back( new primitive2d::PolyPolygonColorPrimitive2D( - a2DFill, + std::move(a2DFill), basegfx::BColor())); } } diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx index 94a50fc05cea..9e0c78c4551b 100644 --- a/drawinglayer/source/tools/emfphelperdata.cxx +++ b/drawinglayer/source/tools/emfphelperdata.cxx @@ -677,14 +677,14 @@ namespace emfplushelper { mrTargetHolders.Current().append( new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( - startCapPolygon, + std::move(startCapPolygon), pen->GetColor().getBColor())); } else { mrTargetHolders.Current().append( new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D( - startCapPolygon, + std::move(startCapPolygon), lineAttribute, pen->GetStrokeAttribute(mdExtractedXScale))); } @@ -722,14 +722,14 @@ namespace emfplushelper { mrTargetHolders.Current().append( new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( - endCapPolygon, + std::move(endCapPolygon), pen->GetColor().getBColor())); } else { mrTargetHolders.Current().append( new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D( - endCapPolygon, + std::move(endCapPolygon), lineAttribute, pen->GetStrokeAttribute(mdExtractedXScale))); } diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx index 8a5dbab74e12..f763cd887ff7 100644 --- a/drawinglayer/source/tools/wmfemfhelper.cxx +++ b/drawinglayer/source/tools/wmfemfhelper.cxx @@ -470,7 +470,7 @@ namespace wmfemfhelper aLinePolygon.transform(rProperties.getTransformation()); rTarget.append( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( - aLinePolygon, + std::move(aLinePolygon), rProperties.getLineColor())); } } @@ -487,7 +487,7 @@ namespace wmfemfhelper aFillPolyPolygon.transform(rProperties.getTransformation()); rTarget.append( new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( - aFillPolyPolygon, + std::move(aFillPolyPolygon), rProperties.getFillColor())); } } @@ -509,7 +509,7 @@ namespace wmfemfhelper { basegfx::B2DPolygon aLinePolygon(rLinePolygon); aLinePolygon.transform(rProperties.getTransformation()); - const drawinglayer::attribute::LineAttribute aLineAttribute( + drawinglayer::attribute::LineAttribute aLineAttribute( rProperties.getLineColor(), bWidthUsed ? rLineInfo.GetWidth() : 0.0, rLineInfo.GetLineJoin(), @@ -519,21 +519,21 @@ namespace wmfemfhelper { std::vector< double > fDotDashArray = rLineInfo.GetDotDashArray(); const double fAccumulated(std::accumulate(fDotDashArray.begin(), fDotDashArray.end(), 0.0)); - const drawinglayer::attribute::StrokeAttribute aStrokeAttribute( + drawinglayer::attribute::StrokeAttribute aStrokeAttribute( std::move(fDotDashArray), fAccumulated); rTarget.append( new drawinglayer::primitive2d::PolygonStrokePrimitive2D( - aLinePolygon, - aLineAttribute, - aStrokeAttribute)); + std::move(aLinePolygon), + std::move(aLineAttribute), + std::move(aStrokeAttribute))); } else { rTarget.append( new drawinglayer::primitive2d::PolygonStrokePrimitive2D( - aLinePolygon, + std::move(aLinePolygon), aLineAttribute)); } } @@ -917,7 +917,7 @@ namespace wmfemfhelper const Gradient& rGradient, PropertyHolder const & rPropertyHolder) { - const drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); + drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); if(aAttribute.getStartColor() == aAttribute.getEndColor()) { @@ -930,7 +930,7 @@ namespace wmfemfhelper rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> pRetval( new drawinglayer::primitive2d::FillGradientPrimitive2D( rRange, - aAttribute)); + std::move(aAttribute))); if(!rPropertyHolder.getTransformation().isIdentity()) { @@ -1102,7 +1102,7 @@ namespace wmfemfhelper // prepare FontColor and Locale const basegfx::BColor aFontColor(rProperty.getTextColor()); const Color aFillColor(rFont.GetFillColor()); - const css::lang::Locale aLocale(LanguageTag(rProperty.getLanguageType()).getLocale()); + css::lang::Locale aLocale(LanguageTag(rProperty.getLanguageType()).getLocale()); const bool bWordLineMode(rFont.IsWordLineMode()); const bool bDecoratedIsNeeded( @@ -1189,8 +1189,8 @@ namespace wmfemfhelper nTextStart, nTextLength, std::vector(rDXArray), - aFontAttribute, - aLocale, + std::move(aFontAttribute), + std::move(aLocale), aFontColor); } } @@ -1346,7 +1346,7 @@ namespace wmfemfhelper // strikeout with character const sal_Unicode aStrikeoutChar( drawinglayer::primitive2d::TEXT_STRIKEOUT_SLASH == aTextStrikeout ? '/' : 'X'); - const css::lang::Locale aLocale(LanguageTag( + css::lang::Locale aLocale(LanguageTag( rProperty.getLanguageType()).getLocale()); aTargets.push_back( @@ -1355,8 +1355,8 @@ namespace wmfemfhelper fLineWidth, rProperty.getTextColor(), aStrikeoutChar, - aFontAttribute, - aLocale)); + std::move(aFontAttribute), + std::move(aLocale))); } else { @@ -2079,7 +2079,7 @@ namespace wmfemfhelper if(!aRange.isEmpty()) { const Gradient& rGradient = pA->GetGradient(); - const drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); + drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); basegfx::B2DPolyPolygon aOutline(basegfx::utils::createPolygonFromRect(aRange)); if(aAttribute.getStartColor() == aAttribute.getEndColor()) @@ -2111,7 +2111,7 @@ namespace wmfemfhelper xGradient[0] = drawinglayer::primitive2d::Primitive2DReference( new drawinglayer::primitive2d::FillGradientPrimitive2D( aRange, - aAttribute)); + std::move(aAttribute))); } // #i112300# clip against polygon representing the rectangle from @@ -2120,7 +2120,7 @@ namespace wmfemfhelper aOutline.transform(rPropertyHolders.Current().getTransformation()); rTargetHolders.Current().append( new drawinglayer::primitive2d::MaskPrimitive2D( - aOutline, + std::move(aOutline), std::move(xGradient))); } } @@ -2137,7 +2137,7 @@ namespace wmfemfhelper if(aOutline.count()) { const Hatch& rHatch = pA->GetHatch(); - const drawinglayer::attribute::FillHatchAttribute aAttribute(createFillHatchAttribute(rHatch)); + drawinglayer::attribute::FillHatchAttribute aAttribute(createFillHatchAttribute(rHatch)); aOutline.transform(rPropertyHolders.Current().getTransformation()); @@ -2146,11 +2146,11 @@ namespace wmfemfhelper new drawinglayer::primitive2d::FillHatchPrimitive2D( aObjectRange, basegfx::BColor(), - aAttribute)); + std::move(aAttribute))); rTargetHolders.Current().append( new drawinglayer::primitive2d::MaskPrimitive2D( - aOutline, + std::move(aOutline), drawinglayer::primitive2d::Primitive2DContainer { aFillHatch })); } @@ -2790,7 +2790,7 @@ namespace wmfemfhelper // check if gradient is a real gradient const Gradient& rGradient = pA->GetGradient(); - const drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); + drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); if(aAttribute.getStartColor() == aAttribute.getEndColor()) { @@ -2810,7 +2810,7 @@ namespace wmfemfhelper const drawinglayer::primitive2d::Primitive2DReference xTransparence( new drawinglayer::primitive2d::FillGradientPrimitive2D( aRange, - aAttribute)); + std::move(aAttribute))); // create transparence primitive rTargetHolders.Current().append( @@ -2910,14 +2910,14 @@ namespace wmfemfhelper // get and check if gradient is a real gradient const Gradient& rGradient = pMetaGradientExAction->GetGradient(); - const drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); + drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); if(aAttribute.getStartColor() == aAttribute.getEndColor()) { // not really a gradient rTargetHolders.Current().append( new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( - aPolyPolygon, + std::move(aPolyPolygon), aAttribute.getStartColor())); } else @@ -2926,7 +2926,7 @@ namespace wmfemfhelper rTargetHolders.Current().append( new drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D( aPolyPolygon, - aAttribute)); + std::move(aAttribute))); } } } diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx index 09f32f020018..6fc34a0013b9 100644 --- a/sc/source/ui/view/hintwin.cxx +++ b/sc/source/ui/view/hintwin.cxx @@ -82,7 +82,7 @@ drawinglayer::primitive2d::Primitive2DContainer ScOverlayHint::createOverlaySequ rtl::Reference<drawinglayer::primitive2d::TextSimplePortionPrimitive2D> pTitle = new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( aTextMatrix, m_aTitle, 0, m_aTitle.getLength(), - std::vector<double>(), aFontAttr, css::lang::Locale(), + std::vector<double>(), std::move(aFontAttr), css::lang::Locale(), rColor.getBColor()); Point aTextStart(nLeft + aHintMargin.Width() + aIndent.Width(), @@ -150,7 +150,7 @@ drawinglayer::primitive2d::Primitive2DContainer ScOverlayHint::createOverlaySequ basegfx::BColor aBorderColor(0.5, 0.5, 0.5); const drawinglayer::primitive2d::Primitive2DReference aBorder( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( - aPoly, aBorderColor)); + std::move(aPoly), aBorderColor)); aSeq.insert(aSeq.begin(), aBorder); aSeq.insert(aSeq.begin(), aBg); diff --git a/sc/source/ui/view/overlayobject.cxx b/sc/source/ui/view/overlayobject.cxx index 67a77884fb88..2be20070e4a0 100644 --- a/sc/source/ui/view/overlayobject.cxx +++ b/sc/source/ui/view/overlayobject.cxx @@ -77,7 +77,7 @@ drawinglayer::primitive2d::Primitive2DContainer ScOverlayDashedBorder::createOve B2DPolyPolygon aPolygon(aPoly); const drawinglayer::primitive2d::Primitive2DReference aReference( new drawinglayer::primitive2d::PolyPolygonMarkerPrimitive2D( - aPolygon, aColorA, aColorB, pMgr->getStripeLengthPixel())); + std::move(aPolygon), aColorA, aColorB, pMgr->getStripeLengthPixel())); return drawinglayer::primitive2d::Primitive2DContainer { aReference }; } diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index e6173fdb9a09..9ab22b73bf5b 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -276,13 +276,13 @@ void ViewRedirector::createRedirectedPrimitive2DSequence( const double fFullDotDashLen(::std::accumulate(aDotDashArray.begin(), aDotDashArray.end(), 0.0)); const drawinglayer::attribute::LineAttribute aLine(aRGBColor); - const drawinglayer::attribute::StrokeAttribute aStroke(std::move(aDotDashArray), fFullDotDashLen); + drawinglayer::attribute::StrokeAttribute aStroke(std::move(aDotDashArray), fFullDotDashLen); // create primitive and add const drawinglayer::primitive2d::Primitive2DReference xRef(new drawinglayer::primitive2d::PolygonStrokePrimitive2D( - aPolygon, + std::move(aPolygon), aLine, - aStroke)); + std::move(aStroke))); rVisitor.visit(xRef); } @@ -398,7 +398,7 @@ void ViewRedirector::createRedirectedPrimitive2DSequence( aVclFont.SetFontHeight( 500 ); - const drawinglayer::attribute::FontAttribute aFontAttribute( + drawinglayer::attribute::FontAttribute aFontAttribute( drawinglayer::primitive2d::getFontAttributeFromVclFont( aTextSizeAttribute, aVclFont, @@ -416,7 +416,7 @@ void ViewRedirector::createRedirectedPrimitive2DSequence( ::std::vector< double > aDXArray{}; // create locale; this may need some more information in the future - const css::lang::Locale aLocale; + css::lang::Locale aLocale; // create primitive and add const drawinglayer::primitive2d::Primitive2DReference xRef( @@ -426,8 +426,8 @@ void ViewRedirector::createRedirectedPrimitive2DSequence( 0, nTextLength, std::move(aDXArray), - aFontAttribute, - aLocale, + std::move(aFontAttribute), + std::move(aLocale), aRGBColor)); rVisitor.visit(xRef); } diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index 5562acc1e709..158c27f29b79 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -294,7 +294,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai drawinglayer::attribute::LineAttribute aLineAttribute(Color(aTextColor).getBColor(), fMnemonicHeight); rSeq[nPrimitives++] = drawinglayer::primitive2d::Primitive2DReference( - new PolygonStrokePrimitive2D(aLine, aLineAttribute)); + new PolygonStrokePrimitive2D(std::move(aLine), aLineAttribute)); } nLineStart += nLineLength; diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index eade717ea474..79e33a9317b6 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -138,7 +138,8 @@ void SfxInfoBarWindow::SetCloseButtonImage() aLine2.append(B2DPoint(aRect.Left(), aRect.Bottom())); aCross.append(aLine2); - aSeq[1] = new PolyPolygonStrokePrimitive2D(aCross, aLineAttribute, StrokeAttribute()); + aSeq[1] + = new PolyPolygonStrokePrimitive2D(std::move(aCross), aLineAttribute, StrokeAttribute()); pProcessor->process(aSeq); diff --git a/svgio/source/svgreader/svgclippathnode.cxx b/svgio/source/svgreader/svgclippathnode.cxx index 31ac632d33dc..826175c0865b 100644 --- a/svgio/source/svgreader/svgclippathnode.cxx +++ b/svgio/source/svgreader/svgclippathnode.cxx @@ -233,7 +233,7 @@ namespace svgio::svgreader // and strokeWidth and forced to black drawinglayer::primitive2d::Primitive2DReference xEmbedTransparence( new drawinglayer::primitive2d::MaskPrimitive2D( - aClipPolyPolygon, + std::move(aClipPolyPolygon), std::move(rContent))); rContent = drawinglayer::primitive2d::Primitive2DContainer { xEmbedTransparence }; diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 21ef7cebf5cf..a2ed97a940ed 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -735,12 +735,12 @@ namespace svgio::svgreader } else { - const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(std::move(aDashArray)); + drawinglayer::attribute::StrokeAttribute aStrokeAttribute(std::move(aDashArray)); aNewLinePrimitive = new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D( rPath, aLineAttribute, - aStrokeAttribute); + std::move(aStrokeAttribute)); } } @@ -1067,7 +1067,7 @@ namespace svgio::svgreader aClipPolygon.transform(aCombinedTransform); xMarker = new drawinglayer::primitive2d::MaskPrimitive2D( - aClipPolygon, + std::move(aClipPolygon), drawinglayer::primitive2d::Primitive2DContainer { xMarker }); } diff --git a/svx/source/diagram/IDiagramHelper.cxx b/svx/source/diagram/IDiagramHelper.cxx index 1803a3d2beed..c090c88e7dec 100644 --- a/svx/source/diagram/IDiagramHelper.cxx +++ b/svx/source/diagram/IDiagramHelper.cxx @@ -256,13 +256,13 @@ void OverlayDiagramPrimitive::create2DDecomposition( rContainer.push_back( new drawinglayer::primitive2d::PolygonStrokePrimitive2D( - aPolygonLapUp, + std::move(aPolygonLapUp), aLineAttribute, aStrokeAttribute)); rContainer.push_back( new drawinglayer::primitive2d::PolygonStrokePrimitive2D( - aPolygonLapDown, + std::move(aPolygonLapDown), aLineAttribute, aStrokeAttribute)); @@ -272,7 +272,7 @@ void OverlayDiagramPrimitive::create2DDecomposition( { rContainer.push_back( new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( - aTextAsPolyPolygon, + std::move(aTextAsPolyPolygon), aLineColor.getBColor())); } } diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx index bd79bc5ed4ac..2a5d73e509c3 100644 --- a/svx/source/sdr/contact/viewcontact.cxx +++ b/svx/source/sdr/contact/viewcontact.cxx @@ -217,11 +217,11 @@ void ViewContact::createViewIndependentPrimitive2DSequence( // hairline polygon with a default size of (1000, 1000, 5000, 3000) OSL_FAIL("ViewContact::createViewIndependentPrimitive2DSequence(): Never call the fallback " "base implementation, this is always an error (!)"); - const basegfx::B2DPolygon aOutline( + basegfx::B2DPolygon aOutline( basegfx::utils::createPolygonFromRect(basegfx::B2DRange(1000.0, 1000.0, 5000.0, 3000.0))); const basegfx::BColor aYellow(1.0, 1.0, 0.0); const drawinglayer::primitive2d::Primitive2DReference xReference( - new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow)); + new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(std::move(aOutline), aYellow)); rVisitor.visit(xReference); } diff --git a/svx/source/sdr/contact/viewcontactofe3d.cxx b/svx/source/sdr/contact/viewcontactofe3d.cxx index a504038cece0..876619215797 100644 --- a/svx/source/sdr/contact/viewcontactofe3d.cxx +++ b/svx/source/sdr/contact/viewcontactofe3d.cxx @@ -113,7 +113,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfE3d::impCreateWithG new drawinglayer::primitive2d::Embedded3DPrimitive2D( rxContent3D, pVCOfE3DScene->getObjectTransformation(), - aViewInformation3D, + std::move(aViewInformation3D), aLightNormal, fShadowSlant, rAllContentRange)); diff --git a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx index 71100ae34d0b..146a06305d64 100644 --- a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx @@ -45,7 +45,7 @@ namespace sdr::contact drawinglayer::primitive2d::createNewSdrLineFillShadowAttribute(rItemSet, false)); // get extrude geometry - const basegfx::B2DPolyPolygon aPolyPolygon(GetE3dExtrudeObj().GetExtrudePolygon()); + basegfx::B2DPolyPolygon aPolyPolygon(GetE3dExtrudeObj().GetExtrudePolygon()); // get 3D Object Attributes drawinglayer::attribute::Sdr3DObjectAttribute aSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet)); @@ -71,7 +71,7 @@ namespace sdr::contact const drawinglayer::primitive3d::Primitive3DReference xReference( new drawinglayer::primitive3d::SdrExtrudePrimitive3D( aWorldTransform, aTextureSize, aAttribute, aSdr3DObjectAttribute, - aPolyPolygon, fDepth, fDiagonal, fBackScale, bSmoothNormals, bSmoothLids, + std::move(aPolyPolygon), fDepth, fDiagonal, fBackScale, bSmoothNormals, bSmoothLids, bCharacterMode, bCloseFront, bCloseBack)); xRetval = { xReference }; diff --git a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx index a3e7086b83d4..a7e73acc58e7 100644 --- a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx @@ -45,7 +45,7 @@ namespace sdr::contact drawinglayer::primitive2d::createNewSdrLineFillShadowAttribute(rItemSet, false)); // get extrude geometry - const basegfx::B2DPolyPolygon aPolyPolygon(GetE3dLatheObj().GetPolyPoly2D()); + basegfx::B2DPolyPolygon aPolyPolygon(GetE3dLatheObj().GetPolyPoly2D()); // get 3D Object Attributes drawinglayer::attribute::Sdr3DObjectAttribute aSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet)); @@ -83,7 +83,7 @@ namespace sdr::contact const drawinglayer::primitive3d::Primitive3DReference xReference( new drawinglayer::primitive3d::SdrLathePrimitive3D( aWorldTransform, aTextureSize, aAttribute, aSdr3DObjectAttribute, - aPolyPolygon, nHorizontalSegments, nVerticalSegments, + std::move(aPolyPolygon), nHorizontalSegments, nVerticalSegments, fDiagonal, fBackScale, fRotation, bSmoothNormals, bSmoothLids, bCharacterMode, bCloseFront, bCloseBack)); xRetval = { xReference }; diff --git a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx index 2951ead56064..f0e2e02d5432 100644 --- a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx @@ -158,7 +158,7 @@ namespace sdr::contact const basegfx::B3DHomMatrix aWorldTransform; const drawinglayer::primitive3d::Primitive3DReference xReference( new drawinglayer::primitive3d::SdrPolyPolygonPrimitive3D( - aPolyPolygon3D, aWorldTransform, aTextureSize, aAttribute, aSdr3DObjectAttribute)); + std::move(aPolyPolygon3D), aWorldTransform, aTextureSize, aAttribute, aSdr3DObjectAttribute)); xRetval = { xReference }; return xRetval; diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index 6428e5a66520..f8cca833880a 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -162,7 +162,7 @@ namespace sdr::contact xRetval.push_back( drawinglayer::primitive2d::Primitive2DReference( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( - aOutline, + std::move(aOutline), aBColor))); } diff --git a/svx/source/sdr/contact/viewcontactofpageobj.cxx b/svx/source/sdr/contact/viewcontactofpageobj.cxx index ffcc18fbc293..3736faefa2bc 100644 --- a/svx/source/sdr/contact/viewcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewcontactofpageobj.cxx @@ -67,10 +67,10 @@ void ViewContactOfPageObj::createViewIndependentPrimitive2DSequence( // which is aOutRect for SdrPageObj. const tools::Rectangle aModelRectangle(GetPageObj().GetLastBoundRect()); const basegfx::B2DRange aModelRange = vcl::unotools::b2DRectangleFromRectangle(aModelRectangle); - const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aModelRange)); + basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aModelRange)); const basegfx::BColor aYellow(1.0, 1.0, 0.0); const drawinglayer::primitive2d::Primitive2DReference xReference( - new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow)); + new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(std::move(aOutline), aYellow)); rVisitor.visit(xReference); } diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx index 44cccb3199a2..0f04045815b5 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx @@ -300,13 +300,13 @@ void ViewContactOfOuterPageBorder::createViewIndependentPrimitive2DSequence(draw aRight.append(basegfx::B2DPoint(aPageBorderRange.getMaxX(), aPageBorderRange.getMinY())); aRight.append(basegfx::B2DPoint(aPageBorderRange.getMaxX(), aPageBorderRange.getMaxY())); - rVisitor.visit(drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aLeft, aRGBBorderColor))); - rVisitor.visit(drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aRight, aRGBBorderColor))); + rVisitor.visit(drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(std::move(aLeft), aRGBBorderColor))); + rVisitor.visit(drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(std::move(aRight), aRGBBorderColor))); } else { - const basegfx::B2DPolygon aPageBorderPolygon(basegfx::utils::createPolygonFromRect(aPageBorderRange)); - rVisitor.visit(drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPageBorderPolygon, aRGBBorderColor))); + basegfx::B2DPolygon aPageBorderPolygon(basegfx::utils::createPolygonFromRect(aPageBorderRange)); + rVisitor.visit(drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(std::move(aPageBorderPolygon), aRGBBorderColor))); } } @@ -333,7 +333,7 @@ void ViewContactOfInnerPageBorder::createViewIndependentPrimitive2DSequence(draw const basegfx::B2DRange aPageBorderRange( static_cast<double>(rPage.GetLeftBorder()), static_cast<double>(rPage.GetUpperBorder()), static_cast<double>(rPage.GetWidth() - rPage.GetRightBorder()), static_cast<double>(rPage.GetHeight() - rPage.GetLowerBorder())); - const basegfx::B2DPolygon aPageBorderPolygon(basegfx::utils::createPolygonFromRect(aPageBorderRange)); + basegfx::B2DPolygon aPageBorderPolygon(basegfx::utils::createPolygonFromRect(aPageBorderRange)); // We have only the page information, not the view information. Use the // svtools::FONTCOLOR or svtools::DOCBOUNDARIES color for initialisation @@ -353,7 +353,7 @@ void ViewContactOfInnerPageBorder::createViewIndependentPrimitive2DSequence(draw // create page outer border primitive const basegfx::BColor aRGBBorderColor(aBorderColor.getBColor()); - rVisitor.visit(drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPageBorderPolygon, aRGBBorderColor))); + rVisitor.visit(drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(std::move(aPageBorderPolygon), aRGBBorderColor))); } ViewContactOfInnerPageBorder::ViewContactOfInnerPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage) diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index e3431da91d9b..d838a13c6eca 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -224,7 +224,7 @@ void ViewObjectContactOfPageObj::createPrimitive2DSequence(const DisplayInfo& /* svtools::ColorConfigValue aBorderConfig = aColorConfig.GetColorValue(svtools::DOCBOUNDARIES); const Color aBorderColor = aBorderConfig.bIsVisible ? aBorderConfig.nColor : aDocColor; const basegfx::B2DRange aPageBound(0.0, 0.0, fPageWidth, fPageHeight); - const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aPageBound)); + basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aPageBound)); // add replacement fill xPageContent[0] = drawinglayer::primitive2d::Primitive2DReference( @@ -232,7 +232,7 @@ void ViewObjectContactOfPageObj::createPrimitive2DSequence(const DisplayInfo& /* // add replacement border xPageContent[1] = drawinglayer::primitive2d::Primitive2DReference( - new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aBorderColor.getBColor())); + new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(std::move(aOutline), aBorderColor.getBColor())); } else { @@ -283,7 +283,7 @@ void ViewObjectContactOfPageObj::createPrimitive2DSequence(const DisplayInfo& /* aOwnOutline.transform(aPageObjectTransform); const drawinglayer::primitive2d::Primitive2DReference xGrayFrame( - new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOwnOutline, aFrameColor.getBColor())); + new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(std::move(aOwnOutline), aFrameColor.getBColor())); rVisitor.visit(xGrayFrame); } diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx index 66d1a6fb4c7d..103e3e05cb92 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx @@ -113,7 +113,7 @@ void ViewObjectContactOfSdrOle2Obj::createPrimitive2DSequence( aObjectOutline.transform(aObjectMatrix); // Use a FillHatchPrimitive2D with necessary attributes - const drawinglayer::attribute::FillHatchAttribute aFillHatch( + drawinglayer::attribute::FillHatchAttribute aFillHatch( drawinglayer::attribute::HatchStyle::Single, // single hatch 125.0, // 1.25 mm basegfx::deg2rad(45.0), // 45 degree diagonal @@ -124,7 +124,7 @@ void ViewObjectContactOfSdrOle2Obj::createPrimitive2DSequence( const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolyPolygonHatchPrimitive2D( basegfx::B2DPolyPolygon(aObjectOutline), COL_BLACK.getBColor(), - aFillHatch)); + std::move(aFillHatch))); rVisitor.visit(xReference); } diff --git a/svx/source/sdr/overlay/overlayline.cxx b/svx/source/sdr/overlay/overlayline.cxx index 30c08f0269b6..ff848ce1ad32 100644 --- a/svx/source/sdr/overlay/overlayline.cxx +++ b/svx/source/sdr/overlay/overlayline.cxx @@ -41,7 +41,7 @@ namespace sdr::overlay const drawinglayer::primitive2d::Primitive2DReference aReference( new drawinglayer::primitive2d::PolygonMarkerPrimitive2D( - aLine, + std::move(aLine), aRGBColorA, aRGBColorB, fStripeLengthPixel)); diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index 0463567c593c..8319a259bc4b 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -134,10 +134,10 @@ namespace sdr::overlay if(mbBorder) { - const basegfx::B2DPolyPolygon aPolyPolygon(impCombineRangesToPolyPolygon(getRanges())); + basegfx::B2DPolyPolygon aPolyPolygon(impCombineRangesToPolyPolygon(getRanges())); const drawinglayer::primitive2d::Primitive2DReference aSelectionOutline( new drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D( - aPolyPolygon, + std::move(aPolyPolygon), aRGBColor)); // add both to result diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx index ceeb32b3f39a..c669f5220ccd 100644 --- a/svx/source/sdr/overlay/overlaytools.cxx +++ b/svx/source/sdr/overlay/overlaytools.cxx @@ -236,7 +236,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const rContainer.push_back( new PolygonMarkerPrimitive2D( - aPolygon, + std::move(aPolygon), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); @@ -247,7 +247,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const rContainer.push_back( new PolygonMarkerPrimitive2D( - aPolygon, + std::move(aPolygon), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); @@ -339,7 +339,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const const basegfx::BColor aEmptyColor(0.0, 0.0, 0.0); const double fHatchRotation(basegfx::deg2rad(45)); const double fDiscreteHatchDistance(3.0); - const drawinglayer::attribute::FillHatchAttribute aFillHatchAttribute( + drawinglayer::attribute::FillHatchAttribute aFillHatchAttribute( drawinglayer::attribute::HatchStyle::Single, fDiscreteHatchDistance * getDiscreteUnit(), fHatchRotation - getRotation(), @@ -350,7 +350,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const new PolyPolygonHatchPrimitive2D( aPolyPolygon, aEmptyColor, - aFillHatchAttribute)); + std::move(aFillHatchAttribute))); aRetval = Primitive2DContainer { aHatch }; } @@ -359,7 +359,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const // create fill primitive const Primitive2DReference aFill( new PolyPolygonColorPrimitive2D( - aPolyPolygon, + std::move(aPolyPolygon), getColor())); aRetval = Primitive2DContainer { aFill }; @@ -435,7 +435,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const rContainer.push_back( new PolygonMarkerPrimitive2D( - aLine, + std::move(aLine), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); @@ -451,7 +451,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const rContainer.push_back( new PolygonMarkerPrimitive2D( - aLine, + std::move(aLine), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); @@ -468,7 +468,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const rContainer.push_back( new PolygonMarkerPrimitive2D( - aLineA, + std::move(aLineA), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); @@ -478,7 +478,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const rContainer.push_back( new PolygonMarkerPrimitive2D( - aLineB, + std::move(aLineB), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); @@ -534,45 +534,45 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const // Left lines aLine.append(basegfx::B2DPoint(getViewport().getMinX(), getRollingRectangle().getMinY())); aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getRollingRectangle().getMinY())); - rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); + rContainer.push_back(new PolygonMarkerPrimitive2D(std::move(aLine), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); aLine.clear(); aLine.append(basegfx::B2DPoint(getViewport().getMinX(), getRollingRectangle().getMaxY())); aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getRollingRectangle().getMaxY())); - rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); + rContainer.push_back(new PolygonMarkerPrimitive2D(std::move(aLine), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); // Right lines aLine.clear(); aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getRollingRectangle().getMinY())); aLine.append(basegfx::B2DPoint(getViewport().getMaxX(), getRollingRectangle().getMinY())); - rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); + rContainer.push_back(new PolygonMarkerPrimitive2D(std::move(aLine), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); aLine.clear(); aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getRollingRectangle().getMaxY())); aLine.append(basegfx::B2DPoint(getViewport().getMaxX(), getRollingRectangle().getMaxY())); - rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); + rContainer.push_back(new PolygonMarkerPrimitive2D(std::move(aLine), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); // Top lines aLine.clear(); aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getViewport().getMinY())); aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getRollingRectangle().getMinY())); - rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); + rContainer.push_back(new PolygonMarkerPrimitive2D(std::move(aLine), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); aLine.clear(); aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getViewport().getMinY())); aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getRollingRectangle().getMinY())); - rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); + rContainer.push_back(new PolygonMarkerPrimitive2D(std::move(aLine), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); // Bottom lines aLine.clear(); aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getRollingRectangle().getMaxY())); aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getViewport().getMaxY())); - rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); + rContainer.push_back(new PolygonMarkerPrimitive2D(std::move(aLine), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); aLine.clear(); aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getRollingRectangle().getMaxY())); aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getViewport().getMaxY())); - rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); + rContainer.push_back(new PolygonMarkerPrimitive2D(std::move(aLine), getRGBColorA(), getRGBColorB(), getDiscreteDashLength())); } diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 18f1a0918fed..bffc183cf64d 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -223,7 +223,7 @@ basegfx::B2DRange getTextAnchorRange(const attribute::SdrTextAttribute& rText, { // create line and stroke attribute const attribute::LineAttribute aLineAttribute(rLine.getColor(), rLine.getWidth(), rLine.getJoin(), rLine.getCap()); - const attribute::StrokeAttribute aStrokeAttribute(std::vector(rLine.getDotDashArray()), rLine.getFullDotDashLen()); + attribute::StrokeAttribute aStrokeAttribute(std::vector(rLine.getDotDashArray()), rLine.getFullDotDashLen()); rtl::Reference<BasePrimitive2D> pNewLinePrimitive; if(!rPolygon.isClosed() && !rStroke.isDefault()) @@ -237,7 +237,7 @@ basegfx::B2DRange getTextAnchorRange(const attribute::SdrTextAttribute& rText, else { // create data - pNewLinePrimitive = new PolygonStrokePrimitive2D(rPolygon, aLineAttribute, aStrokeAttribute); + pNewLinePrimitive = new PolygonStrokePrimitive2D(rPolygon, aLineAttribute, std::move(aStrokeAttribute)); } if(0.0 != rLine.getTransparence()) diff --git a/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx index 0610f43b06ba..b2f010395fbd 100644 --- a/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx @@ -598,7 +598,7 @@ namespace static const double fPatScFact(10.0); // 10.0 multiply, see old code std::vector<double> aDashing(svtools::GetLineDashing(rBorder.Type(), rBorder.PatternScale() * fPatScFact)); - const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(std::move(aDashing)); + drawinglayer::attribute::StrokeAttribute aStrokeAttribute(std::move(aDashing)); const basegfx::B2DPoint aStart(rOrigin + (aPerpendX * aCombination.getRefModeOffset())); rTarget.append( @@ -607,7 +607,7 @@ namespace aStart, aStart + rX, std::move(aBorderlines), - aStrokeAttribute))); + std::move(aStrokeAttribute)))); } double getMinimalNonZeroValue(double fCurrent, double fNew) diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx index 7edd0e601ea0..f520a3d972b9 100644 --- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx @@ -123,7 +123,7 @@ namespace drawinglayer::primitive2d const Color aVclColor(aColor.nColor); aOutline.transform(getObjectTransform()); const drawinglayer::primitive2d::Primitive2DReference xOutline( - new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aVclColor.getBColor())); + new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(std::move(aOutline), aVclColor.getBColor())); rContainer.push_back(xOutline); } } diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 40fd8df27081..77685d863ae8 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -879,7 +879,7 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragMethod::AddConnectorOverl if(pEdge) { - const basegfx::B2DPolygon aEdgePolygon(pEdge->ImplAddConnectorOverlay(*this, pEM->IsCon1(), pEM->IsCon2(), bDetail)); + basegfx::B2DPolygon aEdgePolygon(pEdge->ImplAddConnectorOverlay(*this, pEM->IsCon1(), pEM->IsCon2(), bDetail)); if(aEdgePolygon.count()) { @@ -930,7 +930,7 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragMethod::AddConnectorOverl drawinglayer::primitive2d::Primitive2DReference aPolyPolygonMarkerPrimitive2D( new drawinglayer::primitive2d::PolygonMarkerPrimitive2D( - aEdgePolygon, aColA, aColB, fStripeLength)); + std::move(aEdgePolygon), aColA, aColB, fStripeLength)); aRetval.push_back(aPolyPolygonMarkerPrimitive2D); } } diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 31aa075783a6..a570c6c903ac 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -2625,7 +2625,7 @@ void SdrCropViewHdl::CreateB2dIAObject() const basegfx::BColor aHilightColor(SvtOptionsDrawinglayer::getHilightColor().getBColor()); const drawinglayer::primitive2d::Primitive2DReference aGraphicOutline( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( - aGraphicOutlinePolygon, + std::move(aGraphicOutlinePolygon), aHilightColor)); // combine these @@ -2636,7 +2636,7 @@ void SdrCropViewHdl::CreateB2dIAObject() // embed to MaskPrimitive2D const drawinglayer::primitive2d::Primitive2DReference aMaskedGraphic( new drawinglayer::primitive2d::MaskPrimitive2D( - aCropPolyPolygon, + std::move(aCropPolyPolygon), std::move(aCombination))); // embed to UnifiedTransparencePrimitive2D diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 7fb0efa38986..666c20d48f5a 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -344,7 +344,7 @@ namespace rInfo.mnTextStart, rInfo.mnTextLen, std::vector(aDXArray), - aFontAttribute, + std::move(aFontAttribute), rInfo.mpLocale ? *rInfo.mpLocale : css::lang::Locale(), aBFontColor, rInfo.mbFilled, diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx index da5ec20a3bdf..93543d242d2b 100644 --- a/svx/source/xoutdev/xtabdash.cxx +++ b/svx/source/xoutdev/xtabdash.cxx @@ -121,16 +121,16 @@ BitmapEx XDashList::ImpCreateBitmapForXDash(const XDash* pDash) } } - const drawinglayer::attribute::StrokeAttribute aStrokeAttribute( + drawinglayer::attribute::StrokeAttribute aStrokeAttribute( std::move(aDotDashArray), fFullDotDashLen); // create LinePrimitive const drawinglayer::primitive2d::Primitive2DReference aLinePrimitive( new drawinglayer::primitive2d::PolygonStrokePrimitive2D( - aLine, + std::move(aLine), aLineAttribute, - aStrokeAttribute)); + std::move(aStrokeAttribute))); // prepare VirtualDevice ScopedVclPtrInstance< VirtualDevice > pVirtualDevice; diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx index 3d2acb574c3c..bc8f79ac0426 100644 --- a/svx/source/xoutdev/xtabgrdt.cxx +++ b/svx/source/xoutdev/xtabgrdt.cxx @@ -93,7 +93,7 @@ BitmapEx XGradientList::CreateBitmap( tools::Long nIndex, const Size& rSize ) co { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); // prepare polygon geometry for rectangle - const basegfx::B2DPolygon aRectangle( + basegfx::B2DPolygon aRectangle( basegfx::utils::createPolygonFromRect( basegfx::B2DRange(0.0, 0.0, rSize.Width(), rSize.Height()))); @@ -152,7 +152,7 @@ BitmapEx XGradientList::CreateBitmap( tools::Long nIndex, const Size& rSize ) co } } - const drawinglayer::attribute::FillGradientAttribute aFillGradient( + drawinglayer::attribute::FillGradientAttribute aFillGradient( aGradientStyle, static_cast<double>(rGradient.GetBorder()) * 0.01, static_cast<double>(rGradient.GetXOffset()) * 0.01, @@ -164,12 +164,12 @@ BitmapEx XGradientList::CreateBitmap( tools::Long nIndex, const Size& rSize ) co const drawinglayer::primitive2d::Primitive2DReference aGradientPrimitive( new drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D( basegfx::B2DPolyPolygon(aRectangle), - aFillGradient)); + std::move(aFillGradient))); const basegfx::BColor aBlack(0.0, 0.0, 0.0); const drawinglayer::primitive2d::Primitive2DReference aBlackRectanglePrimitive( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( - aRectangle, + std::move(aRectangle), aBlack)); // prepare VirtualDevice diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx index 4fc97727b0cc..2091924ea518 100644 --- a/svx/source/xoutdev/xtabhtch.cxx +++ b/svx/source/xoutdev/xtabhtch.cxx @@ -87,7 +87,7 @@ BitmapEx XHatchList::CreateBitmap( tools::Long nIndex, const Size& rSize) const const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); // prepare polygon geometry for rectangle - const basegfx::B2DPolygon aRectangle( + basegfx::B2DPolygon aRectangle( basegfx::utils::createPolygonFromRect( basegfx::B2DRange(0.0, 0.0, rSize.Width(), rSize.Height()))); @@ -117,7 +117,7 @@ BitmapEx XHatchList::CreateBitmap( tools::Long nIndex, const Size& rSize) const const basegfx::B2DVector aScaleVector(aScaleMatrix * basegfx::B2DVector(1.0, 0.0)); const double fScaleValue(aScaleVector.getLength()); - const drawinglayer::attribute::FillHatchAttribute aFillHatch( + drawinglayer::attribute::FillHatchAttribute aFillHatch( aHatchStyle, static_cast<double>(rHatch.GetDistance()) * fScaleValue, toRadians(rHatch.GetAngle()), @@ -130,11 +130,11 @@ BitmapEx XHatchList::CreateBitmap( tools::Long nIndex, const Size& rSize) const new drawinglayer::primitive2d::PolyPolygonHatchPrimitive2D( basegfx::B2DPolyPolygon(aRectangle), aBlack, - aFillHatch)); + std::move(aFillHatch))); const drawinglayer::primitive2d::Primitive2DReference aBlackRectanglePrimitive( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( - aRectangle, + std::move(aRectangle), aBlack)); // prepare VirtualDevice diff --git a/sw/source/core/crsr/overlayrangesoutline.cxx b/sw/source/core/crsr/overlayrangesoutline.cxx index aff0f9d8b143..265509a055ab 100644 --- a/sw/source/core/crsr/overlayrangesoutline.cxx +++ b/sw/source/core/crsr/overlayrangesoutline.cxx @@ -60,10 +60,10 @@ namespace sw::overlay if( nCount ) { const basegfx::BColor aRGBColor(getBaseColor().getBColor()); - const basegfx::B2DPolyPolygon aPolyPolygon(impCombineRangesToPolyPolygon(getRanges())); + basegfx::B2DPolyPolygon aPolyPolygon(impCombineRangesToPolyPolygon(getRanges())); const drawinglayer::primitive2d::Primitive2DReference aOutline( new drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D( - aPolyPolygon, + std::move(aPolyPolygon), aRGBColor)); aRetval.resize(1); diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index a4cbbe7cd531..18be4450d41d 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -962,14 +962,14 @@ void paintGraphicUsingPrimitivesHelper( // RegionBand-based implementation, so cannot use it here. if(rOutputDevice.IsClipRegion()) { - const basegfx::B2DPolyPolygon aClip(rOutputDevice.GetClipRegion().GetAsB2DPolyPolygon()); + basegfx::B2DPolyPolygon aClip(rOutputDevice.GetClipRegion().GetAsB2DPolyPolygon()); if(0 != aClip.count()) { rContent.resize(1); rContent[0] = new drawinglayer::primitive2d::MaskPrimitive2D( - aClip, + std::move(aClip), drawinglayer::primitive2d::Primitive2DContainer(rContent)); } } diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index d470b1ae030f..35e79908546a 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3781,7 +3781,7 @@ void SwColumnFrame::PaintBreak( ) const aTextMatrix, aBreakText, 0, aBreakText.getLength(), std::vector< double >(), - aFontAttr, + std::move(aFontAttr), lang::Locale(), aLineColor ) ); @@ -5418,10 +5418,10 @@ void SwFrame::PaintSwFrameShadowAndBorder( const SwRect& rClip = getFrameArea(); basegfx::B2DRectangle aClip(rClip.Left(), rClip.Top(), rClip.Right(), rClip.Bottom()); - const basegfx::B2DPolyPolygon aPolyPolygon( + basegfx::B2DPolyPolygon aPolyPolygon( basegfx::utils::createPolygonFromRect(aClip)); const drawinglayer::primitive2d::Primitive2DReference xClipped( - new drawinglayer::primitive2d::MaskPrimitive2D(aPolyPolygon, { aRetval })); + new drawinglayer::primitive2d::MaskPrimitive2D(std::move(aPolyPolygon), { aRetval })); aRetval = xClipped; } @@ -6858,7 +6858,7 @@ static drawinglayer::primitive2d::Primitive2DContainer lcl_CreatePageAreaDelimit aPolygon.append( aBPoint + aVertVector * nLineLength ); aSeq[i] = new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( - aPolygon, aLineColor ); + std::move(aPolygon), aLineColor ); } return aSeq; @@ -6878,7 +6878,7 @@ static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateRectangleDelimi aPolygon.setClosed( true ); aSeq[0] = new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( - aPolygon, aLineColor ); + std::move(aPolygon), aLineColor ); return aSeq; } @@ -6909,7 +6909,7 @@ static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateColumnAreaDelim aPolygon.append( aBPoint + aVertVector * nLineLength ); aSeq[i] = new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( - aPolygon, aLineColor ); + std::move(aPolygon), aLineColor ); } return aSeq; diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.cxx b/sw/source/uibase/docvw/AnchorOverlayObject.cxx index 482bc6b8304f..a5e9cb3535a8 100644 --- a/sw/source/uibase/docvw/AnchorOverlayObject.cxx +++ b/sw/source/uibase/docvw/AnchorOverlayObject.cxx @@ -129,7 +129,7 @@ void AnchorPrimitive::create2DDecomposition( aDotDashArray.push_back(fDashLen); aDotDashArray.push_back(fDistance); - const drawinglayer::attribute::StrokeAttribute aStrokeAttribute( + drawinglayer::attribute::StrokeAttribute aStrokeAttribute( std::move(aDotDashArray), fDistance + fDashLen); @@ -137,7 +137,7 @@ void AnchorPrimitive::create2DDecomposition( new drawinglayer::primitive2d::PolygonStrokePrimitive2D( getLine(), aLineAttribute, - aStrokeAttribute)); + std::move(aStrokeAttribute))); rContainer.push_back(aStrokedLine); } diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 24f41021e832..85d3da00f529 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -152,12 +152,12 @@ void SwFrameButtonPainter::PaintButton(drawinglayer::primitive2d::Primitive2DCon nAngle = 0; FillGradientAttribute aFillAttrs(drawinglayer::attribute::GradientStyle::Linear, 0.0, 0.0, 0.0, nAngle, aLighterColor, aFillColor); rSeq.push_back(drawinglayer::primitive2d::Primitive2DReference( - new drawinglayer::primitive2d::FillGradientPrimitive2D(aGradientRect, aFillAttrs))); + new drawinglayer::primitive2d::FillGradientPrimitive2D(aGradientRect, std::move(aFillAttrs)))); } // Create the border lines primitive rSeq.push_back(drawinglayer::primitive2d::Primitive2DReference( - new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPolygon, aLineColor))); + new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(std::move(aPolygon), aLineColor))); } SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwFrame *pFrame, bool bHeader ) : @@ -319,7 +319,7 @@ void SwHeaderFooterWin::PaintButton() aSeq.push_back(drawinglayer::primitive2d::Primitive2DReference( new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( aTextMatrix, m_sLabel, 0, m_sLabel.getLength(), - std::vector<double>(), aFontAttr, css::lang::Locale(), aLineColor))); + std::vector<double>(), std::move(aFontAttr), css::lang::Locale(), aLineColor))); // Create the 'plus' or 'arrow' primitive B2DRectangle aSignArea(B2DPoint(aRect.Right() - BUTTON_WIDTH, 0.0), diff --git a/sw/source/uibase/docvw/OverlayRanges.cxx b/sw/source/uibase/docvw/OverlayRanges.cxx index ccbcc0041196..2b30f9543ebe 100644 --- a/sw/source/uibase/docvw/OverlayRanges.cxx +++ b/sw/source/uibase/docvw/OverlayRanges.cxx @@ -84,10 +84,10 @@ namespace sw::overlay if ( mbShowSolidBorder ) { const basegfx::BColor aRGBColor(getBaseColor().getBColor()); - const basegfx::B2DPolyPolygon aPolyPolygon(impCombineRangesToPolyPolygon(getRanges())); + basegfx::B2DPolyPolygon aPolyPolygon(impCombineRangesToPolyPolygon(getRanges())); const drawinglayer::primitive2d::Primitive2DReference aOutline( new drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D( - aPolyPolygon, + std::move(aPolyPolygon), aRGBColor)); aRetval = drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparence, aOutline }; diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index fe68dd1673a2..103503d55efc 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -201,7 +201,7 @@ void SwPageBreakWin::PaintButton() aSeq[0].set(new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( B2DPolyPolygon(aPolygon), aOtherColor)); aSeq[1].set(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( - aPolygon, aColor)); + std::move(aPolygon), aColor)); // Create the primitive for the image BitmapEx aBmpEx(RID_BMP_PAGE_BREAK); diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.cxx b/sw/source/uibase/docvw/ShadowOverlayObject.cxx index 7607cb3354d0..3b7490678533 100644 --- a/sw/source/uibase/docvw/ShadowOverlayObject.cxx +++ b/sw/source/uibase/docvw/ShadowOverlayObject.cxx @@ -82,7 +82,7 @@ void ShadowPrimitive::create2DDecomposition( case SS_NORMAL: { aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (2.0 * getDiscreteUnit()))); - const ::drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute( + ::drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute( drawinglayer::attribute::GradientStyle::Linear, 0.0, 0.5, @@ -94,13 +94,13 @@ void ShadowPrimitive::create2DDecomposition( rContainer.push_back( new drawinglayer::primitive2d::FillGradientPrimitive2D( aRange, - aFillGradientAttribute)); + std::move(aFillGradientAttribute))); break; } case SS_VIEW: { aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (4.0 * getDiscreteUnit()))); - const drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute( + drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute( drawinglayer::attribute::GradientStyle::Linear, 0.0, 0.5, @@ -112,13 +112,13 @@ void ShadowPrimitive::create2DDecomposition( rContainer.push_back( new drawinglayer::primitive2d::FillGradientPrimitive2D( aRange, - aFillGradientAttribute)); + std::move(aFillGradientAttribute))); break; } case SS_EDIT: { aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (4.0 * getDiscreteUnit()))); - const drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute( + drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute( drawinglayer::attribute::GradientStyle::Linear, 0.0, 0.5, @@ -130,7 +130,7 @@ void ShadowPrimitive::create2DDecomposition( rContainer.push_back( new drawinglayer::primitive2d::FillGradientPrimitive2D( aRange, - aFillGradientAttribute)); + std::move(aFillGradientAttribute))); break; } default: diff --git a/sw/source/uibase/docvw/UnfloatTableButton.cxx b/sw/source/uibase/docvw/UnfloatTableButton.cxx index 9621405679a6..96d3c2f61460 100644 --- a/sw/source/uibase/docvw/UnfloatTableButton.cxx +++ b/sw/source/uibase/docvw/UnfloatTableButton.cxx @@ -224,8 +224,8 @@ void UnfloatTableButton::PaintButton() aSeq.push_back(drawinglayer::primitive2d::Primitive2DReference( new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( - aTextMatrix, m_sLabel, 0, m_sLabel.getLength(), std::vector<double>(), aFontAttr, - css::lang::Locale(), aLineColor))); + aTextMatrix, m_sLabel, 0, m_sLabel.getLength(), std::vector<double>(), + std::move(aFontAttr), css::lang::Locale(), aLineColor))); // Create the processor and process the primitives const drawinglayer::geometry::ViewInformation2D aNewViewInfos; |