From 9ec96de5556bf00cb00ed05f74b95c09b01b82b1 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Thu, 22 May 2014 12:13:10 +0200 Subject: cppcheck: Function parameter 'aBox' should be passed by reference Change-Id: I60fc65799e2fd8402a8bdb1e2850b9b34cd38a27 --- sd/source/ui/slidesorter/view/SlsFramePainter.cxx | 20 ++++++++++---------- sd/source/ui/slidesorter/view/SlsFramePainter.hxx | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx index 45222d53a584..746dbb59730c 100644 --- a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx @@ -63,21 +63,21 @@ FramePainter::~FramePainter (void) void FramePainter::PaintFrame ( OutputDevice& rDevice, - const Rectangle aBox) const + const Rectangle& rBox) const { if ( ! mbIsValid) return; // Paint the shadow. - maTopLeft.PaintCorner(rDevice, aBox.TopLeft()); - maTopRight.PaintCorner(rDevice, aBox.TopRight()); - maBottomLeft.PaintCorner(rDevice, aBox.BottomLeft()); - maBottomRight.PaintCorner(rDevice, aBox.BottomRight()); - maLeft.PaintSide(rDevice, aBox.TopLeft(), aBox.BottomLeft(), maTopLeft, maBottomLeft); - maRight.PaintSide(rDevice, aBox.TopRight(), aBox.BottomRight(), maTopRight, maBottomRight); - maTop.PaintSide(rDevice, aBox.TopLeft(), aBox.TopRight(), maTopLeft, maTopRight); - maBottom.PaintSide(rDevice, aBox.BottomLeft(), aBox.BottomRight(), maBottomLeft, maBottomRight); - maCenter.PaintCenter(rDevice,aBox); + maTopLeft.PaintCorner(rDevice, rBox.TopLeft()); + maTopRight.PaintCorner(rDevice, rBox.TopRight()); + maBottomLeft.PaintCorner(rDevice, rBox.BottomLeft()); + maBottomRight.PaintCorner(rDevice, rBox.BottomRight()); + maLeft.PaintSide(rDevice, rBox.TopLeft(), rBox.BottomLeft(), maTopLeft, maBottomLeft); + maRight.PaintSide(rDevice, rBox.TopRight(), rBox.BottomRight(), maTopRight, maBottomRight); + maTop.PaintSide(rDevice, rBox.TopLeft(), rBox.TopRight(), maTopLeft, maTopRight); + maBottom.PaintSide(rDevice, rBox.BottomLeft(), rBox.BottomRight(), maBottomLeft, maBottomRight); + maCenter.PaintCenter(rDevice,rBox); } diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.hxx b/sd/source/ui/slidesorter/view/SlsFramePainter.hxx index 5c52582117ac..322968a66e23 100644 --- a/sd/source/ui/slidesorter/view/SlsFramePainter.hxx +++ b/sd/source/ui/slidesorter/view/SlsFramePainter.hxx @@ -34,7 +34,7 @@ public: /** Paint a border around the given box by using a set of bitmaps for the corners and sides. */ - void PaintFrame (OutputDevice&rDevice, const Rectangle aBox) const; + void PaintFrame (OutputDevice&rDevice, const Rectangle& rBox) const; /** Special functionality that takes the color from the center bitmap and replaces that color in all bitmaps by the given new -- cgit