Commit 3d00fc53 authored by ElenaSubbotina's avatar ElenaSubbotina

DocxFormat - Equation - refactoring

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