summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-02-06 15:51:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-02-07 16:43:23 +0100
commit33b7d62281f1f9aaeaa2f68615e90190fe7b5aaf (patch)
tree1c0156528fda73b0941982c84a8885f0867e993f /sfx2
parentcf11a0dfca5470baea8429c41021527187a5c32d (diff)
these casts are no longer necessary
Change-Id: Ife51f47d95e286e0fec165882377c31b1a664241 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163058 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/templateviewitem.cxx30
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx18
2 files changed, 24 insertions, 24 deletions
diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx
index d28ad50f74cd..3a77dac11a64 100644
--- a/sfx2/source/control/templateviewitem.cxx
+++ b/sfx2/source/control/templateviewitem.cxx
@@ -69,12 +69,12 @@ void TemplateViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProces
fTransparence = pAttrs->fHighlightTransparence;
}
- aSeq[0] = drawinglayer::primitive2d::Primitive2DReference(
+ aSeq[0] =
new PolyPolygonSelectionPrimitive2D( B2DPolyPolygon(::tools::Polygon(maDrawArea,5,5).getB2DPolygon()),
aFillColor,
fTransparence,
0.0,
- true));
+ true);
// Draw thumbnail
Size aImageSize = maPreview1.GetSizePixel();
@@ -91,27 +91,27 @@ void TemplateViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProces
aBounds.append(B2DPoint(fPosX,fPosY+fHeight));
aBounds.setClosed(true);
- aSeq[1] = drawinglayer::primitive2d::Primitive2DReference( new PolyPolygonColorPrimitive2D(
- B2DPolyPolygon(aBounds), COL_WHITE.getBColor()));
+ aSeq[1] = new PolyPolygonColorPrimitive2D(
+ B2DPolyPolygon(aBounds), COL_WHITE.getBColor());
- aSeq[2] = drawinglayer::primitive2d::Primitive2DReference( new FillGraphicPrimitive2D(
- createTranslateB2DHomMatrix(maPrev1Pos.X(),maPrev1Pos.Y()),
- FillGraphicAttribute(Graphic(maPreview1),
- B2DRange(
- B2DPoint(0,0),
- B2DPoint(aImageSize.Width(),aImageSize.Height())),
- false)
- ));
+ aSeq[2] = new FillGraphicPrimitive2D(
+ createTranslateB2DHomMatrix(maPrev1Pos.X(),maPrev1Pos.Y()),
+ FillGraphicAttribute(Graphic(maPreview1),
+ B2DRange(
+ B2DPoint(0,0),
+ B2DPoint(aImageSize.Width(),aImageSize.Height())),
+ false)
+ );
// draw thumbnail borders
- aSeq[3] = drawinglayer::primitive2d::Primitive2DReference(createBorderLine(aBounds));
+ aSeq[3] = createBorderLine(aBounds);
if(mbIsDefaultTemplate)
{
Point aIconPos(getDefaultIconArea().TopLeft());
- aSeq[4] = drawinglayer::primitive2d::Primitive2DReference(new DiscreteBitmapPrimitive2D( maDefaultBitmap,
- B2DPoint(aIconPos.X(), aIconPos.Y())));
+ aSeq[4] = new DiscreteBitmapPrimitive2D( maDefaultBitmap,
+ B2DPoint(aIconPos.X(), aIconPos.Y()));
}
addTextPrimitives(maTitle, pAttrs, maTextPos, aSeq);
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index 56cfee35f199..ae874408b8af 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -164,25 +164,25 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
}
sal_uInt32 nPrimitive = 0;
- aSeq[nPrimitive++] = drawinglayer::primitive2d::Primitive2DReference(
+ aSeq[nPrimitive++] =
new PolyPolygonSelectionPrimitive2D( B2DPolyPolygon(::tools::Polygon(maDrawArea, THUMBNAILVIEW_ITEM_CORNER, THUMBNAILVIEW_ITEM_CORNER).getB2DPolygon()),
aFillColor,
fTransparence,
0.0,
- true));
+ true);
// Draw thumbnail
Point aPos = maPrev1Pos;
Size aImageSize = maPreview1.GetSizePixel();
- aSeq[nPrimitive++] = drawinglayer::primitive2d::Primitive2DReference( new FillGraphicPrimitive2D(
+ aSeq[nPrimitive++] = new FillGraphicPrimitive2D(
createTranslateB2DHomMatrix(aPos.X(),aPos.Y()),
FillGraphicAttribute(Graphic(maPreview1),
B2DRange(
B2DPoint(0,0),
B2DPoint(aImageSize.Width(),aImageSize.Height())),
false)
- ));
+ );
if (mbBorder)
{
@@ -199,7 +199,7 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
aBounds.append(B2DPoint(fPosX,fPosY+fHeight));
aBounds.setClosed(true);
- aSeq[nPrimitive++] = drawinglayer::primitive2d::Primitive2DReference(createBorderLine(aBounds));
+ aSeq[nPrimitive++] = createBorderLine(aBounds);
}
// Draw text below thumbnail
@@ -271,14 +271,14 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai
aTextColor = pAttrs->aHighlightTextColor;
}
- rSeq[nPrimitives++] = drawinglayer::primitive2d::Primitive2DReference(
+ rSeq[nPrimitives++] =
new TextSimplePortionPrimitive2D(aTextMatrix,
aText, nLineStart, nLineLength,
std::vector<double>(),
{},
pAttrs->aFontAttr,
css::lang::Locale(),
- aTextColor));
+ aTextColor);
if (nMnemonicPos != -1 && nMnemonicPos >= nLineStart && nMnemonicPos < nLineStart + nLineLength)
{
@@ -301,8 +301,8 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai
drawinglayer::attribute::LineAttribute aLineAttribute(Color(aTextColor).getBColor(), fMnemonicHeight);
- rSeq[nPrimitives++] = drawinglayer::primitive2d::Primitive2DReference(
- new PolygonStrokePrimitive2D(std::move(aLine), aLineAttribute));
+ rSeq[nPrimitives++] =
+ new PolygonStrokePrimitive2D(std::move(aLine), aLineAttribute);
}
nLineStart += nLineLength;