From b9c6f2de8bdcdcb95fb4f0457ee2fd0e1c42eb5b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 21 Dec 2017 13:05:54 +0200 Subject: unused SID command in starmath Change-Id: I08c09814a6a29286342fd7dc6a30ca0b6395463e Reviewed-on: https://gerrit.libreoffice.org/46909 Tested-by: Jenkins Reviewed-by: Noel Grandin --- bin/find-unused-sid-commands.py | 4 ++- starmath/inc/starmath.hrc | 3 --- starmath/sdi/smath.sdi | 56 ----------------------------------------- starmath/sdi/smslots.sdi | 18 ------------- starmath/source/document.cxx | 8 ------ starmath/source/view.cxx | 5 ---- 6 files changed, 3 insertions(+), 91 deletions(-) diff --git a/bin/find-unused-sid-commands.py b/bin/find-unused-sid-commands.py index 32f45e0f810a..c0e934b0b624 100755 --- a/bin/find-unused-sid-commands.py +++ b/bin/find-unused-sid-commands.py @@ -42,10 +42,12 @@ for pair in commandSet: for line2 in txt2: foundLines = foundLines + line2 if foundLines.find("ExecuteList") != -1: continue - if foundLines.find("GetDispatcher()->Execute") != -1: continue + if foundLines.find("Dispatcher()->Execute") != -1: continue if foundLines.find("ExecuteScenarioSlot") != -1: continue # TODO not sure about this, but let's tackle the easy ones first if foundLines.find("Invalidate(") != -1: continue + if foundLines.find("SFX_IMPL_DOCKINGWINDOW_WITHID") != -1: continue + # dump any lines that contain the SID, so we can eyeball the results print("remove: " + commandName) diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc index bbe606badee7..0a7c6d003278 100644 --- a/starmath/inc/starmath.hrc +++ b/starmath/inc/starmath.hrc @@ -49,8 +49,6 @@ /** Command for inserting a math construction */ #define SID_INSERTCOMMANDTEXT (SID_SMA_START + 106) -#define SID_LOADSYMBOLS (SID_SMA_START + 107) -#define SID_SAVESYMBOLS (SID_SMA_START + 108) #define SID_MODIFYSTATUS (SID_SMA_START + 110) #define SID_TEXTSTATUS (SID_SMA_START + 111) @@ -64,7 +62,6 @@ #define SID_PASTEOBJECT (SID_SMA_START + 118) #define SID_AUTOREDRAW (SID_SMA_START + 119) -#define SID_GETEDITTEXT (SID_SMA_START + 121) #define SID_CMDBOXWINDOW (SID_SMA_START + 122) #define SID_NO_RIGHT_SPACES (SID_SMA_START + 124) #define SID_SAVE_ONLY_USED_SYMBOLS (SID_SMA_START + 125) diff --git a/starmath/sdi/smath.sdi b/starmath/sdi/smath.sdi index 0ee7306938ca..761cae2c0b0d 100644 --- a/starmath/sdi/smath.sdi +++ b/starmath/sdi/smath.sdi @@ -289,25 +289,6 @@ SfxVoidItem ImportMathMLClipboard SID_IMPORT_MATHML_CLIPBOARD GroupId = SfxGroupId::Insert; ] -SfxVoidItem LoadSymbols SID_LOADSYMBOLS -() -[ - AutoUpdate = FALSE, - FastCall = FALSE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - Asynchron; - - AccelConfig = FALSE, - MenuConfig = FALSE, - ToolBoxConfig = FALSE, - GroupId = SfxGroupId::Options; -] - - SfxStringItem ModifyStatus SID_MODIFYSTATUS [ @@ -435,43 +416,6 @@ SfxBoolItem RedrawAutomatic SID_AUTO_REDRAW GroupId = SfxGroupId::View; ] - -SfxVoidItem SaveSymbols SID_SAVESYMBOLS -() -[ - AutoUpdate = FALSE, - FastCall = FALSE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - - AccelConfig = FALSE, - MenuConfig = FALSE, - ToolBoxConfig = FALSE, - GroupId = SfxGroupId::Options; -] - - -SfxVoidItem SetPaperSize SID_GETEDITTEXT -() -[ - AutoUpdate = FALSE, - FastCall = FALSE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - - AccelConfig = FALSE, - MenuConfig = FALSE, - ToolBoxConfig = FALSE, - GroupId = SfxGroupId::Math; -] - - SfxVoidItem SymbolCatalogue SID_SYMBOLS_CATALOGUE () [ diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi index 3b0d5cfc6265..d2e49127017c 100644 --- a/starmath/sdi/smslots.sdi +++ b/starmath/sdi/smslots.sdi @@ -55,18 +55,6 @@ interface FormulaDocument ExecMethod = Execute ; StateMethod = GetState ; ] - //idlpp no menu entry, so no texts - SID_LOADSYMBOLS //idlpp ole : no , status : no - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - //idlpp no menu entry, so no texts - SID_SAVESYMBOLS //idlpp ole : no , status : no - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] SID_FONT //idlpp ole : no , status : no [ ExecMethod = Execute ; @@ -257,12 +245,6 @@ interface FormulaView StateMethod = GetState ; ] //idlpp no menu entry, so no texts - SID_GETEDITTEXT //idlpp ole : no , status : no - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - //idlpp no menu entry, so no texts SID_CMDBOXWINDOW //idlpp ole : no , status : no [ ExecMethod = NoExec ; diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 9466d6635674..776a11d66dbe 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -915,14 +915,6 @@ void SmDocShell::Execute(SfxRequest& rReq) } break; - case SID_LOADSYMBOLS: - LoadSymbols(); - break; - - case SID_SAVESYMBOLS: - SaveSymbols(); - break; - case SID_FONT: { // get device used to retrieve the FontList diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 11c5b7148488..2bd4e70f1a36 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1694,11 +1694,6 @@ void SmViewShell::Execute(SfxRequest& rReq) break; } - case SID_GETEDITTEXT: - if (pWin) - if (!pWin->GetText().isEmpty()) GetDoc()->SetText( pWin->GetText() ); - break; - case SID_ATTR_ZOOM: { if ( !GetViewFrame()->GetFrame().IsInPlace() ) -- cgit