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
cc084bf6
Commit
cc084bf6
authored
Oct 19, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
1f3cf313
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
32 deletions
+35
-32
Common/DocxFormat/Source/MathEquation/MathEquation.cpp
Common/DocxFormat/Source/MathEquation/MathEquation.cpp
+25
-25
Common/DocxFormat/Source/MathEquation/Types.h
Common/DocxFormat/Source/MathEquation/Types.h
+6
-7
DesktopEditor/raster/Metafile/Common/MetaFileRenderer.h
DesktopEditor/raster/Metafile/Common/MetaFileRenderer.h
+4
-0
No files found.
Common/DocxFormat/Source/MathEquation/MathEquation.cpp
View file @
cc084bf6
...
...
@@ -64,7 +64,7 @@ void CEquationReader::InitFonts()
if
(
pOutputDev
)
{
for
(
u
int8_t
i
=
1
;
i
<=
8
;
i
++
)
for
(
u
nsigned
char
i
=
1
;
i
<=
8
;
i
++
)
{
switch
(
i
)
{
...
...
@@ -117,8 +117,8 @@ int CEquationReader::Parse()
int
CEquationReader
::
HandleRecords
()
{
u
int8_t
nTag
,
nRecord
;
u
int16_
t
nTabOffset
;
u
nsigned
char
nTag
,
nRecord
;
u
nsigned
shor
t
nTabOffset
;
int
nRet
=
1
;
...
...
@@ -214,16 +214,16 @@ int CEquationReader::HandleRecords()
void
CEquationReader
::
HandleNudge
()
{
u
int8_t
nXNudge
;
*
pS
>>
nXNudge
;
u
int8_t
nYNudge
;
*
pS
>>
nYNudge
;
u
nsigned
char
nXNudge
;
*
pS
>>
nXNudge
;
u
nsigned
char
nYNudge
;
*
pS
>>
nYNudge
;
if
(
128
==
nXNudge
&&
128
==
nYNudge
)
{
u
int16_
t
nXLongNudge
;
*
pS
>>
nXLongNudge
;
u
int16_
t
nYLongNudge
;
*
pS
>>
nYLongNudge
;
u
nsigned
shor
t
nXLongNudge
;
*
pS
>>
nXLongNudge
;
u
nsigned
shor
t
nYLongNudge
;
*
pS
>>
nYLongNudge
;
}
}
int
CEquationReader
::
HandleChar
(
u
int8_t
nTag
)
int
CEquationReader
::
HandleChar
(
u
nsigned
char
nTag
)
{
Unicode_t
nChar
;
int
nRet
=
1
;
...
...
@@ -234,12 +234,12 @@ int CEquationReader::HandleChar(uint8_t nTag)
//that is!
}
u
int8_t
nTypeFace
;
u
nsigned
char
nTypeFace
;
*
pS
>>
nTypeFace
;
if
(
nVersion
<
3
)
{
u
int8_t
nChar8
;
u
nsigned
char
nChar8
;
*
pS
>>
nChar8
;
nChar
=
nChar8
;
}
...
...
@@ -262,7 +262,7 @@ int CEquationReader::HandleChar(uint8_t nTag)
}
int
CEquationReader
::
HandleTemplate
()
{
u
int8_t
nSelector
,
nVariation
,
nOption
;
u
nsigned
char
nSelector
,
nVariation
,
nOption
;
*
pS
>>
nSelector
;
*
pS
>>
nVariation
;
*
pS
>>
nOption
;
...
...
@@ -273,7 +273,7 @@ int CEquationReader::HandleTemplate()
return
nRet
;
}
void
CEquationReader
::
HandleStartTemplate
(
u
int8_t
nSelector
,
uint8_t
nVariation
)
void
CEquationReader
::
HandleStartTemplate
(
u
nsigned
char
nSelector
,
unsigned
char
nVariation
)
{
switch
(
nSelector
)
{
...
...
@@ -472,7 +472,7 @@ void CEquationReader::HandleStartTemplate(uint8_t nSelector, uint8_t nVariation)
break
;
}
}
void
CEquationReader
::
HandleEndTemplate
(
u
int8_t
nSelector
,
uint8_t
nVariation
)
void
CEquationReader
::
HandleEndTemplate
(
u
nsigned
char
nSelector
,
unsigned
char
nVariation
)
{
switch
(
nSelector
)
{
...
...
@@ -612,7 +612,7 @@ int CEquationReader::HandlePile()
int
CEquationReader
::
HandleMatrix
()
{
u
int8_t
nHorAlign
,
nVerAlign
,
nRows
,
nCols
;
u
nsigned
char
nHorAlign
,
nVerAlign
,
nRows
,
nCols
;
*
pS
>>
nVAlign
;
*
pS
>>
nHorAlign
;
*
pS
>>
nVerAlign
;
...
...
@@ -629,8 +629,8 @@ int CEquationReader::HandleMatrix()
if
(((
nRows
+
1
)
*
2
)
%
8
)
nBytes
++
;
u
int8_t
*
pVerBorders
=
new
uint8_t
[
nRows
+
1
];
u
int8_t
nTempByte
;
u
nsigned
char
*
pVerBorders
=
new
unsigned
char
[
nRows
+
1
];
u
nsigned
char
nTempByte
;
for
(
int
nByteIndex
=
0
,
nRowIndex
=
0
,
nBitIndex
=
0
;
nByteIndex
<
nBytes
;
nByteIndex
++
,
nBitIndex
=
0
)
{
*
pS
>>
nTempByte
;
...
...
@@ -647,7 +647,7 @@ int CEquationReader::HandleMatrix()
if
(((
nCols
+
1
)
*
2
)
%
8
)
nBytes
++
;
u
int8_t
*
pHorBorders
=
new
uint8_t
[
nCols
+
1
];
u
nsigned
char
*
pHorBorders
=
new
unsigned
char
[
nCols
+
1
];
for
(
int
nByteIndex
=
0
,
nColIndex
=
0
,
nBitIndex
=
0
;
nByteIndex
<
nBytes
;
nByteIndex
++
,
nBitIndex
=
0
)
{
*
pS
>>
nTempByte
;
...
...
@@ -674,7 +674,7 @@ int CEquationReader::HandleMatrix()
void
CEquationReader
::
HandleEmblishments
()
{
u
int8_t
nEmbel
;
u
nsigned
char
nEmbel
;
do
{
*
pS
>>
nEmbel
;
...
...
@@ -690,9 +690,9 @@ void CEquationReader::HandleSetSize(MTOKENS eType)
{
if
(
SIZE_CUSTOM
==
eType
)
{
u
int8_t
nTemp
;
u
nsigned
char
nTemp
;
*
pS
>>
nTemp
;
u
int16_
t
nSize
;
u
nsigned
shor
t
nSize
;
switch
(
nTemp
)
{
case
101
:
...
...
@@ -706,7 +706,7 @@ void CEquationReader::HandleSetSize(MTOKENS eType)
*
pS
>>
nTemp
;
nSize
=
nTemp
;
u
int16_
t
nTempSize
;
u
nsigned
shor
t
nTempSize
;
*
pS
>>
nTempSize
;
break
;
}
...
...
@@ -715,7 +715,7 @@ void CEquationReader::HandleSetSize(MTOKENS eType)
// TODO: Проверить эту ветку
nSize
=
nTemp
;
*
pS
>>
nTemp
;
u
int16_
t
nTempSize
=
nTemp
-
128
;
u
nsigned
shor
t
nTempSize
=
nTemp
-
128
;
break
;
}
}
...
...
@@ -731,8 +731,8 @@ void CEquationReader::HandleSetSize(MTOKENS eType)
void
CEquationReader
::
HandleRuler
()
{
u
int8_t
nTabType
,
nTabStops
;
u
int16_
t
nTabOffset
;
u
nsigned
char
nTabType
,
nTabStops
;
u
nsigned
shor
t
nTabOffset
;
*
pS
>>
nTabStops
;
for
(
int
nTabIndex
=
0
;
nTabIndex
<
nTabStops
;
nTabIndex
++
)
...
...
@@ -743,7 +743,7 @@ void CEquationReader::HandleRuler()
}
void
CEquationReader
::
HandleFont
()
{
u
int8_t
nTFace
,
nStyle
;
u
nsigned
char
nTFace
,
nStyle
;
String
sName
;
*
pS
>>
nTFace
;
...
...
Common/DocxFormat/Source/MathEquation/Types.h
View file @
cc084bf6
...
...
@@ -37,13 +37,12 @@
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 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
;
...
...
DesktopEditor/raster/Metafile/Common/MetaFileRenderer.h
View file @
cc084bf6
...
...
@@ -46,6 +46,10 @@
#include <cmath>
#ifndef M_PI
#define M_PI 3.1415926
#endif
namespace
MetaFile
{
class
CMetaFileRenderer
:
public
IOutputDevice
...
...
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