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.me...@novell.com <><, Pseudo Engineer, itinerant idiot _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice