[Libreoffice-commits] core.git: 4 commits - bin/update_pch include/svtools svtools/source

Caolán McNamara caolanm at redhat.com
Wed Jan 18 13:12:32 UTC 2017


 bin/update_pch                       |    1 -
 include/svtools/sores.hxx            |    5 -----
 include/svtools/svtools.hrc          |   19 ++++++-------------
 svtools/source/contnr/fileview.cxx   |    2 +-
 svtools/source/contnr/fileview.src   |   10 ++++------
 svtools/source/contnr/foldertree.cxx |    4 ++--
 svtools/source/contnr/svcontnr.src   |    8 ++++----
 svtools/source/contnr/svimpbox.cxx   |    4 ++--
 svtools/source/dialogs/so3res.src    |    4 ----
 svtools/source/misc/imagemgr.cxx     |    2 +-
 svtools/source/misc/imagemgr.src     |    8 --------
 11 files changed, 20 insertions(+), 47 deletions(-)

New commits:
commit f8f7c400bcc20af7ee21f982951ad5eafe28f027
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 18 12:54:26 2017 +0000

    svtools: load BitmapEx resources instead of Image ones
    
    Change-Id: Ifc852b1cb886b30abdf1061b73c2b600334264c6

diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index a8df827..ce64c93 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -243,9 +243,11 @@
 #define DLG_ADDRESSBOOKSOURCE           (RID_SVTOOLS_START+114)
 
 // bitmaps
-
-#define BMP_PLUGIN                      (RID_SVTOOLS_BITMAP_START +   3)
-// free
+#define RID_BMP_TREENODE_COLLAPSED      (RID_SVTOOLS_BITMAP_START +   0)
+#define RID_BMP_TREENODE_EXPANDED       (RID_SVTOOLS_BITMAP_START +   1)
+#define RID_BMP_FOLDER                  (RID_SVTOOLS_BITMAP_START +   2)
+#define RID_BMP_FOLDER_OPEN             (RID_SVTOOLS_BITMAP_START +   3)
+#define BMP_PLUGIN                      (RID_SVTOOLS_BITMAP_START +   4)
 #define BMP_CURRENT                     (RID_SVTOOLS_BITMAP_START +   5)
 #define BMP_MODIFIED                    (RID_SVTOOLS_BITMAP_START +   6)
 #define BMP_NEW                         (RID_SVTOOLS_BITMAP_START +   7)
@@ -354,13 +356,6 @@
 #define BMP_OO_WRITER_TEMPLATE_LC       (RID_SVTOOLS_BITMAP_START + 110)
 #define BMP_EXTENSION_LC                (RID_SVTOOLS_BITMAP_START + 111)
 
-// images
-#define RID_IMG_TREENODE_COLLAPSED      (RID_SVTOOLS_START +  0)
-#define RID_IMG_TREENODE_EXPANDED       (RID_SVTOOLS_START +  1)
-
-#define IMG_SVT_FOLDER                  (RID_SVTOOLS_START + 42)
-#define IMG_SVT_FOLDER_OPEN             (RID_SVTOOLS_START + 43)
-
 #define STR_PARAGRAPH_START                 (STR_SVT_PRNDLG_START + 50)
 #define STR_PARAGRAPH                       (STR_PARAGRAPH_START + 0)
 
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index dde93560..d8c00d9 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1461,7 +1461,7 @@ SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommand
     ,mnSuspendSelectCallback    ( 0 )
     ,mbIsFirstResort            ( true )
     ,aIntlWrapper               ( Application::GetSettings().GetLanguageTag() )
-    ,maFolderImage              ( SvtResId( IMG_SVT_FOLDER ) )
+    ,maFolderImage              (BitmapEx(SvtResId(RID_BMP_FOLDER)))
     ,mxCmdEnv ( xEnv )
 
 {
diff --git a/svtools/source/contnr/fileview.src b/svtools/source/contnr/fileview.src
index 414bf3c..2ed91c0 100644
--- a/svtools/source/contnr/fileview.src
+++ b/svtools/source/contnr/fileview.src
@@ -68,16 +68,14 @@ String STR_SVT_GB
     Text [ en-US ] = "GB" ;
 };
 
-// Images ---------------------------------------------------------------------
-
-Image IMG_SVT_FOLDER
+Bitmap RID_BMP_FOLDER
 {
-    ImageBitmap = Bitmap { File = "folder.png" ; };
+    File = "folder.png";
 };
 
