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

dante (via logerrit) logerrit at kemper.freedesktop.org
Sat Jul 18 10:43:05 UTC 2020


 starmath/inc/strings.hrc                  |    7 ++++++-
 starmath/inc/strings.hxx                  |    5 +++++
 starmath/source/ElementsDockingWindow.cxx |   19 ++++++++++++++++---
 3 files changed, 27 insertions(+), 4 deletions(-)

New commits:
commit 785f742b64a433d59f7bf80e2bd649659ae10f54
Author:     dante <dante19031999 at gmail.com>
AuthorDate: Wed Jul 15 03:01:21 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jul 18 12:42:29 2020 +0200

    Added to the left pane some interesting hidden features (func, oper)
    
    Added: func funcname <?> (generic function)
    Added: oper opername <?> (generig operator)
    
    The change is motivated by tdf#81267.
    
    Change-Id: I99cc8ce652b7b5e5e030b65f5617b285c26caecf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98796
    Reviewed-by: Dante DM <dante19031999 at gmail.com>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/starmath/inc/strings.hrc b/starmath/inc/strings.hrc
index b4a22c58e546..a892c191220e 100644
--- a/starmath/inc/strings.hrc
+++ b/starmath/inc/strings.hrc
@@ -78,6 +78,7 @@
 #define RID_XNSUBSETEQY_HELP                NC_("RID_XNSUBSETEQY_HELP", "Not Subset Or Equal" )
 #define RID_XNSUPSETY_HELP                  NC_("RID_XNSUPSETY_HELP", "Not Superset" )
 #define RID_XNSUPSETEQY_HELP                NC_("RID_XNSUPSETEQY_HELP", "Not Superset Or Equal" )
+#define RID_FUNCX_HELP                      NC_("RID_FUNCX_HELP", "General function" )
 #define RID_ABSX_HELP                       NC_("RID_ABSX_HELP", "Absolute Value" )
 #define RID_FACTX_HELP                      NC_("RID_FACTX_HELP", "Factorial" )
 #define RID_SQRTX_HELP                      NC_("RID_SQRTX_HELP", "Square Root" )
@@ -102,6 +103,10 @@
 #define RID_ARCOSHX_HELP                    NC_("RID_ARCOSHX_HELP", "Area Hyperbolic Cosine" )
 #define RID_ARTANHX_HELP                    NC_("RID_ARTANHX_HELP", "Area Hyperbolic Tangent" )
 #define RID_ARCOTHX_HELP                    NC_("RID_ARCOTHX_HELP", "Area Hyperbolic Cotangent" )
+#define RID_OPERX_HELP                      NC_("RID_OPERX_HELP", "General operator" )
+#define RID_OPER_FROMX_HELP                 NC_("RID_OPER_FROMX_HELP", "General operator Subscript Bottom" )
+#define RID_OPER_TOX_HELP                   NC_("RID_OPER_TOX_HELP", "General operator Superscript Top" )
+#define RID_OPER_FROMTOX_HELP               NC_("RID_OPER_FROMTOX_HELP", "General operator Sup/Sub script" )
 #define RID_SUMX_HELP                       NC_("RID_SUMX_HELP", "Sum" )
 #define RID_SUM_FROMX_HELP                  NC_("RID_SUM_FROMX_HELP", "Sum Subscript Bottom" )
 #define RID_SUM_TOX_HELP                    NC_("RID_SUM_TOX_HELP", "Sum Superscript Top" )
@@ -236,7 +241,7 @@
 #define RID_INFINITY_HELP                   NC_("RID_INFINITY_HELP", "Infinity" )
 #define RID_PARTIAL_HELP                    NC_("RID_PARTIAL_HELP", "Partial" )
 #define RID_NABLA_HELP                      NC_("RID_NABLA_HELP", "Nabla" )
-#define RID_LAPLACE_HELP                    NC_("RID_LAPLACE_HELP", "Laplace" )
+#define RID_LAPLACE_HELP                    NC_("RID_LAPLACE_HELP", "Laplace transform" )
 #define RID_WP_HELP                         NC_("RID_WP_HELP", "Weierstrass p" )
 #define RID_DOTSAXIS_HELP                   NC_("RID_DOTSAXIS_HELP", "Dots In Middle" )
 #define RID_DOTSUP_HELP                     NC_("RID_DOTSUP_HELP", "Dots To Top" )
diff --git a/starmath/inc/strings.hxx b/starmath/inc/strings.hxx
index bedd9534716d..d8fe00f803a6 100644
--- a/starmath/inc/strings.hxx
+++ b/starmath/inc/strings.hxx
@@ -68,6 +68,7 @@
 #define RID_XNSUBSETEQY     "<?> nsubseteq <?> "
 #define RID_XNSUPSETY       "<?> nsupset <?> "
 #define RID_XNSUPSETEQY     "<?> nsupseteq <?> "
+#define RID_FUNCX           "func func(<?>) "
 #define RID_ABSX            "abs{<?>} "
 #define RID_FACTX           "fact{<?>} "
 #define RID_SQRTX           "sqrt{<?>} "
@@ -92,6 +93,10 @@
 #define RID_ARCOSHX         "arcosh(<?>) "
 #define RID_ARTANHX         "artanh(<?>) "
 #define RID_ARCOTHX         "arcoth(<?>) "
