diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-25 14:06:09 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-25 14:06:12 +0100 |
commit | e83d0d9b3b82a604e373a975524e84626efd160e (patch) | |
tree | c02509703431989a44f5e74453be6e1b16602a21 | |
parent | f144d592fb5c314680e397e3ac686721fb2bc3d6 (diff) |
we don't need to update the style icons anymore
once this was a dialog but now its a panel and the case of a the document under
the dialog changing type isn't an issue anymore
Change-Id: I4680cf238675161c533852d843508a19c74a9073
-rw-r--r-- | include/sfx2/templdlg.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 36 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 3 |
3 files changed, 3 insertions, 37 deletions
diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx index 4f918c839205..a34f78ff50a6 100644 --- a/include/sfx2/templdlg.hxx +++ b/include/sfx2/templdlg.hxx @@ -37,7 +37,6 @@ public: virtual ~SfxTemplatePanelControl() override; virtual void dispose() override; - virtual void DataChanged( const DataChangedEvent& _rDCEvt ) override; virtual void Resize() override; virtual void StateChanged( StateChangedType nStateChange ) override; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 4f93ea913e27..c566eb3fa76e 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -349,7 +349,7 @@ SfxTemplatePanelControl::SfxTemplatePanelControl(SfxBindings* pBindings, vcl::Wi { OSL_ASSERT(mpBindings!=nullptr); - pImpl->updateNonFamilyImages(); + pImpl->setNonFamilyImages(); SetStyle(GetStyle() & ~WB_DOCKABLE); } @@ -365,18 +365,6 @@ void SfxTemplatePanelControl::dispose() Window::dispose(); } -void SfxTemplatePanelControl::DataChanged( const DataChangedEvent& _rDCEvt ) -{ - if ( ( DataChangedEventType::SETTINGS == _rDCEvt.GetType() ) && - ( AllSettingsFlags::STYLE & _rDCEvt.GetFlags() ) ) - { - pImpl->updateFamilyImages(); - pImpl->updateNonFamilyImages(); - } - - Window::DataChanged( _rDCEvt ); -} - void SfxTemplatePanelControl::Resize() { if(pImpl) @@ -2310,26 +2298,7 @@ void SfxTemplateDialog_Impl::ReplaceUpdateButtonByMenu() ToolBoxItemBits::DROPDOWNONLY|m_aActionTbR->GetItemBits( SID_STYLE_NEW_BY_EXAMPLE )); } -void SfxTemplateDialog_Impl::updateFamilyImages() -{ - if ( !m_pStyleFamiliesId ) - // we do not have a resource id to load the new images from - return; - - // let the families collection update the images - pStyleFamilies->updateImages( *m_pStyleFamiliesId ); - - // and set the new images on our toolbox - size_t nLoop = pStyleFamilies->size(); - for( ; nLoop--; ) - { - const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nLoop ); - sal_uInt16 nId = SfxTemplate::SfxFamilyIdToNId( pItem->GetFamily() ); - m_aActionTbL->SetItemImage( nId, pItem->GetImage() ); - } -} - -void SfxTemplateDialog_Impl::updateNonFamilyImages() +void SfxTemplateDialog_Impl::setNonFamilyImages() { m_aActionTbR->SetImageList(ImageList(SfxResId(RID_STYLE_DESIGNER_IMAGELIST))); } @@ -2362,7 +2331,6 @@ SfxTemplateDialog_Impl::~SfxTemplateDialog_Impl() void SfxTemplateDialog_Impl::LoadedFamilies() { - updateFamilyImages(); Resize(); } diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index a0a02d1811e7..980302907fdb 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -369,8 +369,7 @@ protected: void Resize(); Size GetMinOutputSizePixel(); - void updateFamilyImages(); - void updateNonFamilyImages(); + void setNonFamilyImages(); public: friend class SfxTemplateDialog; |