diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-24 13:47:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-26 07:21:04 +0100 |
commit | 08ab1f46b192a188935fdffbefdc9f3973583cdf (patch) | |
tree | 4c1ecb502f3c3b2a2a8865ea8f84a083b16d310e /starmath | |
parent | 9bc8714308b6f4b85a4c756229ac8b670d009f42 (diff) |
loplugin:oncevar extend to tools/gen.hxx types
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2
Reviewed-on: https://gerrit.libreoffice.org/50283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/edit.cxx | 3 | ||||
-rw-r--r-- | starmath/source/rect.cxx | 5 | ||||
-rw-r--r-- | starmath/source/unomodel.cxx | 3 | ||||
-rw-r--r-- | starmath/source/view.cxx | 6 |
4 files changed, 6 insertions, 11 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index edd7db345037..cc77f688eefc 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -554,8 +554,7 @@ IMPL_LINK( SmEditWindow, ScrollHdl, ScrollBar *, /*pScrollBar*/, void ) tools::Rectangle SmEditWindow::AdjustScrollBars() { const Size aOut( GetOutputSizePixel() ); - Point aPoint; - tools::Rectangle aRect( aPoint, aOut ); + tools::Rectangle aRect( Point(), aOut ); if (pVScrollBar && pHScrollBar && pScrollBox) { diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx index c67c1a2b72f0..1ec45fbeb10d 100644 --- a/starmath/source/rect.cxx +++ b/starmath/source/rect.cxx @@ -73,9 +73,8 @@ bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev, pGlyphDev->SetFont(aFnt); long nTextWidth = rDev.GetTextWidth(rText); - Point aPoint; - tools::Rectangle aResult (aPoint, Size(nTextWidth, rDev.GetTextHeight())), - aTmp; + tools::Rectangle aResult (Point(), Size(nTextWidth, rDev.GetTextHeight())), + aTmp; bool bSuccess = pGlyphDev->GetTextBoundRect(aTmp, rText); OSL_ENSURE( bSuccess, "GetTextBoundRect failed" ); diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 768071767962..63816bd3c525 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -1015,8 +1015,7 @@ void SAL_CALL SmModel::render( aPrtPageOffset = Point( static_cast<long>(aPrtPaperSize.Width() * 0.0250), static_cast<long>(aPrtPaperSize.Height() * 0.0214)); } - Point aZeroPoint; - tools::Rectangle OutputRect( aZeroPoint, aOutputSize ); + tools::Rectangle OutputRect( Point(), aOutputSize ); // set minimum top and bottom border diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index fbd977d07ff2..353d3658d90d 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -809,8 +809,7 @@ IMPL_LINK_NOARG( SmCmdBoxWindow, InitialFocusTimerHdl, Timer *, void ) void SmCmdBoxWindow::AdjustPosition() { - Point aPt; - const tools::Rectangle aRect( aPt, GetParent()->GetOutputSizePixel() ); + const tools::Rectangle aRect( Point(), GetParent()->GetOutputSizePixel() ); Point aTopLeft( Point( aRect.Left(), aRect.Bottom() - GetSizePixel().Height() ) ); Point aPos( GetParent()->OutputToScreenPixel( aTopLeft ) ); @@ -2021,8 +2020,7 @@ void SmViewShell::ZoomByItemSet(const SfxItemSet *pSet) { const MapMode aMap( MapUnit::Map100thMM ); SfxPrinter *pPrinter = GetPrinter( true ); - Point aPoint; - tools::Rectangle OutputRect(aPoint, pPrinter->GetOutputSize()); + tools::Rectangle OutputRect(Point(), pPrinter->GetOutputSize()); Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(), OutputRect.GetHeight()), aMap)); Size GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), aMap)); |