summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2014-05-29 17:41:34 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-09-03 06:12:17 -0500
commit529f584b5e2e86273c812d42ada7a489e36b9cf3 (patch)
tree5d7ff4462eea427b57db1478bb058c305ff024ae
parent9a69d111c1f563b5a4f484154d1be36a5a92f3e6 (diff)
Allow STYLE_OPTION_MONO to be unset from toolkit-created window
This was keeping form controls (e.g. CheckBox and RadioButton) to transition from flat style to 3d style, while the 3d-to-flat transition was allowed, making flat some unescapable pit of doom. Whatever the goal of that pinning, it will have to be achieved in a different way. Change-Id: Icc4dfb9673a7dfe4a7d8726fbfd23f75499f8b41 Reviewed-on: https://gerrit.libreoffice.org/9554 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
-rw-r--r--include/vcl/ctrl.hxx1
-rw-r--r--vcl/source/control/ctrl.cxx25
2 files changed, 0 insertions, 26 deletions
diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx
index 4c707327ede2..e4ed1e408f8c 100644
--- a/include/vcl/ctrl.hxx
+++ b/include/vcl/ctrl.hxx
@@ -136,7 +136,6 @@ public:
virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
- virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
// invalidates layout data
virtual void SetText( const OUString& rStr ) SAL_OVERRIDE;
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 6baf5ae8ad9e..c505afa3d094 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -368,31 +368,6 @@ void Control::ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect )
pDev->OutputDevice::SetSettings( aOriginalSettings );
}
-void Control::DataChanged( const DataChangedEvent& rDCEvt)
-{
- // we don't want to lose some style settings for controls created with the
- // toolkit
- if ( IsCreatedWithToolkit() &&
- (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
- (rDCEvt.GetFlags() & SETTINGS_STYLE) )
- {
- const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
-
- AllSettings aSettings = GetSettings();
- StyleSettings aStyleSettings = aSettings.GetStyleSettings();
- sal_uLong nNewOptions = aStyleSettings.GetOptions();
-
- if ( pOldSettings && !(nNewOptions & STYLE_OPTION_MONO) && ( pOldSettings->GetStyleSettings().GetOptions() & STYLE_OPTION_MONO ) )
- {
- nNewOptions |= STYLE_OPTION_MONO;
- aStyleSettings.SetOptions( nNewOptions );
- aStyleSettings.SetMonoColor( pOldSettings->GetStyleSettings().GetMonoColor() );
- aSettings.SetStyleSettings( aStyleSettings );
- SetSettings( aSettings );
- }
- }
-}
-
ControlLayoutData::~ControlLayoutData()
{
if( m_pParent )