From 4a8968039a2e1d9e7aee10433ced1f59c0392d7a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 21 Feb 2018 15:56:58 +0200 Subject: loplugin:changetoolsgen in vcl Change-Id: I0fc68cf51fb23ed9bb86a5087e8247c81b024494 Reviewed-on: https://gerrit.libreoffice.org/50107 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/source/control/fixed.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'vcl/source/control/fixed.cxx') 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) -- cgit