[Libreoffice-commits] .: Branch 'libreoffice-3-4' - 2 commits -
Noel Power
noelp at kemper.freedesktop.org
Fri May 20 03:12:46 PDT 2011
0 files changed
New commits:
commit 6a5fc45bb00dbe99b257be2aa5a81deeb6ced1ca
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri May 20 09:47:43 2011 +0000
fdo#36690: Don't broadcast setting changes during painting of button.
Calling SetSettings() when the output device is Window causes it to
broadcast data change. PushButton::Draw() in fact calls this method
when the button contains colors, which ends up broadcasting its change
via Window::DataChanged call. But depending on the output device
this DataChanged call may end up painting it again, which basically
causes a recursive loop.
The solution is to make sure OutputDevice::SetSettings() is called ( which only
changes the settings without doing anything else ) and *not* and derived
classes 'SetSettings()' method
Signed-off-by: Noel Power <noel.power at novell.com>
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();
commit f71529593fc6e16554602638d100d02ac03bee75
Author: Noel Power <noel.power at novell.com>
Date: Fri May 20 11:06:46 2011 +0100
Revert "fdo#36690: Don't broadcast setting changes during painting of button."
This reverts commit 829d4abd5eda9b03c5d4518f43efc4444bc63935.
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 6932cdb..c77d14a 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->OutputDevice::SetSettings( aSettings );
+ pDev->SetSettings( aSettings );
}
pDev->SetTextFillColor();
More information about the Libreoffice-commits
mailing list