summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-18 11:44:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-19 09:45:46 +0200
commit692c5df18ec1f558abe1a3a658c9881cfb7210a9 (patch)
treef9d6d6d6750ffcfa9401660314c0a1d61993766b /cui
parent1815aa9472080b9dac263d393b9c922dd16351fe (diff)
ImplPlayWithRenderer never checks its OutputDevice against nullptr
just pass a reference instead and spread that around to some similar cases Change-Id: Ifb2dee8c7bf02a9f01982b928c90666cbbdd84fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115759 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx4
-rw-r--r--cui/source/options/personalization.cxx2
-rw-r--r--cui/source/tabpages/grfpage.cxx2
-rw-r--r--cui/source/tabpages/numpages.cxx10
4 files changed, 9 insertions, 9 deletions
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 01a5ad0786ac..e5597dae8265 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -57,14 +57,14 @@ void CuiGraphicPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const ::
const Size aGraphicSize(rRenderContext.LogicToPixel(maPreview.GetPrefSize(), maPreview.GetPrefMapMode()));
const Point aGraphicPosition((aOutputSize.Width() - aGraphicSize.Width() ) >> 1,
(aOutputSize.Height() - aGraphicSize.Height() ) >> 1);
- maPreview.StartAnimation(&rRenderContext, aGraphicPosition, aGraphicSize);
+ maPreview.StartAnimation(rRenderContext, aGraphicPosition, aGraphicSize);
}
else
{
const Size aGraphicSize(maPreview.GetSizePixel());
const Point aGraphicPosition((aOutputSize.Width() - aGraphicSize.Width()) >> 1,
(aOutputSize.Height() - aGraphicSize.Height()) >> 1);
- maPreview.Draw(&rRenderContext, aGraphicPosition, aGraphicSize);
+ maPreview.Draw(rRenderContext, aGraphicPosition, aGraphicSize);
}
}
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index ac2def078f5c..02c064d1b2e7 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -148,7 +148,7 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
ScopedVclPtr<VirtualDevice> xVirDev
= m_vDefaultPersonaImages[nIndex]->create_virtual_device();
xVirDev->SetOutputSizePixel(aSize);
- aGraphic.Draw(xVirDev.get(), Point(0, 0));
+ aGraphic.Draw(*xVirDev, Point(0, 0));
m_vDefaultPersonaImages[nIndex]->set_image(xVirDev.get());
xVirDev.disposeAndClear();
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 569329e3a160..beb8bc207ddd 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -719,7 +719,7 @@ void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const ::tools::Re
::tools::Rectangle aRect(
Point((aWinSize.Width() - m_aFrameSize.Width())/2, (aWinSize.Height() - m_aFrameSize.Height())/2),
m_aFrameSize);
- m_aGrf.Draw(&rRenderContext, aRect.TopLeft(), aRect.GetSize());
+ m_aGrf.Draw(rRenderContext, aRect.TopLeft(), aRect.GetSize());
// Remove one more case that uses XOR paint (RasterOp::Invert).
// Get colors and logic DashLength from settings, use equal to
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index f93ebc8ed497..e03ec1451daa 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2120,7 +2120,7 @@ void SvxNumOptionsTabPage::EditModifyHdl_Impl(const weld::Entry* pEdit)
SetModified();
}
-static tools::Long lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, tools::Long nXStart,
+static tools::Long lcl_DrawGraphic(VirtualDevice& rVDev, const SvxNumberFormat &rFmt, tools::Long nXStart,
tools::Long nYMiddle, tools::Long nDivision)
{
const SvxBrushItem* pBrushItem = rFmt.GetBrush();
@@ -2134,8 +2134,8 @@ static tools::Long lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &
aGSize.setWidth( aGSize.Width() / nDivision );
nRet = aGSize.Width();
aGSize.setHeight( aGSize.Height() / nDivision );
- pGrf->Draw( pVDev, Point(nXStart,nYMiddle - ( aGSize.Height() / 2) ),
- pVDev->PixelToLogic( aGSize ) );
+ pGrf->Draw(rVDev, Point(nXStart,nYMiddle - ( aGSize.Height() / 2) ),
+ rVDev.PixelToLogic( aGSize ) );
}
}
return nRet;
@@ -2280,7 +2280,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
if (SVX_NUM_BITMAP == (rFmt.GetNumberingType() &(~LINK_TOKEN)))
{
tools::Long nYMiddle = nYStart + ( nFontHeight / 2 );
- nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev.get(), rFmt, nNumberXPos, nYMiddle, nWidthRelation) : 0;
+ nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(*pVDev, rFmt, nNumberXPos, nYMiddle, nWidthRelation) : 0;
}
else if (SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType())
{
@@ -2401,7 +2401,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
if (rFmt.IsShowSymbol())
{
tools::Long nYMiddle = nYStart + ( nFontHeight / 2 );
- nTextOffset = lcl_DrawGraphic(pVDev.get(), rFmt, nXStart, nYMiddle, nWidthRelation);
+ nTextOffset = lcl_DrawGraphic(*pVDev, rFmt, nXStart, nYMiddle, nWidthRelation);
nTextOffset = nTextOffset + nXStep;
}
}