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
882ab115
Commit
882ab115
authored
Aug 21, 2017
by
Alexander.Trofimov
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 35685
parent
cdc8c4d7
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
8 deletions
+22
-8
cell/api.js
cell/api.js
+5
-2
cell/model/Serialize.js
cell/model/Serialize.js
+1
-1
common/editorscommon.js
common/editorscommon.js
+16
-5
No files found.
cell/api.js
View file @
882ab115
...
...
@@ -972,6 +972,9 @@ var editor;
};
spreadsheet_api
.
prototype
.
openDocumentFromZip
=
function
(
wb
,
url
)
{
var
t
=
this
;
return
new
Promise
(
function
(
resolve
,
reject
)
{
resolve
();
});
return
new
Promise
(
function
(
resolve
,
reject
)
{
var
openXml
=
AscCommon
.
openXml
;
//open cache xlsx instead of documentUrl, to support pivot in xls, ods... and don't send jwt signature
...
...
@@ -986,7 +989,7 @@ var editor;
var
doc
=
new
openXml
.
OpenXmlPackage
();
var
wbPart
=
null
;
var
wbXml
=
null
;
nextPromise
=
require
(
'
jszip
'
)
.
loadAsync
(
data
).
then
(
function
(
zip
)
{
nextPromise
=
JSZip
.
loadAsync
(
data
).
then
(
function
(
zip
)
{
return
doc
.
openFromZip
(
zip
);
}).
then
(
function
()
{
wbPart
=
doc
.
getPartByRelationshipType
(
openXml
.
relationshipTypes
.
workbook
);
...
...
@@ -1079,7 +1082,7 @@ var editor;
}).
then
(
resolve
,
reject
);
};
if
(
typeof
url
===
"
string
"
)
{
require
(
'
jsziputils
'
)
.
getBinaryContent
(
url
,
processData
);
JSZipUtils
.
getBinaryContent
(
url
,
processData
);
}
else
{
processData
(
undefined
,
url
);
}
...
...
cell/model/Serialize.js
View file @
882ab115
This diff is collapsed.
Click to expand it.
common/editorscommon.js
View file @
882ab115
...
...
@@ -51,7 +51,7 @@
var
c_oAscFileType
=
Asc
.
c_oAscFileType
;
if
(
typeof
String
.
prototype
.
startsWith
!=
'
function
'
)
if
(
typeof
String
.
prototype
.
startsWith
!=
=
'
function
'
)
{
String
.
prototype
.
startsWith
=
function
(
str
)
{
...
...
@@ -132,9 +132,20 @@
return
false
;
};
if
(
typeof
require
===
"
function
"
&&
!
window
[
"
XRegExp
"
]
)
if
(
typeof
require
===
'
function
'
)
{
window
[
"
XRegExp
"
]
=
require
(
"
xregexp
"
);
if
(
!
window
[
'
XRegExp
'
])
{
window
[
'
XRegExp
'
]
=
require
(
'
xregexp
'
);
}
if
(
!
window
[
'
JSZipUtils
'
])
{
window
[
'
JSZipUtils
'
]
=
require
(
'
jsziputils
'
);
}
if
(
!
window
[
'
JSZip
'
])
{
window
[
'
JSZip
'
]
=
require
(
'
jszip
'
);
}
}
var
oZipImages
=
null
;
...
...
@@ -427,7 +438,7 @@
if
(
changesUrl
)
{
oZipImages
=
{};
require
(
'
jsziputils
'
)
.
getBinaryContent
(
changesUrl
,
function
(
err
,
data
)
JSZipUtils
.
getBinaryContent
(
changesUrl
,
function
(
err
,
data
)
{
if
(
err
)
{
...
...
@@ -438,7 +449,7 @@
}
oResult
.
changes
=
[];
require
(
'
jszip
'
)
.
loadAsync
(
data
).
then
(
function
(
zipChanges
)
JSZip
.
loadAsync
(
data
).
then
(
function
(
zipChanges
)
{
var
relativePaths
=
[];
var
promises
=
[];
...
...
Boris Kocherov
@bk
mentioned in commit
842b1da0
·
Oct 06, 2017
mentioned in commit
842b1da0
mentioned in commit 842b1da07026ea4cd0552130c1fa2635fe5679c3
Toggle commit list
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