[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sw/source
Justin Luth
justin_luth at sil.org
Wed Nov 8 08:14:29 UTC 2017
sw/source/core/layout/paintfrm.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 0dda116236e1532f2006f488b974bb9c7067ac5f
Author: Justin Luth <justin_luth at sil.org>
Date: Wed Aug 30 18:08:15 2017 -0400
tdf#104602: don't re-draw page background when bOnlyTextBackground
In 2014 Writer gained support for Paragraph and PageStyle DrawingLayer
FillAttributes, it changed some behaviour with PaintBackground,
so that compat setting BACKGROUND_PARA_OVER_DRAWINGS now overwrote
the entire "hell" layer as the page background was re-applied.
Only DOCX uses this 2012 compatibility setting.
Change-Id: I69517efb7d82acd719d6a27a09ba61554dbf1ec9
Reviewed-on: https://gerrit.libreoffice.org/41744
Reviewed-by: Justin Luth <justin_luth at sil.org>
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit de0993097cad2fd5819f8bea5ff53cddce7cde41)
Reviewed-on: https://gerrit.libreoffice.org/41902
(cherry picked from commit 7117e92448ea328bd4798e873a2faecda748a369)
Reviewed-on: https://gerrit.libreoffice.org/44442
Tested-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index ba8fdc916207..68d1440ac520 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6543,7 +6543,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage,
if( IsTextFrame() || IsSctFrame() )
aPaintRect = UnionFrame( true );
- if ( aPaintRect.IsOver( rRect ) )
+ if ( (!bOnlyTextBackground || IsTextFrame()) && aPaintRect.IsOver( rRect ) )
{
if ( bBack || bPageFrame || !bLowerMode )
{
@@ -6637,7 +6637,6 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage,
// background transparency have to be considered
// Set missing 5th parameter to the default value GRFNUM_NO
// - see declaration in /core/inc/frmtool.hxx.
- if (IsTextFrame() || !bOnlyTextBackground)
::DrawGraphic(
pItem,
pOut,
@@ -6682,7 +6681,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage,
if ( ( pFrame->IsLayoutFrame() && bLowerBorder ) ||
aFrameRect.IsOver( aRect ) )
pFrame->PaintBackground( aRect, pPage, rTmpAttrs, bLowMode,
- bLowerBorder );
+ bLowerBorder, bOnlyTextBackground );
if ( bLowerBorder )
pFrame->PaintBorder( aBorderRect, pPage, rTmpAttrs );
}
More information about the Libreoffice-commits
mailing list