tdf#120703 PVS: do not split a band that is just one pixel high
This is what mentioned in the comment to the line, so implement just that
V560 A part of conditional expression is always true:
pBand->mnYTop < pBand->mnYBottom.
Change-Id: I1027a30a07d49940a31838deddb457b6379eb887
Reviewed-on: https://gerrit.libreoffice.org/64399
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index b363cd0..ce963a9 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -146,7 +146,7 @@
// this allows the lowest pixel of the band to be split off
&& pBand->mnYBottom>=nTop
// do not split a band that is just one pixel high
&& pBand->mnYTop<pBand->mnYBottom)
&& pBand->mnYTop<pBand->mnYBottom-1)
{
// Split the top band.
pTopBand = pBand->SplitBand(nTop);
@@ -163,7 +163,7 @@
// prevent splitting off a band that is 0 pixel high
&& pBand->mnYBottom>nBottom
// do not split a band that is just one pixel high
&& pBand->mnYTop<pBand->mnYBottom)
&& pBand->mnYTop<pBand->mnYBottom-1)
{
// Split the bottom band.
pBand->SplitBand(nBottom+1);