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

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


 formula/Library_forui.mk           |    1 +
 formula/inc/bitmaps.hlst           |   23 +++++++++++++++++++++++
 formula/source/ui/dlg/formdlgs.src |   31 -------------------------------
 formula/source/ui/dlg/funcutl.cxx  |    8 ++++----
 formula/source/ui/dlg/parawin.cxx  |    9 +++++----
 formula/source/ui/dlg/parawin.src  |    5 -----
 formula/source/ui/dlg/structpg.cxx |   10 +++++-----
 formula/source/ui/inc/ForResId.hrc |    9 ---------
 postprocess/CustomTarget_images.mk |    1 +
 9 files changed, 39 insertions(+), 58 deletions(-)

New commits:
commit 9b0fb3f6cae0f8e86840e476ea1a55355896bede
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Apr 25 21:10:16 2017 +0100

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

diff --git a/formula/Library_forui.mk b/formula/Library_forui.mk
index 7097146d3bec..1e9d1e4eb175 100644
--- a/formula/Library_forui.mk
+++ b/formula/Library_forui.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_Library_Library,forui))
 
 $(eval $(call gb_Library_set_include,forui,\
     $$(INCLUDE) \
+    -I$(SRCDIR)/formula/inc \
     -I$(SRCDIR)/formula/source/ui/inc \
 ))
 
