[Libreoffice-commits] core.git: 4 commits - starmath/inc starmath/source

Thomas Arnhold thomas at arnhold.org
Thu Nov 14 00:44:01 PST 2013


 starmath/inc/ElementsDockingWindow.hrc    |   22 -------
 starmath/inc/ElementsDockingWindow.hxx    |   42 -------------
 starmath/inc/starmath.hrc                 |   27 +++++---
 starmath/source/ElementsDockingWindow.cxx |   56 ++++++++---------
 starmath/source/commands.src              |   11 +--
 starmath/source/smres.src                 |   94 ++++++++++++++++--------------
 6 files changed, 102 insertions(+), 150 deletions(-)

New commits:
commit e2beb3ee1519ecb790c157853050d3b352d3839c
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Nov 14 00:02:01 2013 +0100

    starmath: use global resource string
    
    In favor of many getters and setters :)
    
    Change-Id: Ibdfe6e2cb70ec2e743def2f898c1b56713af2661

diff --git a/starmath/inc/ElementsDockingWindow.hrc b/starmath/inc/ElementsDockingWindow.hrc
deleted file mode 100644
index 6eb65b8..0000000
--- a/starmath/inc/ElementsDockingWindow.hrc
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include <starmath.hrc>
-
-#define STR_BLACK 1
-#define STR_BLUE 2
-#define STR_GREEN 3
-#define STR_RED 4
-#define STR_CYAN 5
-#define STR_MAGENTA 6
-#define STR_YELLOW 7
-#define STR_HIDE 8
-#define STR_SIZE 9
-#define STR_FONT 10
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx
index 66b410c..a3a692e 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -115,48 +115,6 @@ public:
     void setVerticalMode(bool bVertical);
 
     void SetSelectHdl(const Link& rLink)   { aSelectHdlLink = rLink; }
-
-    void setColorBlack(const OUString color) { maColorBlack = color; }
-    OUString colorBlack() { return maColorBlack; }
-
-    void setColorBlue(const OUString color) { maColorBlue = color; }
-    OUString colorBlue() { return maColorBlue; }
-
-    void setColorGreen(const OUString color) { maColorGreen = color; }
-    OUString colorGreen() { return maColorGreen; }
-
-    void setColorRed(const OUString color) { maColorRed = color; }
-    OUString colorRed() { return maColorRed; }
-
-    void setColorCyan(const OUString color) { maColorCyan = color; }
-    OUString colorCyan() { return maColorCyan; }
-
-    void setColorMagenta(const OUString color) { maColorMagenta = color; }
-    OUString colorMagenta() { return maColorMagenta; }
-
-    void setColorYellow(const OUString color) { maColorYellow = color; }
-    OUString colorYellow() { return maColorYellow; }
-
-    void setStringHide(const OUString string) { maStringHide = string; }
-    OUString stringHide() { return maStringHide; }
-
-    void setStringSize(const OUString string) { maStringSize = string; }
-    OUString stringSize() { return maStringSize; }
-
-    void setStringFont(const OUString string) { maStringFont = string; }
-    OUString stringFont() { return maStringFont; }
-
-private:
-    OUString            maColorBlack;
-    OUString            maColorBlue;
-    OUString            maColorGreen;
-    OUString            maColorRed;
-    OUString            maColorCyan;
-    OUString            maColorMagenta;
-    OUString            maColorYellow;
-    OUString            maStringHide;
-    OUString            maStringSize;
-    OUString            maStringFont;
 };
 
 class SmElementsDockingWindow : public SfxDockingWindow
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index 4d62b99..636a5ec 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -102,7 +102,16 @@
 #define STR_STATSTR_READING                 (RID_APP_START + 823)
 #define STR_STATSTR_WRITING                 (RID_APP_START + 824)
 #define STR_CMDBOXWINDOW                    (RID_APP_START + 825)
