Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Kohei,

On Fri, 2011-05-20 at 00:45 -0400, Kohei Yoshida wrote:
https://bugs.freedesktop.org/show_bug.cgi?id=36690

and I would like to push this to the -3-4 branch and possibly to the
-3-4-0 branch as well.  The patch is against vcl.
..
Calc races during print preview when the sheet contains buttons with
colors.  The reason is as follows:

        Great description.

When the PushButton::Draw changes the style setting, I'm pretty sure it
never intends to broadcast the change to anyone, yet it does because
SetSettings is virtual.

        right.

  So what my patch does is to allow it to simply
change the style setting without broadcasting it, and that's enough to
end this infinite re-paint cycle.

        Weelll ... it seems that (for all its ugliness) the more common way of
doing this inside button.cxx's draw code (cf. ImplDrawPushButtonFrame)
seems to be this:

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index c77d14a..6932cdb 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1522,7 +1522,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& 
rSize,
         else
             aStyleSettings.SetFaceColor( GetSettings().GetStyleSettings().GetFaceColor() );
         aSettings.SetStyleSettings( aStyleSettings );
-        pDev->SetSettings( aSettings );
+        pDev->OutputDevice::SetSettings( aSettings );
     }
     pDev->SetTextFillColor();

 
        I'd feel happier with that personally too, it also seems to fix the
bug.

        Thanks !

                Michael.

-- 
 michael.meeks@novell.com  <><, Pseudo Engineer, itinerant idiot



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.