[Libreoffice-commits] core.git: bin/find-unused-defines-in-hrc-files.py include/svtools svtools/source svx/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Mar 17 08:21:44 UTC 2017


 bin/find-unused-defines-in-hrc-files.py |    5 ++++-
 include/svtools/controldims.hrc         |    5 -----
 include/svtools/svtools.hrc             |   18 +-----------------
 svtools/source/contnr/fileview.src      |    5 -----
 svtools/source/control/ctrltool.src     |   10 ----------
 svtools/source/misc/imagemgr.src        |    5 -----
 svx/source/dialog/docrecovery.hrc       |   30 +++++++++---------------------
 7 files changed, 14 insertions(+), 64 deletions(-)

New commits:
commit f5a16eae7607a37d29a4524d8c91e0bc10a465c9
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Mar 16 16:09:04 2017 +0200

    remove unused defines from HRC files in svtools
    
    Change-Id: I5d8a6a4fd232ef10644ae45174a07b30af789205
    Reviewed-on: https://gerrit.libreoffice.org/35277
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/bin/find-unused-defines-in-hrc-files.py b/bin/find-unused-defines-in-hrc-files.py
index 7313152417c9..024f7a5797ef 100755
--- a/bin/find-unused-defines-in-hrc-files.py
+++ b/bin/find-unused-defines-in-hrc-files.py
@@ -108,6 +108,7 @@ with a.stdout as txt:
         b = subprocess.Popen(["git", "grep", "-w", idName], stdout=subprocess.PIPE)
         found_reason_to_exclude = False
         with b.stdout as txt2:
+            cnt = 0
             for line2 in txt2:
                 line2 = line2.strip() # otherwise the comparisons below will not work
                 # check if we found one in actual code
@@ -137,7 +138,9 @@ with a.stdout as txt:
                 if "dbaccess/" in line2 and idName.startswith("PROPERTY_ID_"): found_reason_to_exclude = True
                 if "reportdesign/" in line2 and idName.startswith("HID_RPT_PROP_"): found_reason_to_exclude = True
                 if "reportdesign/" in line2 and idName.startswith("RID_STR_"): found_reason_to_exclude = True
-
+                # if we see more than 2 lines then it's probably one of the BASE/START/BEGIN things
+                cnt = cnt + 2
+                if cnt > 3: found_reason_to_exclude = True
         if not found_reason_to_exclude:
             sys.stdout.write(idName + '\n')
             # otherwise the previous line of output will be incorrectly mixed into the below git output, because of buffering
diff --git a/include/svtools/controldims.hrc b/include/svtools/controldims.hrc
index af9ace9b7bff..a29fea575c13 100644
--- a/include/svtools/controldims.hrc
+++ b/include/svtools/controldims.hrc
@@ -32,14 +32,10 @@
 #define RSC_CD_PUSHBUTTON_WIDTH             50
 #define RSC_CD_PUSHBUTTON_HEIGHT            14
 
-#define RSC_CD_FIXEDTEXT_HEIGHT             RSC_BS_CHARHEIGHT
-#define RSC_CD_FIXEDLINE_HEIGHT             RSC_BS_CHARHEIGHT
-
 #define RSC_CD_TEXTBOX_HEIGHT               12      // also numeric fields etc.
 
 // spacings
 #define RSC_SP_CTRL_X                       6       // controls that are unrelated
-#define RSC_SP_CTRL_Y                       7
 #define RSC_SP_CTRL_GROUP_Y                 4
 #define RSC_SP_CTRL_DESC_X                  3       // between description text and related control
 #define RSC_SP_CTRL_DESC_Y                  3
@@ -48,7 +44,6 @@
 #define RSC_SP_DLG_INNERBORDER_LEFT         6
 #define RSC_SP_DLG_INNERBORDER_TOP          6
 #define RSC_SP_DLG_INNERBORDER_RIGHT        6
-#define RSC_SP_DLG_INNERBORDER_BOTTOM       6
 
 #endif
 
diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index 47ff7df2cfc1..c75524835b4c 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -29,7 +29,6 @@
 #define STR_SVT_FILEVIEW_COLUMN_TITLE   (RID_SVTOOLS_START + 20)
 #define STR_SVT_FILEVIEW_COLUMN_SIZE    (RID_SVTOOLS_START + 21)
 #define STR_SVT_FILEVIEW_COLUMN_DATE    (RID_SVTOOLS_START + 22)
-#define STR_SVT_FILEVIEW_ERR_MAKEFOLDER (RID_SVTOOLS_START + 24)
 #define STR_SVT_BYTES                   (RID_SVTOOLS_START + 25)
 #define STR_SVT_KB                      (RID_SVTOOLS_START + 26)
 #define STR_SVT_MB                      (RID_SVTOOLS_START + 27)
@@ -106,11 +105,7 @@
 #define STR_SVT_CALENDAR_NONE               (STR_SVT_CALENDAR_START+3)
 #define STR_SVT_CALENDAR_END                (STR_SVT_CALENDAR_NONE)
 
