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
d949eb38
Commit
d949eb38
authored
May 10, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
13b31cf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
22 deletions
+21
-22
word/api.js
word/api.js
+21
-22
No files found.
word/api.js
View file @
d949eb38
...
...
@@ -396,7 +396,6 @@
this
.
documents
=
_docs
;
this
.
returnDocuments
=
[];
this
.
current
=
-
1
;
this
.
isAsync
=
false
;
this
.
start
=
function
()
{
...
...
@@ -427,14 +426,12 @@
return
;
}
var
LogicDocument
=
this
.
WordControl
.
m_oLogicDocument
;
var
LogicDocument
=
this
.
api
.
WordControl
.
m_oLogicDocument
;
if
(
0
==
this
.
current
)
LogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_InsertDocumentsByUrls
);
while
(
t
rue
)
// no recursion
while
(
t
his
.
current
<
this
.
documents
.
length
)
// no recursion
{
this
.
isAsync
=
true
;
if
(
false
===
LogicDocument
.
Document_Is_SelectionLocked
(
AscCommon
.
changestype_Document_Content_Add
))
{
var
_current
=
this
.
documents
[
this
.
current
];
...
...
@@ -455,12 +452,15 @@
if
(
_current
.
Url
!==
undefined
)
{
// insert/replace document
this
.
insertDocumentUrlsData
=
{
imageMap
:
null
,
documents
:
arrDocuments
,
oSdt
:
null
,
endCallback
:
function
(
_api
,
_props
)
{
_api
.
__content_control_worker
.
isAsync
=
false
;
this
.
api
.
insertDocumentUrlsData
=
{
imageMap
:
null
,
documents
:
[{
url
:
_current
.
Url
,
format
:
_current
.
Format
}],
oSdt
:
null
,
endCallback
:
function
(
_api
,
_props
)
{
_api
.
__content_control_worker
.
returnDocuments
.
push
(
_props
);
_api
.
__content_control_worker
.
run
();
setTimeout
(
function
()
{
window
.
g_asc_plugins
.
api
.
__content_control_worker
.
run
();
},
1
);
}};
this
.
asc_DownloadAs
(
Asc
.
c_oAscFileType
.
CANVAS_WORD
);
this
.
api
.
asc_DownloadAs
(
Asc
.
c_oAscFileType
.
CANVAS_WORD
);
return
;
}
else
if
(
_current
.
Script
!==
undefined
)
{
...
...
@@ -477,6 +477,9 @@
this
.
returnDocuments
.
push
(
_blockStd
.
GetContentControlPr
());
var
_script
=
"
(function(){ var Api = window.g_asc_plugins.api;
\n
"
+
_current
.
Script
+
"
\n
})();
"
;
eval
(
_script
);
if
(
_blockStd
.
Content
.
Get_ElementsCount
()
>
1
)
{
_blockStd
.
Content
.
Remove_FromContent
(
_blockStd
.
Content
.
Get_ElementsCount
()
-
1
,
1
);
...
...
@@ -484,9 +487,6 @@
}
LogicDocument
.
MoveCursorRight
(
false
,
false
,
true
);
var
_script
=
"
(function(){ var Api = window.g_asc_plugins.api;
\n
"
+
_current
.
Script
+
"
\n
})();
"
;
eval
(
_script
);
var
_fonts
=
LogicDocument
.
Document_Get_AllFontNames
();
var
_imagesArray
=
LogicDocument
.
Get_AllImageUrls
();
var
_images
=
{};
...
...
@@ -499,14 +499,18 @@
AscCommon
.
Check_LoadingDataBeforePrepaste
(
window
.
g_asc_plugins
.
api
,
_fonts
,
_images
,
function
()
{
window
.
g_asc_plugins
.
api
.
__content_control_worker
.
isAsync
=
false
;
var
_api
=
window
.
g_asc_plugins
.
api
;
delete
window
.
g_asc_plugins
.
images_rename
;
window
.
g_asc_plugins
.
api
.
asc_Recalculate
();
window
.
g_asc_plugins
.
api
.
WordControl
.
m_oLogicDocument
.
UnlockPanelStyles
(
true
);
_
api
.
asc_Recalculate
();
_
api
.
WordControl
.
m_oLogicDocument
.
UnlockPanelStyles
(
true
);
window
.
g_asc_plugins
.
api
.
__content_control_worker
.
run
();
setTimeout
(
function
()
{
window
.
g_asc_plugins
.
api
.
__content_control_worker
.
run
();
},
1
);
});
return
;
}
else
{
...
...
@@ -514,12 +518,7 @@
var
_blockStd
=
LogicDocument
.
GetContentControl
(
_content_control_pr
.
InternalId
);
_blockStd
.
SetContentControlPr
(
_content_control_pr
);
this
.
returnDocuments
.
push
(
_blockStd
.
GetContentControlPr
());
this
.
isAsync
=
false
;
}
if
(
this
.
isAsync
)
return
;
}
++
this
.
current
;
...
...
@@ -2352,7 +2351,7 @@ background-repeat: no-repeat;\
asc_docs_api
.
prototype
.
endInsertDocumentUrls
=
function
()
{
if
(
this
.
insertDocumentUrlsData
)
{
this
.
insertDocumentUrlsData
.
endCallback
();
this
.
insertDocumentUrlsData
.
endCallback
(
this
);
this
.
insertDocumentUrlsData
=
null
;
//this.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.DownloadAs);
}
...
...
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