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
b8b8a142
Commit
b8b8a142
authored
Dec 15, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 36524 (fix MathType equation)
parent
e5ef7497
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
ASCOfficeDocxFile2/BinWriter/BinEquationWriter.h
ASCOfficeDocxFile2/BinWriter/BinEquationWriter.h
+18
-8
No files found.
ASCOfficeDocxFile2/BinWriter/BinEquationWriter.h
View file @
b8b8a142
...
@@ -144,9 +144,13 @@ namespace MathEquation
...
@@ -144,9 +144,13 @@ namespace MathEquation
void
AddAccent
(
MEMBELTYPE
eType
)
void
AddAccent
(
MEMBELTYPE
eType
)
{
{
LONG
lPos
=
GetSize
()
-
1
;
LONG
lPos
=
GetSize
()
-
1
;
if
(
lPos
<
0
)
return
;
EquationRun
oRun
;
EquationRun
oRun
;
oRun
=
arrRun
[
lPos
];
oRun
=
arrRun
[
lPos
];
RemoveElem
(
lPos
);
RemoveElem
(
lPos
);
oRun
.
bAccent
=
true
;
oRun
.
bAccent
=
true
;
oRun
.
eType
=
eType
;
oRun
.
eType
=
eType
;
Add
(
oRun
);
Add
(
oRun
);
...
@@ -557,11 +561,11 @@ namespace MathEquation
...
@@ -557,11 +561,11 @@ namespace MathEquation
BYTE
horAlign
;
BYTE
horAlign
;
switch
(
eHorAlign
)
switch
(
eHorAlign
)
{
{
case
matrixhoralignLeft
:
horAlign
=
SimpleTypes
::
xalignLeft
;
case
matrixhoralignLeft
:
horAlign
=
SimpleTypes
::
xalignLeft
;
break
;
case
matrixhoralignCenter
:
horAlign
=
SimpleTypes
::
xalignCenter
;
case
matrixhoralignCenter
:
horAlign
=
SimpleTypes
::
xalignCenter
;
break
;
case
matrixhoralignRight
:
horAlign
=
SimpleTypes
::
xalignRight
;
case
matrixhoralignRight
:
horAlign
=
SimpleTypes
::
xalignRight
;
break
;
case
matrixhoralignEqualSign
:
horAlign
=
SimpleTypes
::
xalignCenter
;
case
matrixhoralignEqualSign
:
horAlign
=
SimpleTypes
::
xalignCenter
;
break
;
case
matrixhoralignCommaSign
:
horAlign
=
SimpleTypes
::
xalignCenter
;
case
matrixhoralignCommaSign
:
horAlign
=
SimpleTypes
::
xalignCenter
;
break
;
}
}
WriteItemVal
(
BinDocxRW
::
c_oSer_OMathBottomNodesType
::
McJc
,
horAlign
);
WriteItemVal
(
BinDocxRW
::
c_oSer_OMathBottomNodesType
::
McJc
,
horAlign
);
...
@@ -614,7 +618,7 @@ namespace MathEquation
...
@@ -614,7 +618,7 @@ namespace MathEquation
nRows
=
m_aRowsCounter
.
top
();
nRows
=
m_aRowsCounter
.
top
();
m_aRowsCounter
.
pop
();
m_aRowsCounter
.
pop
();
}
}
int
nPos
=
0
;
int
nPos
=
m_oStream
.
GetPosition
()
;
if
(
!
m_aRowsPosCounter
.
empty
())
if
(
!
m_aRowsPosCounter
.
empty
())
{
{
nPos
=
m_aRowsPosCounter
.
top
();
nPos
=
m_aRowsPosCounter
.
top
();
...
@@ -1675,7 +1679,7 @@ namespace MathEquation
...
@@ -1675,7 +1679,7 @@ namespace MathEquation
void
WriteEndNode
(
BinaryEquationWriter
*
pWriter
)
void
WriteEndNode
(
BinaryEquationWriter
*
pWriter
)
{
{
int
nCurPos
;
int
nCurPos
=
-
1
;
if
(
!
m_aBaseStack
.
empty
())
if
(
!
m_aBaseStack
.
empty
())
{
{
nCurPos
=
m_aBaseStack
.
top
();
nCurPos
=
m_aBaseStack
.
top
();
...
@@ -1687,13 +1691,19 @@ namespace MathEquation
...
@@ -1687,13 +1691,19 @@ namespace MathEquation
}
}
if
(
bPile
&&
bEqArrayStart
)
if
(
bPile
&&
bEqArrayStart
)
{
pWriter
->
WriteItemEnd
(
nCurPos
);
pWriter
->
WriteItemEnd
(
nCurPos
);
}
else
if
(
!
bPile
&&
!
bEqArrayStart
)
else
if
(
!
bPile
&&
!
bEqArrayStart
)
{
pWriter
->
WriteItemEnd
(
nCurPos
);
pWriter
->
WriteItemEnd
(
nCurPos
);
}
else
if
(
!
bPile
&&
bEqArrayStart
)
else
if
(
!
bPile
&&
bEqArrayStart
)
{
{
pWriter
->
m_aRowsCounter
.
push
(
nRows
);
pWriter
->
m_aRowsCounter
.
push
(
nRows
);
bEqArrayStart
=
false
;
bEqArrayStart
=
false
;
if
(
nCurPos
>
0
)
pWriter
->
WriteItemEnd
(
nCurPos
);
//eqArr
pWriter
->
WriteItemEnd
(
nCurPos
);
//eqArr
if
(
!
m_aBaseStack
.
empty
())
if
(
!
m_aBaseStack
.
empty
())
...
...
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