summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-24 12:28:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-24 12:39:36 +0000
commitce3e3185f9ef64b44e26593a8300ae912b6fe68e (patch)
tree37e228279f7abb2bcac2c566fa5cda05a4c436de /bin
parent1ac30cf245454c6f7a777699436722a94a9e349c (diff)
remove unhandled SID commands in starmath
checked that none of these are present in any .xcu files. Change-Id: Ife5ac45ca4e71fed9515941c20853b9ab811e057 Reviewed-on: https://gerrit.libreoffice.org/35619 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/find-unused-defines-in-hrc-files.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/find-unused-defines-in-hrc-files.py b/bin/find-unused-defines-in-hrc-files.py
index 94ec2170fe22..a7adbf29fa20 100755
--- a/bin/find-unused-defines-in-hrc-files.py
+++ b/bin/find-unused-defines-in-hrc-files.py
@@ -134,7 +134,10 @@ with a.stdout as txt:
for line2 in txt2:
line2 = line2.strip() # otherwise the comparisons below will not work
# check if we found one in actual code
- if not ".hrc:" in line2 and not ".src:" in line2: found_reason_to_exclude = True
+ if idName.startswith("SID_"):
+ if not ".hrc:" in line2 and not ".src:" in line2 and not ".sdi:" in line2: found_reason_to_exclude = True
+ else:
+ if not ".hrc:" in line2 and not ".src:" in line2: found_reason_to_exclude = True
if idName.startswith("RID_"):
# is the constant being used as an identifier by entries in .src files?
if ".src:" in line2 and "Identifier = " in line2: found_reason_to_exclude = True
@@ -163,9 +166,9 @@ with a.stdout as txt:
if "forms/" in line2 and idName.startswith("PROPERTY_"): found_reason_to_exclude = True
if "svx/source/tbxctrls/extrusioncontrols.hrc:" in line2 and idName.startswith("DIRECTION_"): found_reason_to_exclude = True
if "svx/source/tbxctrls/extrusioncontrols.hrc:" in line2 and idName.startswith("FROM_"): 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 we see more than a few lines then it's probably one of the BASE/START/BEGIN things
+ cnt = cnt + 1
+ if cnt > 4: 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