diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-06-11 23:15:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-06-12 11:36:28 +0200 |
commit | cdea5f4ceb2d59ae739a8435e4888a302bb0d260 (patch) | |
tree | c3316c46f60eb5e132dad63098aae07ea0fd2a8f /sw | |
parent | b25186b6701f0770127b38ecd7744901d2c5fe72 (diff) |
Fix failing assert "!mbWidthEmpty"
After a46a257794f1f53b294735fc876c394be23a3811 "improve empty tools::Rectangle
(width)", ´make clean && make CppunitTest_desktop_lib` fails with
> #8 0x00007f5651bfc566 in __GI___assert_fail (assertion=0x7f563520c4b6 "!mbWidthEmpty", file=0x7f563536311f "include/tools/gen.hxx", line=390, function=0x7f56353300cb "long tools::Rectangle::Right() const") at /usr/src/debug/glibc-2.29-24-g2ec0b166bf/assert/assert.c:101
> #9 0x00007f5635bc769b in tools::Rectangle::Right() const (this=0x7fff9fcd5140) at include/tools/gen.hxx:390
> #10 0x00007f56364f7f77 in lcl_paintBitmapExToRect(OutputDevice*, Point const&, Size const&, BitmapEx const&, PaintArea) (pOut=0x24cceb0, aPoint=..., aSize=..., rBitmapEx=..., eArea=LEFT) at sw/source/core/layout/paintfrm.cxx:5699
> #11 0x00007f56364e5080 in SwPageFrame::PaintBorderAndShadow(SwRect const&, SwViewShell const*, bool, bool, bool) (_rPageRect=..., _pViewShell=0x242dba0, bPaintLeftShadow=true, bPaintRightShadow=true, bRightSidebar=true) at sw/source/core/layout/paintfrm.cxx:5862
> #12 0x00007f56364e0989 in SwRootFrame::PaintSwFrame(OutputDevice&, SwRect const&, SwPrintData const*) const (this=0x1f554c0, rRenderContext=..., rRect=..., pPrintData=0x0) at sw/source/core/layout/paintfrm.cxx:3122
> #13 0x00007f5636c57816 in SwViewShell::Paint(OutputDevice&, tools::Rectangle const&) (this=0x242dba0, rRenderContext=..., rRect=...) at sw/source/core/view/viewsh.cxx:1840
> #14 0x00007f5635cd6fbe in SwCursorShell::Paint(OutputDevice&, tools::Rectangle const&) (this=0x242dba0, rRenderContext=..., rRect=...) at sw/source/core/crsr/crsrsh.cxx:1411
> #15 0x00007f56370c3baf in SwEditWin::Paint(OutputDevice&, tools::Rectangle const&) (this=0x2491bf0, rRenderContext=..., rRect=...) at sw/source/uibase/docvw/edtwin2.cxx:449
> #16 0x00007f5640771bae in PaintHelper::DoPaint(vcl::Region const*) (this=0x7fff9fcd7ab0, pRegion=0x0) at vcl/source/window/paint.cxx:301
> #17 0x00007f56407738dd in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) (this=0x2491bf0, pRegion=0x0, nPaintFlags=(ImplPaintFlags::PaintAll | ImplPaintFlags::PaintChildren | ImplPaintFlags::Erase)) at vcl/source/window/paint.cxx:605
[...]
Change-Id: I039a175a732e0ecec3ac1d3bba2cb9195d6d7686
Reviewed-on: https://gerrit.libreoffice.org/73842
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index dd6016161955..5d6d89a7a70c 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -5694,12 +5694,15 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin // this, always paint the background color before doing the real paint. tools::Rectangle aRect(aPoint, aSize); - switch (eArea) + if (!aRect.IsEmpty()) { + switch (eArea) + { case LEFT: aRect.SetLeft( aRect.Right() - 1 ); break; case RIGHT: aRect.SetRight( aRect.Left() + 1 ); break; case TOP: aRect.SetTop( aRect.Bottom() - 1 ); break; case BOTTOM: aRect.SetBottom( aRect.Top() + 1 ); break; + } } pOut->SetFillColor(SwViewOption::GetAppBackgroundColor()); |