Commit 1ee1e2e2 authored by ElenaSubbotina's avatar ElenaSubbotina

.

parent 3d47a865
...@@ -453,7 +453,7 @@ namespace MathEquation ...@@ -453,7 +453,7 @@ namespace MathEquation
{ {
nTextSize = nSize*2; nTextSize = nSize*2;
} }
virtual void BeginChar(Unicode_t uChar, uint8_t nTypeFace, bool bSpecialSymbol) virtual void BeginChar(unsigned short uChar, unsigned char nTypeFace, bool bSpecialSymbol)
{ {
bool bIsOpen; bool bIsOpen;
if (!m_aCommandStack.empty()) if (!m_aCommandStack.empty())
...@@ -540,7 +540,7 @@ namespace MathEquation ...@@ -540,7 +540,7 @@ namespace MathEquation
} }
}*/ }*/
} }
virtual void BeginMatrix(uint8_t nVAlign, MMATRIXHORALIGN eHorAlign, MMATRIXVERALIGN eVerAlign, bool bEqualRows, bool bEqualCols, uint8_t nRows, uint8_t nCols, uint8_t* pVerBorders, uint8_t* pHorBorders) virtual void BeginMatrix(unsigned char nVAlign, MMATRIXHORALIGN eHorAlign, MMATRIXVERALIGN eVerAlign, bool bEqualRows, bool bEqualCols, unsigned char nRows, unsigned char nCols, unsigned char* pVerBorders, unsigned char* pHorBorders)
{ {
if (!oRManager.IsEmpty()) if (!oRManager.IsEmpty())
WriteRun(); WriteRun();
...@@ -587,7 +587,7 @@ namespace MathEquation ...@@ -587,7 +587,7 @@ namespace MathEquation
m_aMatrixStack.pop(); m_aMatrixStack.pop();
} }
} }
virtual void StartPile(uint8_t nHAlign, uint8_t nVAlign) virtual void StartPile(unsigned char nHAlign, unsigned char nVAlign)
{ {
switch (nHAlign) switch (nHAlign)
{ {
...@@ -1490,7 +1490,7 @@ namespace MathEquation ...@@ -1490,7 +1490,7 @@ namespace MathEquation
} }
} }
void AddFont(uint8_t nTypeFace, std::string sName, bool bBold, bool bItalic) void AddFont(unsigned char nTypeFace, std::string sName, bool bBold, bool bItalic)
{ {
TMathFont aFont; TMathFont aFont;
aFont.sName = sName; aFont.sName = sName;
......
...@@ -172,4 +172,4 @@ namespace OOX ...@@ -172,4 +172,4 @@ namespace OOX
} }
} }
}//namespace Logic }//namespace Logic
}//namespace OOX }//namespace OOX
\ No newline at end of file
...@@ -109,12 +109,12 @@ public : ...@@ -109,12 +109,12 @@ public :
nValue = ReadUInt32(); nValue = ReadUInt32();
} }
void operator>>(int8_t &nValue) void operator>>(char &nValue)
{ {
nValue = ReadUInt8(); nValue = ReadUInt8();
} }
void operator>>(int16_t &nValue) void operator>>(short &nValue)
{ {
nValue = ReadUInt16(); nValue = ReadUInt16();
} }
......
...@@ -225,7 +225,7 @@ void CEquationReader::HandleNudge() ...@@ -225,7 +225,7 @@ void CEquationReader::HandleNudge()
} }
int CEquationReader::HandleChar(unsigned char nTag) int CEquationReader::HandleChar(unsigned char nTag)
{ {
Unicode_t nChar; unsigned short nChar;
int nRet = 1; int nRet = 1;
if (xfAUTO(nTag)) if (xfAUTO(nTag))
...@@ -749,7 +749,7 @@ void CEquationReader::HandleFont() ...@@ -749,7 +749,7 @@ void CEquationReader::HandleFont()
*pS >> nTFace; *pS >> nTFace;
*pS >> nStyle; *pS >> nStyle;
Char_t nChar8; char nChar8;
do do
{ {
*pS >> nChar8; *pS >> nChar8;
...@@ -760,7 +760,7 @@ void CEquationReader::HandleFont() ...@@ -760,7 +760,7 @@ void CEquationReader::HandleFont()
pOutputDev->AddFont(128 - nTFace, sName.GetValue(), nStyle & 0x01, nStyle & 0x02); pOutputDev->AddFont(128 - nTFace, sName.GetValue(), nStyle & 0x01, nStyle & 0x02);
} }
bool CEquationReader::IsSpecialChar(Unicode_t nChar) bool CEquationReader::IsSpecialChar(unsigned short nChar)
{ {
switch(nChar) switch(nChar)
{ {
......
...@@ -111,7 +111,7 @@ namespace MathEquation ...@@ -111,7 +111,7 @@ namespace MathEquation
void HandleSetSize(MTOKENS eType); void HandleSetSize(MTOKENS eType);
void HandleRuler(); void HandleRuler();
void HandleFont(); void HandleFont();
bool IsSpecialChar(Unicode_t nChar); bool IsSpecialChar(unsigned short nChar);
private: private:
......
...@@ -54,7 +54,7 @@ namespace MathEquation ...@@ -54,7 +54,7 @@ namespace MathEquation
virtual void SetSize(_UINT16 nSize) = 0; virtual void SetSize(_UINT16 nSize) = 0;
// Добавляем символ. К символу могут быть добавлены разные элементы. Зачеркивание, добавление акцента и т.д. // Добавляем символ. К символу могут быть добавлены разные элементы. Зачеркивание, добавление акцента и т.д.
virtual void BeginChar(Unicode_t uChar, unsigned char nTypeFace, bool bSpecialSymbol) = 0; virtual void BeginChar(unsigned short uChar, unsigned char nTypeFace, bool bSpecialSymbol) = 0;
virtual void AddCharEmbel(MEMBELTYPE eType) = 0; virtual void AddCharEmbel(MEMBELTYPE eType) = 0;
virtual void EndChar() = 0; virtual void EndChar() = 0;
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
#include "String.h" #include "String.h"
#include <stack> #include <stack>
#ifndef APPEND #ifndef APPEND
#define APPEND(str,ascii) str.Append(ascii) #define APPEND(str,ascii) str.Append(ascii)
#endif #endif
#define OUTPUTCHARS #define OUTPUTCHARS
...@@ -80,7 +80,7 @@ namespace MathEquation ...@@ -80,7 +80,7 @@ namespace MathEquation
} }
} }
virtual void BeginChar(Unicode_t uChar, uint8_t nTypeFace, bool bSpecialSymbol) virtual void BeginChar(unsigned short uChar, uint8_t nTypeFace, bool bSpecialSymbol)
{ {
WriteNodeBegin("char", true); WriteNodeBegin("char", true);
...@@ -88,11 +88,11 @@ namespace MathEquation ...@@ -88,11 +88,11 @@ namespace MathEquation
{ {
switch(uChar) switch(uChar)
{ {
case specialsymAlignment: WriteStringAttribute("value", "Alignment symbol"); break; case specialsymAlignment: WriteStringAttribute("value", "Alignment symbol"); break;
case specialsymZeroSpace: WriteStringAttribute("value", "ZeroSpace"); break; case specialsymZeroSpace: WriteStringAttribute("value", "ZeroSpace"); break;
case specialsymThinSpace: WriteStringAttribute("value", "ThinSpace"); break; case specialsymThinSpace: WriteStringAttribute("value", "ThinSpace"); break;
case specialsymThickSpace: WriteStringAttribute("value", "ThickSpace"); break; case specialsymThickSpace: WriteStringAttribute("value", "ThickSpace"); break;
case specialsymLargeSpace: WriteStringAttribute("value", "LargeSpace"); break; case specialsymLargeSpace: WriteStringAttribute("value", "LargeSpace"); break;
case specialsymOnePtSpace: WriteStringAttribute("value", "OnePtSpace"); break; case specialsymOnePtSpace: WriteStringAttribute("value", "OnePtSpace"); break;
} }
} }
...@@ -122,13 +122,13 @@ namespace MathEquation ...@@ -122,13 +122,13 @@ namespace MathEquation
bEmbel = true; bEmbel = true;
} }
switch (eType) switch (eType)
{ {
case embelDot: APPEND(rRet," dot "); break; case embelDot: APPEND(rRet," dot "); break;
case embelDDot: APPEND(rRet," ddot "); break; case embelDDot: APPEND(rRet," ddot "); break;
case embelDDDot: APPEND(rRet," dddot "); break; case embelDDDot: APPEND(rRet," dddot "); break;
case embelPrime: APPEND(rRet," prime "); break; case embelPrime: APPEND(rRet," prime "); break;
case embelDPrime: APPEND(rRet," double prime "); break; case embelDPrime: APPEND(rRet," double prime "); break;
case embelLPrime: APPEND(rRet," left prime "); break; case embelLPrime: APPEND(rRet," left prime "); break;
case embelTilde: APPEND(rRet," tilde "); break; case embelTilde: APPEND(rRet," tilde "); break;
case embelHat: APPEND(rRet," hat "); break; case embelHat: APPEND(rRet," hat "); break;
...@@ -142,7 +142,7 @@ namespace MathEquation ...@@ -142,7 +142,7 @@ namespace MathEquation
case embelBar: APPEND(rRet," bar "); break; case embelBar: APPEND(rRet," bar "); break;
case embelTPrime: APPEND(rRet," triple prime "); break; case embelTPrime: APPEND(rRet," triple prime "); break;
case embelFrown: APPEND(rRet," frown "); break; case embelFrown: APPEND(rRet," frown "); break;
case embelSmile: APPEND(rRet," smiple "); break; case embelSmile: APPEND(rRet," smiple "); break;
} }
} }
virtual void EndChar() virtual void EndChar()
...@@ -158,133 +158,133 @@ namespace MathEquation ...@@ -158,133 +158,133 @@ namespace MathEquation
WriteIntAttribute("value", nSize); WriteIntAttribute("value", nSize);
WriteNodeEnd(true); WriteNodeEnd(true);
} }
virtual void BeginMatrix(uint8_t nVAlign, MMATRIXHORALIGN eHorAlign, MMATRIXVERALIGN eVerAlign, bool bEqualRows, bool bEqualCols, uint8_t nRows, uint8_t nCols, uint8_t* pVerBorders, uint8_t* pHorBorders) virtual void BeginMatrix(uint8_t nVAlign, MMATRIXHORALIGN eHorAlign, MMATRIXVERALIGN eVerAlign, bool bEqualRows, bool bEqualCols, uint8_t nRows, uint8_t nCols, uint8_t* pVerBorders, uint8_t* pHorBorders)
{ {
CMatrixCommand* pCommand = (CMatrixCommand*)PushCommand(commandMatrix); CMatrixCommand* pCommand = (CMatrixCommand*)PushCommand(commandMatrix);
pCommand->SetProps(nRows, nCols); pCommand->SetProps(nRows, nCols);
WriteNodeBegin("matrix", true); WriteNodeBegin("matrix", true);
WriteIntAttribute("rows", nRows); WriteIntAttribute("rows", nRows);
WriteIntAttribute("cols", nCols); WriteIntAttribute("cols", nCols);
switch(eHorAlign) switch(eHorAlign)
{ {
case matrixhoralignLeft: WriteStringAttribute("horalign", "left"); break; case matrixhoralignLeft: WriteStringAttribute("horalign", "left"); break;
case matrixhoralignCenter: WriteStringAttribute("horalign", "center"); break; case matrixhoralignCenter: WriteStringAttribute("horalign", "center"); break;
case matrixhoralignRight: WriteStringAttribute("horalign", "right"); break; case matrixhoralignRight: WriteStringAttribute("horalign", "right"); break;
case matrixhoralignEqualSign: WriteStringAttribute("horalign", "equal"); break; case matrixhoralignEqualSign: WriteStringAttribute("horalign", "equal"); break;
case matrixhoralignCommaSign: WriteStringAttribute("horalign", "comma"); break; case matrixhoralignCommaSign: WriteStringAttribute("horalign", "comma"); break;
} }
switch(eVerAlign) switch(eVerAlign)
{ {
case matrixveralignTop: WriteStringAttribute("veralign", "top"); break; case matrixveralignTop: WriteStringAttribute("veralign", "top"); break;
case matrixveralignBaseLine: WriteStringAttribute("veralign", "baseline"); break; case matrixveralignBaseLine: WriteStringAttribute("veralign", "baseline"); break;
case matrixveralginBottom: WriteStringAttribute("veralign", "bottom"); break; case matrixveralginBottom: WriteStringAttribute("veralign", "bottom"); break;
} }
WriteBoolAttribute("equalrows", bEqualRows); WriteBoolAttribute("equalrows", bEqualRows);
WriteBoolAttribute("equalcols", bEqualCols); WriteBoolAttribute("equalcols", bEqualCols);
std::string sVerBorders; std::string sVerBorders;
for (int nVerIndex = 0; nVerIndex <= nRows; nVerIndex++) for (int nVerIndex = 0; nVerIndex <= nRows; nVerIndex++)
{ {
MMATRIXBORDERTYPE eType = (MMATRIXBORDERTYPE)pVerBorders[nVerIndex]; MMATRIXBORDERTYPE eType = (MMATRIXBORDERTYPE)pVerBorders[nVerIndex];
switch(eType) switch(eType)
{ {
case matrixborderNone: sVerBorders.append(" none "); break; case matrixborderNone: sVerBorders.append(" none "); break;
case matrixborderSolid: sVerBorders.append(" solid "); break; case matrixborderSolid: sVerBorders.append(" solid "); break;
case matrixborderDash: sVerBorders.append(" dash "); break; case matrixborderDash: sVerBorders.append(" dash "); break;
case matrixborderDot: sVerBorders.append(" dot "); break; case matrixborderDot: sVerBorders.append(" dot "); break;
} }
} }
std::string sHorBorders; std::string sHorBorders;
for (int nHorIndex = 0; nHorIndex <= nCols; nHorIndex++) for (int nHorIndex = 0; nHorIndex <= nCols; nHorIndex++)
{ {
MMATRIXBORDERTYPE eType = (MMATRIXBORDERTYPE)pHorBorders[nHorIndex]; MMATRIXBORDERTYPE eType = (MMATRIXBORDERTYPE)pHorBorders[nHorIndex];
switch(eType) switch(eType)
{ {
case matrixborderNone: sHorBorders.append(" none "); break; case matrixborderNone: sHorBorders.append(" none "); break;
case matrixborderSolid: sHorBorders.append(" solid "); break; case matrixborderSolid: sHorBorders.append(" solid "); break;
case matrixborderDash: sHorBorders.append(" dash "); break; case matrixborderDash: sHorBorders.append(" dash "); break;
case matrixborderDot: sHorBorders.append(" dot "); break; case matrixborderDot: sHorBorders.append(" dot "); break;
} }
} }
WriteStringAttribute("verborders", sVerBorders); WriteStringAttribute("verborders", sVerBorders);
WriteStringAttribute("horborders", sHorBorders); WriteStringAttribute("horborders", sHorBorders);
WriteNodeEnd(false); WriteNodeEnd(false);
} }
virtual void EndMatrix() virtual void EndMatrix()
{ {
PopCommand(); PopCommand();
WriteNodeEnd("matrix"); WriteNodeEnd("matrix");
} }
virtual void StartPile(uint8_t nHAlign, uint8_t nVAlign) virtual void StartPile(uint8_t nHAlign, uint8_t nVAlign)
{ {
//switch(nHAlign) //switch(nHAlign)
//{ //{
//case 1: //case 1:
//default: //default:
// APPEND(rRet,"alignl {"); // APPEND(rRet,"alignl {");
// break; // break;
//case 2: //case 2:
// APPEND(rRet,"alignc {"); // APPEND(rRet,"alignc {");
// break; // break;
//case 3: //case 3:
// APPEND(rRet,"alignr {"); // APPEND(rRet,"alignr {");
// break; // break;
//} //}
//switch(nVAlign) //switch(nVAlign)
//{ //{
//} //}
WriteNodeBegin("pile", false); WriteNodeBegin("pile", false);
} }
virtual void EndPile() virtual void EndPile()
{ {
WriteNodeEnd("pile"); WriteNodeEnd("pile");
} }
virtual void BeginBrackets(MBRACKETSTYPE eType, bool bOpen, bool bClose) virtual void BeginBrackets(MBRACKETSTYPE eType, bool bOpen, bool bClose)
{ {
PushCommand(commandBrackets); PushCommand(commandBrackets);
WriteNodeBegin("brackets", true); WriteNodeBegin("brackets", true);
switch(eType) switch(eType)
{ {
case bracketsAngle: WriteStringAttribute("type", "angle"); break; case bracketsAngle: WriteStringAttribute("type", "angle"); break;
case bracketsRound: WriteStringAttribute("type", "round"); break; case bracketsRound: WriteStringAttribute("type", "round"); break;
case bracketsCurve: WriteStringAttribute("type", "curve"); break; case bracketsCurve: WriteStringAttribute("type", "curve"); break;
case bracketsSquare: WriteStringAttribute("type", "square"); break; case bracketsSquare: WriteStringAttribute("type", "square"); break;
case bracketsLine: WriteStringAttribute("type", "line"); break; case bracketsLine: WriteStringAttribute("type", "line"); break;
case bracketsDLine: WriteStringAttribute("type", "double line"); break; case bracketsDLine: WriteStringAttribute("type", "double line"); break;
case bracketsFloor: WriteStringAttribute("type", "floor"); break; case bracketsFloor: WriteStringAttribute("type", "floor"); break;
case bracketsCeil: WriteStringAttribute("type", "ceil"); break; case bracketsCeil: WriteStringAttribute("type", "ceil"); break;
case bracketsSquareOpenOpen: WriteStringAttribute("type", "square open open"); break; case bracketsSquareOpenOpen: WriteStringAttribute("type", "square open open"); break;
case bracketsSquareRound: WriteStringAttribute("type", "square-round"); break; case bracketsSquareRound: WriteStringAttribute("type", "square-round"); break;
case bracketsSquareCloseClose: WriteStringAttribute("type", "square close close"); break; case bracketsSquareCloseClose: WriteStringAttribute("type", "square close close"); break;
case bracketsSquareCloseOpen: WriteStringAttribute("type", "square close open"); break; case bracketsSquareCloseOpen: WriteStringAttribute("type", "square close open"); break;
case bracketsRoundSquare: WriteStringAttribute("type", "round-square"); break; case bracketsRoundSquare: WriteStringAttribute("type", "round-square"); break;
} }
WriteBoolAttribute("open", bOpen); WriteBoolAttribute("open", bOpen);
WriteBoolAttribute("close", bClose); WriteBoolAttribute("close", bClose);
WriteNodeEnd(false); WriteNodeEnd(false);
} }
virtual void EndBrackets(MBRACKETSTYPE eType, bool bOpen, bool bClose) virtual void EndBrackets(MBRACKETSTYPE eType, bool bOpen, bool bClose)
{ {
PopCommand(); PopCommand();
WriteNodeEnd("brackets"); WriteNodeEnd("brackets");
} }
virtual void BeginRoot(bool bDegree) virtual void BeginRoot(bool bDegree)
{ {
PushCommand(commandRoot); PushCommand(commandRoot);
WriteNodeBegin("root", true); WriteNodeBegin("root", true);
WriteBoolAttribute("nroot", bDegree); WriteBoolAttribute("nroot", bDegree);
WriteNodeEnd(false); WriteNodeEnd(false);
} }
virtual void EndRoot() virtual void EndRoot()
{ {
...@@ -292,97 +292,97 @@ namespace MathEquation ...@@ -292,97 +292,97 @@ namespace MathEquation
WriteNodeEnd("root"); WriteNodeEnd("root");
} }
virtual void BeginFraction(MFRACTIONTYPES eType, bool bInline) virtual void BeginFraction(MFRACTIONTYPES eType, bool bInline)
{ {
PushCommand(commandFraction); PushCommand(commandFraction);
WriteNodeBegin("fraction", true); WriteNodeBegin("fraction", true);
WriteBoolAttribute("inline", bInline); WriteBoolAttribute("inline", bInline);
WriteNodeEnd(false); WriteNodeEnd(false);
} }
virtual void EndFraction() virtual void EndFraction()
{ {
PopCommand(); PopCommand();
WriteNodeEnd("fraction"); WriteNodeEnd("fraction");
} }
virtual void BeginScript(MSCRIPTALIGN eAlign, bool bBase = false, bool bSup = false, bool bSub = false, bool bInline = true) virtual void BeginScript(MSCRIPTALIGN eAlign, bool bBase = false, bool bSup = false, bool bSub = false, bool bInline = true)
{ {
CScriptCommand* pCommand = (CScriptCommand*)PushCommand(commandScript); CScriptCommand* pCommand = (CScriptCommand*)PushCommand(commandScript);
pCommand->SetProps(bInline, bBase, bSup, bSub); pCommand->SetProps(bInline, bBase, bSup, bSub);
WriteNodeBegin("script", true); WriteNodeBegin("script", true);
switch(eAlign) switch(eAlign)
{ {
case scriptalignRight: WriteStringAttribute("align", "right"); break; case scriptalignRight: WriteStringAttribute("align", "right"); break;
case scriptalignCenter: WriteStringAttribute("align", "center"); break; case scriptalignCenter: WriteStringAttribute("align", "center"); break;
case scriptalignLeft: WriteStringAttribute("align", "left"); break; case scriptalignLeft: WriteStringAttribute("align", "left"); break;
} }
WriteBoolAttribute("base", bBase); WriteBoolAttribute("base", bBase);
WriteBoolAttribute("sup", bSup); WriteBoolAttribute("sup", bSup);
WriteBoolAttribute("sub", bSub); WriteBoolAttribute("sub", bSub);
WriteBoolAttribute("inline", bInline); WriteBoolAttribute("inline", bInline);
WriteNodeEnd(false); WriteNodeEnd(false);
} }
virtual void EndScript() virtual void EndScript()
{ {
PopCommand(); PopCommand();
WriteNodeEnd("script"); WriteNodeEnd("script");
} }
virtual void BeginBar(MBARTYPE eType, bool bTop) virtual void BeginBar(MBARTYPE eType, bool bTop)
{ {
PushCommand(commandBar); PushCommand(commandBar);
WriteNodeBegin("bar", true); WriteNodeBegin("bar", true);
switch(eType) switch(eType)
{ {
case bartypeLine: WriteStringAttribute("type", "line"); break; case bartypeLine: WriteStringAttribute("type", "line"); break;
case bartypeDoubleLine: WriteStringAttribute("type", "doubleline"); break; case bartypeDoubleLine: WriteStringAttribute("type", "doubleline"); break;
case bartypeArrowLeft: WriteStringAttribute("type", "arrow-left"); break; case bartypeArrowLeft: WriteStringAttribute("type", "arrow-left"); break;
case bartypeArrowRight: WriteStringAttribute("type", "arrow-right"); break; case bartypeArrowRight: WriteStringAttribute("type", "arrow-right"); break;
case bartypeArrowDouble: WriteStringAttribute("type", "arrow-double"); break; case bartypeArrowDouble: WriteStringAttribute("type", "arrow-double"); break;
} }
WriteBoolAttribute("top", bTop); WriteBoolAttribute("top", bTop);
WriteNodeEnd(false); WriteNodeEnd(false);
} }
virtual void EndBar () virtual void EndBar ()
{ {
PopCommand(); PopCommand();
WriteNodeEnd("bar"); WriteNodeEnd("bar");
} }
virtual void BeginArrow(MARROWTYPE eType, bool bTop) virtual void BeginArrow(MARROWTYPE eType, bool bTop)
{ {
PushCommand(commandArrow); PushCommand(commandArrow);
WriteNodeBegin("arrow", true); WriteNodeBegin("arrow", true);
switch(eType) switch(eType)
{ {
case arrowtypeLeft: WriteStringAttribute("type", "left"); break; case arrowtypeLeft: WriteStringAttribute("type", "left"); break;
case arrowtypeRight: WriteStringAttribute("type", "right"); break; case arrowtypeRight: WriteStringAttribute("type", "right"); break;
case arrowtypeDouble: WriteStringAttribute("type", "double"); break; case arrowtypeDouble: WriteStringAttribute("type", "double"); break;
} }
WriteBoolAttribute("top", bTop); WriteBoolAttribute("top", bTop);
WriteNodeEnd(false); WriteNodeEnd(false);
} }
virtual void EndArrow() virtual void EndArrow()
{ {
PopCommand(); PopCommand();
WriteNodeEnd("arrow"); WriteNodeEnd("arrow");
} }
virtual void BeginIntegral(MINTEGRALTYPE eType) virtual void BeginIntegral(MINTEGRALTYPE eType)
{ {
PushCommand(commandIntegral); PushCommand(commandIntegral);
WriteNodeBegin("integral", true); WriteNodeBegin("integral", true);
switch(eType) switch(eType)
{ {
case integraltypeSingle: WriteStringAttribute("type", "Single"); break; case integraltypeSingle: WriteStringAttribute("type", "Single"); break;
...@@ -410,10 +410,10 @@ namespace MathEquation ...@@ -410,10 +410,10 @@ namespace MathEquation
case integraltypeTripleOrientedCSub: WriteStringAttribute("type", "TripleOrientedCSub"); break; case integraltypeTripleOrientedCSub: WriteStringAttribute("type", "TripleOrientedCSub"); break;
case integraltypeTripleCSub: WriteStringAttribute("type", "TripleCSub"); break; case integraltypeTripleCSub: WriteStringAttribute("type", "TripleCSub"); break;
} }
WriteNodeEnd(false); WriteNodeEnd(false);
} }
virtual void EndIntegral() virtual void EndIntegral()
{ {
PopCommand(); PopCommand();
...@@ -431,12 +431,12 @@ namespace MathEquation ...@@ -431,12 +431,12 @@ namespace MathEquation
PopCommand(); PopCommand();
WriteNodeEnd("verticalbrace"); WriteNodeEnd("verticalbrace");
} }
virtual void BeingNArray(MNARRAYTYPE eType) virtual void BeingNArray(MNARRAYTYPE eType)
{ {
CNArrayCommand* pCommand = (CNArrayCommand*)PushCommand(commandNArray); CNArrayCommand* pCommand = (CNArrayCommand*)PushCommand(commandNArray);
pCommand->SetType(eType); pCommand->SetType(eType);
switch(eType) switch(eType)
{ {
case narySumCSub: WriteNodeBegin("sum", true); WriteStringAttribute("type", "CSub"); break; case narySumCSub: WriteNodeBegin("sum", true); WriteStringAttribute("type", "CSub"); break;
case narySumCSubSup: WriteNodeBegin("sum", true); WriteStringAttribute("type", "CSubSup"); break; case narySumCSubSup: WriteNodeBegin("sum", true); WriteStringAttribute("type", "CSubSup"); break;
...@@ -467,18 +467,18 @@ namespace MathEquation ...@@ -467,18 +467,18 @@ namespace MathEquation
case naryIntersect: WriteNodeBegin("intersect", true); WriteStringAttribute("type", "regular"); break; case naryIntersect: WriteNodeBegin("intersect", true); WriteStringAttribute("type", "regular"); break;
case naryIntersectRSub: WriteNodeBegin("intersect", true); WriteStringAttribute("type", "RSub"); break; case naryIntersectRSub: WriteNodeBegin("intersect", true); WriteStringAttribute("type", "RSub"); break;
case naryIntersectRSubSup: WriteNodeBegin("intersect", true); WriteStringAttribute("type", "RSubSup"); break; case naryIntersectRSubSup: WriteNodeBegin("intersect", true); WriteStringAttribute("type", "RSubSup"); break;
} }
WriteNodeEnd(false); WriteNodeEnd(false);
} }
virtual void EndNArray() virtual void EndNArray()
{ {
CNArrayCommand* pCommand = (CNArrayCommand*)TopCommand(); CNArrayCommand* pCommand = (CNArrayCommand*)TopCommand();
MNARRAYTYPE eType = pCommand->GetType(); MNARRAYTYPE eType = pCommand->GetType();
PopCommand(); PopCommand();
switch(eType) switch(eType)
{ {
case narySumCSub: case narySumCSub:
case narySumCSubSup: case narySumCSubSup:
...@@ -515,25 +515,25 @@ namespace MathEquation ...@@ -515,25 +515,25 @@ namespace MathEquation
case naryIntersectRSubSup: case naryIntersectRSubSup:
WriteNodeEnd("intersect"); WriteNodeEnd("intersect");
break; break;
} }
}
virtual void BeginLongDivision(MLONGDIVISION eType)
{
PushCommand(commandLongDivision);
WriteNodeBegin("longdivision");
} }
virtual void BeginLongDivision(MLONGDIVISION eType)
{
PushCommand(commandLongDivision);
WriteNodeBegin("longdivision");
}
virtual void EndLongDivision() virtual void EndLongDivision()
{ {
PopCommand(); PopCommand();
WriteNodeEnd("longdivision"); WriteNodeEnd("longdivision");
}
virtual void BeginAngleBracketsWithSeparator(MANGLEBRACKETSWITHSEPARATORTYPE eType)
{
CBracketsWithSeparatorCommand* pCommand = (CBracketsWithSeparatorCommand*)PushCommand(commandBracketsSep);
pCommand->SetType(eType);
WriteNodeBegin("brackets-separator");
} }
virtual void BeginAngleBracketsWithSeparator(MANGLEBRACKETSWITHSEPARATORTYPE eType)
{
CBracketsWithSeparatorCommand* pCommand = (CBracketsWithSeparatorCommand*)PushCommand(commandBracketsSep);
pCommand->SetType(eType);
WriteNodeBegin("brackets-separator");
}
virtual void EndAngleBracketsWithSeparator() virtual void EndAngleBracketsWithSeparator()
{ {
PopCommand(); PopCommand();
...@@ -1099,7 +1099,7 @@ namespace MathEquation ...@@ -1099,7 +1099,7 @@ namespace MathEquation
rRet += sValue; rRet += sValue;
rRet += "\""; rRet += "\"";
} }
void WriteStringAttribute(const char* sName, Unicode_t uChar) void WriteStringAttribute(const char* sName, unsigned short uChar)
{ {
rRet += " "; rRet += " ";
rRet += sName; rRet += sName;
...@@ -1112,7 +1112,7 @@ namespace MathEquation ...@@ -1112,7 +1112,7 @@ namespace MathEquation
rRet += " "; rRet += " ";
rRet += sName; rRet += sName;
rRet += "=\""; rRet += "=\"";
rRet += String::CreateFromInt32(nValue); rRet += String::CreateFromInt32(nValue);
rRet += "\""; rRet += "\"";
} }
private: private:
...@@ -1125,4 +1125,4 @@ namespace MathEquation ...@@ -1125,4 +1125,4 @@ namespace MathEquation
} }
#endif #endif
\ No newline at end of file
...@@ -38,9 +38,6 @@ ...@@ -38,9 +38,6 @@
namespace MathEquation namespace MathEquation
{ {
typedef unsigned short Unicode_t;
typedef signed char Char_t;
struct TMathFont struct TMathFont
{ {
std::string sName; std::string sName;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment