diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-05-23 19:44:15 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-05-23 20:51:12 +0000 |
commit | 0792e97bd7ea6f23c908bdebc4826b08c6265d55 (patch) | |
tree | 894b40b13a5d9aff3ebb119dad6b06c6e275be7c /vcl/source/control | |
parent | ba203843f5a209cb48e2d6f4ec4e3649982185ea (diff) |
VclPtr - add compat methods for old-style focus / notification.
The previous code would only invoke Window:: methods by the time we
hit the destructor; do the same to avoid fixing more scattered
crashers for now.
Change-Id: Ibdcd1290309bb7fc31a44d534c52d357da022591
Reviewed-on: https://gerrit.libreoffice.org/15880
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/button.cxx | 14 | ||||
-rw-r--r-- | vcl/source/control/combobox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/ctrl.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/fixed.cxx | 4 | ||||
-rw-r--r-- | vcl/source/control/ilstbox.cxx | 12 | ||||
-rw-r--r-- | vcl/source/control/lstbox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/scrbar.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/slider.cxx | 4 | ||||
-rw-r--r-- | vcl/source/control/spinbtn.cxx | 8 | ||||
-rw-r--r-- | vcl/source/control/spinfld.cxx | 2 |
11 files changed, 31 insertions, 31 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index d2f128a9f7ce..e8ab9c90da40 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1548,7 +1548,7 @@ void PushButton::SetSymbol( SymbolType eSymbol ) if ( meSymbol != eSymbol ) { meSymbol = eSymbol; - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } } @@ -1562,7 +1562,7 @@ void PushButton::SetDropDown( PushButtonDropdownStyle nStyle ) if ( mnDDStyle != nStyle ) { mnDDStyle = nStyle; - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } } @@ -1584,7 +1584,7 @@ void PushButton::SetState( TriState eState ) ImplGetButtonState() |= DrawButtonFlags::DontKnow; } - StateChanged( StateChangedType::State ); + CompatStateChanged( StateChangedType::State ); Toggle(); } } @@ -1594,7 +1594,7 @@ void PushButton::SetPressed( bool bPressed ) if ( mbPressed != bPressed ) { mbPressed = bPressed; - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } } @@ -2641,7 +2641,7 @@ bool RadioButton::SetModeRadioImage( const Image& rImage ) if ( rImage != maImage ) { maImage = rImage; - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); queue_resize(); } return true; @@ -2659,7 +2659,7 @@ void RadioButton::SetState( bool bCheck ) if ( mbChecked != bCheck ) { mbChecked = bCheck; - StateChanged( StateChangedType::State ); + CompatStateChanged( StateChangedType::State ); Toggle(); } } @@ -2716,7 +2716,7 @@ void RadioButton::Check( bool bCheck ) mbChecked = bCheck; ImplDelData aDelData; ImplAddDel( &aDelData ); - StateChanged( StateChangedType::State ); + CompatStateChanged( StateChangedType::State ); if ( aDelData.IsDead() ) return; if ( bCheck && mbRadioCheck ) diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index dde32dfa3fa2..59656c90344f 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -664,7 +664,7 @@ void ComboBox::StateChanged( StateChangedType nType ) mpBtn->EnableRTL( IsRTLEnabled() ); ImplInitDropDownButton( mpBtn ); } - mpSubEdit->StateChanged( StateChangedType::Mirroring ); + mpSubEdit->CompatStateChanged( StateChangedType::Mirroring ); mpImplLB->EnableRTL( IsRTLEnabled() ); Resize(); } diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index ed59e5d99aad..0c40a341b397 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -81,7 +81,7 @@ void Control::EnableRTL( bool bEnable ) // convenience: for controls also switch layout mode SetLayoutMode( bEnable ? TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT : TEXT_LAYOUT_TEXTORIGIN_LEFT ); - StateChanged( StateChangedType::Mirroring ); + CompatStateChanged( StateChangedType::Mirroring ); OutputDevice::EnableRTL(bEnable); } @@ -256,7 +256,7 @@ bool Control::Notify( NotifyEvent& rNEvt ) if ( !mbHasControlFocus ) { mbHasControlFocus = true; - StateChanged( StateChangedType::ControlFocus ); + CompatStateChanged( StateChangedType::ControlFocus ); if ( ImplCallEventListenersAndHandler( VCLEVENT_CONTROL_GETFOCUS, maGetFocusHdl, this ) ) // been destroyed within the handler return true; @@ -270,7 +270,7 @@ bool Control::Notify( NotifyEvent& rNEvt ) if ( !pFocusWin || !ImplIsWindowOrChild( pFocusWin ) ) { mbHasControlFocus = false; - StateChanged( StateChangedType::ControlFocus ); + CompatStateChanged( StateChangedType::ControlFocus ); if ( ImplCallEventListenersAndHandler( VCLEVENT_CONTROL_LOSEFOCUS, maLoseFocusHdl, this ) ) // been destroyed within the handler return true; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 558490387d0c..b196dfa2b2fa 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -2454,7 +2454,7 @@ void Edit::SetReadOnly( bool bReadOnly ) if ( mpSubEdit ) mpSubEdit->SetReadOnly( bReadOnly ); - StateChanged( StateChangedType::ReadOnly ); + CompatStateChanged( StateChangedType::ReadOnly ); } } diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 9d2c38fe8155..92ff28c15aa6 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -840,7 +840,7 @@ void FixedBitmap::DataChanged( const DataChangedEvent& rDCEvt ) void FixedBitmap::SetBitmap( const Bitmap& rBitmap ) { maBitmap = rBitmap; - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); queue_resize(); } @@ -1018,7 +1018,7 @@ void FixedImage::SetImage( const Image& rImage ) if ( rImage != maImage ) { maImage = rImage; - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); queue_resize(); } } diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index e9c4f92f2eb7..28e5889fcdd4 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -2205,7 +2205,7 @@ void ImplListBox::Clear() } mpVScrollBar->SetThumbPos( 0 ); mpHScrollBar->SetThumbPos( 0 ); - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } sal_Int32 ImplListBox::InsertEntry( sal_Int32 nPos, const OUString& rStr ) @@ -2217,7 +2217,7 @@ sal_Int32 ImplListBox::InsertEntry( sal_Int32 nPos, const OUString& rStr ) delete pNewEntry; return nNewPos; } - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); return nNewPos; } @@ -2230,14 +2230,14 @@ sal_Int32 ImplListBox::InsertEntry( sal_Int32 nPos, const OUString& rStr, const delete pNewEntry; return nNewPos; } - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); return nNewPos; } void ImplListBox::RemoveEntry( sal_Int32 nPos ) { maLBWindow->RemoveEntry( nPos ); - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } void ImplListBox::SetEntryFlags( sal_Int32 nPos, ListBoxEntryFlags nFlags ) @@ -2277,7 +2277,7 @@ void ImplListBox::Resize() IMPL_LINK_NOARG(ImplListBox, MRUChanged) { - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); return 1; } @@ -2593,7 +2593,7 @@ void ImplListBox::SetMRUEntries( const OUString& rEntries, sal_Unicode cSep ) { maLBWindow->GetEntryList()->SetMRUCount( nMRUCount ); SetSeparatorPos( nMRUCount ? nMRUCount-1 : 0 ); - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } } diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 60683d3f30af..857f78f3d714 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -1408,7 +1408,7 @@ void ListBox::SetReadOnly( bool bReadOnly ) if ( mpImplLB->IsReadOnly() != bReadOnly ) { mpImplLB->SetReadOnly( bReadOnly ); - StateChanged( StateChangedType::ReadOnly ); + CompatStateChanged( StateChangedType::ReadOnly ); } } diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 97a0748d9d24..2db7fc1bdcc7 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -1387,7 +1387,7 @@ void ScrollBar::SetRange( const Range& rRange ) if ( mnThumbPos < mnMinRange ) mnThumbPos = mnMinRange; - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } } @@ -1401,7 +1401,7 @@ void ScrollBar::SetThumbPos( long nNewThumbPos ) if ( mnThumbPos != nNewThumbPos ) { mnThumbPos = nNewThumbPos; - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } } @@ -1416,7 +1416,7 @@ void ScrollBar::SetVisibleSize( long nNewSize ) mnThumbPos = mnMaxRange-mnVisibleSize; if ( mnThumbPos < mnMinRange ) mnThumbPos = mnMinRange; - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } } diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index 4aa94ad8b427..4f0c7e1ebd9f 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -986,7 +986,7 @@ void Slider::SetRange( const Range& rRange ) if ( mnThumbPos < mnMinRange ) mnThumbPos = mnMinRange; ImplUpdateLinkedField(); - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } } @@ -1001,7 +1001,7 @@ void Slider::SetThumbPos( long nNewThumbPos ) { mnThumbPos = nNewThumbPos; ImplUpdateLinkedField(); - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } } diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx index 2f196d62a394..6d1d5f324172 100644 --- a/vcl/source/control/spinbtn.cxx +++ b/vcl/source/control/spinbtn.cxx @@ -76,7 +76,7 @@ void SpinButton::Up() if (ImplIsUpperEnabled()) { mnValue += mnValueStep; - StateChanged(StateChangedType::Data); + CompatStateChanged(StateChangedType::Data); ImplMoveFocus(true); } @@ -89,7 +89,7 @@ void SpinButton::Down() if (ImplIsLowerEnabled()) { mnValue -= mnValueStep; - StateChanged(StateChangedType::Data); + CompatStateChanged(StateChangedType::Data); ImplMoveFocus(false); } @@ -372,7 +372,7 @@ void SpinButton::SetRange( const Range& rRange ) if ( mnValue < mnMinRange ) mnValue = mnMinRange; - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } } @@ -387,7 +387,7 @@ void SpinButton::SetValue( long nValue ) if ( mnValue != nValue ) { mnValue = nValue; - StateChanged( StateChangedType::Data ); + CompatStateChanged( StateChangedType::Data ); } } diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index d5547dfc4db3..f64c5a7fe626 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -824,7 +824,7 @@ void SpinField::StateChanged(StateChangedType nType) else if( nType == StateChangedType::Mirroring ) { if (mpEdit) - mpEdit->StateChanged(StateChangedType::Mirroring); + mpEdit->CompatStateChanged(StateChangedType::Mirroring); Resize(); } } |