Kaydet (Commit) abc84c73 authored tarafından Mike Kaganski's avatar Mike Kaganski

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: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 68e84132
...@@ -146,7 +146,7 @@ namespace ...@@ -146,7 +146,7 @@ namespace
// this allows the lowest pixel of the band to be split off // this allows the lowest pixel of the band to be split off
&& pBand->mnYBottom>=nTop && pBand->mnYBottom>=nTop
// do not split a band that is just one pixel high // do not split a band that is just one pixel high
&& pBand->mnYTop<pBand->mnYBottom) && pBand->mnYTop<pBand->mnYBottom-1)
{ {
// Split the top band. // Split the top band.
pTopBand = pBand->SplitBand(nTop); pTopBand = pBand->SplitBand(nTop);
...@@ -163,7 +163,7 @@ namespace ...@@ -163,7 +163,7 @@ namespace
// prevent splitting off a band that is 0 pixel high // prevent splitting off a band that is 0 pixel high
&& pBand->mnYBottom>nBottom && pBand->mnYBottom>nBottom
// do not split a band that is just one pixel high // do not split a band that is just one pixel high
&& pBand->mnYTop<pBand->mnYBottom) && pBand->mnYTop<pBand->mnYBottom-1)
{ {
// Split the bottom band. // Split the bottom band.
pBand->SplitBand(nBottom+1); pBand->SplitBand(nBottom+1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment