[Libreoffice-commits] core.git: extensions/source

Caolán McNamara caolanm at redhat.com
Sat Dec 24 15:29:08 UTC 2016


 extensions/source/bibliography/bib.hrc     |   13 ++++++----
 extensions/source/bibliography/toolbar.cxx |   35 ++++++++++-----------------
 extensions/source/bibliography/toolbar.hxx |    2 -
 extensions/source/bibliography/toolbar.src |   37 ++++++++++++++++++-----------
 4 files changed, 44 insertions(+), 43 deletions(-)

New commits:
commit ab72a07f1a1213bf6f9515058865fb898ff7bf24
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 24 15:27:39 2016 +0000

    unwind RID_TOOLBAR_IMGLIST and RID_TOOLBAR_BIGIMGLIST ImageLists
    
    Change-Id: Iae7ffce940f90e48dfb95b33abab35ca03a6b305

diff --git a/extensions/source/bibliography/bib.hrc b/extensions/source/bibliography/bib.hrc
index 2a08819..5c7ea6e 100644
--- a/extensions/source/bibliography/bib.hrc
+++ b/extensions/source/bibliography/bib.hrc
@@ -25,11 +25,14 @@
 #define RID_BIB_START                   RID_EXTENSIONS_START
 #endif
 
-//Controls(100)
-#define RID_BIB_CONTROLS            (RID_BIB_START + 100)
-#define RID_TOOLBAR_IMGLIST         (RID_BIB_CONTROLS+ 2)
-// free
-#define RID_TOOLBAR_BIGIMGLIST      (RID_BIB_CONTROLS+ 4)
+//Bitmaps(100)
+#define RID_BIB_IMAGES                   (RID_BIB_START + 100)
+#define RID_EXTBMP_AUTOFILTER_SC         (RID_BIB_IMAGES + 1)
+#define RID_EXTBMP_FILTERCRIT_SC         (RID_BIB_IMAGES + 2)
+#define RID_EXTBMP_REMOVE_FILTER_SORT_SC (RID_BIB_IMAGES + 3)
+#define RID_EXTBMP_AUTOFILTER_LC         (RID_BIB_IMAGES + 4)
+#define RID_EXTBMP_FILTERCRIT_LC         (RID_BIB_IMAGES + 5)
+#define RID_EXTBMP_REMOVE_FILTER_SORT_LC (RID_BIB_IMAGES + 6)
 
 // Strings (500)
 #define RID_BIB_STRING              (RID_BIB_START + 200)
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index db6fb3e..9f5541d 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -175,18 +175,16 @@ void BibTBEditListener::statusChanged(const frame::FeatureStateEvent& rEvt)throw
 
 BibToolBar::BibToolBar(vcl::Window* pParent, Link<void*,void> aLink)
     : ToolBox(pParent, "toolbar", "modules/sbibliography/ui/toolbar.ui")
-    , aImgLst(BibResId(  RID_TOOLBAR_IMGLIST     )),
-    aBigImgLst(BibResId( RID_TOOLBAR_BIGIMGLIST )),
-    aFtSource(VclPtr<FixedText>::Create(this,WB_VCENTER)),
-    aLBSource(VclPtr<ListBox>::Create(this,WB_DROPDOWN)),
-    aFtQuery(VclPtr<FixedText>::Create(this,WB_VCENTER)),
-    aEdQuery(VclPtr<Edit>::Create(this)),
-    pPopupMenu(VclPtr<PopupMenu>::Create()),
-    nMenuId(0),
-    nSelMenuItem(0),
-    aLayoutManager( aLink ),
-    nSymbolsSize( SFX_SYMBOLS_SIZE_SMALL ),
-    nOutStyle( 0 )
+    , aFtSource(VclPtr<FixedText>::Create(this,WB_VCENTER))
+    , aLBSource(VclPtr<ListBox>::Create(this,WB_DROPDOWN))
+    , aFtQuery(VclPtr<FixedText>::Create(this,WB_VCENTER))
+    , aEdQuery(VclPtr<Edit>::Create(this))
+    , pPopupMenu(VclPtr<PopupMenu>::Create())
+    , nMenuId(0)
+    , nSelMenuItem(0)
+    , aLayoutManager(aLink)
+    , nSymbolsSize(SFX_SYMBOLS_SIZE_SMALL)
+    , nOutStyle(0)
 {
     SvtMiscOptions aSvtMiscOptions;
     nSymbolsSize = aSvtMiscOptions.GetCurrentSymbolsSize();
@@ -556,7 +554,6 @@ IMPL_LINK_NOARG( BibToolBar, OptionsChanged_Impl, LinkParamNone*, void )
         RebuildToolbar();
 }
 