-Image IMG_SVT_FOLDER_OPEN
+Bitmap RID_BMP_FOLDER_OPEN
 {
-    ImageBitmap = Bitmap { File = "folderop.png" ; };
+    File = "folderop.png";
 };
 
 // Menus -----------------------------------------------------------------
diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx
index 3912759..2d6b8d1 100644
--- a/svtools/source/contnr/foldertree.cxx
+++ b/svtools/source/contnr/foldertree.cxx
@@ -14,8 +14,8 @@
 
 FolderTree::FolderTree( vcl::Window* pParent, WinBits nBits )
     : SvTreeListBox( pParent, nBits | WB_SORT | WB_TABSTOP )
-    , m_aFolderImage( SvtResId( IMG_SVT_FOLDER ) )
-    , m_aFolderExpandedImage( SvtResId( IMG_SVT_FOLDER_OPEN ) )
+    , m_aFolderImage(BitmapEx(SvtResId(RID_BMP_FOLDER)))
+    , m_aFolderExpandedImage(BitmapEx(SvtResId(RID_BMP_FOLDER_OPEN)))
 {
     Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
     Reference< XInteractionHandler > xInteractionHandler(
diff --git a/svtools/source/contnr/svcontnr.src b/svtools/source/contnr/svcontnr.src
index ccef108..12f83cd 100644
--- a/svtools/source/contnr/svcontnr.src
+++ b/svtools/source/contnr/svcontnr.src
@@ -19,14 +19,14 @@
 
 #include <svtools/svtools.hrc>
 
-Image RID_IMG_TREENODE_COLLAPSED
+Bitmap RID_BMP_TREENODE_COLLAPSED
 {
-    ImageBitmap = Bitmap { File = "plus.png"; } ;
+    File = "plus.png";
 };
 
-Image RID_IMG_TREENODE_EXPANDED
+Bitmap RID_BMP_TREENODE_EXPANDED
 {
-    ImageBitmap = Bitmap { File = "minus.png"; } ;
+    File = "minus.png";
 };
 
 // descriptions of accessible objects
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index b0e693c..9cbe0fa 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -3343,8 +3343,8 @@ void SvImpLBox::implInitDefaultNodeImages()
         // assume that all or nothing is initialized
         return;
 
-    s_pDefCollapsed  = new Image( SvtResId( RID_IMG_TREENODE_COLLAPSED ) );
-    s_pDefExpanded   = new Image( SvtResId( RID_IMG_TREENODE_EXPANDED ) );
+    s_pDefCollapsed = new Image(BitmapEx(SvtResId(RID_BMP_TREENODE_COLLAPSED)));
+    s_pDefExpanded = new Image(BitmapEx(SvtResId(RID_BMP_TREENODE_EXPANDED)));
 }
 
 
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index f7eeb06..cb8597a 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -541,7 +541,7 @@ static Image GetImageFromList_Impl( sal_uInt16 nImageId, bool bBig )
             return Image(BitmapEx(SvtResId(bBig ? BMP_TABLE_LC : BMP_TABLE_SC)));
         case IMG_FOLDER:
             // if not bBig, then return our new small folder image (256 colors)
-            return bBig ? Image(BitmapEx(SvtResId(BMP_FOLDER_LC))) : Image(SvtResId(IMG_SVT_FOLDER));
+            return Image(BitmapEx(SvtResId(bBig ? BMP_FOLDER_LC : RID_BMP_FOLDER)));
         case IMG_DXF:
             return Image(BitmapEx(SvtResId(bBig ? BMP_DXF_LC : BMP_DXF_SC)));
         case IMG_MET:
commit 5e16a343b819d7fa2ee30c940046eb2fd251f28e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 18 12:45:12 2017 +0000

    RID_IMG_PRNDLG_NOCOLLATE is unusable, and unused
    
    Change-Id: Ic85e3d37a2696bf2bf67e5c48c71386336e07675

diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index 79aec8a..a8df827 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -95,7 +95,7 @@
 #define STR_SVT_PRNDLG_POWER_SAVE           (STR_SVT_PRNDLG_START+26)
 #define STR_SVT_PRNDLG_DEFPRINTER           (STR_SVT_PRNDLG_START+27)
 #define STR_SVT_PRNDLG_JOBCOUNT             (STR_SVT_PRNDLG_START+28)
-#define STR_SVT_PRNDLG_END              (RID_IMG_PRNDLG_NOCOLLATE)
+#define STR_SVT_PRNDLG_END                  (STR_SVT_PRNDLG_JOBCOUNT)
 
 #define STR_SVT_CALENDAR_START              (STR_SVT_PRNDLG_END+1)
 #define STR_SVT_CALENDAR_DAY                (STR_SVT_CALENDAR_START+0)
@@ -361,8 +361,6 @@
 #define IMG_SVT_FOLDER                  (RID_SVTOOLS_START + 42)
 #define IMG_SVT_FOLDER_OPEN             (RID_SVTOOLS_START + 43)
 
-#define RID_IMG_PRNDLG_NOCOLLATE            (STR_SVT_PRNDLG_START + 30)
-
 #define STR_PARAGRAPH_START                 (STR_SVT_PRNDLG_START + 50)
 #define STR_PARAGRAPH                       (STR_PARAGRAPH_START + 0)
 
commit e3bc14eccefe3841f11de1672e2d6b6e0e94ee0a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 18 12:41:26 2017 +0000

    there's no need for this nutso redefine
    
    both BMP_PLUGIN resources point to the same plugin.png ultimately
    
    Change-Id: Ifa1cc00698f749ba84f17a79074c73e080e1d356

diff --git a/bin/update_pch b/bin/update_pch
index 9cdff2b..aba7b24 100755
--- a/bin/update_pch
+++ b/bin/update_pch
@@ -377,7 +377,6 @@ def filter_ignore(line, module):
         ignore_list += [
             'sdgslots.hxx', # special directives
             'sdslots.hxx',  # special directives
-            'svtools/sores.hxx', # redefines BMP_PLUGIN defined in svtools.hrc
            ]
     if module == 'sfx2':
         ignore_list += [
diff --git a/include/svtools/sores.hxx b/include/svtools/sores.hxx
index 1a1260a..581197c 100644
--- a/include/svtools/sores.hxx
+++ b/include/svtools/sores.hxx
@@ -27,11 +27,6 @@
 #define STR_FURTHER_OBJECT                      32026
 #define STR_UNKNOWN_SOURCE                      32027
 
-#ifdef BMP_PLUGIN
-#undef BMP_PLUGIN
-#endif
-#define BMP_PLUGIN                      32000
-
 // Sot Format Strings
 #define STR_FORMAT_START                        32100
 #define STR_FORMAT_STRING                       (STR_FORMAT_START + 1)
diff --git a/svtools/source/dialogs/so3res.src b/svtools/source/dialogs/so3res.src
index bc92074..fec8d89 100644
--- a/svtools/source/dialogs/so3res.src
+++ b/svtools/source/dialogs/so3res.src
@@ -185,10 +185,6 @@ String STR_FURTHER_OBJECT
     Text [ en-US ] = "Further objects" ;
 };
 
-Bitmap BMP_PLUGIN
-{
-    File = "plugin.png" ;
-};
 String STR_UNKNOWN_SOURCE
 {
     Text [ en-US ] = "Unknown source" ;
commit e54999c00baae68b17bb0bcb013bc5249f77e838
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 18 12:35:39 2017 +0000

    unused resources
    
    Change-Id: Ia3f5a4ed5cb1eb9fefeb3a4fe5b5a14f2e260a6a

diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index 10b8942..79aec8a 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -245,7 +245,7 @@
 // bitmaps
 
 #define BMP_PLUGIN                      (RID_SVTOOLS_BITMAP_START +   3)
-#define BMP_LIST_ADD                    (RID_SVTOOLS_BITMAP_START +   4)
+// free
 #define BMP_CURRENT                     (RID_SVTOOLS_BITMAP_START +   5)
 #define BMP_MODIFIED                    (RID_SVTOOLS_BITMAP_START +   6)
 #define BMP_NEW                         (RID_SVTOOLS_BITMAP_START +   7)
diff --git a/svtools/source/misc/imagemgr.src b/svtools/source/misc/imagemgr.src
index 971edb9..df5c7b3 100644
--- a/svtools/source/misc/imagemgr.src
+++ b/svtools/source/misc/imagemgr.src
@@ -517,14 +517,6 @@ Bitmap BMP_PLUGIN
     File = "plugin.png" ;
 };
 
-Image BMP_LIST_ADD
-{
-    ImageBitmap = Bitmap
-    {
-        File = "list_add.png" ;
-    };
-};
-
 // description strings
 
 String STR_DESCRIPTION_SOURCEFILE


More information about the Libreoffice-commits mailing list