LibreOffice Module starmath (master) 1
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
MathType Class Reference

#include <mathtype.hxx>

Collaboration diagram for MathType:
[legend]

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
 
SvStreampS
 
OUStringBuffer & rRet
 
SmNodepTree
 
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
 

Detailed Description

Definition at line 51 of file mathtype.hxx.

Member Enumeration Documentation

◆ MTEMPLATES

enum MathType::MTEMPLATES
private
Enumerator
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 

Definition at line 169 of file mathtype.hxx.

◆ MTOKENS

enum MathType::MTOKENS
private
Enumerator
END 
LINE 
CHAR 
TMPL 
PILE 
MATRIX 
EMBEL 
RULER 
FONT 
SIZE 

Definition at line 168 of file mathtype.hxx.

Constructor & Destructor Documentation

◆ MathType() [1/2]

MathType::MathType ( OUStringBuffer &  rIn)
inlineexplicit

Definition at line 54 of file mathtype.hxx.

References Init().

◆ MathType() [2/2]

MathType::MathType ( OUStringBuffer &  rIn,
SmNode pIn 
)
inline

Definition at line 75 of file mathtype.hxx.

References Init().

Member Function Documentation

◆ ConvertFromStarMath()

bool MathType::ConvertFromStarMath ( SfxMedium rMedium)

◆ EndTemplate()

void MathType::EndTemplate ( int  nOldPendingAttributes)
private

Definition at line 2042 of file mathtype.cxx.

References END, nPendingAttributes, pS, and SvStream::WriteUChar().

Referenced by HandleAttributes().

◆ HandleAlign()

void MathType::HandleAlign ( sal_uInt8  nHAlign,
int rSetAlign 
)
private

Definition at line 1786 of file mathtype.cxx.

References rRet.

Referenced by HandlePile().

◆ HandleAttributes()

void MathType::HandleAttributes ( SmNode pNode,
int  nLevel 
)
private

◆ HandleBrace()

void MathType::HandleBrace ( SmNode pNode,
int  nLevel 
)
private

◆ HandleChar()

bool MathType::HandleChar ( sal_Int32 &  rTextStart,
int rSetSize,
int  nLevel,
sal_uInt8  nTag,
sal_uInt8  nSelector,
sal_uInt8  nVariation,
bool  bSilent 
)
private

◆ HandleCScript()

sal_uInt8 MathType::HandleCScript ( SmNode pNode,
SmNode pContent,
int  nLevel,
sal_uInt64 *  pPos = nullptr,
bool  bTest = true 
)
private

◆ HandleEmblishments()

void MathType::HandleEmblishments ( )
private

Definition at line 2730 of file mathtype.cxx.

References SvStream::good(), nPostlSup, nPostSup, nVersion, pS, SvStream::ReadUChar(), rRet, and sPost.

Referenced by HandleRecords().

◆ HandleFractions()

void MathType::HandleFractions ( SmNode pNode,
int  nLevel 
)
private

Definition at line 2304 of file mathtype.cxx.

References END, SmNode::GetSubNode(), HandleNodes(), LINE, pS, TMPL, and SvStream::WriteUChar().

Referenced by HandleNodes().

◆ HandleLim()

bool MathType::HandleLim ( SmNode pNode,
int  nLevel 
)
private

◆ HandleMAlign()

void MathType::HandleMAlign ( SmNode pNode,
int  nLevel 
)
private

◆ HandleMath()

void MathType::HandleMath ( SmNode pNode)
private

◆ HandleMatrix()

bool MathType::HandleMatrix ( int  nLevel,
sal_uInt8  nSelector,
sal_uInt8  nVariarion 
)
private

Definition at line 2649 of file mathtype.cxx.

References SvStream::good(), HandleRecords(), pS, SvStream::ReadUChar(), rRet, and SvStream::SeekRel().

Referenced by HandleRecords().

◆ HandleMatrixSeparator()

