Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
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
sdkjs
Commits
9a846a2b
Commit
9a846a2b
authored
Aug 12, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
math object not saved in html
parent
f99ed7a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
common/wordcopypaste.js
common/wordcopypaste.js
+7
-3
word/Editor/Math.js
word/Editor/Math.js
+1
-1
word/Editor/Serialize2.js
word/Editor/Serialize2.js
+3
-3
No files found.
common/wordcopypaste.js
View file @
9a846a2b
...
...
@@ -524,10 +524,14 @@ CopyProcessor.prototype =
}
else
if
(
para_Math
==
item
.
Type
){
var
sSrc
=
item
.
MathToImageConverter
();
if
(
null
!=
sSrc
&&
""
!=
sSrc
&&
null
!=
sSrc
.
ImageUrl
){
if
(
null
!=
sSrc
&&
null
!=
sSrc
.
ImageUrl
){
var
oImg
=
new
CopyElement
(
"
img
"
);
oImg
.
oAttributes
[
"
width
"
]
=
item
.
Width
;
oImg
.
oAttributes
[
"
height
"
]
=
item
.
Height
;
if
(
sSrc
.
w_px
>
0
)
{
oImg
.
oAttributes
[
"
width
"
]
=
sSrc
.
w_px
;
}
if
(
sSrc
.
h_px
>
0
)
{
oImg
.
oAttributes
[
"
height
"
]
=
sSrc
.
h_px
;
}
oImg
.
oAttributes
[
"
src
"
]
=
sSrc
.
ImageUrl
;
oTarget
.
addChild
(
oImg
);
}
...
...
word/Editor/Math.js
View file @
9a846a2b
...
...
@@ -2636,7 +2636,7 @@ ParaMath.prototype.MathToImageConverter = function(bCopy, _canvasInput, _widthPx
if
(
undefined
===
_canvasInput
)
{
var
_ret
=
{
ImageNative
:
_canvas
,
ImageUrl
:
""
};
var
_ret
=
{
ImageNative
:
_canvas
,
ImageUrl
:
""
,
w_px
:
_canvas
.
width
,
h_px
:
_canvas
.
height
,
w_mm
:
w_mm
,
h_mm
:
h_mm
};
try
{
_ret
.
ImageUrl
=
_canvas
.
toDataURL
(
"
image/png
"
);
...
...
word/Editor/Serialize2.js
View file @
9a846a2b
...
...
@@ -4139,11 +4139,11 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap, copyPa
{
//заменяем на картинку, если бы был аналог CachedImage не надо было бы заменять
var
sSrc
=
item
.
MathToImageConverter
();
if
(
null
!=
sSrc
&&
""
!=
sSrc
&&
null
!=
sSrc
.
ImageUrl
&&
item
.
Width
>
0
&&
item
.
Height
>
0
){
if
(
null
!=
sSrc
&&
null
!=
sSrc
.
ImageUrl
&&
sSrc
.
w_mm
>
0
&&
sSrc
.
h_mm
>
0
){
var
doc
=
this
.
Document
;
//todo paragraph
var
drawing
=
new
ParaDrawing
(
item
.
Width
,
item
.
Height
,
null
,
this
.
Document
.
DrawingDocument
,
this
.
Document
,
par
);
var
Image
=
editor
.
WordControl
.
m_oLogicDocument
.
DrawingObjects
.
createImage
(
sSrc
.
ImageUrl
,
0
,
0
,
item
.
Width
,
item
.
Height
);
var
drawing
=
new
ParaDrawing
(
sSrc
.
w_mm
,
sSrc
.
h_mm
,
null
,
this
.
Document
.
DrawingDocument
,
this
.
Document
,
par
);
var
Image
=
editor
.
WordControl
.
m_oLogicDocument
.
DrawingObjects
.
createImage
(
sSrc
.
ImageUrl
,
0
,
0
,
sSrc
.
w_mm
,
sSrc
.
h_mm
);
Image
.
cachedImage
=
sSrc
.
ImageUrl
;
drawing
.
Set_GraphicObject
(
Image
);
Image
.
setParent
(
drawing
);
...
...
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