From 697590be0903edbf23b35be7a9c48910d59b938b Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Sat, 24 Dec 2016 19:46:34 +0200 Subject: Support icon theme change in a floating border control was unintentionally broken by 64a2dc962cd68c86281ed747d3dc96bc996115eb Change-Id: I3358d8104dd1e2200f84019a2c4c41f1e0019399 --- svx/source/tbxctrls/tbcontrl.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index bacad8901fd7..3362174b8ad4 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -273,6 +273,7 @@ public: virtual void dispose() override; virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException ) override; + virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; }; class SvxLineWindow_Impl : public svtools::ToolbarPopup @@ -1754,6 +1755,20 @@ void SvxFrameWindow_Impl::KeyInput( const KeyEvent& rKEvt ) aFrameSet->KeyInput( rKEvt ); } +void SvxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt ) +{ + ToolbarPopup::DataChanged( rDCEvt ); + + if ( ( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) && ( rDCEvt.GetFlags() & AllSettingsFlags::STYLE ) ) + { + InitImageList(); + + sal_uInt16 nNumOfItems = aFrameSet->GetItemCount(); + for ( sal_uInt16 i = 1 ; i <= nNumOfItems ; ++i ) + aFrameSet->SetItemImage( i, Image(aImgVec[i-1]) ); + } +} + enum class FrmValidFlags { NONE = 0x00, Left = 0x01, -- cgit