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

Caolán McNamara caolanm at redhat.com
Tue Jul 1 05:24:23 PDT 2014


 sw/source/ui/frmdlg/frmpage.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 1ad76412e3fa74f2b7547d7cc283933775b2760e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 30 16:29:48 2014 +0100

    Resolves: fdo#80681 widget is not transparent
    
    regression from 12dfca2ea61116665a7abefd43a9a4caa2b8920b
    Author: Armin Le Grand <alg at apache.org>
    Date:   Mon May 14 15:16:00 2012 +0000
        Resolves: #i119307# added deletion of sw's BmpWindow control...
        ...due to the fact that graphics may be transparent
    
    Change-Id: I7eb2ee8ed53f0ef907a4573a735c71de43b6e8d3
    (cherry picked from commit 1caad856de1c1c5b0a8c31d2226416a2db9632cd)
    Reviewed-on: https://gerrit.libreoffice.org/9987
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index de476b5..0fbdfb9 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2595,8 +2595,12 @@ BmpWindow::BmpWindow(Window* pPar, WinBits nStyle)
     , bGraphic(false)
     , bLeftAlign(false)
 {
-    // #i119307# use background, the graphic might have transparency
-    SetBackground(Wallpaper(Color(COL_WHITE)));
+    SetBackground();
+    SetPaintTransparent(sal_True);
+    // #i119307# the graphic might have transparency, set up white as the color
+    // to use when drawing a rectangle under the image
+    SetLineColor(COL_WHITE);
+    SetFillColor(COL_WHITE);
 }
 
 Size BmpWindow::GetOptimalSize() const
@@ -2654,7 +2658,7 @@ void BmpWindow::Paint( const Rectangle& )
     }
 
     // #i119307# clear window background, the graphic might have transparency
-    Erase();
+    DrawRect(Rectangle(aPntPos, aPntSz));
 
     if ( bGraphic )
         aGraphic.Draw( this, aPntPos, aPntSz );


More information about the Libreoffice-commits mailing list