[Libreoffice-commits] core.git: Branch 'libreoffice-4-4-1' - sw/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Feb 20 04:15:43 PST 2015


 sw/source/core/layout/paintfrm.cxx |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit be3f5f82719930f415b5ca38451e8aa4bcd02027
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Feb 17 12:16:54 2015 +0100

    tdf#82661 SwFrm::PaintBackground: handle fill attrs when comparing background
    
    Regression from 7d9bb549d498d6beed2c4050c402d09643febdfa (Related:
    i#124638 Second step of DrawingLayer FillAttributes..., 2014-06-02),
    should be good enough till SdrAllFillAttributesHelper gets its own
    operator ==().
    
    Change-Id: I03f847bc1589e3771790427d9894cc330a7b8dc6
    (cherry picked from commit 1e33cd8355eb1d856a1439b4a095e379b3acf0bd)
    Reviewed-on: https://gerrit.libreoffice.org/14537
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 010cd7e81ef0f8c524ff764eed80e746caa1d94c)
    Reviewed-on: https://gerrit.libreoffice.org/14564

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 0dc99f5..84dfcf6 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6436,6 +6436,15 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
     pOut->Pop();
 }
 
+static bool lcl_compareFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& pA, const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& pB)
+{
+    if (pA == pB)
+        return true;
+    if (!pA || !pB)
+        return false;
+    return pA->getFillAttribute() == pB->getFillAttribute();
+}
+
 /// OD 05.09.2002 #102912#
 /// Do not paint background for fly frames without a background brush by
 /// calling <PaintBaBo> at the page or at the fly frame its anchored
@@ -6540,8 +6549,8 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
                 ::lcl_CalcBorderRect( aRect, this, rAttrs, false );
                 if ( (IsTxtFrm() || IsTabFrm()) && GetPrev() )
                 {
-                    if ( GetPrev()->GetAttrSet()->GetBackground() ==
-                         GetAttrSet()->GetBackground() )
+                    if ( GetPrev()->GetAttrSet()->GetBackground() == GetAttrSet()->GetBackground() &&
+                         lcl_compareFillAttributes(GetPrev()->getSdrAllFillAttributesHelper(), getSdrAllFillAttributesHelper()))
                     {
                         aRect.Top( Frm().Top() );
                     }


More information about the Libreoffice-commits mailing list