[Libreoffice-commits] core.git: bin/find-unused-defines-in-hrc-files.py starmath/inc starmath/sdi
Noel Grandin
noel.grandin at collabora.co.uk
Fri Mar 24 12:40:02 UTC 2017
bin/find-unused-defines-in-hrc-files.py | 11 ++++++---
starmath/inc/starmath.hrc | 2 -
starmath/sdi/smath.sdi | 37 --------------------------------
starmath/sdi/smslots.sdi | 17 ++------------
4 files changed, 10 insertions(+), 57 deletions(-)
New commits:
commit ce3e3185f9ef64b44e26593a8300ae912b6fe68e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Mar 24 12:28:21 2017 +0200
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 at collabora.co.uk>
Tested-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 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
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index b897ed25ff09..df75dd055362 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -34,7 +34,6 @@
#define SID_ZOOMIN (SID_SMA_START + 10)
#define SID_ZOOMOUT (SID_SMA_START + 11)
#define SID_DRAW (SID_SMA_START + 12)
-#define SID_TOOLBOX (SID_SMA_START + 14)
#define SID_FORMULACURSOR (SID_SMA_START + 15)
#define SID_FONT (SID_SMA_START + 50)
#define SID_FONTSIZE (SID_SMA_START + 51)
@@ -71,7 +70,6 @@
#define SID_GETEDITTEXT (SID_SMA_START + 121)
#define SID_CMDBOXWINDOW (SID_SMA_START + 122)
-#define SID_TOOLBOXWINDOW (SID_SMA_START + 123)
#define SID_NO_RIGHT_SPACES (SID_SMA_START + 124)
#define SID_SAVE_ONLY_USED_SYMBOLS (SID_SMA_START + 125)
#define SID_ELEMENTSDOCKINGWINDOW (SID_SMA_START + 126)
diff --git a/starmath/sdi/smath.sdi b/starmath/sdi/smath.sdi
index 3ba797615505..7b6e4e522494 100644
--- a/starmath/sdi/smath.sdi
+++ b/starmath/sdi/smath.sdi
@@ -600,43 +600,6 @@ SfxVoidItem UnicodeNotationToggle SID_UNICODE_NOTATION_TOGGLE
]
-SfxVoidItem ToolBoxWindow SID_TOOLBOXWINDOW
-()
-[
- AutoUpdate = FALSE,
- FastCall = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
-
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-
-SfxBoolItem ToolBox SID_TOOLBOX
-
-[
- AutoUpdate = FALSE,
- FastCall = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
-
-
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- ToolBoxConfig = TRUE,
- GroupId = GID_VIEW;
-]
-
-
SfxVoidItem ZoomIn SID_ZOOMIN
()
[
diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi
index 14ee77d58c54..43a73bd84db4 100644
--- a/starmath/sdi/smslots.sdi
+++ b/starmath/sdi/smslots.sdi
@@ -283,22 +283,11 @@ interface FormulaView
[
ExecMethod = Execute;
]
- //idlpp kein Menueeintrag , also keine Texte
- SID_TOOLBOXWINDOW //idlpp ole : no , status : no
+ SID_SYMBOLS_CATALOGUE //idlpp ole : no , status : no
[
- ExecMethod = NoExec ;
- StateMethod = NoState ;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
]
- SID_TOOLBOX //idlpp ole : no , status : no
- [
- ExecMethod = Execute ;
- StateMethod = GetState ;
- ]
- SID_SYMBOLS_CATALOGUE //idlpp ole : no , status : no
- [
- ExecMethod = Execute ;
- StateMethod = GetState ;
- ]
}
shell SmViewShell
More information about the Libreoffice-commits
mailing list