summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-08-30 18:08:15 -0400
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-09-04 11:05:00 +0200
commitde0993097cad2fd5819f8bea5ff53cddce7cde41 (patch)
tree5e8a7718662a960b101f15b40267a2e2e89fa375
parent75a96e22fd162a9410333698f57e4302ae190e66 (diff)
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@sil.org> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/source/core/layout/paintfrm.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index b78c230137de..f88d84a6a6f0 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6510,7 +6510,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 )
{
@@ -6604,7 +6604,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,
@@ -6649,7 +6648,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 );
}