Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
3d00fc53
Commit
3d00fc53
authored
Oct 19, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DocxFormat - Equation - refactoring
parent
38660816
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
35 deletions
+30
-35
Common/DocxFormat/Source/MathEquation/MathEquation.cpp
Common/DocxFormat/Source/MathEquation/MathEquation.cpp
+7
-7
Common/DocxFormat/Source/MathEquation/MathEquation.h
Common/DocxFormat/Source/MathEquation/MathEquation.h
+20
-19
Common/DocxFormat/Source/MathEquation/Types.h
Common/DocxFormat/Source/MathEquation/Types.h
+2
-8
X2tConverter/build/Qt/X2tConverter.pro
X2tConverter/build/Qt/X2tConverter.pro
+1
-1
No files found.
Common/DocxFormat/Source/MathEquation/MathEquation.cpp
View file @
3d00fc53
...
...
@@ -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
++
)
...
...
Common/DocxFormat/Source/MathEquation/MathEquation.h
View file @
3d00fc53
...
...
@@ -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
;
};
...
...
Common/DocxFormat/Source/MathEquation/Types.h
View file @
3d00fc53
...
...
@@ -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
{
...
...
X2tConverter/build/Qt/X2tConverter.pro
View file @
3d00fc53
...
...
@@ -7,7 +7,7 @@
QT
-=
core
QT
-=
gui
VERSION
=
2.0
.
2.40
0
VERSION
=
2.0
.
2.40
1
DEFINES
+=
INTVER
=
$$
VERSION
TEMPLATE
=
app
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment