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
260331cb
Commit
260331cb
authored
Aug 18, 2017
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asc_nativeOpenFile pivot
parent
d2da301d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
cell/api.js
cell/api.js
+14
-10
No files found.
cell/api.js
View file @
260331cb
...
@@ -954,7 +954,7 @@ var editor;
...
@@ -954,7 +954,7 @@ var editor;
}
}
}
}
this
.
wbModel
=
this
.
_openDocument
(
sData
);
this
.
wbModel
=
this
.
_openDocument
(
sData
);
this
.
openDocumentFromZip
(
this
.
wbModel
).
then
(
function
()
{
this
.
openDocumentFromZip
(
this
.
wbModel
,
AscCommon
.
g_oDocumentUrls
.
getUrl
(
'
Editor.xlsx
'
)
).
then
(
function
()
{
t
.
FontLoader
.
LoadDocumentFonts
(
t
.
wbModel
.
generateFontMap2
());
t
.
FontLoader
.
LoadDocumentFonts
(
t
.
wbModel
.
generateFontMap2
());
// Какая-то непонятная заглушка, чтобы не падало в ipad
// Какая-то непонятная заглушка, чтобы не падало в ipad
...
@@ -970,18 +970,16 @@ var editor;
...
@@ -970,18 +970,16 @@ var editor;
t
.
sendEvent
(
'
asc_onError
'
,
c_oAscError
.
ID
.
Unknown
,
c_oAscError
.
Level
.
Critical
);
t
.
sendEvent
(
'
asc_onError
'
,
c_oAscError
.
ID
.
Unknown
,
c_oAscError
.
Level
.
Critical
);
});
});
};
};
spreadsheet_api
.
prototype
.
openDocumentFromZip
=
function
(
wb
)
{
spreadsheet_api
.
prototype
.
openDocumentFromZip
=
function
(
wb
,
url
)
{
var
t
=
this
;
var
t
=
this
;
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
var
openXml
=
AscCommon
.
openXml
;
var
openXml
=
AscCommon
.
openXml
;
//open cache xlsx instead of documentUrl, to support pivot in xls, ods... and don't send jwt signature
//open cache xlsx instead of documentUrl, to support pivot in xls, ods... and don't send jwt signature
var
url
=
AscCommon
.
g_oDocumentUrls
.
getUrl
(
'
Editor.xlsx
'
);
if
(
t
.
isChartEditor
&&
url
)
{
if
(
t
.
isChartEditor
&&
url
)
{
resolve
();
resolve
();
return
;
return
;
}
}
var
processData
=
function
(
err
,
data
)
{
require
(
'
jsziputils
'
).
getBinaryContent
(
url
,
function
(
err
,
data
)
{
if
(
err
)
{
if
(
err
)
{
reject
(
err
);
// or handle err
reject
(
err
);
// or handle err
}
else
{
}
else
{
...
@@ -1072,7 +1070,12 @@ var editor;
...
@@ -1072,7 +1070,12 @@ var editor;
return
Asc
.
ReadDefTableStyles
(
wb
);
return
Asc
.
ReadDefTableStyles
(
wb
);
}).
then
(
resolve
,
reject
);
}).
then
(
resolve
,
reject
);
}
}
});
};
if
(
typeof
url
===
"
string
"
)
{
require
(
'
jsziputils
'
).
getBinaryContent
(
url
,
processData
);
}
else
{
processData
(
undefined
,
url
);
}
});
});
};
};
...
@@ -3289,7 +3292,7 @@ var editor;
...
@@ -3289,7 +3292,7 @@ var editor;
}
}
};
};
spreadsheet_api
.
prototype
.
asc_nativeOpenFile
=
function
(
base64File
,
version
,
isUser
)
{
spreadsheet_api
.
prototype
.
asc_nativeOpenFile
=
function
(
base64File
,
version
,
isUser
,
xlsxFile
)
{
asc
[
"
editor
"
]
=
this
;
asc
[
"
editor
"
]
=
this
;
this
.
SpellCheckUrl
=
''
;
this
.
SpellCheckUrl
=
''
;
...
@@ -3310,9 +3313,10 @@ var editor;
...
@@ -3310,9 +3313,10 @@ var editor;
}
}
oBinaryFileReader
.
Read
(
base64File
,
this
.
wbModel
);
oBinaryFileReader
.
Read
(
base64File
,
this
.
wbModel
);
g_oIdCounter
.
Set_Load
(
false
);
g_oIdCounter
.
Set_Load
(
false
);
this
.
openDocumentFromZip
(
this
.
wbModel
,
xlsxFile
).
then
(
function
()
{
this
.
_coAuthoringInit
();
this
.
_coAuthoringInit
();
this
.
wb
=
new
AscCommonExcel
.
WorkbookView
(
this
.
wbModel
,
this
.
controller
,
this
.
handlers
,
window
[
"
_null_object
"
],
window
[
"
_null_object
"
],
this
,
this
.
collaborativeEditing
,
this
.
fontRenderingMode
);
this
.
wb
=
new
AscCommonExcel
.
WorkbookView
(
this
.
wbModel
,
this
.
controller
,
this
.
handlers
,
window
[
"
_null_object
"
],
window
[
"
_null_object
"
],
this
,
this
.
collaborativeEditing
,
this
.
fontRenderingMode
);
});
};
};
spreadsheet_api
.
prototype
.
asc_nativeCalculateFile
=
function
()
{
spreadsheet_api
.
prototype
.
asc_nativeCalculateFile
=
function
()
{
...
...
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