summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/tabctrl.cxx2
-rw-r--r--vcl/source/gdi/mtfxmldump.cxx2
-rw-r--r--vcl/source/outdev/rect.cxx3
-rw-r--r--vcl/source/treelist/treelistbox.cxx2
4 files changed, 5 insertions, 4 deletions
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index d5b9eeeeacfa..eeede1ae1e1c 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2123,7 +2123,7 @@ Size TabControl::calculateRequisition() const
tools::Rectangle aTabRect = pThis->ImplGetTabRect(nPos, aOptimalPageSize.Width(), LONG_MAX);
if (aTabRect.Bottom() > nTabLabelsBottom)
nTabLabelsBottom = aTabRect.Bottom();
- if (aTabRect.Right() > nTabLabelsRight)
+ if (!aTabRect.IsEmpty() && aTabRect.Right() > nTabLabelsRight)
nTabLabelsRight = aTabRect.Right();
}
diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx
index 8c168a89d4c4..3f681a08a674 100644
--- a/vcl/source/gdi/mtfxmldump.cxx
+++ b/vcl/source/gdi/mtfxmldump.cxx
@@ -459,7 +459,7 @@ void writeRectangle(tools::XmlWriter& rWriter, tools::Rectangle const& rRectangl
{
rWriter.attribute("left", rRectangle.Left());
rWriter.attribute("top", rRectangle.Top());
- rWriter.attribute("right", rRectangle.Right());
+ rWriter.attribute("right", rRectangle.IsWidthEmpty() ? -32767 : rRectangle.Right());
rWriter.attribute("bottom", rRectangle.Bottom());
}
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 67343278a1be..14d341ac6b8f 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -376,7 +376,8 @@ BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix )
void AdjustTwoRect( SalTwoRect& rTwoRect, const tools::Rectangle& rValidSrcRect )
{
- if( ( rTwoRect.mnSrcX < rValidSrcRect.Left() ) || ( rTwoRect.mnSrcX >= rValidSrcRect.Right() ) ||
+ long right = rValidSrcRect.IsEmpty() ? rValidSrcRect.Left() : rValidSrcRect.Right();
+ if( ( rTwoRect.mnSrcX < rValidSrcRect.Left() ) || ( rTwoRect.mnSrcX >= right ) ||
( rTwoRect.mnSrcY < rValidSrcRect.Top() ) || ( rTwoRect.mnSrcY >= rValidSrcRect.Bottom() ) ||
( ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) > rValidSrcRect.Right() ) ||
( ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) > rValidSrcRect.Bottom() ) )
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index f42aac4983af..b91fb5552d61 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -2770,7 +2770,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render
{
rRenderContext.SetFillColor(aBackgroundColor);
// this case may occur for smaller horizontal resizes
- if (aRect.Left() < aRect.Right())
+ if (!aRect.IsEmpty() && (aRect.Left() < aRect.Right()))
rRenderContext.DrawRect(aRect);
}
}