summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-10-05 20:26:57 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-10-06 17:13:50 +0200
commit7661789352187e28a5f3daedcb7c3e4956d6d2c5 (patch)
tree6edf1825ff657ac2e640ffa47f251ddc1e180987 /vcl
parente32ab825cb0566b55011f630ed7b79df0fd6e04c (diff)
cid#1608598 silence Overflowed constant
and cid#1607946 Overflowed constant cid#1608526 Overflowed integer argument cid#1608611 Overflowed integer argument Change-Id: Iec21df2f3d7dc8fba3872c6a70466ae12026a49d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174557 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/graphic/GraphicObject2.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/source/graphic/GraphicObject2.cxx b/vcl/source/graphic/GraphicObject2.cxx
index a8dd186a3d93..fb2584d53037 100644
--- a/vcl/source/graphic/GraphicObject2.cxx
+++ b/vcl/source/graphic/GraphicObject2.cxx
@@ -364,11 +364,12 @@ bool GraphicObject::ImplDrawTiled(OutputDevice& rOut, const tools::Rectangle& rA
rOut.IntersectClipRegion( rArea );
// Paint all tiles
-
-
+ auto nOutAreaWidth = aOutArea.GetWidth();
+ auto nOutAreaHeight = aOutArea.GetHeight();
+ assert(nOutAreaWidth >= 0 && nOutAreaHeight >= 0 && "coverity 2023.12.2");
bRet = ImplDrawTiled(rOut, aOutStart,
- (aOutArea.GetWidth() + aOutArea.Left() - aOutStart.X() + rSizePixel.Width() - 1) / rSizePixel.Width(),
- (aOutArea.GetHeight() + aOutArea.Top() - aOutStart.Y() + rSizePixel.Height() - 1) / rSizePixel.Height(),
+ (nOutAreaWidth + aOutArea.Left() - aOutStart.X() + rSizePixel.Width() - 1) / rSizePixel.Width(),
+ (nOutAreaHeight + aOutArea.Top() - aOutStart.Y() + rSizePixel.Height() - 1) / rSizePixel.Height(),
rSizePixel, pAttr);
rOut.Pop();