-
+#define STR_BLACK                           (RID_APP_START + 826)
+#define STR_BLUE                            (RID_APP_START + 827)
+#define STR_GREEN                           (RID_APP_START + 828)
+#define STR_RED                             (RID_APP_START + 829)
+#define STR_CYAN                            (RID_APP_START + 830)
+#define STR_MAGENTA                         (RID_APP_START + 831)
+#define STR_YELLOW                          (RID_APP_START + 832)
+#define STR_HIDE                            (RID_APP_START + 833)
+#define STR_SIZE                            (RID_APP_START + 834)
+#define STR_FONT                            (RID_APP_START + 835)
 #define STR_ALIGN_LEFT                      (RID_APP_START + 836)
 #define STR_ALIGN_CENTER                    (RID_APP_START + 837)
 #define STR_ALIGN_RIGHT                     (RID_APP_START + 838)
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index e45a1ee..f02c86f 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <ElementsDockingWindow.hxx>
-#include <ElementsDockingWindow.hrc>
 
 #include <starmath.hrc>
 #include <smmod.hxx>
@@ -460,29 +459,29 @@ void SmElementsControl::addElements(const sal_uInt16 aElementsArray[][2], sal_uI
             else if (aElementId == RID_BLANK)
                 addElement("\"~\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_PHANTOMX)
-                addElement("\"" + stringHide() +"\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+                addElement("\"" + SM_RESSTR(STR_HIDE) +"\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_BOLDX)
                 addElement("bold B", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_ITALX)
                 addElement("ital I", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_SIZEXY)
-                addElement("\"" + stringSize() + "\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+                addElement("\"" + SM_RESSTR(STR_SIZE) + "\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_FONTXY)
-                addElement("\"" + stringFont() + "\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+                addElement("\"" + SM_RESSTR(STR_FONT) + "\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_BLACK)
-                addElement("color black { \"" + colorBlack() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+                addElement("color black { \"" + SM_RESSTR(STR_BLACK) + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_BLUE)
-                addElement("color blue { \"" + colorBlue() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+                addElement("color blue { \"" + SM_RESSTR(STR_BLUE) + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_GREEN)
-                addElement("color green { \"" + colorGreen() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+                addElement("color green { \"" + SM_RESSTR(STR_GREEN) + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_RED)
-                addElement("color red { \"" + colorRed() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+                addElement("color red { \"" + SM_RESSTR(STR_RED) + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_CYAN)
-                addElement("color cyan { \"" + colorCyan() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+                addElement("color cyan { \"" + SM_RESSTR(STR_CYAN) + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_MAGENTA)
-                addElement("color magenta { \"" + colorMagenta() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+                addElement("color magenta { \"" + SM_RESSTR(STR_MAGENTA) + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_YELLOW)
-                addElement("color yellow { \"" + colorYellow() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+                addElement("color yellow { \"" + SM_RESSTR(STR_YELLOW) + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_ALIGNLX)
                 addElement("\"" + SM_RESSTR(STR_ALIGN_LEFT) + "\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_ALIGNCX)
@@ -578,17 +577,6 @@ SmElementsDockingWindow::SmElementsDockingWindow(SfxBindings* pInputBindings, Sf
     maElementListBox    (this, SmResId(1))
 {
     maElementsControl.SetBorderStyle( WINDOW_BORDER_MONO );
-    maElementsControl.setColorBlack(SmResId(STR_BLACK));
-    maElementsControl.setColorBlue(SmResId(STR_BLUE));
-    maElementsControl.setColorGreen(SmResId(STR_GREEN));
-    maElementsControl.setColorRed(SmResId(STR_RED));
-    maElementsControl.setColorCyan(SmResId(STR_CYAN));
-    maElementsControl.setColorMagenta(SmResId(STR_MAGENTA));
-    maElementsControl.setColorYellow(SmResId(STR_YELLOW));
-
-    maElementsControl.setStringHide(SmResId(STR_HIDE));
-    maElementsControl.setStringSize(SmResId(STR_SIZE));
-    maElementsControl.setStringFont(SmResId(STR_FONT));
 
     maElementListBox.SetDropDownLineCount( 11 );
 
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index 62c5bd3..0907229 100644
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -17,14 +17,12 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include <sfx2/sfx.hrc>
 #include <sfx2/tabpage.hrc>
 #include <svx/globlmn.hrc>
 #include "starmath.hrc"
 #include "dialog.hrc"
 #include "toolbox.hrc"
-#include "ElementsDockingWindow.hrc"
 #include "smcommands.h"
 
 #define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; }
@@ -394,47 +392,47 @@ DockingWindow RID_ELEMENTSDOCKINGWINDOW
     };
 
     Text [ en-US ] = "Elements Dock" ;
+};
 
-    String STR_BLACK
-    {
-        Text [ en-US ] = "black" ;
-    };
-    String STR_BLUE
-    {
-        Text [ en-US ] = "blue" ;
-    };
-    String STR_GREEN
-    {
-        Text [ en-US ] = "green" ;
-    };
-    String STR_RED
-    {
-        Text [ en-US ] = "red" ;
-    };
-    String STR_CYAN
-    {
-        Text [ en-US ] = "cyan" ;
-    };
-    String STR_MAGENTA
-    {
-        Text [ en-US ] = "magenta" ;
-    };
-    String STR_YELLOW
-    {
-        Text [ en-US ] = "yellow" ;
-    };
-    String STR_HIDE
-    {
-        Text [ en-US ] = "hide" ;
-    };
-    String STR_SIZE
-    {
-        Text [ en-US ] = "size" ;
-    };
-    String STR_FONT
-    {
-        Text [ en-US ] = "font" ;
-    };
+String STR_BLACK
+{
+    Text [ en-US ] = "black" ;
+};
+String STR_BLUE
+{
+    Text [ en-US ] = "blue" ;
+};
+String STR_GREEN
+{
+    Text [ en-US ] = "green" ;
+};
+String STR_RED
+{
+    Text [ en-US ] = "red" ;
+};
+String STR_CYAN
+{
+    Text [ en-US ] = "cyan" ;
+};
+String STR_MAGENTA
+{
+    Text [ en-US ] = "magenta" ;
+};
+String STR_YELLOW
+{
+    Text [ en-US ] = "yellow" ;
+};
+String STR_HIDE
+{
+    Text [ en-US ] = "hide" ;
+};
+String STR_SIZE
+{
+    Text [ en-US ] = "size" ;
+};
+String STR_FONT
+{
+    Text [ en-US ] = "font" ;
 };
 
 String STR_ALIGN_LEFT
commit dbbfdf3d32760498b746d3d5c5dcbcccf7932225
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Wed Nov 13 23:42:21 2013 +0100

    starmath: some improvements
    
    Change-Id: I9dbeb16a527094bb8b32f8b8926f2a511e6190ba

diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 5ce08e2..e45a1ee 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -454,35 +454,35 @@ void SmElementsControl::addElements(const sal_uInt16 aElementsArray[][2], sal_uI
             addSeparator();
         } else {
             if (aElementId == RID_NEWLINE)
-                addElement(OStringToOUString( "\xe2\x86\xb5", RTL_TEXTENCODING_UTF8 ), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement(OStringToOUString( "\xe2\x86\xb5", RTL_TEXTENCODING_UTF8 ), SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_SBLANK)
-                addElement(OUString("\"`\""), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("\"`\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_BLANK)
-                addElement(OUString("\"~\""), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("\"~\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_PHANTOMX)
-                addElement(OUString("\"" + stringHide() +"\""), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("\"" + stringHide() +"\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_BOLDX)
-                addElement(OUString("bold B"), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("bold B", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_ITALX)
-                addElement(OUString("ital I"), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("ital I", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_SIZEXY)
-                addElement(OUString("\"" + stringSize() + "\""), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("\"" + stringSize() + "\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_FONTXY)
-                addElement(OUString("\"" + stringFont() + "\""), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("\"" + stringFont() + "\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_BLACK)
-                addElement(OUString("color black { \"" + colorBlack() + "\" }"), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("color black { \"" + colorBlack() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_BLUE)
-                addElement(OUString("color blue { \"" + colorBlue() + "\" }"), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("color blue { \"" + colorBlue() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_GREEN)
-                addElement(OUString("color green { \"" + colorGreen() + "\" }"), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("color green { \"" + colorGreen() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_RED)
-                addElement(OUString("color red { \"" + colorRed() + "\" }"), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("color red { \"" + colorRed() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_CYAN)
-                addElement(OUString("color cyan { \"" + colorCyan() + "\" }"), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("color cyan { \"" + colorCyan() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_MAGENTA)
-                addElement(OUString("color magenta { \"" + colorMagenta() + "\" }"), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("color magenta { \"" + colorMagenta() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_COLORX_YELLOW)
-                addElement(OUString("color yellow { \"" + colorYellow() + "\" }"), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement("color yellow { \"" + colorYellow() + "\" }", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_ALIGNLX)
                 addElement("\"" + SM_RESSTR(STR_ALIGN_LEFT) + "\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else if (aElementId == RID_ALIGNCX)
@@ -490,7 +490,7 @@ void SmElementsControl::addElements(const sal_uInt16 aElementsArray[][2], sal_uI
             else if (aElementId == RID_ALIGNRX)
                 addElement("\"" + SM_RESSTR(STR_ALIGN_RIGHT) + "\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else
-                addElement(SmResId(aElementId), SmResId(aElementId), SmResId(aElementIdHelp));
+                addElement(SM_RESSTR(aElementId), SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
         }
     }
 }
commit 2e00906285c59bf49efaa07df83293d8cd21c9bb
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Wed Nov 13 17:10:43 2013 +0100

    fdo#71580: Elements dock: Alignment items are missing
    
    Also add << and >> to the Elements dock.
    
    Change-Id: Id58d64c8ab938259e84ce1a178644c6d4a6ee95d

diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index 1c32d85..4d62b99 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -75,7 +75,6 @@
 #define SID_SAVE_ONLY_USED_SYMBOLS  (SID_SMA_START + 125)
 #define SID_ELEMENTSDOCKINGWINDOW   (SID_SMA_START + 126)
 
-
 #define RID_SYMDEFINEDIALOG         (RID_APP_START + 9)
 #define RID_PRINTUIOPTIONS          (RID_APP_START + 11)
 
@@ -104,6 +103,10 @@
 #define STR_STATSTR_WRITING                 (RID_APP_START + 824)
 #define STR_CMDBOXWINDOW                    (RID_APP_START + 825)
 
+#define STR_ALIGN_LEFT                      (RID_APP_START + 836)
+#define STR_ALIGN_CENTER                    (RID_APP_START + 837)
+#define STR_ALIGN_RIGHT                     (RID_APP_START + 838)
+
 #define RID_ERR_IDENT               (RID_APP_START + 920)
 #define RID_ERR_UNKNOWN             (RID_APP_START + 921)
 #define RID_ERR_UNEXPECTEDCHARACTER (RID_APP_START + 922)
@@ -753,8 +756,11 @@
 #define RID_SYM_OR                        (RID_APP_START + 4273)
 #define RID_SYM_OR_HELP                   (RID_APP_START + 4274)
 
-#define BMP_ARROW_RIGHT     1
+#define RID_ALIGNLX_HELP                  (RID_APP_START + 4275)
+#define RID_ALIGNCX_HELP                  (RID_APP_START + 4276)
+#define RID_ALIGNRX_HELP                  (RID_APP_START + 4277)
 
+#define BMP_ARROW_RIGHT     1
 
 // 342 == SCH_IF_SMAVIEWSHELL, because SFX_INTERFACE_LIB is no
 // Define but latterly an Enum
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index cda53ef..5ce08e2 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -70,6 +70,7 @@ const sal_uInt16 SmElementsControl::aRelationsList[][2] =
     {RID_XEQY, RID_XEQY_HELP}, {RID_XNEQY, RID_XNEQY_HELP}, {RID_XLTY, RID_XLTY_HELP},
     {RID_XLEY, RID_XLEY_HELP}, {RID_XLESLANTY, RID_XLESLANTY_HELP}, {RID_XGTY, RID_XGTY_HELP},
     {RID_XGEY, RID_XGEY_HELP}, {RID_XGESLANTY, RID_XGESLANTY_HELP},
+    {RID_XLLY, RID_XLLY_HELP}, {RID_XGGY, RID_XGGY_HELP},
     {0xFFFF, 0},
     {RID_XAPPROXY, RID_XAPPROXY_HELP}, {RID_XSIMY, RID_XSIMY_HELP}, {RID_XSIMEQY, RID_XSIMEQY_HELP},
     {RID_XEQUIVY, RID_XEQUIVY_HELP}, {RID_XPROPY, RID_XPROPY_HELP}, {RID_XPARALLELY, RID_XPARALLELY_HELP},
@@ -182,7 +183,10 @@ const sal_uInt16 SmElementsControl::aFormats[][2] =
     {RID_LSUBX, RID_LSUBX_HELP}, {RID_CSUPX, RID_CSUPX_HELP}, {RID_CSUBX, RID_CSUBX_HELP},
     {0xFFFF, 0},
     {RID_NEWLINE, RID_NEWLINE_HELP}, {RID_SBLANK, RID_SBLANK_HELP}, {RID_BLANK, RID_BLANK_HELP},
-    {RID_NOSPACE, RID_NOSPACE_HELP}, {RID_BINOMXY, RID_BINOMXY_HELP}, {RID_STACK, RID_STACK_HELP},
+    {RID_NOSPACE, RID_NOSPACE_HELP},
+    {RID_ALIGNLX, RID_ALIGNLX_HELP}, {RID_ALIGNCX, RID_ALIGNCX_HELP}, {RID_ALIGNRX, RID_ALIGNRX_HELP},
+    {0xFFFF, 0},
+    {RID_BINOMXY, RID_BINOMXY_HELP}, {RID_STACK, RID_STACK_HELP},
     {RID_MATRIX, RID_MATRIX_HELP},
 };
 
@@ -479,6 +483,12 @@ void SmElementsControl::addElements(const sal_uInt16 aElementsArray[][2], sal_uI
                 addElement(OUString("color magenta { \"" + colorMagenta() + "\" }"), SmResId(aElementId), SmResId(aElementIdHelp));
             else if (aElementId == RID_COLORX_YELLOW)
                 addElement(OUString("color yellow { \"" + colorYellow() + "\" }"), SmResId(aElementId), SmResId(aElementIdHelp));
+            else if (aElementId == RID_ALIGNLX)
+                addElement("\"" + SM_RESSTR(STR_ALIGN_LEFT) + "\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+            else if (aElementId == RID_ALIGNCX)
+                addElement("\"" + SM_RESSTR(STR_ALIGN_CENTER) + "\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+            else if (aElementId == RID_ALIGNRX)
+                addElement("\"" + SM_RESSTR(STR_ALIGN_RIGHT) + "\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else
                 addElement(SmResId(aElementId), SmResId(aElementId), SmResId(aElementIdHelp));
         }
diff --git a/starmath/source/commands.src b/starmath/source/commands.src
index 848464d..72535632 100644
--- a/starmath/source/commands.src
+++ b/starmath/source/commands.src
@@ -17,13 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include <sfx2/sfx.hrc>
 #include "starmath.hrc"
 
-
-////////////////////////////////////////////////////////////
-
 String RID_PLUSX            { Text = "+<?> " ; };
 String RID_PLUSX_HELP       { Text = "+ Sign" ; };
 String RID_MINUSX           { Text = "-<?> " ; };
@@ -76,7 +72,9 @@ String RID_XLESLANTY_HELP   { Text = "Is Less Than Or Equal To" ; };
 String RID_XGESLANTY        { Text = "<?> geslant <?> " ; };
 String RID_XGESLANTY_HELP   { Text = "Is Greater Than Or Equal To" ; };
 String RID_XLLY             { Text = "<?> << <?> " ; };
+String RID_XLLY_HELP        { Text = "Is Much Less Than" ; };
 String RID_XGGY             { Text = "<?> >> <?> " ; };
+String RID_XGGY_HELP        { Text = "Is Much Greater Than" ; };
 String RID_XDEFY            { Text = "<?> def <?> " ; };
 String RID_XEQUIVY          { Text = "<?> equiv <?> " ; };
 String RID_XEQUIVY_HELP     { Text = "Is Congruent To" ; };
@@ -266,7 +264,7 @@ String RID_FROMX            { Text = "from{<?>} <?> " ; };
 String RID_TOX              { Text = "to{<?>} <?> " ; };
 String RID_FROMXTOY         { Text = "from{<?>} to{<?>} <?> " ; };
 String RID_ACUTEX           { Text = "acute <?> " ; };
-String RID_ACUTEX_HELP      { Text =  "Acute Accent" ; };
+String RID_ACUTEX_HELP      { Text = "Acute Accent" ; };
 String RID_BARX             { Text = "bar <?> " ; };
 String RID_BARX_HELP        { Text = "Line Above" ; };
 String RID_BREVEX           { Text = "breve <?> " ; };
@@ -389,8 +387,11 @@ String RID_STACK_HELP       { Text = "Vertical Stack" ; };
 String RID_MATRIX           { Text = "matrix{<?> # <?> ## <?> # <?>} " ; };
 String RID_MATRIX_HELP      { Text = "Matrix Stack" ; };
 String RID_ALIGNLX          { Text = "alignl <?> " ; };
+String RID_ALIGNLX_HELP     { Text = "Align Right" ; };
 String RID_ALIGNCX          { Text = "alignc <?> " ; };
+String RID_ALIGNCX_HELP     { Text = "Align Center" ; };
 String RID_ALIGNRX          { Text = "alignr <?> " ; };
+String RID_ALIGNRX_HELP     { Text = "Align Right" ; };
 String RID_ALEPH            { Text = "aleph " ; };
 String RID_ALEPH_HELP       { Text = "Aleph" ; };
 String RID_EMPTYSET         { Text = "emptyset " ; };
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index 6d0d126..62c5bd3 100644
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -437,6 +437,18 @@ DockingWindow RID_ELEMENTSDOCKINGWINDOW
     };
 };
 
+String STR_ALIGN_LEFT
+{
+    Text [ en-US ] = "left" ;
+};
+String STR_ALIGN_CENTER
+{
+    Text [ en-US ] = "center" ;
+};
+String STR_ALIGN_RIGHT
+{
+    Text [ en-US ] = "right" ;
+};
 
 String STR_CMDBOXWINDOW
 {
commit bd8b4f2b5dea5b3a0db7eac4e8d44918f1d8ec79
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Wed Nov 13 17:09:27 2013 +0100

    starmath: remove unused resource ids
    
    Change-Id: I9dee3cf5591df19cd0189e32ae7be024b07020f3

diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index fbc3541..1c32d85 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -755,14 +755,6 @@
 
 #define BMP_ARROW_RIGHT     1
 
-#define MN_WIN 60
-#define MN_SUB_VIEW 31
-#define MN_SUB_TOOLBAR 32
-#define MN_SUB_GRAPHIC 33
-#define MN_SUB_SPELLING 34
-#define MN_SUB_TEMPLATES 35
-
-#define FT_1 1
 
 // 342 == SCH_IF_SMAVIEWSHELL, because SFX_INTERFACE_LIB is no
 // Define but latterly an Enum


More information about the Libreoffice-commits mailing list