void MathType::HandleMatrixSeparator ( int  nMatrixRows,
int  nMatrixCols,
int rCurCol,
int rCurRow 
)
private

Definition at line 1758 of file mathtype.cxx.

References rRet.

Referenced by HandleRecords().

◆ HandleNodes()

void MathType::HandleNodes ( SmNode pNode,
int  nLevel 
)
private

◆ HandleNudge()

void MathType::HandleNudge ( )
private

Definition at line 619 of file mathtype.cxx.

References pS, SvStream::ReadUChar(), and SvStream::ReadUInt16().

Referenced by HandleRecords().

◆ HandleOperator()

void MathType::HandleOperator ( SmNode pNode,
int  nLevel 
)
private

◆ HandlePile()

bool MathType::HandlePile ( int rSetAlign,
int  nLevel,
sal_uInt8  nSelector,
sal_uInt8  nVariation 
)
private

Definition at line 2627 of file mathtype.cxx.

References HandleAlign(), HandleRecords(), nHAlign, pS, SvStream::ReadUChar(), and rRet.

Referenced by HandleRecords().

◆ HandleRecords()

bool MathType::HandleRecords ( int  nLevel,
sal_uInt8  nSelector = 0xFF,
sal_uInt8  nVariation = 0xFF,
int  nRows = 0,
int  nCols = 0 
)
private

◆ HandleRoot()

void MathType::HandleRoot ( SmNode pNode,
int  nLevel 
)
private

Definition at line 2117 of file mathtype.cxx.

References END, SmNode::GetSubNode(), HandleNodes(), LINE, pS, TMPL, and SvStream::WriteUChar().

Referenced by HandleNodes().

◆ HandleSetSize()

void MathType::HandleSetSize ( )
private

Definition at line 2812 of file mathtype.cxx.

References nDSize, nLSize, pS, SvStream::ReadInt16(), and SvStream::ReadUChar().

Referenced by HandleRecords().

◆ HandleSize()

bool MathType::HandleSize ( sal_Int16  nLSize,
sal_Int16  nDSize,
int rSetSize 
)
private

Definition at line 1806 of file mathtype.cxx.

References aSizeTable, nCurSize, nLastSize, and rRet.

Referenced by HandleChar(), and HandleRecords().

◆ HandleSmMatrix()

void MathType::HandleSmMatrix ( SmMatrixNode pMatrix,
int  nLevel 
)
private

◆ HandleSubSupScript()

void MathType::HandleSubSupScript ( SmNode pNode,
int  nLevel 
)
private

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().

◆ HandleTable()

void MathType::HandleTable ( SmNode pNode,
int  nLevel 
)
private

◆ HandleTemplate()

bool MathType::HandleTemplate ( int  nLevel,
sal_uInt8 rSelector,
sal_uInt8 rVariation,
sal_Int32 &  rLastTemplateBracket 
)
private

Definition at line 2679 of file mathtype.cxx.

References HandleRecords(), pS, SvStream::ReadUChar(), and rRet.

Referenced by HandleRecords().

◆ HandleText()

void MathType::HandleText ( SmNode pNode)
private

◆ HandleVerticalBrace()

void MathType::HandleVerticalBrace ( SmNode pNode,
int  nLevel 
)
private

◆ Init()

void MathType::Init ( void  )
private

◆ LookupChar()

bool MathType::LookupChar ( sal_Unicode  nChar,
OUStringBuffer &  rRet,
sal_uInt8  nVersion,
sal_uInt8  nTypeFace = 0 
)
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().

◆ Parse() [1/2]

bool MathType::Parse ( SotStorage pStor)

◆ Parse() [2/2]

bool MathType::Parse ( SvStream pStream)

◆ StartTemplate()

int MathType::StartTemplate ( sal_uInt16  nSelector,
sal_uInt16  nVariation = 0 
)
private

Definition at line 2025 of file mathtype.cxx.

References LINE, nPendingAttributes, pS, TMPL, and SvStream::WriteUChar().

Referenced by HandleAttributes().

