Commit cc084bf6 authored by ElenaSubbotina's avatar ElenaSubbotina

.

parent 1f3cf313
...@@ -64,7 +64,7 @@ void CEquationReader::InitFonts() ...@@ -64,7 +64,7 @@ void CEquationReader::InitFonts()
if (pOutputDev) if (pOutputDev)
{ {
for(uint8_t i = 1; i <= 8; i++) for(unsigned char i = 1; i <= 8; i++)
{ {
switch(i) switch(i)
{ {
...@@ -117,8 +117,8 @@ int CEquationReader::Parse() ...@@ -117,8 +117,8 @@ int CEquationReader::Parse()
int CEquationReader::HandleRecords() int CEquationReader::HandleRecords()
{ {
uint8_t nTag, nRecord; unsigned char nTag, nRecord;
uint16_t nTabOffset; unsigned short nTabOffset;
int nRet = 1; int nRet = 1;
...@@ -214,16 +214,16 @@ int CEquationReader::HandleRecords() ...@@ -214,16 +214,16 @@ int CEquationReader::HandleRecords()
void CEquationReader::HandleNudge() void CEquationReader::HandleNudge()
{ {
uint8_t nXNudge; *pS >> nXNudge; unsigned char nXNudge; *pS >> nXNudge;
uint8_t nYNudge; *pS >> nYNudge; unsigned char nYNudge; *pS >> nYNudge;
if (128 == nXNudge && 128 == nYNudge) if (128 == nXNudge && 128 == nYNudge)
{ {
uint16_t nXLongNudge; *pS >> nXLongNudge; unsigned short nXLongNudge; *pS >> nXLongNudge;
uint16_t nYLongNudge; *pS >> nYLongNudge; unsigned short nYLongNudge; *pS >> nYLongNudge;
} }
} }
int CEquationReader::HandleChar(uint8_t nTag) int CEquationReader::HandleChar(unsigned char nTag)
{ {
Unicode_t nChar; Unicode_t nChar;
int nRet = 1; int nRet = 1;
...@@ -234,12 +234,12 @@ int CEquationReader::HandleChar(uint8_t nTag) ...@@ -234,12 +234,12 @@ int CEquationReader::HandleChar(uint8_t nTag)
//that is! //that is!
} }
uint8_t nTypeFace; unsigned char nTypeFace;
*pS >> nTypeFace; *pS >> nTypeFace;
if (nVersion < 3) if (nVersion < 3)
{ {
uint8_t nChar8; unsigned char nChar8;
*pS >> nChar8; *pS >> nChar8;
nChar = nChar8; nChar = nChar8;
} }
...@@ -262,7 +262,7 @@ int CEquationReader::HandleChar(uint8_t nTag) ...@@ -262,7 +262,7 @@ int CEquationReader::HandleChar(uint8_t nTag)
} }
int CEquationReader::HandleTemplate() int CEquationReader::HandleTemplate()
{ {
uint8_t nSelector, nVariation, nOption; unsigned char nSelector, nVariation, nOption;
*pS >> nSelector; *pS >> nSelector;
*pS >> nVariation; *pS >> nVariation;
*pS >> nOption; *pS >> nOption;
...@@ -273,7 +273,7 @@ int CEquationReader::HandleTemplate() ...@@ -273,7 +273,7 @@ int CEquationReader::HandleTemplate()
return nRet; return nRet;
} }
void CEquationReader::HandleStartTemplate(uint8_t nSelector, uint8_t nVariation) void CEquationReader::HandleStartTemplate(unsigned char nSelector, unsigned char nVariation)
{ {
switch (nSelector) switch (nSelector)
{ {
...@@ -472,7 +472,7 @@ void CEquationReader::HandleStartTemplate(uint8_t nSelector, uint8_t nVariation) ...@@ -472,7 +472,7 @@ void CEquationReader::HandleStartTemplate(uint8_t nSelector, uint8_t nVariation)
break; break;
} }
} }
void CEquationReader::HandleEndTemplate(uint8_t nSelector, uint8_t nVariation) void CEquationReader::HandleEndTemplate(unsigned char nSelector, unsigned char nVariation)
{ {
switch (nSelector) switch (nSelector)
{ {
...@@ -612,7 +612,7 @@ int CEquationReader::HandlePile() ...@@ -612,7 +612,7 @@ int CEquationReader::HandlePile()
int CEquationReader::HandleMatrix() int CEquationReader::HandleMatrix()
{ {
uint8_t nHorAlign, nVerAlign, nRows, nCols; unsigned char nHorAlign, nVerAlign, nRows, nCols;
*pS >> nVAlign; *pS >> nVAlign;
*pS >> nHorAlign; *pS >> nHorAlign;
*pS >> nVerAlign; *pS >> nVerAlign;
...@@ -629,8 +629,8 @@ int CEquationReader::HandleMatrix() ...@@ -629,8 +629,8 @@ int CEquationReader::HandleMatrix()
if (((nRows + 1) * 2) % 8) if (((nRows + 1) * 2) % 8)
nBytes++; nBytes++;
uint8_t *pVerBorders = new uint8_t[nRows + 1]; unsigned char *pVerBorders = new unsigned char[nRows + 1];
uint8_t nTempByte; unsigned char nTempByte;
for (int nByteIndex = 0, nRowIndex = 0, nBitIndex = 0; nByteIndex < nBytes; nByteIndex++, nBitIndex = 0) for (int nByteIndex = 0, nRowIndex = 0, nBitIndex = 0; nByteIndex < nBytes; nByteIndex++, nBitIndex = 0)
{ {
*pS >> nTempByte; *pS >> nTempByte;
...@@ -647,7 +647,7 @@ int CEquationReader::HandleMatrix() ...@@ -647,7 +647,7 @@ int CEquationReader::HandleMatrix()
if (((nCols + 1) * 2) % 8) if (((nCols + 1) * 2) % 8)
nBytes++; nBytes++;
uint8_t *pHorBorders = new uint8_t[nCols + 1]; unsigned char *pHorBorders = new unsigned char[nCols + 1];
for (int nByteIndex = 0, nColIndex = 0, nBitIndex = 0; nByteIndex < nBytes; nByteIndex++, nBitIndex = 0) for (int nByteIndex = 0, nColIndex = 0, nBitIndex = 0; nByteIndex < nBytes; nByteIndex++, nBitIndex = 0)
{ {
*pS >> nTempByte; *pS >> nTempByte;
...@@ -674,7 +674,7 @@ int CEquationReader::HandleMatrix() ...@@ -674,7 +674,7 @@ int CEquationReader::HandleMatrix()
void CEquationReader::HandleEmblishments() void CEquationReader::HandleEmblishments()
{ {
uint8_t nEmbel; unsigned char nEmbel;
do do
{ {
*pS >> nEmbel; *pS >> nEmbel;
...@@ -690,9 +690,9 @@ void CEquationReader::HandleSetSize(MTOKENS eType) ...@@ -690,9 +690,9 @@ void CEquationReader::HandleSetSize(MTOKENS eType)
{ {
if (SIZE_CUSTOM == eType) if (SIZE_CUSTOM == eType)
{ {
uint8_t nTemp; unsigned char nTemp;
*pS >> nTemp; *pS >> nTemp;
uint16_t nSize; unsigned short nSize;
switch (nTemp) switch (nTemp)
{ {
case 101: case 101:
...@@ -706,7 +706,7 @@ void CEquationReader::HandleSetSize(MTOKENS eType) ...@@ -706,7 +706,7 @@ void CEquationReader::HandleSetSize(MTOKENS eType)
*pS >> nTemp; *pS >> nTemp;
nSize = nTemp; nSize = nTemp;
uint16_t nTempSize; unsigned short nTempSize;
*pS >> nTempSize; *pS >> nTempSize;
break; break;
} }
...@@ -715,7 +715,7 @@ void CEquationReader::HandleSetSize(MTOKENS eType) ...@@ -715,7 +715,7 @@ void CEquationReader::HandleSetSize(MTOKENS eType)
// TODO: Проверить эту ветку // TODO: Проверить эту ветку
nSize = nTemp; nSize = nTemp;
*pS >> nTemp; *pS >> nTemp;
uint16_t nTempSize = nTemp - 128; unsigned short nTempSize = nTemp - 128;
break; break;
} }
} }
...@@ -731,8 +731,8 @@ void CEquationReader::HandleSetSize(MTOKENS eType) ...@@ -731,8 +731,8 @@ void CEquationReader::HandleSetSize(MTOKENS eType)
void CEquationReader::HandleRuler() void CEquationReader::HandleRuler()
{ {
uint8_t nTabType, nTabStops; unsigned char nTabType, nTabStops;
uint16_t nTabOffset; unsigned short nTabOffset;
*pS >> nTabStops; *pS >> nTabStops;
for (int nTabIndex = 0; nTabIndex < nTabStops; nTabIndex++) for (int nTabIndex = 0; nTabIndex < nTabStops; nTabIndex++)
...@@ -743,7 +743,7 @@ void CEquationReader::HandleRuler() ...@@ -743,7 +743,7 @@ void CEquationReader::HandleRuler()
} }
void CEquationReader::HandleFont() void CEquationReader::HandleFont()
{ {
uint8_t nTFace, nStyle; unsigned char nTFace, nStyle;
String sName; String sName;
*pS >> nTFace; *pS >> nTFace;
......
...@@ -37,13 +37,12 @@ ...@@ -37,13 +37,12 @@
namespace MathEquation namespace MathEquation
{ {
//typedef unsigned char uint8_t;
typedef unsigned char uint8_t; //typedef unsigned short uint16_t;
typedef unsigned short uint16_t; //typedef unsigned int uint32_t;
typedef unsigned int uint32_t; //typedef signed char int8_t;
typedef signed char int8_t; //typedef signed short int16_t;
typedef signed short int16_t; //typedef signed int int32_t;
typedef signed int int32_t;
typedef unsigned short Unicode_t; typedef unsigned short Unicode_t;
typedef signed char Char_t; typedef signed char Char_t;
......
...@@ -46,6 +46,10 @@ ...@@ -46,6 +46,10 @@
#include <cmath> #include <cmath>
#ifndef M_PI
#define M_PI 3.1415926
#endif
namespace MetaFile namespace MetaFile
{ {
class CMetaFileRenderer : public IOutputDevice class CMetaFileRenderer : public IOutputDevice
......
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