From 0f00751af858da91d379208b8b679002a180ff93 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 21 Dec 2016 17:23:33 +0000 Subject: unwind RID_STYLE_DESIGNER_IMAGELIST ImageList Change-Id: I8fd69aa8acc8aa2bb1705b3819cf089e618464b5 --- sfx2/source/dialog/dialog.hrc | 5 ++++- sfx2/source/dialog/templdlg.cxx | 17 +++++------------ sfx2/source/dialog/templdlg.src | 21 ++++++++++++--------- sfx2/source/inc/templdgi.hxx | 2 -- 4 files changed, 21 insertions(+), 24 deletions(-) diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc index 800f71750b18..c860dbd4b565 100644 --- a/sfx2/source/dialog/dialog.hrc +++ b/sfx2/source/dialog/dialog.hrc @@ -57,11 +57,14 @@ #define STR_PDF_EXPORT_SEND ( RC_DIALOG_BEGIN + 120 ) #define IMG_INFO ( RC_DIALOG_BEGIN + 122 ) -#define RID_STYLE_DESIGNER_IMAGELIST ( RC_DIALOG_BEGIN + 123 ) +//free #define SFX_ST_EDIT ( RC_DIALOG_BEGIN + 124 ) #define STR_STYLE_ELEMTLIST ( RC_DIALOG_BEGIN + 125 ) #define STR_FONT_TABPAGE ( RC_DIALOG_BEGIN + 126 ) #define STR_PREVIEW_CHECKBOX ( RC_DIALOG_BEGIN + 127 ) +#define RID_SFXBMP_WATERCAN ( RC_DIALOG_BEGIN + 128 ) +#define RID_SFXBMP_NEW_BY_EXAMPLE ( RC_DIALOG_BEGIN + 129 ) +#define RID_SFXBMP_UPDATE_BY_EXAMPLE ( RC_DIALOG_BEGIN + 130 ) #endif diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 8e5f32ea26a5..a8f6af17bb75 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -343,8 +343,6 @@ SfxTemplatePanelControl::SfxTemplatePanelControl(SfxBindings* pBindings, vcl::Wi { OSL_ASSERT(mpBindings!=nullptr); - pImpl->setNonFamilyImages(); - SetStyle(GetStyle() & ~WB_DOCKABLE); } @@ -2176,26 +2174,26 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(SfxBindings* pB, SfxTemplatePanel ::comphelper::getProcessComponentContext()) ); uno::Reference< container::XNameAccess > xUICommands; OUString sTextDoc("com.sun.star.text.TextDocument"); - if(xNameAccess->hasByName(sTextDoc)) + if (xNameAccess->hasByName(sTextDoc)) { - uno::Any a = xNameAccess->getByName( sTextDoc ); + uno::Any a = xNameAccess->getByName(sTextDoc); a >>= xUICommands; } if (xUICommands.is()) { uno::Any aCommand = xUICommands->getByName(".uno:StyleApply"); OUString sLabel = lcl_GetLabel( aCommand ); - m_aActionTbR->InsertItem( SID_STYLE_WATERCAN, sLabel ); + m_aActionTbR->InsertItem(SID_STYLE_WATERCAN, Image(BitmapEx(SfxResId(RID_SFXBMP_WATERCAN))), sLabel); m_aActionTbR->SetHelpId(SID_STYLE_WATERCAN, HID_TEMPLDLG_WATERCAN); aCommand = xUICommands->getByName(".uno:StyleNewByExample"); sLabel = lcl_GetLabel( aCommand ); - m_aActionTbR->InsertItem( SID_STYLE_NEW_BY_EXAMPLE, sLabel ); + m_aActionTbR->InsertItem(SID_STYLE_NEW_BY_EXAMPLE, Image(BitmapEx(SfxResId(RID_SFXBMP_NEW_BY_EXAMPLE))), sLabel); m_aActionTbR->SetHelpId(SID_STYLE_NEW_BY_EXAMPLE, HID_TEMPLDLG_NEWBYEXAMPLE); aCommand = xUICommands->getByName(".uno:StyleUpdateByExample"); sLabel = lcl_GetLabel( aCommand ); - m_aActionTbR->InsertItem( SID_STYLE_UPDATE_BY_EXAMPLE, sLabel ); + m_aActionTbR->InsertItem(SID_STYLE_UPDATE_BY_EXAMPLE, Image(BitmapEx(SfxResId(RID_SFXBMP_UPDATE_BY_EXAMPLE))), sLabel); m_aActionTbR->SetHelpId(SID_STYLE_UPDATE_BY_EXAMPLE, HID_TEMPLDLG_UPDATEBYEXAMPLE); } } @@ -2251,11 +2249,6 @@ void SfxTemplateDialog_Impl::ReplaceUpdateButtonByMenu() ToolBoxItemBits::DROPDOWNONLY|m_aActionTbR->GetItemBits( SID_STYLE_NEW_BY_EXAMPLE )); } -void SfxTemplateDialog_Impl::setNonFamilyImages() -{ - m_aActionTbR->SetImageList(ImageList(SfxResId(RID_STYLE_DESIGNER_IMAGELIST))); -} - void SfxTemplateDialog_Impl::ClearFamilyList() { m_aActionTbL->Clear(); diff --git a/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src index 0381acfbb7c8..ee0e92df8d1e 100644 --- a/sfx2/source/dialog/templdlg.src +++ b/sfx2/source/dialog/templdlg.src @@ -21,16 +21,19 @@ #include "dialog.hrc" #include "helpid.hrc" -ImageList RID_STYLE_DESIGNER_IMAGELIST +Bitmap RID_SFXBMP_WATERCAN { - Prefix = "sc"; - IdList = - { - SID_STYLE_WATERCAN ; - SID_STYLE_NEW_BY_EXAMPLE ; - SID_STYLE_UPDATE_BY_EXAMPLE ; - }; - IdCount = { 3 ; }; + File = "sc05554.png"; +}; + +Bitmap RID_SFXBMP_NEW_BY_EXAMPLE +{ + File = "sc05555.png"; +}; + +Bitmap RID_SFXBMP_UPDATE_BY_EXAMPLE +{ + File = "sc05556.png"; }; // Strings --------------------------------------------------------------- diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 738f8b22b762..ab9cb30eb94f 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -367,8 +367,6 @@ protected: void Resize(); Size GetMinOutputSizePixel(); - void setNonFamilyImages(); - public: friend class SfxTemplateDialog; -- cgit