[Libreoffice-commits] core.git: framework/inc framework/source postprocess/CustomTarget_images.mk

Caolán McNamara caolanm at redhat.com
Wed Apr 26 08:03:28 UTC 2017


 framework/inc/bitmaps.hlst                            |   19 ++++++++++++++++++
 framework/inc/classes/resource.hrc                    |    4 ---
 framework/source/classes/resource.src                 |   15 --------------
 framework/source/uielement/popuptoolbarcontroller.cxx |    7 +++---
 postprocess/CustomTarget_images.mk                    |    1 
 5 files changed, 24 insertions(+), 22 deletions(-)

New commits:
commit 5fc07f0781d864722cc1bacc1357b317b3b5fdbb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Apr 25 21:22:07 2017 +0100

    remove framework bitmaps from .src files
    
    Change-Id: Iea85517a60874d49cdf60860071f0924b96cbf62
    Reviewed-on: https://gerrit.libreoffice.org/36966
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/framework/inc/bitmaps.hlst b/framework/inc/bitmaps.hlst
new file mode 100644
index 000000000000..0ad598c8cb2c
--- /dev/null
+++ b/framework/inc/bitmaps.hlst
@@ -0,0 +1,19 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_FRAMEWORK_INC_BITMAPS_HRC
+#define INCLUDED_FRAMEWORK_INC_BITMAPS_HRC
+
+#define BMP_SAVEMODIFIED_SMALL      "res/savemodified_small.png"
+#define BMP_SAVEMODIFIED_LARGE      "res/savemodified_large.png"
+#define BMP_SAVEMODIFIED_EXTRALARGE "res/savemodified_extralarge.png"
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc
index b4325e7f23ec..4c66725c370f 100644
--- a/framework/inc/classes/resource.hrc
+++ b/framework/inc/classes/resource.hrc
@@ -56,10 +56,6 @@
 #define STR_TOOLBAR_LOCK_TOOLBAR                (RID_STR_START+32)
 #define STR_TOOLBAR_CLOSE_TOOLBAR               (RID_STR_START+33)
 
-#define BMP_SAVEMODIFIED_SMALL                  (RID_IMAGE_START+0)
-#define BMP_SAVEMODIFIED_LARGE                  (RID_IMAGE_START+1)
-#define BMP_SAVEMODIFIED_EXTRALARGE             (RID_IMAGE_START+2)
-
 #define MENUITEM_TOOLBAR_VISIBLEBUTTON          1
 #define MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR       2
 #define MENUITEM_TOOLBAR_DOCKTOOLBAR            3
diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src
index b045b6d9e029..7cec9dc7b914 100644
--- a/framework/source/classes/resource.src
+++ b/framework/source/classes/resource.src
@@ -170,19 +170,4 @@ String STR_LANGSTATUS_HINT
     Text [ en-US ] = "Text Language. Right-click to set character or paragraph language" ;
 };
 
-Bitmap BMP_SAVEMODIFIED_SMALL
-{
-    File = "savemodified_small.png";
-};
-
-Bitmap BMP_SAVEMODIFIED_LARGE
-{
-    File = "savemodified_large.png";
-};
-
-Bitmap BMP_SAVEMODIFIED_EXTRALARGE
-{
-    File = "savemodified_extralarge.png";
-};
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index 7227f05bf847..87b8909d40b3 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <classes/resource.hrc>
+#include "bitmaps.hlst"
 #include <classes/fwkresid.hxx>
 
 #include <cppuhelper/implbase.hxx>
@@ -496,11 +497,11 @@ void SaveToolbarController::updateImage()
     else if ( m_bModified )
     {
         if (eImageType == vcl::ImageType::Size26)
-            aImage = Image(BitmapEx(FwkResId(BMP_SAVEMODIFIED_LARGE)));
+            aImage = Image(BitmapEx(BMP_SAVEMODIFIED_LARGE));
         else if (eImageType == vcl::ImageType::Size32)
-            aImage = Image(BitmapEx(FwkResId(BMP_SAVEMODIFIED_EXTRALARGE)));
+            aImage = Image(BitmapEx(BMP_SAVEMODIFIED_EXTRALARGE));
         else
-            aImage = Image(BitmapEx(FwkResId(BMP_SAVEMODIFIED_SMALL)));
+            aImage = Image(BitmapEx(BMP_SAVEMODIFIED_SMALL));
     }
 
     if ( !aImage )
diff --git a/postprocess/CustomTarget_images.mk b/postprocess/CustomTarget_images.mk
index 17d27b1a483b..46db5aa44132 100644
--- a/postprocess/CustomTarget_images.mk
+++ b/postprocess/CustomTarget_images.mk
@@ -59,6 +59,7 @@ $(packimages_DIR)/sourceimagelist.ilst : \
 		$(SRCDIR)/filter/inc/bitmaps.hlst \
 		$(SRCDIR)/formula/inc/bitmaps.hlst \
 		$(SRCDIR)/fpicker/inc/bitmaps.hlst \
+		$(SRCDIR)/framework/inc/bitmaps.hlst \
 		$(SRCDIR)/sfx2/inc/bitmaps.hlst \
 		$(SRCDIR)/vcl/inc/bitmaps.hlst
 	grep res $^ | cut -d'"' -f2 | sed "s/^/%MODULE%\//" | sed "s/%MODULE%.res/%GLOBALRES%/g" > $@


More information about the Libreoffice-commits mailing list