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
5e7f5ded
Commit
5e7f5ded
authored
Feb 06, 2017
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Bug 33863
parent
3a09861e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
8 deletions
+33
-8
cell/model/clipboard.js
cell/model/clipboard.js
+6
-3
common/Drawings/Format/DrawingContent.js
common/Drawings/Format/DrawingContent.js
+8
-0
common/Drawings/Format/Shape.js
common/Drawings/Format/Shape.js
+16
-2
common/wordcopypaste.js
common/wordcopypaste.js
+3
-3
No files found.
cell/model/clipboard.js
View file @
5e7f5ded
...
@@ -1124,7 +1124,10 @@
...
@@ -1124,7 +1124,10 @@
_convertBeforeInsertIntoShapeContent
:
function
(
worksheet
,
content
,
isConvertToPPTX
,
target_doc_content
)
_convertBeforeInsertIntoShapeContent
:
function
(
worksheet
,
content
,
isConvertToPPTX
,
target_doc_content
)
{
{
var
elements
=
[],
selectedElement
,
element
;
var
elements
=
[],
selectedElement
,
element
;
var
bRemoveHyperlink
=
false
;
if
(
target_doc_content
&&
target_doc_content
.
Is_ChartTitleContent
&&
target_doc_content
.
Is_ChartTitleContent
()){
bRemoveHyperlink
=
true
;
}
for
(
var
i
=
0
;
i
<
content
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
content
.
length
;
i
++
)
{
{
selectedElement
=
new
CSelectedElement
();
selectedElement
=
new
CSelectedElement
();
...
@@ -1132,7 +1135,7 @@
...
@@ -1132,7 +1135,7 @@
if
(
type_Paragraph
===
element
.
GetType
())
//paragraph
if
(
type_Paragraph
===
element
.
GetType
())
//paragraph
{
{
selectedElement
.
Element
=
AscFormat
.
ConvertParagraphToPPTX
(
element
,
worksheet
.
model
.
DrawingDocument
,
target_doc_content
,
true
);
selectedElement
.
Element
=
AscFormat
.
ConvertParagraphToPPTX
(
element
,
worksheet
.
model
.
DrawingDocument
,
target_doc_content
,
true
,
bRemoveHyperlink
);
elements
.
push
(
selectedElement
);
elements
.
push
(
selectedElement
);
}
}
else
if
(
type_Table
===
element
.
GetType
())
//table
else
if
(
type_Table
===
element
.
GetType
())
//table
...
@@ -1143,7 +1146,7 @@
...
@@ -1143,7 +1146,7 @@
for
(
var
j
=
0
;
j
<
paragraphs
.
length
;
j
++
)
for
(
var
j
=
0
;
j
<
paragraphs
.
length
;
j
++
)
{
{
selectedElement
=
new
CSelectedElement
();
selectedElement
=
new
CSelectedElement
();
selectedElement
.
Element
=
AscFormat
.
ConvertParagraphToPPTX
(
paragraphs
[
j
],
worksheet
.
model
.
DrawingDocument
,
target_doc_content
);
selectedElement
.
Element
=
AscFormat
.
ConvertParagraphToPPTX
(
paragraphs
[
j
],
worksheet
.
model
.
DrawingDocument
,
target_doc_content
,
true
,
bRemoveHyperlink
);
elements
.
push
(
selectedElement
);
elements
.
push
(
selectedElement
);
}
}
}
}
...
...
common/Drawings/Format/DrawingContent.js
View file @
5e7f5ded
...
@@ -425,6 +425,14 @@
...
@@ -425,6 +425,14 @@
return
false
;
return
false
;
};
};
CDrawingDocContent
.
prototype
.
Is_ChartTitleContent
=
function
(){
if
(
this
.
Parent
instanceof
AscFormat
.
CTextBody
&&
this
.
Parent
.
parent
instanceof
AscFormat
.
CTitle
){
return
true
;
}
return
false
;
};
CDrawingDocContent
.
prototype
.
Selection_Draw_Page
=
function
(
PageIndex
){
CDrawingDocContent
.
prototype
.
Selection_Draw_Page
=
function
(
PageIndex
){
var
CurPage
=
PageIndex
;
var
CurPage
=
PageIndex
;
if
(
CurPage
<
0
||
CurPage
>=
this
.
Pages
.
length
)
if
(
CurPage
<
0
||
CurPage
>=
this
.
Pages
.
length
)
...
...
common/Drawings/Format/Shape.js
View file @
5e7f5ded
...
@@ -261,7 +261,7 @@ function CopyRunToPPTX(Run, Paragraph, bHyper)
...
@@ -261,7 +261,7 @@ function CopyRunToPPTX(Run, Paragraph, bHyper)
return
NewRun
;
return
NewRun
;
}
}
function
ConvertParagraphToPPTX
(
paragraph
,
drawingDocument
,
newParent
,
bIsAddMath
)
function
ConvertParagraphToPPTX
(
paragraph
,
drawingDocument
,
newParent
,
bIsAddMath
,
bRemoveHyperlink
)
{
{
var
_drawing_document
=
isRealObject
(
drawingDocument
)
?
drawingDocument
:
paragraph
.
DrawingDocument
;
var
_drawing_document
=
isRealObject
(
drawingDocument
)
?
drawingDocument
:
paragraph
.
DrawingDocument
;
var
_new_parent
=
isRealObject
(
newParent
)
?
newParent
:
paragraph
.
Parent
;
var
_new_parent
=
isRealObject
(
newParent
)
?
newParent
:
paragraph
.
Parent
;
...
@@ -308,9 +308,23 @@ function ConvertParagraphToPPTX(paragraph, drawingDocument, newParent, bIsAddMat
...
@@ -308,9 +308,23 @@ function ConvertParagraphToPPTX(paragraph, drawingDocument, newParent, bIsAddMat
new_paragraph
.
Internal_Content_Add
(
new_paragraph
.
Content
.
length
,
CopyRunToPPTX
(
Item
,
new_paragraph
),
false
);
new_paragraph
.
Internal_Content_Add
(
new_paragraph
.
Content
.
length
,
CopyRunToPPTX
(
Item
,
new_paragraph
),
false
);
}
}
else
if
(
Item
.
Type
===
para_Hyperlink
)
else
if
(
Item
.
Type
===
para_Hyperlink
)
{
if
(
bRemoveHyperlink
===
true
)
{
for
(
var
j
=
0
;
j
<
Item
.
Content
.
length
;
++
j
)
{
if
(
Item
.
Content
[
j
].
Type
===
para_Run
)
{
new_paragraph
.
Internal_Content_Add
(
new_paragraph
.
Content
.
length
,
CopyRunToPPTX
(
Item
.
Content
[
j
],
new_paragraph
),
false
);
}
}
}
else
{
{
new_paragraph
.
Internal_Content_Add
(
new_paragraph
.
Content
.
length
,
ConvertHyperlinkToPPTX
(
Item
,
new_paragraph
),
false
);
new_paragraph
.
Internal_Content_Add
(
new_paragraph
.
Content
.
length
,
ConvertHyperlinkToPPTX
(
Item
,
new_paragraph
),
false
);
}
}
}
else
if
(
true
===
bIsAddMath
&&
Item
.
Type
===
para_Math
)
else
if
(
true
===
bIsAddMath
&&
Item
.
Type
===
para_Math
)
{
{
new_paragraph
.
Internal_Content_Add
(
new_paragraph
.
Content
.
length
,
Item
.
Copy
(),
false
);
new_paragraph
.
Internal_Content_Add
(
new_paragraph
.
Content
.
length
,
Item
.
Copy
(),
false
);
...
...
common/wordcopypaste.js
View file @
5e7f5ded
...
@@ -2501,7 +2501,7 @@ PasteProcessor.prototype =
...
@@ -2501,7 +2501,7 @@ PasteProcessor.prototype =
{
{
if
(
type_Paragraph
===
aContent
.
content
[
i
].
Get_Type
())
if
(
type_Paragraph
===
aContent
.
content
[
i
].
Get_Type
())
{
{
newContent
.
push
(
AscFormat
.
ConvertParagraphToPPTX
(
aContent
.
content
[
i
],
this
.
oDocument
.
DrawingDocument
,
this
.
oDocument
));
newContent
.
push
(
AscFormat
.
ConvertParagraphToPPTX
(
aContent
.
content
[
i
],
this
.
oDocument
.
DrawingDocument
,
this
.
oDocument
,
false
,
true
));
}
}
}
}
...
@@ -2587,7 +2587,7 @@ PasteProcessor.prototype =
...
@@ -2587,7 +2587,7 @@ PasteProcessor.prototype =
element
.
Get_AllDrawingObjects
(
drawings
);
element
.
Get_AllDrawingObjects
(
drawings
);
if
(
type_Paragraph
==
element
.
GetType
())
//paragraph
if
(
type_Paragraph
==
element
.
GetType
())
//paragraph
{
{
selectedElement
.
Element
=
AscFormat
.
ConvertParagraphToPPTX
(
element
,
null
,
null
,
true
);
selectedElement
.
Element
=
AscFormat
.
ConvertParagraphToPPTX
(
element
,
null
,
null
,
true
,
false
);
elements
.
push
(
selectedElement
);
elements
.
push
(
selectedElement
);
}
}
else
if
(
type_Table
==
element
.
GetType
())
//table
else
if
(
type_Table
==
element
.
GetType
())
//table
...
@@ -3879,7 +3879,7 @@ PasteProcessor.prototype =
...
@@ -3879,7 +3879,7 @@ PasteProcessor.prototype =
{
{
if
(
cDocumentContent
.
Content
[
n
]
instanceof
Paragraph
)
if
(
cDocumentContent
.
Content
[
n
]
instanceof
Paragraph
)
{
{
cDocumentContent
.
Content
[
nIndex
]
=
AscFormat
.
ConvertParagraphToPPTX
(
cDocumentContent
.
Content
[
nIndex
]);
cDocumentContent
.
Content
[
nIndex
]
=
AscFormat
.
ConvertParagraphToPPTX
(
cDocumentContent
.
Content
[
nIndex
]
,
null
,
null
,
true
,
false
);
++
nIndex
;
++
nIndex
;
}
}
...
...
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