-#define STR_SVT_PVER_START                  (STR_SVT_CALENDAR_END+1)
-#define STR_SVT_PVER_OEM_PROFESSIONAL       (STR_SVT_PVER_START+16)
-#define STR_SVT_PVER_END                    (STR_SVT_PVER_OEM_PROFESSIONAL)
-
-#define STR_SVT_STYLE_START                 (STR_SVT_PVER_END+1)
+#define STR_SVT_STYLE_START                 (STR_SVT_CALENDAR_END+1)
 #define STR_SVT_STYLE_LIGHT                 (STR_SVT_STYLE_START+0)
 #define STR_SVT_STYLE_LIGHT_ITALIC          (STR_SVT_STYLE_START+1)
 #define STR_SVT_STYLE_NORMAL                (STR_SVT_STYLE_START+2)
@@ -124,8 +119,6 @@
 #define STR_SVT_FONTMAP_START               (STR_SVT_STYLE_END+1)
 #define STR_SVT_FONTMAP_BOTH                (STR_SVT_FONTMAP_START+0)
 #define STR_SVT_FONTMAP_PRINTERONLY         (STR_SVT_FONTMAP_START+1)
-#define STR_SVT_FONTMAP_SCREENONLY          (STR_SVT_FONTMAP_START+2)
-#define STR_SVT_FONTMAP_SIZENOTAVAILABLE    (STR_SVT_FONTMAP_START+3)
 #define STR_SVT_FONTMAP_STYLENOTAVAILABLE   (STR_SVT_FONTMAP_START+4)
 #define STR_SVT_FONTMAP_NOTAVAILABLE        (STR_SVT_FONTMAP_START+5)
 #define STR_SVT_FONTMAP_END                 (STR_SVT_FONTMAP_NOTAVAILABLE)
@@ -239,11 +232,6 @@
 #define STR_LOGICAL_FIELD_NAMES             (STR_SVT_ADDRESSTEMPLATE_START+32)
 #define STR_SVT_ADDRESSTEMPLATE_END         (STR_LOGICAL_FIELD_NAMES)
 
-// dialogs
-
-#define DLG_LOGIN                       (RID_SVTOOLS_START+113)
-#define DLG_ADDRESSBOOKSOURCE           (RID_SVTOOLS_START+114)
-
 // bitmaps
 #define RID_BMP_TREENODE_COLLAPSED      (RID_SVTOOLS_BITMAP_START +   0)
 #define RID_BMP_TREENODE_EXPANDED       (RID_SVTOOLS_BITMAP_START +   1)
@@ -285,7 +273,6 @@
 #define BMP_CDROMDEV_SC                 (RID_SVTOOLS_BITMAP_START +  37)
 #define BMP_NETWORKDEV_SC               (RID_SVTOOLS_BITMAP_START +  38)
 #define BMP_TABLE_SC                    (RID_SVTOOLS_BITMAP_START +  39)
-#define BMP_FOLDER_SC                   (RID_SVTOOLS_BITMAP_START +  40)
 #define BMP_DXF_SC                      (RID_SVTOOLS_BITMAP_START +  41)
 #define BMP_MET_SC                      (RID_SVTOOLS_BITMAP_START +  42)
 #define BMP_PNG_SC                      (RID_SVTOOLS_BITMAP_START +  43)
@@ -358,9 +345,6 @@
 #define BMP_OO_WRITER_TEMPLATE_LC       (RID_SVTOOLS_BITMAP_START + 110)
 #define BMP_EXTENSION_LC                (RID_SVTOOLS_BITMAP_START + 111)
 
-#define STR_PARAGRAPH_START                 (STR_SVT_PRNDLG_START + 50)
-#define STR_PARAGRAPH                       (STR_PARAGRAPH_START + 0)
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/contnr/fileview.src b/svtools/source/contnr/fileview.src
index 2ed91c096363..8e433edf0a83 100644
--- a/svtools/source/contnr/fileview.src
+++ b/svtools/source/contnr/fileview.src
@@ -43,11 +43,6 @@ String STR_SVT_FILEVIEW_COLUMN_TYPE
     Text [ en-US ] = "Type";
 };
 
-String STR_SVT_FILEVIEW_ERR_MAKEFOLDER
-{
-    Text [ en-US ] = "Could not create the folder %1.";
-};
-
 String STR_SVT_BYTES
 {
     Text [ en-US ] = "Bytes" ;
diff --git a/svtools/source/control/ctrltool.src b/svtools/source/control/ctrltool.src
index 37b016c1a6a3..a178aee45717 100644
--- a/svtools/source/control/ctrltool.src
+++ b/svtools/source/control/ctrltool.src
@@ -68,16 +68,6 @@ String STR_SVT_FONTMAP_PRINTERONLY
     Text [ en-US ] = "This is a printer font. The screen image may differ." ;
 };
 
