diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-19 14:33:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-20 10:21:07 +0100 |
commit | 7d7d4cf217e82db8839dbc49dcab1ab72c203b4e (patch) | |
tree | 02bf7659d9bb3fce41a54407ea890313ad9d6a30 /sw/source/core/layout/paintfrm.cxx | |
parent | 6aecd49aa6de7c7f65c3c240ee3b7db36497df4d (diff) |
loplugin:refcounting in sw
Change-Id: I56f2f5aa4d9105e93f28701b8352d1fb97829ead
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111215
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/layout/paintfrm.cxx')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index dd3def6e8dc9..ef69c5ff81ba 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3548,12 +3548,10 @@ static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateDashedIndicator const basegfx::BColor aOtherColor = basegfx::utils::hsl2rgb( aHslLine ); // Compute the plain line - drawinglayer::primitive2d::PolygonHairlinePrimitive2D * pPlainLine = + aSeq[0] = new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( aLinePolygon, aOtherColor ); - aSeq[0] = drawinglayer::primitive2d::Primitive2DReference( pPlainLine ); - // Dashed line in twips aStrokePattern.push_back( 40 ); aStrokePattern.push_back( 40 ); @@ -3562,13 +3560,12 @@ static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateDashedIndicator } // Compute the dashed line primitive - drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D * pLine = + aSeq[ aSeq.size( ) - 1 ] = new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D ( basegfx::B2DPolyPolygon( aLinePolygon ), drawinglayer::attribute::LineAttribute( aColor ), drawinglayer::attribute::StrokeAttribute( aStrokePattern ) ); - aSeq[ aSeq.size( ) - 1 ] = drawinglayer::primitive2d::Primitive2DReference( pLine ); return aSeq; } @@ -3683,15 +3680,14 @@ void SwColumnFrame::PaintBreak( ) const aRect.Right(), aRect.Top() + nTextOff ); } - drawinglayer::primitive2d::TextSimplePortionPrimitive2D * pText = + aSeq.push_back( new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( aTextMatrix, aBreakText, 0, aBreakText.getLength(), std::vector< double >(), aFontAttr, lang::Locale(), - aLineColor ); - aSeq.push_back( drawinglayer::primitive2d::Primitive2DReference( pText ) ); + aLineColor ) ); ProcessPrimitives( aSeq ); } @@ -6660,10 +6656,8 @@ static drawinglayer::primitive2d::Primitive2DContainer lcl_CreatePageAreaDelimit aPolygon.append( aBPoint ); aPolygon.append( aBPoint + aVertVector * nLineLength ); - drawinglayer::primitive2d::PolygonHairlinePrimitive2D* pLine = - new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( + aSeq[i] = new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( aPolygon, aLineColor ); - aSeq[i] = drawinglayer::primitive2d::Primitive2DReference( pLine ); } return aSeq; @@ -6682,10 +6676,8 @@ static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateRectangleDelimi aPolygon.append( basegfx::B2DPoint( rRect.Left(), rRect.Bottom() ) ); aPolygon.setClosed( true ); - drawinglayer::primitive2d::PolygonHairlinePrimitive2D* pLine = - new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( + aSeq[0] = new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( aPolygon, aLineColor ); - aSeq[0] = drawinglayer::primitive2d::Primitive2DReference( pLine ); return aSeq; } @@ -6715,10 +6707,8 @@ static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateColumnAreaDelim aPolygon.append( aBPoint ); aPolygon.append( aBPoint + aVertVector * nLineLength ); - drawinglayer::primitive2d::PolygonHairlinePrimitive2D* pLine = - new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( + aSeq[i] = new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( aPolygon, aLineColor ); - aSeq[i] = drawinglayer::primitive2d::Primitive2DReference( pLine ); } return aSeq; |