Commit 3d00fc53 authored by ElenaSubbotina's avatar ElenaSubbotina

DocxFormat - Equation - refactoring

parent 38660816
...@@ -118,7 +118,7 @@ int CEquationReader::Parse() ...@@ -118,7 +118,7 @@ int CEquationReader::Parse()
int CEquationReader::HandleRecords() int CEquationReader::HandleRecords()
{ {
unsigned char nTag, nRecord; unsigned char nTag, nRecord;
unsigned short nTabOffset; _UINT16 nTabOffset;
int nRet = 1; int nRet = 1;
...@@ -219,8 +219,8 @@ void CEquationReader::HandleNudge() ...@@ -219,8 +219,8 @@ void CEquationReader::HandleNudge()
if (128 == nXNudge && 128 == nYNudge) if (128 == nXNudge && 128 == nYNudge)
{ {
unsigned short nXLongNudge; *pS >> nXLongNudge; _UINT16 nXLongNudge; *pS >> nXLongNudge;
unsigned short nYLongNudge; *pS >> nYLongNudge; _UINT16 nYLongNudge; *pS >> nYLongNudge;
} }
} }
int CEquationReader::HandleChar(unsigned char nTag) int CEquationReader::HandleChar(unsigned char nTag)
...@@ -692,7 +692,7 @@ void CEquationReader::HandleSetSize(MTOKENS eType) ...@@ -692,7 +692,7 @@ void CEquationReader::HandleSetSize(MTOKENS eType)
{ {
unsigned char nTemp; unsigned char nTemp;
*pS >> nTemp; *pS >> nTemp;
unsigned short nSize; _UINT16 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;
unsigned short nTempSize; _UINT16 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;
unsigned short nTempSize = nTemp - 128; _UINT16 nTempSize = nTemp - 128;
break; break;
} }
} }
...@@ -732,7 +732,7 @@ void CEquationReader::HandleSetSize(MTOKENS eType) ...@@ -732,7 +732,7 @@ void CEquationReader::HandleSetSize(MTOKENS eType)
void CEquationReader::HandleRuler() void CEquationReader::HandleRuler()
{ {
unsigned char nTabType, nTabStops; unsigned char nTabType, nTabStops;
unsigned short nTabOffset; _UINT16 nTabOffset;
*pS >> nTabStops; *pS >> nTabStops;
for (int nTabIndex = 0; nTabIndex < nTabStops; nTabIndex++) for (int nTabIndex = 0; nTabIndex < nTabStops; nTabIndex++)
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#define _MATH_EQUATION_READER_H #define _MATH_EQUATION_READER_H
#include "../../../3dParty/pole/pole.h" #include "../../../3dParty/pole/pole.h"
#include "Types.h" #include "Types.h"
#include "LEStream.h" #include "LEStream.h"
#include "String.h" #include "String.h"
...@@ -100,10 +101,10 @@ namespace MathEquation ...@@ -100,10 +101,10 @@ namespace MathEquation
inline int xfRULER (BYTE nTest) {return nTest & 0x20;} inline int xfRULER (BYTE nTest) {return nTest & 0x20;}
void HandleNudge(); void HandleNudge();
int HandleChar(uint8_t nTag); int HandleChar(unsigned char nTag);
int HandleTemplate(); int HandleTemplate();
void HandleStartTemplate(uint8_t nSelector, uint8_t nVariation); void HandleStartTemplate(unsigned char nSelector, unsigned char nVariation);
void HandleEndTemplate (uint8_t nSelector, uint8_t nVariation); void HandleEndTemplate (unsigned char nSelector, unsigned char nVariation);
int HandlePile(); int HandlePile();
int HandleMatrix(); int HandleMatrix();
void HandleEmblishments(); void HandleEmblishments();
...@@ -117,22 +118,22 @@ namespace MathEquation ...@@ -117,22 +118,22 @@ namespace MathEquation
// Header // Header
struct struct
{ {
uint32_t nCBHdr; _UINT32 nCBHdr;
uint16_t nVersion; _UINT16 nVersion;
uint16_t nCf; _UINT16 nCf;
uint32_t nCBObject; _UINT32 nCBObject;
uint32_t nReserved1; _UINT32 nReserved1;
uint32_t nReserved2; _UINT32 nReserved2;
uint32_t nReserved3; _UINT32 nReserved3;
uint32_t nReserved4; _UINT32 nReserved4;
} oHeader; } oHeader;
// Ver 2 Header // Ver 2 Header
uint8_t nVersion; unsigned char nVersion;
uint8_t nPlatform; unsigned char nPlatform;
uint8_t nProduct; unsigned char nProduct;
uint8_t nProdVersion; unsigned char nProdVersion;
uint8_t nProdSubVersion; unsigned char nProdSubVersion;
Storage m_oStorage; Storage m_oStorage;
...@@ -141,10 +142,10 @@ namespace MathEquation ...@@ -141,10 +142,10 @@ namespace MathEquation
IOutputDev* pOutputDev; IOutputDev* pOutputDev;
uint16_t aSizeTable[7]; _UINT16 aSizeTable[7];
uint8_t nHAlign; unsigned char nHAlign;
uint8_t nVAlign; unsigned char nVAlign;
TFontMap mFontMap; TFontMap mFontMap;
}; };
......
...@@ -34,16 +34,10 @@ ...@@ -34,16 +34,10 @@
#include <map> #include <map>
#include "../../../../DesktopEditor/common/Types.h" #include "../../../../DesktopEditor/common/Types.h"
#include "../../../../Common/DocxFormat/Source/Base/Types_32.h"
namespace MathEquation namespace MathEquation
{ {
//typedef unsigned char uint8_t;
//typedef unsigned short uint16_t;
//typedef unsigned int uint32_t;
//typedef signed char int8_t;
//typedef signed short int16_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;
...@@ -54,7 +48,7 @@ namespace MathEquation ...@@ -54,7 +48,7 @@ namespace MathEquation
bool bBold; bool bBold;
}; };
typedef std::map<uint8_t, TMathFont> TFontMap; typedef std::map<unsigned char, TMathFont> TFontMap;
enum MBRACKETSTYPE enum MBRACKETSTYPE
{ {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
QT -= core QT -= core
QT -= gui QT -= gui
VERSION = 2.0.2.400 VERSION = 2.0.2.401
DEFINES += INTVER=$$VERSION DEFINES += INTVER=$$VERSION
TEMPLATE = app TEMPLATE = app
......
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