-String STR_SVT_FONTMAP_SCREENONLY
-{
-    Text [ en-US ] = "This is a screen font. The printer image may differ." ;
-};
-
-String STR_SVT_FONTMAP_SIZENOTAVAILABLE
-{
-    Text [ en-US ] = "This font size has not been installed. The closest available size will be used.";
-};
-
 String STR_SVT_FONTMAP_STYLENOTAVAILABLE
 {
     Text [ en-US ] = "This font style will be simulated or the closest matching style will be used.";
diff --git a/svtools/source/misc/imagemgr.src b/svtools/source/misc/imagemgr.src
index df5c7b338fb4..778221b3c7d4 100644
--- a/svtools/source/misc/imagemgr.src
+++ b/svtools/source/misc/imagemgr.src
@@ -152,11 +152,6 @@ Bitmap BMP_TABLE_SC
     File = "sx03188.png";
 };
 
-Bitmap BMP_FOLDER_SC
-{
-    File = "sx03189.png";
-};
-
 Bitmap BMP_DXF_SC
 {
     File = "sx03217.png";
diff --git a/svx/source/dialog/docrecovery.hrc b/svx/source/dialog/docrecovery.hrc
index 4b2112d4edc7..cb4bf249e356 100644
--- a/svx/source/dialog/docrecovery.hrc
+++ b/svx/source/dialog/docrecovery.hrc
@@ -26,33 +26,21 @@
 
 #define PROGR_HEIGHT                (RSC_CD_PUSHBUTTON_HEIGHT)
 
-#define SAVE_WIDTH                  290
-#define SAVE_HEIGHT                 238
-#define SAVE_TITLEWINHEIGHT         36
-#define SAVE_COL0                   (RSC_SP_DLG_INNERBORDER_LEFT)
-#define SAVE_COL2                   (SAVE_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT)
-
-// Save Progress Dialog
-#define SAVEPROGR_WIDTH             240
-#define SAVEPROGR_COL0              (RSC_SP_DLG_INNERBORDER_LEFT)
-#define SAVEPROGR_COL1              (SAVEPROGR_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT)
-#define SAVEPROGR_CONTROLWIDTH      (SAVEPROGR_COL1-SAVEPROGR_COL0)
-
-#define RECOV_HEIGHT                SAVE_HEIGHT
-#define RECOV_TITLEWINHEIGHT        SAVE_TITLEWINHEIGHT
-#define RECOV_DESCRHEIGHT           6*RSC_CD_FIXEDTEXT_HEIGHT
+#define RECOV_HEIGHT                238
+#define RECOV_TITLEWINHEIGHT        36
+#define RECOV_DESCRHEIGHT           6*RSC_BS_CHARHEIGHT
 #define RECOV_ROW1                  (RECOV_TITLEWINHEIGHT)
-#define RECOV_ROW2                  (RECOV_ROW1+RSC_SP_CTRL_Y)
+#define RECOV_ROW2                  (RECOV_ROW1+7)
 #define RECOV_ROW3                  (RECOV_ROW2+RECOV_DESCRHEIGHT+RSC_SP_CTRL_DESC_Y)
-#define RECOV_ROW4                  (RECOV_ROW3+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y)
+#define RECOV_ROW4                  (RECOV_ROW3+RSC_BS_CHARHEIGHT+RSC_SP_CTRL_DESC_Y)
 #define RECOV_ROW5                  (RECOV_ROW4+PROGR_HEIGHT+RSC_SP_CTRL_GROUP_Y)
-#define RECOV_ROW6                  (RECOV_ROW5+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y)
-#define RECOV_ROW10                 (RECOV_HEIGHT-RSC_SP_DLG_INNERBORDER_BOTTOM)
+#define RECOV_ROW6                  (RECOV_ROW5+RSC_BS_CHARHEIGHT+RSC_SP_CTRL_DESC_Y)
+#define RECOV_ROW10                 (RECOV_HEIGHT-6)
 #define RECOV_ROW9                  (RECOV_ROW10-RSC_CD_PUSHBUTTON_HEIGHT)
-#define RECOV_ROW8                  (RECOV_ROW9-RSC_SP_CTRL_GROUP_Y-RSC_CD_FIXEDLINE_HEIGHT)
+#define RECOV_ROW8                  (RECOV_ROW9-RSC_SP_CTRL_GROUP_Y-RSC_BS_CHARHEIGHT)
 #define RECOV_ROW7                  (RECOV_ROW8-RSC_SP_CTRL_GROUP_Y)
 #define RECOV_FILELISTHEIGHT        (RECOV_ROW7-RECOV_ROW6)
-#define RECOV_CONTROLWIDTH          (SAVE_COL2-SAVE_COL0)
+#define RECOV_CONTROLWIDTH          (290-6-RSC_SP_DLG_INNERBORDER_LEFT)
 
 #endif
 


More information about the Libreoffice-commits mailing list