-
 IMPL_LINK_NOARG( BibToolBar, SettingsChanged_Impl, VclSimpleEvent&, void )
 {
     // Check if toolbar button size have changed and we have to use system settings
@@ -568,7 +565,6 @@ IMPL_LINK_NOARG( BibToolBar, SettingsChanged_Impl, VclSimpleEvent&, void )
     }
 }
 
-
 void BibToolBar::RebuildToolbar()
 {
     ApplyImageList();
@@ -576,16 +572,11 @@ void BibToolBar::RebuildToolbar()
     Application::PostUserEvent( aLayoutManager );
 }
 
-
 void BibToolBar::ApplyImageList()
 {
-    ImageList& rList = ( nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ) ?
-                       ( aImgLst ) :
-                       ( aBigImgLst );
-
-    SetItemImage(nTBC_BT_AUTOFILTER  , rList.GetImage(SID_FM_AUTOFILTER));
-    SetItemImage(nTBC_BT_FILTERCRIT  , rList.GetImage(SID_FM_FILTERCRIT));
-    SetItemImage(nTBC_BT_REMOVEFILTER, rList.GetImage(SID_FM_REMOVE_FILTER_SORT ));
+    SetItemImage(nTBC_BT_AUTOFILTER, Image(BitmapEx(BibResId(nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? RID_EXTBMP_AUTOFILTER_SC : RID_EXTBMP_AUTOFILTER_LC))));
+    SetItemImage(nTBC_BT_FILTERCRIT, Image(BitmapEx(BibResId(nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? RID_EXTBMP_FILTERCRIT_SC : RID_EXTBMP_FILTERCRIT_LC))));
+    SetItemImage(nTBC_BT_REMOVEFILTER, Image(BitmapEx(BibResId(nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ? RID_EXTBMP_REMOVE_FILTER_SORT_SC : RID_EXTBMP_REMOVE_FILTER_SORT_LC))));
     AdjustToolBox();
 }
 
diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx
index e6f4d1a..fc6f01b 100644
--- a/extensions/source/bibliography/toolbar.hxx
+++ b/extensions/source/bibliography/toolbar.hxx
@@ -110,8 +110,6 @@ class BibToolBar:   public ToolBox
         BibToolBarListenerArr   aListenerArr;
         css::uno::Reference< css::frame::XController >  xController;
         Idle                    aIdle;
-        ImageList               aImgLst;
-        ImageList               aBigImgLst;
         VclPtr<FixedText>       aFtSource;
         VclPtr<ListBox>         aLBSource;
         VclPtr<FixedText>       aFtQuery;
diff --git a/extensions/source/bibliography/toolbar.src b/extensions/source/bibliography/toolbar.src
index d510360..24a6dc7 100644
--- a/extensions/source/bibliography/toolbar.src
+++ b/extensions/source/bibliography/toolbar.src
@@ -21,25 +21,34 @@
 #include "svx/svxcommands.h"
 #include "bib.hrc"
 
-#define BIB_IMAGES \
-    IdList =                                \
-    {                                       \
-        SID_FM_AUTOFILTER;      /*10716*/     \
-        SID_FM_FILTERCRIT;      /*10715*/     \
-        SID_FM_REMOVE_FILTER_SORT ; /*10711*/ \
-    };                                     \
-    IdCount = { 3; };
+Bitmap RID_EXTBMP_AUTOFILTER_SC
+{
+    File = "sc10716.png";
+};
+
+Bitmap RID_EXTBMP_FILTERCRIT_SC
+{
+    File = "sc10715.png";
+};
+
+Bitmap RID_EXTBMP_REMOVE_FILTER_SORT_SC
+{
+    File = "sc10711.png";
+};
+
+Bitmap RID_EXTBMP_AUTOFILTER_LC
+{
+    File = "lc10716.png";
+};
 
-ImageList RID_TOOLBAR_IMGLIST
+Bitmap RID_EXTBMP_FILTERCRIT_LC
 {
-    Prefix = "sc";
-    BIB_IMAGES
+    File = "lc10715.png";
 };
 
-ImageList RID_TOOLBAR_BIGIMGLIST
+Bitmap RID_EXTBMP_REMOVE_FILTER_SORT_LC
 {
-    Prefix = "lc";
-    BIB_IMAGES
+    File = "lc10711.png";
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list