◆ TypeFaceToString()

void MathType::TypeFaceToString ( OUString &  rRet,
sal_uInt8  nFace 
)
private

◆ xfAUTO()

static int MathType::xfAUTO ( sal_uInt8  nTest)
inlinestaticprivate

Definition at line 124 of file mathtype.hxx.

Referenced by HandleChar().

◆ xfEMBELL()

static int MathType::xfEMBELL ( sal_uInt8  nTest)
inlinestaticprivate

Definition at line 125 of file mathtype.hxx.

Referenced by HandleChar().

◆ xfLMOVE()

static int MathType::xfLMOVE ( sal_uInt8  nTest)
inlinestaticprivate

Definition at line 123 of file mathtype.hxx.

Referenced by HandleRecords().

◆ xfNULL()

static int MathType::xfNULL ( sal_uInt8  nTest)
inlinestaticprivate

Definition at line 126 of file mathtype.hxx.

Referenced by HandleRecords().

Member Data Documentation

◆ aUserStyles

MathTypeFontSet MathType::aUserStyles
private

Definition at line 166 of file mathtype.hxx.

Referenced by HandleRecords(), Init(), and TypeFaceToString().

◆ bIsReInterpBrace

bool MathType::bIsReInterpBrace
private

Definition at line 161 of file mathtype.hxx.

Referenced by HandleBrace(), and HandleMath().

◆ nCurSize

sal_Int16 MathType::nCurSize
private

Definition at line 158 of file mathtype.hxx.

Referenced by HandleRecords(), and HandleSize().

◆ nDSize

sal_Int16 MathType::nDSize
private

Definition at line 157 of file mathtype.hxx.

Referenced by HandleChar(), HandleRecords(), and HandleSetSize().

◆ nHAlign

sal_uInt8 MathType::nHAlign
private

Definition at line 151 of file mathtype.hxx.

Referenced by HandleMAlign(), HandlePile(), and HandleTable().

◆ nInsertion

sal_uInt64 MathType::nInsertion
private

Definition at line 154 of file mathtype.hxx.

Referenced by HandleAttributes(), and HandleText().

◆ nLastSize

sal_Int16 MathType::nLastSize
private

Definition at line 159 of file mathtype.hxx.

Referenced by HandleSize().

◆ nLSize

sal_Int16 MathType::nLSize
private

Definition at line 156 of file mathtype.hxx.

Referenced by HandleChar(), HandleRecords(), and HandleSetSize().

◆ nPendingAttributes

int MathType::nPendingAttributes
private

◆ nPostlSup

sal_Int32 MathType::nPostlSup
private

Definition at line 164 of file mathtype.hxx.

Referenced by HandleChar(), and HandleEmblishments().

◆ nPostSup

sal_Int32 MathType::nPostSup
private

Definition at line 163 of file mathtype.hxx.

Referenced by HandleChar(), and HandleEmblishments().

◆ nSpec

sal_uInt8 MathType::nSpec
private

Definition at line 160 of file mathtype.hxx.

Referenced by HandleBrace(), and HandleMath().

◆ nTypeFace

sal_uInt8 MathType::nTypeFace
private

Definition at line 165 of file mathtype.hxx.

Referenced by HandleChar(), HandleRecords(), and LookupChar().

◆ nVersion

sal_uInt8 MathType::nVersion
private

Definition at line 102 of file mathtype.hxx.

Referenced by HandleChar(), HandleEmblishments(), LookupChar(), and Parse().

◆ pS

SvStream* MathType::pS
private

◆ pTree

SmNode* MathType::pTree
private

Definition at line 149 of file mathtype.hxx.

Referenced by ConvertFromStarMath().

◆ rRet

OUStringBuffer& MathType::rRet
private

◆ sPost

OUStringBuffer MathType::sPost
private

Definition at line 162 of file mathtype.hxx.

Referenced by HandleChar(), and HandleEmblishments().


The documentation for this class was generated from the following files: