summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-25 14:06:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-25 14:06:12 +0100
commite83d0d9b3b82a604e373a975524e84626efd160e (patch)
treec02509703431989a44f5e74453be6e1b16602a21 /sfx2
parentf144d592fb5c314680e397e3ac686721fb2bc3d6 (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
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/templdlg.cxx36
-rw-r--r--sfx2/source/inc/templdgi.hxx3
2 files changed, 3 insertions, 36 deletions
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;