LibreOffice Module starmath (master) 1
|
Parses the starmath code and creates the nodes. More...
Functions | |
std::vector< SmMlAttribute > | makeMlAttributeList (std::vector< SmMlAttributePos > aAttributePosList) |
Generates an attribute vector of default values from an attribute position list. More... | |
SmToken | Identify_SmXMLOperatorContext_Impl (sal_Unicode cChar, bool bIsStretchy=true) |
Identifies operator chars tokens for importing mathml. More... | |
SmToken | Identify_PrefixPostfix_SmXMLOperatorContext_Impl (sal_Unicode cChar) |
Identifies opening / closing brace tokens for importing mathml. More... | |
SmToken | Identify_Prefix_SmXMLOperatorContext_Impl (sal_Unicode cChar) |
Identifies opening brace tokens for importing mathml. More... | |
SmToken | Identify_Postfix_SmXMLOperatorContext_Impl (sal_Unicode cChar) |
Identifies closing brace tokens for importing mathml. More... | |
SmColorTokenTableEntry | Identify_Color_Parser (sal_uInt32 cColor) |
Identifies color from color code cColor. More... | |
SmColorTokenTableEntry | Identify_Color_MATHML (sal_uInt32 cColor) |
Identifies color from color code cColor. More... | |
SmColorTokenTableEntry | Identify_Color_DVIPSNAMES (sal_uInt32 cColor) |
Identifies color from color code cColor. More... | |
const SmColorTokenTableEntry * | Identify_ColorName_Parser (std::u16string_view colorname) |
Identifies color from color name. More... | |
SmColorTokenTableEntry | Identify_ColorName_HTML (std::u16string_view colorname) |
Identifies color from color name. More... | |
const SmColorTokenTableEntry * | Identify_ColorName_DVIPSNAMES (std::u16string_view colorname) |
Identifies color from color name. More... | |
bool | isStructuralNode (SmNodeType aNodeTypeName) |
bool | isBinOperatorNode (SmNodeType aNodeTypeName) |
bool | isUnOperatorNode (SmNodeType aNodeTypeName) |
bool | isOperatorNode (SmNodeType aNodeTypeName) |
bool | isStandaloneNode (SmNodeType aNodeTypeName) |
AbstractSmParser * | GetDefaultSmParser () |
AbstractSmParser * | GetVersionSmParser (sal_uInt16 nVersion) |
OUString | getParseErrorDesc (SmParseError err) |
Parses the starmath code and creates the nodes.
AbstractSmParser * starmathdatabase::GetDefaultSmParser | ( | ) |
OUString starmathdatabase::getParseErrorDesc | ( | SmParseError | err | ) |
Definition at line 45 of file parsebase.cxx.
References err, SmParseErrorDesc, and SmResId().
Referenced by SmParser5::DoError().
AbstractSmParser * starmathdatabase::GetVersionSmParser | ( | sal_uInt16 | nVersion | ) |
Definition at line 39 of file parse.cxx.
References nVersion.
Referenced by SmDocShell::SetSmSyntaxVersion(), SmElementsControl::setSmSyntaxVersion(), and SmElementsControl::SmElementsControl().
SmColorTokenTableEntry starmathdatabase::Identify_Color_DVIPSNAMES | ( | sal_uInt32 | cColor | ) |
Identifies color from color code cColor.
It will be returned with the dvipsnames syntax.
cColor | |
parser | color |
Definition at line 724 of file starmathdatabase.cxx.
References aColorTokenTableDVIPS, i, TRGB, and TRGBA.
SmColorTokenTableEntry starmathdatabase::Identify_Color_MATHML | ( | sal_uInt32 | cColor | ) |
Identifies color from color code cColor.
It will be returned with the MATHML syntax.
This is used to export mathml. Identifies the color and allows it to export it in proper mathml code.
cColor | |
parser | color |
Definition at line 713 of file starmathdatabase.cxx.
References aColorTokenTableMATHML, i, TRGB, and TRGBA.
Referenced by SmXMLExport::ExportFont(), and SmMLExport::exportMlAttributes().
SmColorTokenTableEntry starmathdatabase::Identify_Color_Parser | ( | sal_uInt32 | cColor | ) |
Identifies color from color code cColor.
It will be returned with the parser syntax.
For a given color returns the way it would be in the parser. Used for nodes to text visitors.
cColor | |
parser | color |
Definition at line 699 of file starmathdatabase.cxx.
References aColorTokenTableDVIPS, aColorTokenTableParse, i, TRGB, and TRGBA.
Referenced by SmNodeToTextVisitor::Visit().
const SmColorTokenTableEntry * starmathdatabase::Identify_ColorName_DVIPSNAMES | ( | std::u16string_view | colorname | ) |
Identifies color from color name.
It will be returned with the dvipsnames syntax.
This code has been implemented to add a compatibility layer to import / export latex.
cColor | |
parser | color |
Definition at line 770 of file starmathdatabase.cxx.
References aColorTokenTableDVIPS, aColorTokenTableERROR, o3tl::compareToIgnoreAsciiCase(), and i.
Referenced by SmParser5::NextTokenColor().
SmColorTokenTableEntry starmathdatabase::Identify_ColorName_HTML | ( | std::u16string_view | colorname | ) |
Identifies color from color name.
It will be returned with the HTML syntax.
This finds color values for the color names loaded by mathmlimport. In theory mathml only supports HTML4 colors, but most browsers support all HTML5 colors. That's why there is an high risk of finding them inside mathml and have to give support.
cColor | |
parser | color |
Definition at line 750 of file starmathdatabase.cxx.
References aColorTokenTableHTML, col, COL_SM_BLACK(), o3tl::compareToIgnoreAsciiCase(), i, Color::STRtoRGB(), TERROR, and TRGB.
const SmColorTokenTableEntry * starmathdatabase::Identify_ColorName_Parser | ( | std::u16string_view | colorname | ) |
Identifies color from color name.
It will be returned with the parser syntax.
This finds color values for the color names loaded by the parser.
cColor | |
parser | color |
Definition at line 736 of file starmathdatabase.cxx.
References aColorTokenTableERROR, aColorTokenTableParse, o3tl::compareToIgnoreAsciiCase(), and i.
Referenced by SmParser5::NextTokenColor().
SmToken starmathdatabase::Identify_Postfix_SmXMLOperatorContext_Impl | ( | sal_Unicode | cChar | ) |
Identifies closing brace tokens for importing mathml.
Identifies from char cChar
While loading MO elements ( with postfix value for form attribute ) might find braces symbols. This code allows to generate appropriate token for them.
cChar |
Definition at line 267 of file starmathdatabase.cxx.
References LBrace, MS_DVERTLINE, MS_LANGLE, MS_LBRACE, MS_LBRACKET, MS_LCEIL, MS_LDBRACKET, MS_LFLOOR, MS_LMATHANGLE, MS_LPARENT, MS_NONE, MS_RANGLE, MS_RBRACE, MS_RBRACKET, MS_RCEIL, MS_RDBRACKET, MS_RFLOOR, MS_RMATHANGLE, MS_RPARENT, MS_VERTLINE, NONE, RBrace, SAL_MAX_UINT16, TERROR, TLANGLE, TLBRACE, TLBRACKET, TLCEIL, TLDBRACKET, TLFLOOR, TLPARENT, TNONE, TRANGLE, TRBRACE, TRBRACKET, TRCEIL, TRDBRACKET, TRDLINE, TRFLOOR, TRLINE, and TRPARENT.
SmToken starmathdatabase::Identify_Prefix_SmXMLOperatorContext_Impl | ( | sal_Unicode | cChar | ) |
Identifies opening brace tokens for importing mathml.
Identifies from char cChar
While loading MO elements ( with prefix value for form attribute ) might find braces symbols. This code allows to generate appropriate token for them.
cChar |
Definition at line 220 of file starmathdatabase.cxx.
References LBrace, MS_DVERTLINE, MS_LANGLE, MS_LBRACE, MS_LBRACKET, MS_LCEIL, MS_LDBRACKET, MS_LFLOOR, MS_LMATHANGLE, MS_LPARENT, MS_NONE, MS_RANGLE, MS_RBRACE, MS_RBRACKET, MS_RCEIL, MS_RDBRACKET, MS_RFLOOR, MS_RMATHANGLE, MS_RPARENT, MS_VERTLINE, NONE, RBrace, SAL_MAX_UINT16, TERROR, TLANGLE, TLBRACE, TLBRACKET, TLCEIL, TLDBRACKET, TLDLINE, TLFLOOR, TLLINE, TLPARENT, TNONE, TRANGLE, TRBRACE, TRBRACKET, TRCEIL, TRDBRACKET, TRFLOOR, and TRPARENT.
SmToken starmathdatabase::Identify_PrefixPostfix_SmXMLOperatorContext_Impl | ( | sal_Unicode | cChar | ) |
Identifies opening / closing brace tokens for importing mathml.
Identifies from char cChar
While loading MO fenced elements might find braces symbols. This code allows to generate appropriate token for them.
cChar |
Definition at line 314 of file starmathdatabase.cxx.
References LBrace, MS_DVERTLINE, MS_LANGLE, MS_LBRACE, MS_LBRACKET, MS_LCEIL, MS_LDBRACKET, MS_LFLOOR, MS_LMATHANGLE, MS_LPARENT, MS_NONE, MS_RANGLE, MS_RBRACE, MS_RBRACKET, MS_RCEIL, MS_RDBRACKET, MS_RFLOOR, MS_RMATHANGLE, MS_RPARENT, MS_VERTLINE, NONE, RBrace, SAL_MAX_UINT16, TERROR, TLANGLE, TLBRACE, TLBRACKET, TLCEIL, TLDBRACKET, TLFLOOR, TLPARENT, TLRDLINE, TLRLINE, TNONE, TRANGLE, TRBRACE, TRBRACKET, TRCEIL, TRDBRACKET, TRFLOOR, and TRPARENT.
SmToken starmathdatabase::Identify_SmXMLOperatorContext_Impl | ( | sal_Unicode | cChar, |
bool | bIsStretchy = true |
||
) |
Identifies operator chars tokens for importing mathml.
Identifies from char cChar
While loading MO or MI elements might find an unicode16 symbol. This code allows to generate appropriate token for them.
cChar |
Definition at line 23 of file starmathdatabase.cxx.
References LBrace, MS_AND, MS_ASSIGN, MS_BACKSLASH, MS_CDOT, MS_COPROD, MS_DEF, MS_DIV, MS_DLINE, MS_EQUIV, MS_FACT, MS_GE, MS_GESLANT, MS_GG, MS_GT, MS_IIINT, MS_IINT, MS_IN, MS_INT, MS_INTERSECT, MS_LANGLE, MS_LBRACE, MS_LBRACKET, MS_LCEIL, MS_LDBRACKET, MS_LE, MS_LESLANT, MS_LFLOOR, MS_LINE, MS_LINT, MS_LL, MS_LLINT, MS_LLLINT, MS_LMATHANGLE, MS_LPARENT, MS_LT, MS_MINUS, MS_MINUSPLUS, MS_MULTIPLY, MS_NDIVIDES, MS_NEG, MS_NEQ, MS_NI, MS_NONE, MS_NOTIN, MS_NOTPRECEDES, MS_NOTSUCCEEDS, MS_NSUBSET, MS_NSUBSETEQ, MS_NSUPSET, MS_NSUPSETEQ, MS_ODIVIDE, MS_ODOT, MS_OMINUS, MS_OPLUS, MS_OR, MS_ORTHO, MS_OTIMES, MS_PLUS, MS_PLUSMINUS, MS_PRECEDES, MS_PRECEDESEQUAL, MS_PRECEDESEQUIV, MS_PROD, MS_PROP, MS_RANGLE, MS_RBRACE, MS_RBRACKET, MS_RCEIL, MS_RDBRACKET, MS_RFLOOR, MS_RIGHTARROW, MS_RMATHANGLE, MS_RPARENT, MS_SIM, MS_SIMEQ, MS_SLASH, MS_SUBSET, MS_SUBSETEQ, MS_SUCCEEDS, MS_SUCCEEDSEQUAL, MS_SUCCEEDSEQUIV, MS_SUM, MS_SUPSET, MS_SUPSETEQ, MS_TIMES, MS_TRANSL, MS_TRANSR, MS_UNION, NONE, Oper, Product, RBrace, Relation, SAL_MAX_UINT16, Sum, TAND, TASSIGN, TBACKSLASH, TCDOT, TCOPROD, TDEF, TDIV, TDIVIDES, TEQUIV, TERROR, TFACT, TGE, TGESLANT, TGG, TGT, TIIINT, TIINT, TIN, TINT, TINTD, TINTERSECT, TLANGLE, TLBRACE, TLBRACKET, TLCEIL, TLDBRACKET, TLE, TLESLANT, TLFLOOR, TLINT, TLL, TLLINT, TLLLINT, TLPARENT, TLT, TMINUS, TMINUSPLUS, TMULTIPLY, TNDIVIDES, TNEG, TNEQ, TNI, TNONE, TNOTIN, TNOTPRECEDES, TNOTSUCCEEDS, TNSUBSET, TNSUBSETEQ, TNSUPSET, TNSUPSETEQ, TODIVIDE, TODOT, TOMINUS, TOPLUS, TOR, TORTHO, TOTIMES, TPARALLEL, TPLUS, TPLUSMINUS, TPRECEDES, TPRECEDESEQUAL, TPRECEDESEQUIV, TPROD, TPROP, TRANGLE, TRBRACE, TRBRACKET, TRCEIL, TRDBRACKET, TRFLOOR, TRPARENT, TSIM, TSIMEQ, TSLASH, TSUBSET, TSUBSETEQ, TSUCCEEDS, TSUCCEEDSEQUAL, TSUCCEEDSEQUIV, TSUM, TSUPSET, TSUPSETEQ, TTIMES, TTOWARD, TTRANSL, TTRANSR, TUNION, TWIDEBACKSLASH, TWIDESLASH, and UnOper.
|
inline |
Definition at line 71 of file nodetype.hxx.
References BinDiagonal, BinHor, BinVer, and SubSup.
|
inline |
Definition at line 82 of file nodetype.hxx.
References BinDiagonal, BinHor, BinVer, Oper, SubSup, and UnHor.
|
inline |
Definition at line 89 of file nodetype.hxx.
References Blank, GlyphSpecial, Math, MathIdent, Special, and Text.
|
inline |
|
inline |
Definition at line 77 of file nodetype.hxx.
References UnHor.
std::vector< SmMlAttribute > starmathdatabase::makeMlAttributeList | ( | std::vector< SmMlAttributePos > | aAttributePosList | ) |
Generates an attribute vector of default values from an attribute position list.
aAttributePosList |
Definition at line 126 of file element.cxx.
References i.
Referenced by SmMlElement::SmImplAttributeType().
|
extern |
Definition at line 668 of file starmathdatabase.cxx.
Referenced by Identify_Color_DVIPSNAMES(), Identify_Color_Parser(), and Identify_ColorName_DVIPSNAMES().
|
extern |
Definition at line 696 of file starmathdatabase.cxx.
Referenced by Identify_ColorName_DVIPSNAMES(), and Identify_ColorName_Parser().
|
extern |
Definition at line 518 of file starmathdatabase.cxx.
Referenced by Identify_ColorName_HTML().
|
extern |
Definition at line 675 of file starmathdatabase.cxx.
Referenced by Identify_Color_MATHML().
|
extern |
Definition at line 361 of file starmathdatabase.cxx.
Referenced by Identify_Color_Parser(), and Identify_ColorName_Parser().
|
extern |
Entity names for mathml.
Example: &infin -> \u221E; These ones are to be used on import.
Referenced by SmMLImportWrapper::ReadThroughComponentIS().
|
extern |
Entity names for mathml.
Example: "\u221E"; -> ∞ These ones are to be used on file export.
Referenced by SmMLExportWrapper::WriteThroughComponentOS().
|
constexpr |
Definition at line 105 of file mathmlMo.hxx.
|
extern |
|
extern |
|
extern |
Definition at line 36 of file def.cxx.
Referenced by SmMlElement::SmImplAttributeType().
|
extern |
Definition at line 24 of file def.cxx.
Referenced by SmMlElement::SmImplAttributeType().
|
extern |
Definition at line 45 of file def.cxx.
Referenced by SmMlElement::SmImplAttributeType().
|
extern |
Definition at line 57 of file def.cxx.
Referenced by SmMlElement::SmImplAttributeType().
|
extern |
Definition at line 80 of file def.cxx.
Referenced by SmMlElement::SmImplAttributeType().
|
extern |
Definition at line 101 of file def.cxx.
Referenced by SmMlElement::SmImplAttributeType().
|
extern |
Definition at line 89 of file def.cxx.
Referenced by SmMlElement::SmImplAttributeType().
|
extern |
|
extern |
Definition at line 24 of file parsebase.cxx.
Referenced by getParseErrorDesc().
|
constexpr |
w3 documentation has been used for this.
See: https://www.w3.org/2003/entities/2007/htmlmathml-f.ent Copyright 1998 - 2011 W3C. We allow the import of HTML5 entities because are compatible with mathml and ill formatted are expected. On export only mathml entities are allowed. Some documentation: https://www.w3.org/TR/MathML3/chapter7.html
Definition at line 36 of file xparsmlbase.hxx.