diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2011-11-15 13:34:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-15 13:35:45 +0000 |
commit | cfc84011b3fb609ac78f35666d9aecda4ca34678 (patch) | |
tree | 303c7c54f99f4e6a2ee25d2900cce2d0caa1ecc9 /starmath/source | |
parent | a1cc4e507cb6547d7715be09bff29366424c09fe (diff) |
Fix for fdo#42892: Add new symbols to Math
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/commands.src | 61 | ||||
-rw-r--r-- | starmath/source/mathtype.cxx | 28 | ||||
-rw-r--r-- | starmath/source/parse.cxx | 8 | ||||
-rw-r--r-- | starmath/source/toolbox.cxx | 4 | ||||
-rw-r--r-- | starmath/source/toolbox.src | 70 |
5 files changed, 163 insertions, 8 deletions
diff --git a/starmath/source/commands.src b/starmath/source/commands.src index 150f0df36aea..c3834f701385 100644 --- a/starmath/source/commands.src +++ b/starmath/source/commands.src @@ -226,7 +226,14 @@ String RID_UPARROW { Text = "uparrow " ; }; String RID_DOWNARROW { Text = "downarrow " ; }; String RID_NOSPACE { Text = "nospace {<?>} " ; }; - +String RID_XPRECEDESY { Text = "<?> prec <?> " ; }; +String RID_XPRECEDESEQUALY { Text = "<?> preccurlyeq <?> " ; }; +String RID_XPRECEDESEQUIVY { Text = "<?> precsim <?> " ; }; +String RID_XSUCCEEDSY { Text = "<?> succ <?> " ; }; +String RID_XSUCCEEDSEQUALY { Text = "<?> succcurlyeq <?> " ; }; +String RID_XSUCCEEDSEQUIVY { Text = "<?> succsim <?> " ; }; +String RID_XNOTPRECEDESY { Text = "<?> nprec <?> " ; }; +String RID_XNOTSUCCEEDSY { Text = "<?> nsucc <?> " ; }; ////////////////////////////////////////// @@ -509,6 +516,58 @@ Menu RID_COMMANDMENU HelpId = HID_SMA_DRARROW; Text = "a drarrow b"; }; + MenuItem + { + Separator = TRUE; + }; + MenuItem + { + Identifier = RID_XPRECEDESY; + HelpId = HID_SMA_PRECEDES; + Text = "a prec b"; + }; + MenuItem + { + Identifier = RID_XSUCCEEDSY; + HelpId = HID_SMA_SUCCEEDS; + Text = "a succ b"; + }; + MenuItem + { + Identifier = RID_XPRECEDESEQUALY; + HelpId = HID_SMA_PRECEDESEQUAL; + Text = "a preccurlyeq b"; + }; + MenuItem + { + Identifier = RID_XSUCCEEDSEQUALY; + HelpId = HID_SMA_SUCCEEDSEQUAL; + Text = "a succcurlyeq b"; + }; + MenuItem + { + Identifier = RID_XPRECEDESEQUIVY; + HelpId = HID_SMA_PRECEDESEQUIV; + Text = "a precsim b"; + }; + MenuItem + { + Identifier = RID_XSUCCEEDSEQUIVY; + HelpId = HID_SMA_SUCCEEDSEQUIV; + Text = "a succsim b"; + }; + MenuItem + { + Identifier = RID_XNOTPRECEDESY; + HelpId = HID_SMA_NOTPRECEDES; + Text = "a nprec b"; + }; + MenuItem + { + Identifier = RID_XNOTSUCCEEDSY; + HelpId = HID_SMA_NOTSUCCEEDS; + Text = "a nsucc b"; + }; }; }; }; diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 69d1b0677332..785a391f72d5 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -435,6 +435,32 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion, case 0x2265: pC = " >= "; break; + + case 0x227A: + pC = " prec "; + break; + case 0x227B: + pC = " succ "; + break; + case 0x227C: + pC = " preccurlyeq "; + break; + case 0x227D: + pC = " succcurlyeq "; + break; + case 0x227E: + pC = " precsim "; + break; + case 0x227F: + pC = " succsim "; + break; + case 0x2280: + pC = " nprec "; + break; + case 0x2281: + pC = " nsucc "; + break; + case 0x2282: pC = " subset "; break; @@ -459,8 +485,6 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion, case 0x2289: pC = " nsupseteq "; break; - case 0x227a: - case 0x227b: case 0x22b2: case 0x22b3: rRet += ' '; diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index a2f36bf52e55..efe10220283b 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -249,6 +249,10 @@ static const SmTokenTableEntry aTokenTable[] = { "partial", TPARTIAL, MS_PARTIAL, TGSTANDALONE, 5 }, { "phantom", TPHANTOM, '\0', TGFONTATTR, 5}, { "plusminus", TPLUSMINUS, MS_PLUSMINUS, TGUNOPER | TGSUM, 5}, + { "prec", TPRECEDES, MS_PRECEDES, TGRELATION, 0 }, + { "preccurlyeq", TPRECEDESEQUAL, MS_PRECEDESEQUAL, TGRELATION, 0 }, + { "precsim", TPRECEDESEQUIV, MS_PRECEDESEQUIV, TGRELATION, 0 }, + { "nprec", TNOTPRECEDES, MS_NOTPRECEDES, TGRELATION, 0 }, { "prod", TPROD, MS_PROD, TGOPER, 5}, { "prop", TPROP, MS_PROP, TGRELATION, 0}, { "rangle", TRANGLE, MS_RANGLE, TGRBRACES, 0}, //! 0 to terminate expression @@ -281,6 +285,10 @@ static const SmTokenTableEntry aTokenTable[] = { "stack", TSTACK, '\0', 0, 5}, { "sub", TRSUB, '\0', TGPOWER, 0}, { "subset", TSUBSET, MS_SUBSET, TGRELATION, 0}, + { "succ", TSUCCEEDS, MS_SUCCEEDS, TGRELATION, 0 }, + { "succcurlyeq", TSUCCEEDSEQUAL, MS_SUCCEEDSEQUAL, TGRELATION, 0 }, + { "succsim", TSUCCEEDSEQUIV, MS_SUCCEEDSEQUIV, TGRELATION, 0 }, + { "nsucc", TNOTSUCCEEDS, MS_NOTSUCCEEDS, TGRELATION, 0 }, { "subseteq", TSUBSETEQ, MS_SUBSETEQ, TGRELATION, 0}, { "sum", TSUM, MS_SUM, TGOPER, 5}, { "sup", TRSUP, '\0', TGPOWER, 0}, diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx index 68e15f6079d0..36c28e27f06d 100644 --- a/starmath/source/toolbox.cxx +++ b/starmath/source/toolbox.cxx @@ -238,7 +238,7 @@ void SmToolBoxWindow::StateChanged( StateChangedType nStateChange ) void SmToolBoxWindow::AdjustPosSize( bool bSetPos ) { Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) ); - Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 5 /* see nLines in SetCategory*/ ) ); + Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 7 /* see nLines in SetCategory*/ ) ); OSL_ENSURE( aCatSize.Width() == aCmdSize.Width(), "width mismatch" ); // catalog settings @@ -307,7 +307,7 @@ void SmToolBoxWindow::SetCategory(sal_uInt16 nCategoryRID) switch (nCategoryRID) { case RID_UNBINOPS_CAT : nLines = 4; break; - case RID_RELATIONS_CAT: nLines = 5; break; + case RID_RELATIONS_CAT: nLines = 7; break; case RID_SETOPERATIONS_CAT: nLines = 5; break; case RID_FUNCTIONS_CAT: nLines = 5; break; case RID_OPERATORS_CAT: nLines = 3; break; diff --git a/starmath/source/toolbox.src b/starmath/source/toolbox.src index f493e104448a..a83f69f0c0b3 100644 --- a/starmath/source/toolbox.src +++ b/starmath/source/toolbox.src @@ -259,7 +259,7 @@ FloatingWindow RID_TOOLBOXWINDOW Size = MAP_APPFONT ( 65 , 95 ) ; SVLook = TRUE ; Hide = TRUE ; - LineCount = 5 ; + LineCount = 7 ; ItemList = { ToolBoxItem @@ -413,6 +413,62 @@ FloatingWindow RID_TOOLBOXWINDOW HelpId = HID_SMA_DRARROW ; Text [ en-US ] = "Double Arrow Right"; }; + ToolBoxItem + { + Type = TOOLBOXITEM_BREAK ; + }; + ToolBoxItem + { + Identifier = RID_XPRECEDESY ; + HelpId = HID_SMA_PRECEDES ; + Text [ en-US ] = "Precedes"; + }; + ToolBoxItem + { + Identifier = RID_XNOTPRECEDESY ; + HelpId = HID_SMA_NOTPRECEDES ; + Text [ en-US ] = "Not precedes"; + }; + ToolBoxItem + { + Identifier = RID_XSUCCEEDSY ; + HelpId = HID_SMA_SUCCEEDS ; + Text [ en-US ] = "Succeeds"; + }; + ToolBoxItem + { + Identifier = RID_XNOTSUCCEEDSY ; + HelpId = HID_SMA_NOTSUCCEEDS ; + Text [ en-US ] = "Not succeeds"; + }; + ToolBoxItem + { + Type = TOOLBOXITEM_BREAK ; + }; + ToolBoxItem + { + Identifier = RID_XPRECEDESEQUALY ; + HelpId = HID_SMA_PRECEDESEQUAL ; + Text [ en-US ] = "Precedes or equal to"; + }; + ToolBoxItem + { + Identifier = RID_XSUCCEEDSEQUALY ; + HelpId = HID_SMA_SUCCEEDSEQUAL ; + Text [ en-US ] = "Succeeds or equal to"; + }; + ToolBoxItem + { + Identifier = RID_XPRECEDESEQUIVY ; + HelpId = HID_SMA_PRECEDESEQUIV ; + Text [ en-US ] = "Precedes or equivalent to"; + }; + ToolBoxItem + { + Identifier = RID_XSUCCEEDSEQUIVY ; + HelpId = HID_SMA_SUCCEEDSEQUIV ; + Text [ en-US ] = "Succeeds or equivalent to"; + }; }; }; @@ -1516,8 +1572,16 @@ FloatingWindow RID_TOOLBOXWINDOW RID_DLARROW ; \ RID_DLRARROW ; \ RID_DRARROW ; \ + RID_XPRECEDESY ; \ + RID_XNOTPRECEDESY ; \ + RID_XPRECEDESEQUALY ; \ + RID_XPRECEDESEQUIVY ; \ + RID_XSUCCEEDSY ; \ + RID_XNOTSUCCEEDSY ; \ + RID_XSUCCEEDSEQUALY ; \ + RID_XSUCCEEDSEQUIVY ; \ }; \ - IdCount ={ 21 ; }; + IdCount ={ 29 ; }; ImageList RID_IL_RELATIONS { @@ -1728,7 +1792,7 @@ FloatingWindow RID_TOOLBOXWINDOW RID_PARTIAL ; \ RID_NABLA ; \ RID_EXISTS ; \ - RID_NOTEXISTS ; \ + RID_NOTEXISTS ; \ RID_FORALL ; \ RID_HBAR; \ RID_LAMBDABAR ; \ |