summaryrefslogtreecommitdiff
path: root/vcl/source/control/fixed.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-21 15:56:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-22 20:18:57 +0100
commit4a8968039a2e1d9e7aee10433ced1f59c0392d7a (patch)
tree7074b5b4a94b5d509487872b8201bc5872dc107e /vcl/source/control/fixed.cxx
parent1d7f96a324a4c2ab82a04513c6a38dc31fd061fa (diff)
loplugin:changetoolsgen in vcl
Change-Id: I0fc68cf51fb23ed9bb86a5087e8247c81b024494 Reviewed-on: https://gerrit.libreoffice.org/50107 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control/fixed.cxx')
-rw-r--r--vcl/source/control/fixed.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index d417f97ece07..d61199e69aa7 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -145,7 +145,7 @@ void FixedText::ImplDraw(OutputDevice* pDev, DrawFlags nDrawFlags,
Point aPos = rPos;
if ( nWinStyle & WB_EXTRAOFFSET )
- aPos.X() += 2;
+ aPos.AdjustX(2 );
if ( nWinStyle & WB_PATHELLIPSIS )
{
@@ -325,13 +325,13 @@ Size FixedText::CalcMinimumTextSize( Control const *pControl, long nMaxWidth )
Size aSize = getTextDimensions(pControl, pControl->GetText(), nMaxWidth);
if ( pControl->GetStyle() & WB_EXTRAOFFSET )
- aSize.Width() += 2;
+ aSize.AdjustWidth(2 );
// GetTextRect cannot take an empty string
if ( aSize.Width() < 0 )
- aSize.Width() = 0;
+ aSize.setWidth( 0 );
if ( aSize.Height() <= 0 )
- aSize.Height() = pControl->GetTextHeight();
+ aSize.setHeight( pControl->GetTextHeight() );
return aSize;
}
@@ -525,9 +525,9 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext)
SetFont(aFont);
Point aStartPt(aOutSize.Width() / 2, aOutSize.Height() - 1);
if (nWinStyle & WB_VCENTER)
- aStartPt.Y() -= (aOutSize.Height() - nWidth) / 2;
+ aStartPt.AdjustY( -((aOutSize.Height() - nWidth) / 2) );
Point aTextPt(aStartPt);
- aTextPt.X() -= GetTextHeight() / 2;
+ aTextPt.AdjustX( -(GetTextHeight() / 2) );
rRenderContext.DrawText(aTextPt, aText, 0, aText.getLength());
rRenderContext.Pop();
if (aOutSize.Height() - aStartPt.Y() > FIXEDLINE_TEXT_BORDER)