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
3d47a865
Commit
3d47a865
authored
Oct 19, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3d00fc53
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
88 deletions
+88
-88
Common/DocxFormat/Source/MathEquation/LEStream.h
Common/DocxFormat/Source/MathEquation/LEStream.h
+12
-12
Common/DocxFormat/Source/MathEquation/OutputDev.h
Common/DocxFormat/Source/MathEquation/OutputDev.h
+76
-76
No files found.
Common/DocxFormat/Source/MathEquation/LEStream.h
View file @
3d47a865
...
...
@@ -65,46 +65,46 @@ public :
delete
pBuffer
;
}
u
int8_t
ReadUInt8
()
u
nsigned
char
ReadUInt8
()
{
if
(
pCur
+
1
>=
pEnd
)
return
0
;
u
int8_t
unResult
=
pCur
[
0
];
u
nsigned
char
unResult
=
pCur
[
0
];
pCur
++
;
return
unResult
;
}
uint16_t
ReadUInt16
()
_UINT16
ReadUInt16
()
{
if
(
pCur
+
2
>=
pEnd
)
return
0
;
uint16_t
ushResult
=
(
pCur
[
0
])
|
((
pCur
[
1
])
<<
8
);
_UINT16
ushResult
=
(
pCur
[
0
])
|
((
pCur
[
1
])
<<
8
);
pCur
+=
2
;
return
ushResult
;
}
uint32_t
ReadUInt32
()
_UINT32
ReadUInt32
()
{
if
(
pCur
+
4
>=
pEnd
)
return
0
;
uint32_t
unResult
=
(
uint32_t
)((
pCur
[
0
]
<<
0
)
|
((
pCur
[
1
])
<<
8
)
|
((
pCur
[
2
])
<<
16
)
|
((
pCur
[
3
])
<<
24
));
_UINT32
unResult
=
(
_UINT32
)((
pCur
[
0
]
<<
0
)
|
((
pCur
[
1
])
<<
8
)
|
((
pCur
[
2
])
<<
16
)
|
((
pCur
[
3
])
<<
24
));
pCur
+=
4
;
return
unResult
;
}
void
operator
>>
(
uint8_t
&
nValue
)
void
operator
>>
(
unsigned
char
&
nValue
)
{
nValue
=
ReadUInt8
();
}
void
operator
>>
(
uint16_t
&
nValue
)
void
operator
>>
(
_UINT16
&
nValue
)
{
nValue
=
ReadUInt16
();
}
void
operator
>>
(
uint32_t
&
nValue
)
void
operator
>>
(
_UINT32
&
nValue
)
{
nValue
=
ReadUInt32
();
}
...
...
@@ -137,12 +137,12 @@ public :
uint32_t
Tell
()
_UINT32
Tell
()
{
return
(
uint32_t
)(
pCur
-
pBuffer
);
return
(
_UINT32
)(
pCur
-
pBuffer
);
}
void
SeekRel
(
uint32_t
nPos
)
void
SeekRel
(
_UINT32
nPos
)
{
pCur
+=
nPos
;
}
...
...
Common/DocxFormat/Source/MathEquation/OutputDev.h
View file @
3d47a865
...
...
@@ -51,18 +51,18 @@ namespace MathEquation
virtual
void
EndBlock
()
=
0
;
// Выставляем размер в текущем блоке
virtual
void
SetSize
(
uint16_t
nSize
)
=
0
;
virtual
void
SetSize
(
_UINT16
nSize
)
=
0
;
// Добавляем символ. К символу могут быть добавлены разные элементы. Зачеркивание, добавление акцента и т.д.
virtual
void
BeginChar
(
Unicode_t
uChar
,
uint8_t
nTypeFace
,
bool
bSpecialSymbol
)
=
0
;
virtual
void
BeginChar
(
Unicode_t
uChar
,
unsigned
char
nTypeFace
,
bool
bSpecialSymbol
)
=
0
;
virtual
void
AddCharEmbel
(
MEMBELTYPE
eType
)
=
0
;
virtual
void
EndChar
()
=
0
;
// Матрица. Количество блоков здесь равно nRows * nCol, посылаются последовательно в обычном порядке (первая строка слева направо, вторая строка слева направо и т.д.)
virtual
void
BeginMatrix
(
uint8_t
nVAlign
,
MMATRIXHORALIGN
eHorAlign
,
MMATRIXVERALIGN
eVerAlign
,
bool
bEqualRows
,
bool
bEqualCols
,
uint8_t
nRows
,
uint8_t
nCols
,
uint8_t
*
pVerBorders
,
uint8_t
*
pHorBorders
)
=
0
;
virtual
void
BeginMatrix
(
unsigned
char
nVAlign
,
MMATRIXHORALIGN
eHorAlign
,
MMATRIXVERALIGN
eVerAlign
,
bool
bEqualRows
,
bool
bEqualCols
,
unsigned
char
nRows
,
unsigned
char
nCols
,
unsigned
char
*
pVerBorders
,
unsigned
char
*
pHorBorders
)
=
0
;
virtual
void
EndMatrix
()
=
0
;
virtual
void
StartPile
(
uint8_t
nHAlign
,
uint8_t
nVAlign
)
=
0
;
virtual
void
StartPile
(
unsigned
char
nHAlign
,
unsigned
char
nVAlign
)
=
0
;
virtual
void
EndPile
()
=
0
;
// Скобки с элементом внутри
...
...
@@ -111,7 +111,7 @@ namespace MathEquation
virtual
void
BeginAngleBracketsWithSeparator
(
MANGLEBRACKETSWITHSEPARATORTYPE
eType
)
=
0
;
virtual
void
EndAngleBracketsWithSeparator
()
=
0
;
void
AddFont
(
uint8_t
nTypeFace
,
std
::
string
sName
,
bool
bBold
,
bool
bItalic
)
void
AddFont
(
unsigned
char
nTypeFace
,
std
::
string
sName
,
bool
bBold
,
bool
bItalic
)
{
TMathFont
aFont
;
aFont
.
sName
=
sName
;
...
...
@@ -120,7 +120,7 @@ namespace MathEquation
m_mFonts
[
nTypeFace
]
=
aFont
;
}
TMathFont
*
GetFont
(
uint8_t
nTypeFace
)
TMathFont
*
GetFont
(
unsigned
char
nTypeFace
)
{
TFontMap
::
iterator
itFind
=
m_mFonts
.
find
(
nTypeFace
);
if
(
itFind
!=
m_mFonts
.
end
())
...
...
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