diff --git a/formula/inc/bitmaps.hlst b/formula/inc/bitmaps.hlst
new file mode 100644
index 000000000000..10984f7a77c1
--- /dev/null
+++ b/formula/inc/bitmaps.hlst
@@ -0,0 +1,23 @@
+/* -*- 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_FORMULA_INC_BITMAPS_HRC
+#define INCLUDED_FORMULA_INC_BITMAPS_HRC
+
+#define BMP_STR_CLOSE   "formula/res/fapclose.png"
+#define BMP_STR_OPEN    "formula/res/fapopen.png"
+#define BMP_STR_END     "formula/res/fapok.png"
+#define BMP_STR_ERROR   "formula/res/faperror.png"
+#define RID_BMP_REFBTN1 "formula/res/refinp1.png"
+#define RID_BMP_REFBTN2 "formula/res/refinp2.png"
+#define BMP_FX          "formula/res/fx.png"
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/formula/source/ui/dlg/formdlgs.src b/formula/source/ui/dlg/formdlgs.src
index 0df94d1bde6f..d342c1d772c9 100644
--- a/formula/source/ui/dlg/formdlgs.src
+++ b/formula/source/ui/dlg/formdlgs.src
@@ -20,26 +20,6 @@
 #include "formdlgs.hrc"
 #include "ForResId.hrc"
 
-Bitmap BMP_STR_CLOSE
-{
-    File = "fapclose.png";
-};
-
-Bitmap BMP_STR_OPEN
-{
-    File = "fapopen.png";
-};
-
-Bitmap BMP_STR_END
-{
-    File = "fapok.png";
-};
-
-Bitmap BMP_STR_ERROR
-{
-    File = "faperror.png";
-};
-
 String STR_TITLE1
 {
     Text [ en-US ] = "Function Wizard" ;
@@ -54,22 +34,11 @@ String STR_END
 {
     Text [ en-US ] = "~End" ;
 };
-
-Bitmap RID_BMP_REFBTN1
-{
-    File = "refinp1.png";
-};
-
 String RID_STR_SHRINK
 {
     Text [ en-US ] = "Shrink" ;
 };
 
-Bitmap RID_BMP_REFBTN2
-{
-    File = "refinp2.png";
-};
-
 String RID_STR_EXPAND
 {
     Text [ en-US ] = "Expand" ;
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index 685381fadb1c..e4e21ab98871 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -28,9 +28,9 @@
 #include "ControlHelper.hxx"
 #include "ModuleHelper.hxx"
 #include "ForResId.hrc"
+#include "bitmaps.hlst"
 #include "com/sun/star/accessibility/AccessibleRole.hpp"
 
-
 namespace formula
 {
 
@@ -524,9 +524,9 @@ IMPL_LINK_NOARG(RefEdit, UpdateHdl, Timer *, void)
 
 //class RefButton
 RefButton::RefButton( vcl::Window* _pParent, WinBits nStyle ) :
-    ImageButton( _pParent, nStyle ),
-    aImgRefStart(BitmapEx(ModuleRes(RID_BMP_REFBTN1))),
-    aImgRefDone(BitmapEx(ModuleRes(RID_BMP_REFBTN2))),
+    ImageButton(_pParent, nStyle),
+    aImgRefStart(BitmapEx(RID_BMP_REFBTN1)),
+    aImgRefDone(BitmapEx(RID_BMP_REFBTN2)),
     aShrinkQuickHelp( ModuleRes( RID_STR_SHRINK ).toString() ),
     aExpandQuickHelp( ModuleRes( RID_STR_EXPAND ).toString() ),
     pAnyRefDlg( nullptr ),
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index a2ab34ec2df8..c8e9b0ee9141 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -27,6 +27,7 @@
 #include "formula/IFunctionDescription.hxx"
 #include "ModuleHelper.hxx"
 #include "ForResId.hrc"
+#include "bitmaps.hlst"
 
 #define VAR_ARGS 30
 #define PAIRED_VAR_ARGS (VAR_ARGS + VAR_ARGS)
@@ -58,13 +59,13 @@ ParaWin::ParaWin(vcl::Window* pParent,IControlReferenceHandler* _pDlg):
     m_pFtArgDesc->SetText("");
 
     get(m_pBtnFx1, "FX1");
-    m_pBtnFx1->SetModeImage(Image(BitmapEx(ModuleRes(BMP_FX))));
+    m_pBtnFx1->SetModeImage(Image(BitmapEx(BMP_FX)));
     get(m_pBtnFx2, "FX2");
-    m_pBtnFx2->SetModeImage(Image(BitmapEx(ModuleRes(BMP_FX))));
+    m_pBtnFx2->SetModeImage(Image(BitmapEx(BMP_FX)));
     get(m_pBtnFx3, "FX3");
-    m_pBtnFx3->SetModeImage(Image(BitmapEx(ModuleRes(BMP_FX))));
+    m_pBtnFx3->SetModeImage(Image(BitmapEx(BMP_FX)));
     get(m_pBtnFx4, "FX4");
-    m_pBtnFx4->SetModeImage(Image(BitmapEx(ModuleRes(BMP_FX))));
+    m_pBtnFx4->SetModeImage(Image(BitmapEx(BMP_FX)));
 
     get(m_pFtArg1, "FT_ARG1");
     get(m_pFtArg2, "FT_ARG2");
diff --git a/formula/source/ui/dlg/parawin.src b/formula/source/ui/dlg/parawin.src
index 93191b4937da..65e3085d4ce1 100644
--- a/formula/source/ui/dlg/parawin.src
+++ b/formula/source/ui/dlg/parawin.src
@@ -19,11 +19,6 @@
 
 #include "ForResId.hrc"
 
-Bitmap BMP_FX
-{
-    File = "fx.png";
-};
-
 String STR_OPTIONAL
 {
     Text [ en-US ] = "(optional)" ;
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index b1eb5a030109..3fa22117145f 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -29,7 +29,7 @@
 #include "ModuleHelper.hxx"
 #include "formula/IFunctionDescription.hxx"
 #include "ForResId.hrc"
-
+#include "bitmaps.hlst"
 
 namespace formula
 {
@@ -82,8 +82,8 @@ VCL_BUILDER_FACTORY_ARGS(StructListBox, WB_BORDER)
 
 StructPage::StructPage(vcl::Window* pParent):
     TabPage(pParent, "StructPage", "formula/ui/structpage.ui"),
-    maImgEnd(BitmapEx(ModuleRes(BMP_STR_END))),
-    maImgError(BitmapEx(ModuleRes(BMP_STR_ERROR))),
+    maImgEnd(BitmapEx(BMP_STR_END)),
+    maImgError(BitmapEx(BMP_STR_ERROR)),
     pSelectedToken  ( nullptr )
 {
     get(m_pTlbStruct, "struct");
@@ -94,8 +94,8 @@ StructPage::StructPage(vcl::Window* pParent):
                         WB_HASBUTTONS|WB_HSCROLL|WB_NOINITIALSELECTION);
 
     m_pTlbStruct->SetNodeDefaultImages();
-    m_pTlbStruct->SetDefaultExpandedEntryBmp(Image(BitmapEx(ModuleRes(BMP_STR_OPEN))));
-    m_pTlbStruct->SetDefaultCollapsedEntryBmp(Image(BitmapEx(ModuleRes(BMP_STR_CLOSE))));
+    m_pTlbStruct->SetDefaultExpandedEntryBmp(Image(BitmapEx(BMP_STR_OPEN)));
+    m_pTlbStruct->SetDefaultCollapsedEntryBmp(Image(BitmapEx(BMP_STR_CLOSE)));
 
 
     m_pTlbStruct->SetSelectHdl(LINK( this, StructPage, SelectHdl ) );
diff --git a/formula/source/ui/inc/ForResId.hrc b/formula/source/ui/inc/ForResId.hrc
index a1b64a8c2960..e41d3aecbba4 100644
--- a/formula/source/ui/inc/ForResId.hrc
+++ b/formula/source/ui/inc/ForResId.hrc
@@ -47,15 +47,6 @@
 #define STR_TITLE1                      (RID_STRING_START + 7)
 #define STR_TITLE2                      (RID_STRING_START + 8)
 
-// bitmap
-#define RID_BMP_REFBTN1                             (RID_BITMAP_START + 0)
-#define RID_BMP_REFBTN2                             (RID_BITMAP_START + 2)
-#define BMP_STR_CLOSE                               (RID_BITMAP_START + 3)
-#define BMP_STR_OPEN                                (RID_BITMAP_START + 4)
-#define BMP_STR_END                                 (RID_BITMAP_START + 5)
-#define BMP_STR_ERROR                               (RID_BITMAP_START + 6)
-#define BMP_FX                                      (RID_BITMAP_START + 7)
-
 #endif          // FORMULA_FORRESID_HRC
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/postprocess/CustomTarget_images.mk b/postprocess/CustomTarget_images.mk
index 8e9aece9297e..982fd8e1c888 100644
--- a/postprocess/CustomTarget_images.mk
+++ b/postprocess/CustomTarget_images.mk
@@ -57,6 +57,7 @@ $(packimages_DIR)/sourceimagelist.ilst : \
 		$(SRCDIR)/desktop/inc/bitmaps.hlst \
 		$(SRCDIR)/extensions/inc/bitmaps.hlst \
 		$(SRCDIR)/filter/inc/bitmaps.hlst \
+		$(SRCDIR)/formula/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