[Libreoffice-commits] core.git: bin/find-unused-sid-commands.py starmath/inc starmath/sdi starmath/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Dec 22 19:22:12 UTC 2017


 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, 91 insertions(+), 3 deletions(-)

New commits:
commit 420a65c107551156e69578c432261dd6dc7b882b
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Dec 22 13:20:16 2017 +0200

    Revert "unused SID command in starmath"
    
    This reverts commit b9c6f2de8bdcdcb95fb4f0457ee2fd0e1c42eb5b.
    
    Change-Id: Ice33baa738c025de72ceb11cf6746e017fb27484
    Reviewed-on: https://gerrit.libreoffice.org/46964
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/bin/find-unused-sid-commands.py b/bin/find-unused-sid-commands.py
index c0e934b0b624..32f45e0f810a 100755
--- a/bin/find-unused-sid-commands.py
+++ b/bin/find-unused-sid-commands.py
@@ -42,12 +42,10 @@ for pair in commandSet:
         for line2 in txt2:
             foundLines = foundLines + line2
     if foundLines.find("ExecuteList") != -1: continue
-    if foundLines.find("Dispatcher()->Execute") != -1: continue
+    if foundLines.find("GetDispatcher()->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 0a7c6d003278..bbe606badee7 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -49,6 +49,8 @@
 /** 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)
 
@@ -62,6 +64,7 @@
 #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 761cae2c0b0d..0ee7306938ca 100644
--- a/starmath/sdi/smath.sdi
+++ b/starmath/sdi/smath.sdi
@@ -289,6 +289,25 @@ 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
 
 [
@@ -416,6 +435,43 @@ 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 d2e49127017c..3b0d5cfc6265 100644
--- a/starmath/sdi/smslots.sdi
+++ b/starmath/sdi/smslots.sdi
@@ -55,6 +55,18 @@ 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 ;
@@ -245,6 +257,12 @@ 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 776a11d66dbe..9466d6635674 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -915,6 +915,14 @@ 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 2bd4e70f1a36..11c5b7148488 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1694,6 +1694,11 @@ 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() )


More information about the Libreoffice-commits mailing list