[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - 2 commits - starmath/source

Thomas Arnhold thomas at arnhold.org
Wed May 28 00:48:09 PDT 2014


 starmath/source/ElementsDockingWindow.cxx |   29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

New commits:
commit 36f1f514963f3bbfe77893745b71b4cac5a966b5
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Wed May 28 09:40:40 2014 +0200

    Related fdo#71616: Set correct BaseSize
    
    BaseSize has to be set in 100th mm, otherwise the scalable
    brackets are far too thin.
    
    See starmath/source/cfgitem.cxx:
    
    pFormat->SetBaseSize( Size(0, SmPtsTo100th_mm( nTmp16 )) );
    
    nTmp16 is 12pt -> 422 100th mm (at least for me). Let's reuse that.
    
    Change-Id: I69571ae002f790199ab423955b1635eda42096eb

diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index f826f84..8cf2938 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -220,7 +220,7 @@ SmElementsControl::SmElementsControl(Window *pParent, const ResId& rResId)
     , mbVerticalMode(true)
     , mpScroll(new ScrollBar(this, WB_VERT))
 {
-    maFormat.SetBaseSize(PixelToLogic(Size(0, 24)));
+    maFormat.SetBaseSize(PixelToLogic(Size(0, SmPtsTo100th_mm(12))));
 
     mpScroll->SetScrollHdl( LINK(this, SmElementsControl, ScrollHdl) );
     mpScroll->Show();
commit e90d25337a413b3e69afe043f637330f25dcf06f
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Wed May 28 08:57:54 2014 +0200

    Resolves: fdo#71616 Elements dock: Better display of scalable braces
    
    Change-Id: I2255be738aa2230b4102030891026f1f9ad2c38f

diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 2b14ac2..f826f84 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -516,6 +516,33 @@ void SmElementsControl::addElements(const sal_uInt16 aElementsArray[][2], sal_uI
                 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 if (aElementId == RID_SLRPARENTX)
+                addElement("left ( binom{<?>}{<?>} right ) ", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+            else if (aElementId == RID_SLRBRACKETX)
+                addElement("left [ binom{<?>}{<?>} right ] ", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+            else if (aElementId == RID_SLRDBRACKETX)
+                addElement("left ldbracket binom{<?>}{<?>} right rdbracket ", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+            else if (aElementId == RID_SLRBRACEX)
+                addElement("left lbrace binom{<?>}{<?>} right rbrace ", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+            else if (aElementId == RID_SLRANGLEX)
+                addElement("left langle binom{<?>}{<?>} right rangle ", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+            else if (aElementId == RID_SLRCEILX)
+                addElement("left lceil binom{<?>}{<?>} right rceil ", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+            else if (aElementId == RID_SLRFLOORX)
+                addElement("left lfloor binom{<?>}{<?>} right rfloor ", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+
+            else if (aElementId == RID_SLRLINEX)
+                addElement("left lline binom{<?>}{<?>} right rline ", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+            else if (aElementId == RID_SLRDLINEX)
+                addElement("left ldline binom{<?>}{<?>} right rdline ", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+            else if (aElementId == RID_SLMRANGLEXY)
+                addElement("left langle binom{<?>}{<?>} mline binom{<?>}{<?>} right rangle ", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+
+            else if (aElementId == RID_XOVERBRACEY)
+                addElement("{<?><?><?>} overbrace {<?>} ", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+            else if (aElementId == RID_XUNDERBRACEY)
+                addElement("{<?><?><?>} underbrace {<?>} ", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
             else
                 addElement(SM_RESSTR(aElementId), SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
         }


More information about the Libreoffice-commits mailing list