From 2b3c57887aeeaa592d693df23dbab98552434cb3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 15 Mar 2017 15:16:55 +0200 Subject: remove unused defines from HRC files in sd Change-Id: I2cbb6257aa65e45f3e46b64a8f00e36aecd95564 Reviewed-on: https://gerrit.libreoffice.org/35219 Tested-by: Jenkins Reviewed-by: Noel Grandin --- bin/find-unused-defines-in-hrc-files.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/find-unused-defines-in-hrc-files.py b/bin/find-unused-defines-in-hrc-files.py index 59d917ad1dea..acf51573dd8e 100755 --- a/bin/find-unused-defines-in-hrc-files.py +++ b/bin/find-unused-defines-in-hrc-files.py @@ -78,6 +78,7 @@ exclusionSet = set([ "STR_UPDATE_ALL", "STR_UPDATE_INDEX", "STR_UPDATE_LINK", + "BMP_PLACEHOLDER_", ]) @@ -125,10 +126,12 @@ with a.stdout as txt: # these are used in calculations in other .hrc files if "sw/inc/rcid.hrc:" in line2: found_reason_to_exclude = True # calculations - if "sw/source/uibase/inc/ribbar.hrc:" in line2 and "ST_" in line2: found_reason_to_exclude = True - if "sw/source/uibase/inc/ribbar.hrc:" in line2 and "STR_IMGBTN_" in line2: found_reason_to_exclude = True + if "sw/source/uibase/inc/ribbar.hrc:" in line2 and "ST_" in idName: found_reason_to_exclude = True + if "sw/source/uibase/inc/ribbar.hrc:" in line2 and "STR_IMGBTN_" in idName: found_reason_to_exclude = True if "sw/source/core/undo/undo.hrc:" in line2: found_reason_to_exclude = True if "sw/inc/poolfmt.hrc:" in line2: found_reason_to_exclude = True + # not sure about these, looks suspicious + if "sd/source/ui/app/strings.src:" in line2 and idName.endswith("_TOOLBOX"): found_reason_to_exclude = True if not found_reason_to_exclude: sys.stdout.write(idName + '\n') -- cgit