LibreOffice Module starmath (master) 1
|
#include <mathtype.hxx>
Public Member Functions | |
MathType (OUStringBuffer &rIn) | |
MathType (OUStringBuffer &rIn, SmNode *pIn) | |
bool | Parse (SotStorage *pStor) |
bool | Parse (SvStream *pStream) |
bool | ConvertFromStarMath (SfxMedium &rMedium) |
Static Public Member Functions | |
static bool | LookupChar (sal_Unicode nChar, OUStringBuffer &rRet, sal_uInt8 nVersion, sal_uInt8 nTypeFace=0) |
Private Types | |
enum | MTOKENS { END , LINE , CHAR , TMPL , PILE , MATRIX , EMBEL , RULER , FONT , SIZE } |
enum | MTEMPLATES { tmANGLE , tmPAREN , tmBRACE , tmBRACK , tmBAR , tmDBAR , tmFLOOR , tmCEILING , tmLBLB , tmRBRB , tmRBLB , tmLBRP , tmLPRB , tmROOT , tmFRACT , tmSCRIPT , tmUBAR , tmOBAR , tmLARROW , tmRARROW , tmBARROW , tmSINT , tmDINT , tmTINT , tmSSINT , tmDSINT , tmTSINT , tmUHBRACE , tmLHBRACE , tmSUM , tmISUM , tmPROD , tmIPROD , tmCOPROD , tmICOPROD , tmUNION , tmIUNION , tmINTER , tmIINTER , tmLIM , tmLDIV , tmSLFRACT , tmINTOP , tmSUMOP , tmLSCRIPT , tmDIRAC , tmUARROW , tmOARROW , tmOARC } |
Private Member Functions | |
void | Init () |
bool | HandleRecords (int nLevel, sal_uInt8 nSelector=0xFF, sal_uInt8 nVariation=0xFF, int nRows=0, int nCols=0) |
bool | HandleSize (sal_Int16 nLSize, sal_Int16 nDSize, int &rSetSize) |
void | HandleAlign (sal_uInt8 nHAlign, int &rSetAlign) |
bool | HandlePile (int &rSetAlign, int nLevel, sal_uInt8 nSelector, sal_uInt8 nVariation) |
bool | HandleMatrix (int nLevel, sal_uInt8 nSelector, sal_uInt8 nVariarion) |
void | HandleMatrixSeparator (int nMatrixRows, int nMatrixCols, int &rCurCol, int &rCurRow) |
bool | HandleTemplate (int nLevel, sal_uInt8 &rSelector, sal_uInt8 &rVariation, sal_Int32 &rLastTemplateBracket) |
void | HandleEmblishments () |
void | HandleSetSize () |
bool | HandleChar (sal_Int32 &rTextStart, int &rSetSize, int nLevel, sal_uInt8 nTag, sal_uInt8 nSelector, sal_uInt8 nVariation, bool bSilent) |
void | HandleNudge () |
void | HandleNodes (SmNode *pNode, int nLevel) |
int | StartTemplate (sal_uInt16 nSelector, sal_uInt16 nVariation=0) |
void | EndTemplate (int nOldPendingAttributes) |
void | HandleSmMatrix (SmMatrixNode *pMatrix, int nLevel) |
void | HandleTable (SmNode *pNode, int nLevel) |
void | HandleRoot (SmNode *pNode, int nLevel) |
void | HandleSubSupScript (SmNode *pNode, int nLevel) |
sal_uInt8 | HandleCScript (SmNode *pNode, SmNode *pContent, int nLevel, sal_uInt64 *pPos=nullptr, bool bTest=true) |
void | HandleFractions (SmNode *pNode, int nLevel) |
void | HandleBrace (SmNode *pNode, int nLevel) |
void | HandleVerticalBrace (SmNode *pNode, int nLevel) |
void | HandleOperator (SmNode *pNode, int nLevel) |
bool | HandleLim (SmNode *pNode, int nLevel) |
void | HandleMAlign (SmNode *pNode, int nLevel) |
void | HandleMath (SmNode *pNode) |
void | HandleText (SmNode *pNode) |
void | HandleAttributes (SmNode *pNode, int nLevel) |
void | TypeFaceToString (OUString &rRet, sal_uInt8 nFace) |
Static Private Member Functions | |
static int | xfLMOVE (sal_uInt8 nTest) |
static int | xfAUTO (sal_uInt8 nTest) |
static int | xfEMBELL (sal_uInt8 nTest) |
static int | xfNULL (sal_uInt8 nTest) |
Private Attributes | |
sal_uInt8 | nVersion |
SvStream * | pS |
OUStringBuffer & | rRet |
SmNode * | pTree |
sal_uInt8 | nHAlign |
int | nPendingAttributes |
sal_uInt64 | nInsertion |
sal_Int16 | nLSize |
sal_Int16 | nDSize |
sal_Int16 | nCurSize |
sal_Int16 | nLastSize |
sal_uInt8 | nSpec |
bool | bIsReInterpBrace |
OUStringBuffer | sPost |
sal_Int32 | nPostSup |
sal_Int32 | nPostlSup |
sal_uInt8 | nTypeFace |
MathTypeFontSet | aUserStyles |
Definition at line 51 of file mathtype.hxx.
|
private |
Definition at line 169 of file mathtype.hxx.
|
private |
Enumerator | |
---|---|
END | |
LINE | |
CHAR | |
TMPL | |
PILE | |
MATRIX | |
EMBEL | |
RULER | |
FONT | |
SIZE |
Definition at line 168 of file mathtype.hxx.
|
inlineexplicit |
Definition at line 54 of file mathtype.hxx.
References Init().
|
inline |
Definition at line 75 of file mathtype.hxx.
References Init().
bool MathType::ConvertFromStarMath | ( | SfxMedium & | rMedium | ) |
Definition at line 1864 of file mathtype.cxx.
References tools::SvRef< typename T >::clear(), END, EQNOLEFILEHDR_SIZE, ERRCODE_NONE, tools::SvRef< typename T >::get(), SfxMedium::GetOutStream(), HandleNodes(), tools::SvRef< typename T >::is(), MSO_EQUATION3_CLASSID, nPendingAttributes, pS, pTree, SvStream::Seek(), SvStream::SeekRel(), SvStream::SetEndian(), SvStream::Tell(), EQNOLEFILEHDR::Write(), and SvStream::WriteUChar().
Referenced by SmDocShell::WriteAsMathType3().
|
private |
Definition at line 2042 of file mathtype.cxx.
References END, nPendingAttributes, pS, and SvStream::WriteUChar().
Referenced by HandleAttributes().
Definition at line 3148 of file mathtype.cxx.
References EndTemplate(), SmToken::eType, SmNode::GetSubNode(), SmTextNode::GetText(), SmNode::GetToken(), HandleNodes(), nInsertion, nPendingAttributes, nPos, pS, SvStream::Seek(), StartTemplate(), TACUTE, TBAR, TBREVE, TCDOT, TCHECK, TCIRCLE, TDDDOT, TDDOT, SvStream::Tell(), TGRAVE, THAT, TOVERLINE, TOVERSTRIKE, TTEXT, TTILDE, TUNDERLINE, TVEC, TWIDEHARPOON, TWIDEHAT, TWIDETILDE, TWIDEVEC, and SvStream::WriteUChar().
Referenced by HandleNodes().
Definition at line 2328 of file mathtype.cxx.
References bIsReInterpBrace, CHAR, END, SmToken::eType, SmNode::GetSubNode(), SmNode::GetToken(), HandleNodes(), LINE, nSpec, pS, SvStream::Seek(), SvStream::Tell(), TLANGLE, TLBRACE, TLBRACKET, TLDLINE, TLFLOOR, TLLINE, tmANGLE, tmBAR, tmBRACE, tmBRACK, tmDBAR, tmFLOOR, tmPAREN, TMPL, SvStream::WriteUChar(), and SvStream::WriteUInt16().
Referenced by HandleNodes().
|
private |
Definition at line 2835 of file mathtype.cxx.
References aStr, HandleRecords(), HandleSize(), lcl_PrependDummyTerm(), LookupChar(), nDSize, nLSize, nPostlSup, nPostSup, nTypeFace, nVersion, pS, SvStream::ReadUChar(), SvStream::ReadUtf16(), rRet, sPost, TypeFaceToString(), xfAUTO(), and xfEMBELL().
Referenced by HandleRecords().
|
private |
Definition at line 2148 of file mathtype.cxx.
References CSUB, CSUP, END, SmNode::GetSubNode(), HandleNodes(), LINE, pS, SvStream::Tell(), TMPL, and SvStream::WriteUChar().
Referenced by HandleLim(), HandleOperator(), and HandleSubSupScript().
|
private |
Definition at line 2730 of file mathtype.cxx.
References SvStream::good(), nPostlSup, nPostSup, nVersion, pS, SvStream::ReadUChar(), rRet, and sPost.
Referenced by HandleRecords().
Definition at line 2304 of file mathtype.cxx.
References END, SmNode::GetSubNode(), HandleNodes(), LINE, pS, TMPL, and SvStream::WriteUChar().
Referenced by HandleNodes().
Definition at line 2940 of file mathtype.cxx.
References CHAR, END, SmToken::eType, SmNode::GetSubNode(), SmNode::GetToken(), HandleCScript(), HandleNodes(), LINE, pS, TLIM, TLIMINF, TLIMSUP, SvStream::WriteUChar(), and SvStream::WriteUInt16().
Referenced by HandleOperator().
Definition at line 3016 of file mathtype.cxx.
References SmToken::eType, SmNode::GetNumSubNodes(), SmNode::GetSubNode(), SmNode::GetToken(), HandleNodes(), i, nHAlign, TALIGNC, and TALIGNR.
Referenced by HandleNodes().
|
private |
Definition at line 3040 of file mathtype.cxx.
References bIsReInterpBrace, CHAR, SmTextNode::ConvertSymbolToUnicode(), EMBEL, END, SmToken::eType, SmTextNode::GetText(), SmNode::GetToken(), i, LINE, nPendingAttributes, nSpec, pS, TMLINE, SvStream::WriteUChar(), and SvStream::WriteUInt16().
Referenced by HandleNodes().
Definition at line 2649 of file mathtype.cxx.
References SvStream::good(), HandleRecords(), pS, SvStream::ReadUChar(), rRet, and SvStream::SeekRel().
Referenced by HandleRecords().
Definition at line 1936 of file mathtype.cxx.
References Align, SmToken::aText, Attribute, BinVer, Blank, Brace, CHAR, END, SmToken::eType, Expression, SmNode::GetNumSubNodes(), SmNode::GetSubNode(), SmTextNode::GetText(), SmNode::GetToken(), SmNode::GetType(), HandleAttributes(), HandleBrace(), HandleFractions(), HandleMAlign(), HandleMath(), HandleNodes(), HandleOperator(), HandleRoot(), HandleSmMatrix(), HandleSubSupScript(), HandleTable(), HandleText(), HandleVerticalBrace(), i, Line, LINE, Math, MathIdent, Matrix, Oper, pS, Root, Special, SubSup, Table, Text, TSBLANK, VerticalBrace, SvStream::WriteUChar(), and SvStream::WriteUInt16().
Referenced by ConvertFromStarMath(), HandleAttributes(), HandleBrace(), HandleCScript(), HandleFractions(), HandleLim(), HandleMAlign(), HandleNodes(), HandleOperator(), HandleRoot(), HandleSmMatrix(), HandleSubSupScript(), HandleTable(), and HandleVerticalBrace().
|
private |
Definition at line 619 of file mathtype.cxx.
References pS, SvStream::ReadUChar(), and SvStream::ReadUInt16().
Referenced by HandleRecords().
Definition at line 2438 of file mathtype.cxx.
References CHAR, END, SmToken::eType, SmNode::GetSubNode(), SmNode::GetToken(), HandleCScript(), HandleLim(), HandleNodes(), LINE, nPos, pS, SvStream::Seek(), TCOPROD, SvStream::Tell(), TIIINT, TIINT, TINT, TINTD, TLINT, TLLINT, TLLLINT, TMPL, TPROD, TSUM, SvStream::WriteUChar(), and SvStream::WriteUInt16().
Referenced by HandleNodes().
|
private |
Definition at line 2627 of file mathtype.cxx.
References HandleAlign(), HandleRecords(), nHAlign, pS, SvStream::ReadUChar(), and rRet.
Referenced by HandleRecords().
|
private |
Definition at line 636 of file mathtype.cxx.
References aStr, aUserStyles, CHAR, EMBEL, END, SvStream::eof(), FONT, HandleChar(), HandleEmblishments(), HandleMatrix(), HandleMatrixSeparator(), HandleNudge(), HandlePile(), HandleRecords(), HandleSetSize(), HandleSize(), HandleTemplate(), i, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert(), lcl_AppendDummyTerm(), LINE, MATRIX, nCurSize, nDSize, nLSize, MathTypeFont::nStyle, MathTypeFont::nTface, nTypeFace, PILE, pS, SvStream::ReadChar(), SvStream::ReadUChar(), SvStream::ReadUInt16(), rRet, RULER, SAL_WARN, SIZE, tmANGLE, tmBAR, tmBARROW, tmBRACE, tmBRACK, tmCEILING, tmCOPROD, tmDBAR, tmDINT, tmDIRAC, tmDSINT, tmFLOOR, tmFRACT, tmICOPROD, tmIINTER, tmINTER, tmINTOP, tmIPROD, tmISUM, tmIUNION, tmLARROW, tmLBLB, tmLBRP, tmLDIV, tmLHBRACE, tmLIM, tmLPRB, tmLSCRIPT, tmOARROW, tmOBAR, tmPAREN, TMPL, tmPROD, tmRARROW, tmRBLB, tmRBRB, tmROOT, tmSCRIPT, tmSINT, tmSLFRACT, tmSSINT, tmSUM, tmSUMOP, tmTINT, tmTSINT, tmUARROW, tmUBAR, tmUHBRACE, tmUNION, TypeFaceToString(), xfLMOVE(), and xfNULL().
Referenced by HandleChar(), HandleMatrix(), HandlePile(), HandleRecords(), HandleTemplate(), and Parse().
Definition at line 2117 of file mathtype.cxx.
References END, SmNode::GetSubNode(), HandleNodes(), LINE, pS, TMPL, and SvStream::WriteUChar().
Referenced by HandleNodes().
|
private |
Definition at line 2812 of file mathtype.cxx.
References nDSize, nLSize, pS, SvStream::ReadInt16(), and SvStream::ReadUChar().
Referenced by HandleRecords().
|
private |
Definition at line 1806 of file mathtype.cxx.
References aSizeTable, nCurSize, nLastSize, and rRet.
Referenced by HandleChar(), and HandleRecords().
|
private |
Definition at line 2050 of file mathtype.cxx.
References END, SmMatrixNode::GetNumCols(), SmMatrixNode::GetNumRows(), SmStructureNode::GetNumSubNodes(), SmStructureNode::GetSubNode(), HandleNodes(), i, LINE, MATRIX, pS, and SvStream::WriteUChar().
Referenced by HandleNodes().
Definition at line 2210 of file mathtype.cxx.
References END, SmNode::GetSubNode(), HandleCScript(), HandleNodes(), LINE, LSUB, LSUP, pS, RSUB, RSUP, TMPL, and SvStream::WriteUChar().
Referenced by HandleNodes().
Definition at line 2083 of file mathtype.cxx.
References END, SmNode::GetNumSubNodes(), SmNode::GetSubNode(), HandleNodes(), i, LINE, nHAlign, PILE, pS, and SvStream::WriteUChar().
Referenced by HandleNodes().
|
private |
Definition at line 2679 of file mathtype.cxx.
References HandleRecords(), pS, SvStream::ReadUChar(), and rRet.
Referenced by HandleRecords().
|
private |
Definition at line 3279 of file mathtype.cxx.
References CHAR, SmTextNode::ConvertSymbolToUnicode(), EMBEL, END, SmNode::GetFont(), vcl::Font::GetItalic(), SmTextNode::GetText(), vcl::Font::GetWeight(), i, ITALIC_NORMAL, nInsertion, nPendingAttributes, pS, SvStream::Tell(), WEIGHT_BOLD, SvStream::WriteUChar(), and SvStream::WriteUInt16().
Referenced by HandleNodes().
Definition at line 2411 of file mathtype.cxx.
References END, SmToken::eType, SmNode::GetSubNode(), SmNode::GetToken(), HandleNodes(), LINE, pS, tmLHBRACE, TMPL, tmUHBRACE, TUNDERBRACE, and SvStream::WriteUChar().
Referenced by HandleNodes().
|
private |
Definition at line 40 of file mathtype.cxx.
References aUserStyles, i, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert(), MathTypeFont::nStyle, MathTypeFont::nTface, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::reserve().
Referenced by MathType().
|
static |
Definition at line 83 of file mathtype.cxx.
References MS_LANGLE, MS_LMATHANGLE, MS_RANGLE, MS_RMATHANGLE, nTypeFace, nVersion, rRet, and u.
Referenced by HandleChar().
bool MathType::Parse | ( | SotStorage * | pStor | ) |
Definition at line 550 of file mathtype.cxx.
References ERRCODE_NONE, tools::SvRef< typename T >::get(), tools::SvRef< typename T >::is(), SotStorage::OpenSotStream(), and Parse().
Referenced by SmDocShell::ConvertFrom(), Parse(), and TestImportMathType().
bool MathType::Parse | ( | SvStream * | pStream | ) |
Definition at line 560 of file mathtype.cxx.
References SvStream::good(), HandleRecords(), nVersion, pS, EQNOLEFILEHDR::Read(), SvStream::ReadUChar(), rRet, and SvStream::SetEndian().
|
private |
Definition at line 2025 of file mathtype.cxx.
References LINE, nPendingAttributes, pS, TMPL, and SvStream::WriteUChar().
Referenced by HandleAttributes().
|
private |
Definition at line 541 of file mathtype.cxx.
References MathTypeFont::AppendStyleToText(), aUserStyles, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), and MathTypeFont::nStyle.
Referenced by HandleChar(), and HandleRecords().
Definition at line 124 of file mathtype.hxx.
Referenced by HandleChar().
Definition at line 125 of file mathtype.hxx.
Referenced by HandleChar().
Definition at line 123 of file mathtype.hxx.
Referenced by HandleRecords().
Definition at line 126 of file mathtype.hxx.
Referenced by HandleRecords().
|
private |
Definition at line 166 of file mathtype.hxx.
Referenced by HandleRecords(), Init(), and TypeFaceToString().
|
private |
Definition at line 161 of file mathtype.hxx.
Referenced by HandleBrace(), and HandleMath().
|
private |
Definition at line 158 of file mathtype.hxx.
Referenced by HandleRecords(), and HandleSize().
|
private |
Definition at line 157 of file mathtype.hxx.
Referenced by HandleChar(), HandleRecords(), and HandleSetSize().
|
private |
Definition at line 151 of file mathtype.hxx.
Referenced by HandleMAlign(), HandlePile(), and HandleTable().
|
private |
Definition at line 154 of file mathtype.hxx.
Referenced by HandleAttributes(), and HandleText().
|
private |
Definition at line 159 of file mathtype.hxx.
Referenced by HandleSize().
|
private |
Definition at line 156 of file mathtype.hxx.
Referenced by HandleChar(), HandleRecords(), and HandleSetSize().
|
private |
Definition at line 153 of file mathtype.hxx.
Referenced by ConvertFromStarMath(), EndTemplate(), HandleAttributes(), HandleMath(), HandleText(), and StartTemplate().
|
private |
Definition at line 164 of file mathtype.hxx.
Referenced by HandleChar(), and HandleEmblishments().
|
private |
Definition at line 163 of file mathtype.hxx.
Referenced by HandleChar(), and HandleEmblishments().
|
private |
Definition at line 160 of file mathtype.hxx.
Referenced by HandleBrace(), and HandleMath().
|
private |
Definition at line 165 of file mathtype.hxx.
Referenced by HandleChar(), HandleRecords(), and LookupChar().
|
private |
Definition at line 102 of file mathtype.hxx.
Referenced by HandleChar(), HandleEmblishments(), LookupChar(), and Parse().
|
private |
Definition at line 104 of file mathtype.hxx.
Referenced by ConvertFromStarMath(), EndTemplate(), HandleAttributes(), HandleBrace(), HandleChar(), HandleCScript(), HandleEmblishments(), HandleFractions(), HandleLim(), HandleMath(), HandleMatrix(), HandleNodes(), HandleNudge(), HandleOperator(), HandlePile(), HandleRecords(), HandleRoot(), HandleSetSize(), HandleSmMatrix(), HandleSubSupScript(), HandleTable(), HandleTemplate(), HandleText(), HandleVerticalBrace(), Parse(), and StartTemplate().
|
private |
Definition at line 149 of file mathtype.hxx.
Referenced by ConvertFromStarMath().
|
private |
Definition at line 148 of file mathtype.hxx.
Referenced by HandleAlign(), HandleChar(), HandleEmblishments(), HandleMatrix(), HandleMatrixSeparator(), HandlePile(), HandleRecords(), HandleSize(), HandleTemplate(), LookupChar(), and Parse().
|
private |
Definition at line 162 of file mathtype.hxx.
Referenced by HandleChar(), and HandleEmblishments().