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
9adcde7d
Commit
9adcde7d
authored
Sep 15, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
desktop 5.0
parent
f90839ab
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
78 additions
and
15 deletions
+78
-15
cell/Local/api.js
cell/Local/api.js
+5
-4
common/Local/common.js
common/Local/common.js
+38
-0
common/apiBase.js
common/apiBase.js
+7
-0
slide/Local/api.js
slide/Local/api.js
+6
-5
word/Local/api.js
word/Local/api.js
+21
-6
word/api.js
word/api.js
+1
-0
No files found.
cell/Local/api.js
View file @
9adcde7d
...
...
@@ -60,7 +60,7 @@ var c_oAscError = Asc.c_oAscError;
window
[
"
AscDesktopEditor
"
][
"
LocalStartOpen
"
]();
};
asc
[
'
spreadsheet_api
'
].
prototype
.
_OfflineAppDocumentEndLoad
=
function
(
_data
)
asc
[
'
spreadsheet_api
'
].
prototype
.
_OfflineAppDocumentEndLoad
=
function
(
_data
,
_len
)
{
AscCommon
.
g_oIdCounter
.
m_sUserId
=
window
[
"
AscDesktopEditor
"
][
"
CheckUserId
"
]();
if
(
_data
==
""
)
...
...
@@ -69,7 +69,8 @@ var c_oAscError = Asc.c_oAscError;
return
;
}
this
.
openDocument
(
_data
);
var
_binary
=
getBinaryArray
(
_data
,
_len
);
this
.
openDocument
(
_binary
);
AscCommon
.
History
.
UserSaveMode
=
true
;
DesktopOfflineUpdateLocalName
(
this
);
...
...
@@ -137,7 +138,7 @@ window["Asc"]['spreadsheet_api'].prototype.asc_setAdvancedOptions = function(idO
};
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
[
"
asc_setAdvancedOptions
"
]
=
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
.
asc_setAdvancedOptions
;
window
[
"
DesktopOfflineAppDocumentEndLoad
"
]
=
function
(
_url
,
_data
)
window
[
"
DesktopOfflineAppDocumentEndLoad
"
]
=
function
(
_url
,
_data
,
_len
)
{
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
_url
;
if
(
AscCommon
.
g_oDocumentUrls
.
documentUrl
.
indexOf
(
"
file:
"
)
!=
0
)
...
...
@@ -147,7 +148,7 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data)
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
file://
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
}
window
[
"
Asc
"
][
"
editor
"
].
_OfflineAppDocumentEndLoad
(
_data
);
window
[
"
Asc
"
][
"
editor
"
].
_OfflineAppDocumentEndLoad
(
_data
,
_len
);
};
/////////////////////////////////////////////////////////
...
...
common/Local/common.js
View file @
9adcde7d
...
...
@@ -388,6 +388,44 @@ window["DesktopAfterOpen"] = function(_api)
]);
};
function
getBinaryArray
(
_data
,
_len
)
{
var
_array
=
new
Uint8Array
(
_len
);
var
_index
=
0
;
var
_written
=
0
;
var
_data_len
=
_data
.
length
;
while
(
_index
<
_data_len
)
{
var
dwCurr
=
0
;
var
i
;
var
nBits
=
0
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
_index
>=
_data_len
)
break
;
var
nCh
=
DecodeBase64Char
(
_data
.
charCodeAt
(
_index
++
));
if
(
nCh
==
-
1
)
{
i
--
;
continue
;
}
dwCurr
<<=
6
;
dwCurr
|=
nCh
;
nBits
+=
6
;
}
dwCurr
<<=
24
-
nBits
;
for
(
i
=
0
;
i
<
nBits
/
8
;
i
++
)
{
_array
[
_written
++
]
=
((
dwCurr
&
0x00ff0000
)
>>>
16
);
dwCurr
<<=
8
;
}
}
return
_array
;
}
// меняем среду
//AscBrowser.isSafari = false;
//AscBrowser.isSafariMacOs = false;
...
...
common/apiBase.js
View file @
9adcde7d
...
...
@@ -1489,6 +1489,13 @@
return
this
.
signatures
;
};
baseEditorsApi
.
prototype
.
asc_isSignaturesSupport
=
function
()
{
if
(
window
[
"
AscDesktopEditor
"
]
&&
window
[
"
AscDesktopEditor
"
][
"
IsSignaturesSupport
"
])
return
window
[
"
AscDesktopEditor
"
][
"
IsSignaturesSupport
"
]();
return
false
;
};
baseEditorsApi
.
prototype
.
asc_getSignatureImage
=
function
(
sGuid
)
{
var
count
=
this
.
signatures
.
length
;
...
...
slide/Local/api.js
View file @
9adcde7d
...
...
@@ -49,7 +49,7 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentStartLoad = function()
AscCommon
.
History
.
UserSaveMode
=
true
;
window
[
"
AscDesktopEditor
"
][
"
LocalStartOpen
"
]();
};
Asc
[
'
asc_docs_api
'
].
prototype
.
_OfflineAppDocumentEndLoad
=
function
(
_url
,
_data
)
Asc
[
'
asc_docs_api
'
].
prototype
.
_OfflineAppDocumentEndLoad
=
function
(
_url
,
_data
,
_len
)
{
AscCommon
.
g_oIdCounter
.
m_sUserId
=
window
[
"
AscDesktopEditor
"
][
"
CheckUserId
"
]();
if
(
_data
==
""
)
...
...
@@ -57,15 +57,16 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentEndLoad = function(_url, _data)
this
.
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationOpenError
,
c_oAscError
.
Level
.
Critical
);
return
;
}
this
.
OpenDocument2
(
_url
,
_data
);
var
_binary
=
getBinaryArray
(
_data
,
_len
);
this
.
OpenDocument2
(
_url
,
_binary
);
this
.
WordControl
.
m_oLogicDocument
.
Set_FastCollaborativeEditing
(
false
);
this
.
DocumentOrientation
=
(
null
==
this
.
WordControl
.
m_oLogicDocument
)
?
true
:
!
this
.
WordControl
.
m_oLogicDocument
.
Orientation
;
DesktopOfflineUpdateLocalName
(
this
);
window
[
"
DesktopAfterOpen
"
](
this
);
};
window
[
"
DesktopOfflineAppDocumentEndLoad
"
]
=
function
(
_url
,
_data
)
window
[
"
DesktopOfflineAppDocumentEndLoad
"
]
=
function
(
_url
,
_data
,
_len
)
{
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
_url
;
if
(
AscCommon
.
g_oDocumentUrls
.
documentUrl
.
indexOf
(
"
file:
"
)
!=
0
)
...
...
@@ -75,7 +76,7 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data)
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
file://
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
}
editor
.
_OfflineAppDocumentEndLoad
(
_url
,
_data
);
editor
.
_OfflineAppDocumentEndLoad
(
_url
,
_data
,
_len
);
};
/////////////////////////////////////////////////////////
...
...
word/Local/api.js
View file @
9adcde7d
...
...
@@ -49,7 +49,7 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentStartLoad = function()
AscCommon
.
History
.
UserSaveMode
=
true
;
window
[
"
AscDesktopEditor
"
][
"
LocalStartOpen
"
]();
};
Asc
[
'
asc_docs_api
'
].
prototype
.
_OfflineAppDocumentEndLoad
=
function
(
_url
,
_data
)
Asc
[
'
asc_docs_api
'
].
prototype
.
_OfflineAppDocumentEndLoad
=
function
(
_url
,
_data
,
_len
)
{
AscCommon
.
g_oIdCounter
.
m_sUserId
=
window
[
"
AscDesktopEditor
"
][
"
CheckUserId
"
]();
if
(
_data
==
""
)
...
...
@@ -57,20 +57,35 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentEndLoad = function(_url, _data)
this
.
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationOpenError
,
c_oAscError
.
Level
.
Critical
);
return
;
}
if
(
AscCommon
.
c_oSerFormat
.
Signature
!==
_data
.
substring
(
0
,
AscCommon
.
c_oSerFormat
.
Signature
.
length
))
var
_binary
=
getBinaryArray
(
_data
,
_len
);
var
_sign_len
=
AscCommon
.
c_oSerFormat
.
Signature
.
length
;
var
_signature
=
""
;
if
(
_binary
.
length
>=
_sign_len
)
{
for
(
var
i
=
0
;
i
<
_sign_len
;
i
++
)
{
_signature
+=
String
.
fromCharCode
(
_binary
[
i
]);
}
}
if
(
AscCommon
.
c_oSerFormat
.
Signature
!==
_signature
)
{
this
.
OpenDocument
(
_url
,
_
data
);
this
.
OpenDocument
(
_url
,
_
binary
);
}
else
{
this
.
OpenDocument2
(
_url
,
_
data
);
this
.
OpenDocument2
(
_url
,
_
binary
);
this
.
WordControl
.
m_oLogicDocument
.
Set_FastCollaborativeEditing
(
false
);
}
this
.
WordControl
.
m_oLogicDocument
.
Set_FastCollaborativeEditing
(
false
);
DesktopOfflineUpdateLocalName
(
this
);
window
[
"
DesktopAfterOpen
"
](
this
);
};
window
[
"
DesktopOfflineAppDocumentEndLoad
"
]
=
function
(
_url
,
_data
)
window
[
"
DesktopOfflineAppDocumentEndLoad
"
]
=
function
(
_url
,
_data
,
_len
)
{
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
_url
;
if
(
AscCommon
.
g_oDocumentUrls
.
documentUrl
.
indexOf
(
"
file:
"
)
!=
0
)
...
...
@@ -80,7 +95,7 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data)
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
file://
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
}
editor
.
_OfflineAppDocumentEndLoad
(
_url
,
_data
);
editor
.
_OfflineAppDocumentEndLoad
(
_url
,
_data
,
_len
);
};
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_setAdvancedOptions
=
function
(
idOption
,
option
)
...
...
word/api.js
View file @
9adcde7d
...
...
@@ -8807,6 +8807,7 @@ background-repeat: no-repeat;\
asc_docs_api
.
prototype
[
"
asc_SelectCertificate
"
]
=
asc_docs_api
.
prototype
.
asc_SelectCertificate
;
asc_docs_api
.
prototype
[
"
asc_GetDefaultCertificate
"
]
=
asc_docs_api
.
prototype
.
asc_GetDefaultCertificate
;
asc_docs_api
.
prototype
[
"
asc_getSignatures
"
]
=
asc_docs_api
.
prototype
.
asc_getSignatures
;
asc_docs_api
.
prototype
[
"
asc_isSignaturesSupport
"
]
=
asc_docs_api
.
prototype
.
asc_isSignaturesSupport
;
CDocInfoProp
.
prototype
[
'
get_PageCount
'
]
=
CDocInfoProp
.
prototype
.
get_PageCount
;
CDocInfoProp
.
prototype
[
'
put_PageCount
'
]
=
CDocInfoProp
.
prototype
.
put_PageCount
;
...
...
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