+#define RID_OPERX           "oper oper <?> "
+#define RID_OPER_FROMX      "oper oper from{<?>} <?> "
+#define RID_OPER_TOX        "oper oper to{<?>} <?> "
+#define RID_OPER_FROMTOX    "oper oper from{<?>} to{<?>} <?> "
 #define RID_SUMX            "sum <?> "
 #define RID_SUM_FROMX       "sum from{<?>} <?> "
 #define RID_SUM_TOX         "sum to{<?>} <?> "
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index c21933fe1be2..ca62820488a1 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -69,7 +69,7 @@ const SmElementDescr SmElementsControl::m_aUnaryBinaryOperatorsList[] =
     {RID_XODIVIDEY, RID_XODIVIDEY_HELP}, {RID_XCIRCY, RID_XCIRCY_HELP},
     {RID_XWIDESLASHY, RID_XWIDESLASHY_HELP}, {RID_XWIDEBSLASHY, RID_XWIDEBSLASHY_HELP},
     {nullptr, nullptr},
-    {RID_NEGX, RID_NEGX_HELP}, {RID_XANDY, RID_XANDY_HELP}, {RID_XORY, RID_XORY_HELP},
+    {RID_NEGX, RID_NEGX_HELP}, {RID_XANDY, RID_XANDY_HELP}, {RID_XORY, RID_XORY_HELP}
 };
 
 const SmElementDescr SmElementsControl::m_aRelationsList[] =
@@ -120,7 +120,9 @@ const SmElementDescr SmElementsControl::m_aFunctionsList[] =
     {nullptr, nullptr},
     {RID_ARCSINX, RID_ARCSINX_HELP}, {RID_ARCCOSX, RID_ARCCOSX_HELP}, {RID_ARCTANX, RID_ARCTANX_HELP},
     {RID_ARCCOTX, RID_ARCCOTX_HELP}, {RID_ARSINHX, RID_ARSINHX_HELP}, {RID_ARCOSHX, RID_ARCOSHX_HELP},
-    {RID_ARTANHX, RID_ARTANHX_HELP}, {RID_ARCOTHX, RID_ARCOTHX_HELP}
+    {RID_ARTANHX, RID_ARTANHX_HELP}, {RID_ARCOTHX, RID_ARCOTHX_HELP},
+    {nullptr, nullptr},
+    {RID_FUNCX, RID_FUNCX_HELP}
 };
 
 const SmElementDescr SmElementsControl::m_aOperatorsList[] =
@@ -160,6 +162,9 @@ const SmElementDescr SmElementsControl::m_aOperatorsList[] =
     {nullptr, nullptr},
     {RID_LLLINTX, RID_LLLINTX_HELP}, {RID_LLLINT_FROMX, RID_LLLINT_FROMX_HELP},
     {RID_LLLINT_TOX, RID_LLLINT_TOX_HELP}, {RID_LLLINT_FROMTOX, RID_LLLINT_FROMTOX_HELP},
+    {nullptr, nullptr},
+    {RID_OPERX, RID_OPERX_HELP}, {RID_OPER_FROMX, RID_OPER_FROMX_HELP},
+    {RID_OPER_TOX, RID_OPER_TOX_HELP}, {RID_OPER_FROMTOX, RID_OPER_FROMTOX_HELP}
 };
 
 const SmElementDescr SmElementsControl::m_aAttributesList[] =
@@ -940,7 +945,6 @@ void SmElementsControl::addElements(const SmElementDescr aElementsArray[], sal_u
                 addElement(aParser, "left lceil binom{<?>}{<?>} right rceil ", aElement, SmResId(pElementHelp));
             else if (aElement == RID_SLRFLOORX)
                 addElement(aParser, "left lfloor binom{<?>}{<?>} right rfloor ", aElement, SmResId(pElementHelp));
-
             else if (aElement == RID_SLRLINEX)
                 addElement(aParser, "left lline binom{<?>}{<?>} right rline ", aElement, SmResId(pElementHelp));
             else if (aElement == RID_SLRDLINEX)
@@ -948,6 +952,15 @@ void SmElementsControl::addElements(const SmElementDescr aElementsArray[], sal_u
             else if (aElement == RID_SLMRANGLEXY)
                 addElement(aParser, "left langle binom{<?>}{<?>} mline binom{<?>}{<?>} right rangle ", aElement, SmResId(pElementHelp));
 
+            else if (aElement == RID_OPERX)
+                addElement(aParser, u"oper \xE22B <?>", aElement, SmResId(pElementHelp));
+            else if (aElement == RID_OPER_FROMX)
+                addElement(aParser, u"oper \xE22B from <?> <?>", aElement, SmResId(pElementHelp));
+            else if (aElement == RID_OPER_TOX)
+                addElement(aParser, u"oper \xE22B to <?> <?>", aElement, SmResId(pElementHelp));
+            else if (aElement == RID_OPER_FROMTOX)
+                addElement(aParser, u"oper \xE22B from <?> to <?> <?>", aElement, SmResId(pElementHelp));
+
             else if (aElement == RID_XOVERBRACEY)
                 addElement(aParser, "{<?><?><?>} overbrace {<?>} ", aElement, SmResId(pElementHelp));
             else if (aElement == RID_XUNDERBRACEY)


More information about the Libreoffice-commits mailing list