summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2019-06-11 19:41:37 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2019-06-12 02:28:34 +0200
commitd6ee728dfe2b346217acc5a0d231c7b62e8e61ae (patch)
tree77b5c958091d3704d412371978d2b7a24c44a72c /sd/source
parent7aaa7212f2f37606b34d44a039398f05c02d5660 (diff)
Fix assert on loading a video presentation in gtk3
Regression from commit a46a257794f1 ("improve empty tools::Rectangle (width)"). Change-Id: I2d6d5bc140fe4012a5b17bb01fd325225cb776b8 Reviewed-on: https://gerrit.libreoffice.org/73844 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/slidesorter/view/SlideSorterView.cxx3
-rw-r--r--sd/source/ui/slidesorter/view/SlsLayouter.cxx4
2 files changed, 7 insertions, 0 deletions
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 2616e93eee60..36cd90066363 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -638,6 +638,9 @@ void SlideSorterView::Paint (
OutputDevice& rDevice,
const ::tools::Rectangle& rRepaintArea)
{
+ if (rRepaintArea.IsEmpty())
+ return;
+
if ( ! mpPageObjectPainter)
if ( ! GetPageObjectPainter())
return;
diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
index c2332a69c56e..ac16ea895050 100644
--- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
@@ -814,6 +814,10 @@ Range Layouter::Implementation::GetValidVerticalSizeRange() const
Range Layouter::Implementation::GetRangeOfVisiblePageObjects (const ::tools::Rectangle& aVisibleArea) const
{
+ // technically that's not empty, but it's the default, so...
+ if (aVisibleArea.IsEmpty())
+ return Range(-1, -1);
+
const sal_Int32 nRow0 (GetRowAtPosition(aVisibleArea.Top(), true, GM_NEXT));
const sal_Int32 nCol0 (GetColumnAtPosition(aVisibleArea.Left(),true, GM_NEXT));
const sal_Int32 nRow1 (GetRowAtPosition(aVisibleArea.Bottom(), true, GM_PREVIOUS));