[Libreoffice-commits] core.git: include/sfx2 sfx2/source
Caolán McNamara
caolanm at redhat.com
Tue Oct 25 13:07:52 UTC 2016
include/sfx2/templdlg.hxx | 1 -
sfx2/source/dialog/templdlg.cxx | 36 ++----------------------------------
sfx2/source/inc/templdgi.hxx | 3 +--
3 files changed, 3 insertions(+), 37 deletions(-)
New commits:
commit e83d0d9b3b82a604e373a975524e84626efd160e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 25 14:06:09 2016 +0100
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
diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx
index 4f918c8..a34f78f 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 4f93ea9..c566eb3 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 a0a02d1..9803029 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;
More information about the Libreoffice-commits
mailing list