diff options
author | Justin Luth <justin.luth@collabora.com> | 2020-07-24 08:11:54 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2020-07-24 13:41:59 +0200 |
commit | c016fe2b5918d6e53113e100b1126076b6e1a6a3 (patch) | |
tree | 376b160a107c2626cf45b32baadb46bbfe609ffe /sw | |
parent | b827eefd6397dc34b49a03e186146aed6cd80042 (diff) |
tdf#99492 sw layout: always paint merged cell grids
So the logic goes like this:
1.) paint table background
2.) paint row X background
3.) paint row X's cell backgrounds
So far so good. The cell background overrides all others.
4.) paint row Y background.
Well, now it has painted over top of any merged Y grids,
and thus covered cells need to paint themselves again.
5.) paint row Y's cells, NOT excluding covered cells.
Dropping this "optimization" of ignoring the covered cell
shouldn't impact performance too much since merged cells
are not super common.
One alternative option would be to determine if the
row has a background fill, and only paint all the
merged grids in that case. But that isn't trivial,
and so the processing of determining that might
as well be used to just paint the cell background again.
The only other option is to paint all rows first,
and then paint all the cells. But the logic of
this generic function doesn't easily allow for that.
Unfortunately, I couldn't see how to create a unit test
since layout.xml doesn't include color at all.
However, Office Interoperability Testing should catch it since
there are a couple of clear examples attached to the bug report.
Change-Id: Ie2c3776ab062dbb51c88134291e8901e71838b18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99343
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index b6d5a9159f34..37a5bba27ed0 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -6195,10 +6195,6 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP return; } - // nothing to do for covered table cells: - if( IsCellFrame() && IsCoveredCell() ) - return; - SwViewShell *pSh = gProp.pSGlobalShell; // #i16816# tagged pdf support |