diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/osx/salnativewidgets.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/mtfxmldump.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/rect.cxx | 3 | ||||
-rw-r--r-- | vcl/source/treelist/treelistbox.cxx | 2 | ||||
-rw-r--r-- | vcl/win/gdi/salnativewidgets-luna.cxx | 3 |
6 files changed, 10 insertions, 4 deletions
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index ad1362d438de..481d7a90e5fe 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -1017,6 +1017,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) { + if (rControlRegion.IsEmpty()) // nothing to do + return false; bool toReturn = false; tools::Rectangle aCtrlBoundRect( rControlRegion ); 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); } } diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index 422a86c27045..1b49bfba61ad 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -1155,6 +1155,9 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, bool bOk = false; HTHEME hTheme = nullptr; + if (rControlRegion.IsEmpty()) // nothing to do + return true; + tools::Rectangle buttonRect = rControlRegion; tools::Rectangle cacheRect = rControlRegion; Size keySize = cacheRect.GetSize(); |