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
c5b52c29
Commit
c5b52c29
authored
Nov 13, 2017
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gadget mode changes
parent
c95c52d8
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
385 additions
and
786 deletions
+385
-786
cell/Local/api.js
cell/Local/api.js
+61
-149
cell/api.js
cell/api.js
+1
-0
common/Drawings/Externals.js
common/Drawings/Externals.js
+2
-10
common/GlobalLoaders.js
common/GlobalLoaders.js
+1
-1
common/Local/common.js
common/Local/common.js
+191
-400
common/editorscommon.js
common/editorscommon.js
+53
-1
common/externs/global.js
common/externs/global.js
+17
-0
slide/Local/api.js
slide/Local/api.js
+28
-101
slide/api.js
slide/api.js
+1
-0
word/Local/api.js
word/Local/api.js
+29
-124
word/api.js
word/api.js
+1
-0
No files found.
cell/Local/api.js
View file @
c5b52c29
...
@@ -53,92 +53,67 @@ var c_oAscError = Asc.c_oAscError;
...
@@ -53,92 +53,67 @@ var c_oAscError = Asc.c_oAscError;
{
{
this
.
asc_registerCallback
(
'
asc_onDocumentContentReady
'
,
function
(){
this
.
asc_registerCallback
(
'
asc_onDocumentContentReady
'
,
function
(){
DesktopOfflineUpdateLocalName
(
window
[
"
Asc
"
][
"
editor
"
]);
DesktopOfflineUpdateLocalName
(
window
[
"
Asc
"
][
"
editor
"
]);
setTimeout
(
function
(){
window
[
"
UpdateInstallPlugins
"
]();},
10
);
});
});
return
this
.
jio_open
();
window
[
"
AscDesktopEditor
"
][
"
LocalStartOpen
"
]();
};
};
asc
[
'
spreadsheet_api
'
].
prototype
.
_OfflineAppDocumentEndLoad
=
function
(
_
data
,
_len
)
asc
[
'
spreadsheet_api
'
].
prototype
.
_OfflineAppDocumentEndLoad
=
function
(
_
url
,
_data
)
{
{
AscCommon
.
g_oIdCounter
.
m_sUserId
=
window
[
"
AscDesktopEditor
"
][
"
CheckUserId
"
]();
//
AscCommon.g_oIdCounter.m_sUserId = window["AscDesktopEditor"]["CheckUserId"]();
if
(
_data
==
""
)
if
(
_data
==
""
)
{
{
this
.
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
Convertation
Open
Error
,
c_oAscError
.
Level
.
Critical
);
this
.
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationError
,
c_oAscError
.
Level
.
Critical
);
return
;
return
;
}
}
var
_binary
=
getBinaryArray
(
_data
,
_len
);
this
.
openDocument
(
_data
);
this
.
openDocument
(
_binary
);
AscCommon
.
History
.
UserSaveMode
=
true
;
AscCommon
.
History
.
UserSaveMode
=
true
;
DesktopOfflineUpdateLocalName
(
this
);
DesktopOfflineUpdateLocalName
(
this
);
window
[
"
DesktopAfterOpen
"
](
this
);
this
.
onUpdateDocumentModified
(
AscCommon
.
History
.
Is_Modified
());
this
.
onUpdateDocumentModified
(
AscCommon
.
History
.
Have_Changes
());
};
};
asc
[
'
spreadsheet_api
'
].
prototype
.
_onNeedParams
=
function
(
data
,
opt_isPassword
)
asc
[
'
spreadsheet_api
'
].
prototype
.
_onNeedParams
=
function
(
data
)
{
var
options
;
if
(
opt_isPassword
){
options
=
new
AscCommon
.
asc_CAdvancedOptions
(
Asc
.
c_oAscAdvancedOptionsID
.
DRM
);
}
else
{
var
cp
=
JSON
.
parse
(
"
{
\"
codepage
\"
:46,
\"
delimiter
\"
:1}
"
);
cp
[
'
encodings
'
]
=
AscCommon
.
getEncodingParams
();
options
=
new
AscCommon
.
asc_CAdvancedOptions
(
Asc
.
c_oAscAdvancedOptionsID
.
CSV
,
cp
);
}
this
.
handlers
.
trigger
(
"
asc_onAdvancedOptions
"
,
options
,
AscCommon
.
c_oAscAdvancedOptionsAction
.
Open
);
};
asc
[
'
spreadsheet_api
'
].
prototype
.
asc_addImageDrawingObject
=
function
(
url
)
{
{
var
_url
=
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrl
"
](
url
);
var
cp
=
JSON
.
parse
(
"
{
\"
codepage
\"
:46,
\"
delimiter
\"
:1}
"
);
cp
[
'
encodings
'
]
=
AscCommon
.
getEncodingParams
();
var
ws
=
this
.
wb
.
getWorksheet
();
this
.
handlers
.
trigger
(
"
asc_onAdvancedOptions
"
,
new
AscCommon
.
asc_CAdvancedOptions
(
Asc
.
c_oAscAdvancedOptionsID
.
CSV
,
cp
),
AscCommon
.
c_oAscAdvancedOptionsAction
.
Open
);
if
(
ws
)
{
var
_url
=
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrl
"
](
url
);
ws
.
objectRender
.
addImageDrawingObject
([
AscCommon
.
g_oDocumentUrls
.
getImageUrl
(
_url
)],
null
);
}
};
};
// asc['spreadsheet_api'].prototype.asc_addImageDrawingObject = function(url)
// {
// var _url = window["AscDesktopEditor"]["LocalFileGetImageUrl"](url);
//
// var ws = this.wb.getWorksheet();
// if (ws)
// {
// var _url = window["AscDesktopEditor"]["LocalFileGetImageUrl"](url);
// ws.objectRender.addImageDrawingObject([AscCommon.g_oDocumentUrls.getImageUrl(_url)], null);
// }
// };
asc
[
'
spreadsheet_api
'
].
prototype
.
asc_showImageFileDialog
=
function
()
asc
[
'
spreadsheet_api
'
].
prototype
.
asc_showImageFileDialog
=
function
()
{
{
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrlFromOpenFileDialog
"
]();
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrlFromOpenFileDialog
"
]();
};
};
asc
[
'
spreadsheet_api
'
].
prototype
.
asc_addImage
=
function
()
//
asc['spreadsheet_api'].prototype.asc_addImage = function()
{
//
{
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrlFromOpenFileDialog
"
]();
//
window["AscDesktopEditor"]["LocalFileGetImageUrlFromOpenFileDialog"]();
};
//
};
})(
jQuery
,
window
);
})(
jQuery
,
window
);
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
.
asc_setAdvancedOptions
=
function
(
idOption
,
option
)
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
.
asc_setAdvancedOptions
=
function
(
idOption
,
option
)
{
{
if
(
window
[
"
Asc
"
].
c_oAscAdvancedOptionsID
.
CSV
===
idOption
)
{
window
[
"
AscDesktopEditor
"
][
"
SetAdvancedOptions
"
](
""
+
option
.
asc_getCodePage
(),
""
+
option
.
asc_getDelimiter
());
var
delimiter
=
option
.
asc_getDelimiter
();
var
delimiterChar
=
option
.
asc_getDelimiterChar
();
var
_param
=
""
;
_param
+=
(
"
<m_nCsvTxtEncoding>
"
+
option
.
asc_getCodePage
()
+
"
</m_nCsvTxtEncoding>
"
);
if
(
null
!=
delimiter
)
{
_param
+=
(
"
<m_nCsvDelimiter>
"
+
delimiter
+
"
</m_nCsvDelimiter>
"
);
}
if
(
null
!=
delimiterChar
)
{
_param
+=
(
"
<m_nCsvDelimiterChar>
"
+
delimiterChar
+
"
</m_nCsvDelimiterChar>
"
);
}
window
[
"
AscDesktopEditor
"
][
"
SetAdvancedOptions
"
](
_param
);
}
else
if
(
window
[
"
Asc
"
].
c_oAscAdvancedOptionsID
.
DRM
===
idOption
)
{
var
_param
=
""
;
_param
+=
(
"
<m_sPassword>
"
+
AscCommon
.
CopyPasteCorrectString
(
option
.
asc_getPassword
())
+
"
</m_sPassword>
"
);
window
[
"
AscDesktopEditor
"
][
"
SetAdvancedOptions
"
](
_param
);
}
};
};
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
[
"
asc_setAdvancedOptions
"
]
=
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
.
asc_setAdvancedOptions
;
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
[
"
asc_setAdvancedOptions
"
]
=
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
.
asc_setAdvancedOptions
;
window
[
"
DesktopOfflineAppDocumentEndLoad
"
]
=
function
(
_url
,
_data
,
_len
)
window
[
"
asc_initAdvancedOptions
"
]
=
function
()
{
window
[
"
Asc
"
][
"
editor
"
].
_onNeedParams
(
undefined
);
};
window
[
"
DesktopOfflineAppDocumentEndLoad
"
]
=
function
(
_url
,
_data
)
{
{
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
_url
;
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
_url
;
if
(
AscCommon
.
g_oDocumentUrls
.
documentUrl
.
indexOf
(
"
file:
"
)
!=
0
)
if
(
AscCommon
.
g_oDocumentUrls
.
documentUrl
.
indexOf
(
"
file:
"
)
!=
0
)
...
@@ -147,8 +122,8 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data, _len)
...
@@ -147,8 +122,8 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data, _len)
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
/
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
/
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
file://
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
file://
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
}
}
window
[
"
Asc
"
][
"
editor
"
].
_OfflineAppDocumentEndLoad
(
_data
,
_len
);
window
[
"
Asc
"
][
"
editor
"
].
_OfflineAppDocumentEndLoad
(
_data
);
};
};
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
...
@@ -156,9 +131,9 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data, _len)
...
@@ -156,9 +131,9 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data, _len)
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
AscCommon
.
CHistory
.
prototype
.
Reset_SavedIndex
=
function
(
IsUserSave
)
AscCommon
.
CHistory
.
prototype
.
Reset_SavedIndex
=
function
(
IsUserSave
)
{
{
this
.
SavedIndex
=
(
null
===
this
.
SavedIndex
&&
-
1
===
this
.
Index
?
null
:
this
.
Index
);
if
(
true
===
this
.
Is_UserSaveMode
())
if
(
true
===
this
.
Is_UserSaveMode
())
{
{
this
.
SavedIndex
=
this
.
Index
;
if
(
true
===
IsUserSave
)
if
(
true
===
IsUserSave
)
{
{
this
.
UserSavedIndex
=
this
.
Index
;
this
.
UserSavedIndex
=
this
.
Index
;
...
@@ -167,14 +142,15 @@ AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave)
...
@@ -167,14 +142,15 @@ AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave)
}
}
else
else
{
{
this
.
SavedIndex
=
this
.
Index
;
this
.
ForceSave
=
false
;
this
.
ForceSave
=
false
;
}
}
};
};
AscCommon
.
CHistory
.
prototype
.
Have_Changes
=
function
(
IsNotUserSave
,
IsNoSavedNoModifyed
)
AscCommon
.
CHistory
.
prototype
.
Is_Modified
=
function
(
IsNotUserSave
,
IsNoSavedNoModifyed
)
{
{
var
checkIndex
=
(
this
.
Is_UserSaveMode
()
&&
!
IsNotUserSave
)
?
this
.
UserSavedIndex
:
this
.
SavedIndex
;
var
checkIndex
=
(
this
.
Is_UserSaveMode
()
&&
!
IsNotUserSave
)
?
this
.
UserSavedIndex
:
this
.
SavedIndex
;
if
(
-
1
===
this
.
Index
&&
null
===
checkIndex
&&
false
===
this
.
ForceSave
)
if
(
-
1
===
this
.
Index
&&
null
===
checkIndex
&&
false
===
this
.
ForceSave
)
{
{
if
(
window
[
"
AscDesktopEditor
"
])
if
(
window
[
"
AscDesktopEditor
"
])
{
{
...
@@ -187,10 +163,10 @@ AscCommon.CHistory.prototype.Have_Changes = function(IsNotUserSave, IsNoSavedNoM
...
@@ -187,10 +163,10 @@ AscCommon.CHistory.prototype.Have_Changes = function(IsNotUserSave, IsNoSavedNoM
}
}
return
(
this
.
Index
!=
checkIndex
||
true
===
this
.
ForceSave
);
return
(
this
.
Index
!=
checkIndex
||
true
===
this
.
ForceSave
);
};
};
window
[
"
DesktopOfflineAppDocumentApplyChanges
"
]
=
function
(
_changes
)
window
[
"
DesktopOfflineAppDocumentApplyChanges
"
]
=
function
(
_changes
)
{
{
for
(
var
i
=
0
,
l
=
_changes
.
length
;
i
<
l
;
++
i
)
for
(
var
i
=
0
,
l
=
_changes
.
length
;
i
<
l
;
++
i
)
{
{
window
[
"
Asc
"
][
"
editor
"
].
CoAuthoringApi
.
onSaveChanges
(
_changes
[
i
],
null
,
true
);
window
[
"
Asc
"
][
"
editor
"
].
CoAuthoringApi
.
onSaveChanges
(
_changes
[
i
],
null
,
true
);
}
}
...
@@ -199,47 +175,8 @@ window["DesktopOfflineAppDocumentApplyChanges"] = function(_changes)
...
@@ -199,47 +175,8 @@ window["DesktopOfflineAppDocumentApplyChanges"] = function(_changes)
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
//////////////// SAVE //////////////////////
//////////////// SAVE //////////////////////
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
.
onUpdateDocumentModified
=
function
(
bIsModified
)
{
// Обновляем только после окончания сохранения
if
(
this
.
canSave
)
{
this
.
handlers
.
trigger
(
"
asc_onDocumentModifiedChanged
"
,
bIsModified
);
this
.
_onUpdateDocumentCanSave
();
if
(
undefined
!==
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
onDocumentModifiedChanged
"
](
AscCommon
.
History
?
AscCommon
.
History
.
Have_Changes
(
undefined
,
true
)
:
bValue
);
}
}
};
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
.
asc_Save
=
function
(
isNoUserSave
,
isSaveAs
)
{
if
(
this
.
isChartEditor
||
AscCommon
.
c_oAscAdvancedOptionsAction
.
None
!==
this
.
advancedOptionsAction
)
return
;
var
t
=
this
;
if
(
true
!==
isNoUserSave
)
this
.
IsUserSave
=
true
;
if
(
this
.
IsUserSave
)
{
this
.
LastUserSavedIndex
=
AscCommon
.
History
.
UserSavedIndex
;
}
if
(
true
===
this
.
canSave
&&
!
this
.
isLongAction
())
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
.
asc_DownloadAs
=
function
(
typeFile
,
bIsDownloadEvent
)
{
var
_isNaturalSave
=
this
.
IsUserSave
;
this
.
canSave
=
false
;
this
.
CoAuthoringApi
.
askSaveChanges
(
function
(
e
){
t
.
onSaveCallback
(
e
);});
if
(
this
.
CoAuthoringApi
.
onUnSaveLock
)
this
.
CoAuthoringApi
.
onUnSaveLock
();
if
(
_isNaturalSave
===
true
)
window
[
"
DesktopOfflineAppDocumentStartSave
"
](
isSaveAs
);
}
};
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
.
asc_DownloadAs
=
function
(
typeFile
,
bIsDownloadEvent
)
{
{
this
.
asc_Save
(
false
,
true
);
this
.
asc_Save
(
false
,
true
);
};
};
...
@@ -249,56 +186,31 @@ window["Asc"]['spreadsheet_api'].prototype.asc_isOffline = function()
...
@@ -249,56 +186,31 @@ window["Asc"]['spreadsheet_api'].prototype.asc_isOffline = function()
return
true
;
return
true
;
};
};
window
[
"
DesktopOfflineAppDocumentStartSave
"
]
=
function
(
isSaveAs
,
password
,
isForce
)
window
[
"
DesktopOfflineAppDocumentStartSave
"
]
=
function
(
isSaveAs
)
{
{
window
.
doadssIsSaveAs
=
isSaveAs
;
if
(
true
!==
isForce
&&
window
.
g_asc_plugins
&&
window
.
g_asc_plugins
.
isRunned
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
))
{
window
.
g_asc_plugins
.
init
({
"
type
"
:
"
generatePassword
"
});
return
;
}
window
[
"
Asc
"
][
"
editor
"
].
sync_StartAction
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
Asc
.
c_oAscAsyncAction
.
Save
);
window
[
"
Asc
"
][
"
editor
"
].
sync_StartAction
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
Asc
.
c_oAscAsyncAction
.
Save
);
var
_param
=
""
;
var
_param
=
""
;
if
(
isSaveAs
===
true
)
if
(
isSaveAs
===
true
)
_param
+=
"
saveas=true;
"
;
_param
+=
"
saveas=true;
"
;
if
(
AscCommon
.
AscBrowser
.
isRetina
)
if
(
AscCommon
.
AscBrowser
.
isRetina
)
_param
+=
"
retina=true;
"
;
_param
+=
"
retina=true;
"
;
window
[
"
AscDesktopEditor
"
][
"
LocalFileSave
"
](
_param
,
password
);
window
[
"
AscDesktopEditor
"
][
"
LocalFileSave
"
](
_param
);
};
};
window
[
"
DesktopOfflineAppDocumentEndSave
"
]
=
function
(
error
,
hash
,
password
)
window
[
"
DesktopOfflineAppDocumentEndSave
"
]
=
function
(
error
)
{
{
window
[
"
Asc
"
][
"
editor
"
].
sync_EndAction
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
Asc
.
c_oAscAsyncAction
.
Save
);
window
[
"
Asc
"
][
"
editor
"
].
sync_EndAction
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
Asc
.
c_oAscAsyncAction
.
Save
);
if
(
0
==
error
)
if
(
0
==
error
)
DesktopOfflineUpdateLocalName
(
window
[
"
Asc
"
][
"
editor
"
]);
DesktopOfflineUpdateLocalName
(
window
[
"
Asc
"
][
"
editor
"
]);
else
else
AscCommon
.
History
.
UserSavedIndex
=
window
[
"
Asc
"
][
"
editor
"
].
LastUserSavedIndex
;
AscCommon
.
History
.
UserSavedIndex
=
window
[
"
Asc
"
][
"
editor
"
].
LastUserSavedIndex
;
window
[
"
Asc
"
][
"
editor
"
].
onUpdateDocumentModified
(
AscCommon
.
History
.
Have_Changes
());
window
[
"
Asc
"
][
"
editor
"
].
LastUserSavedIndex
=
undefined
;
if
(
2
==
error
)
window
[
"
Asc
"
][
"
editor
"
].
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationSaveError
,
c_oAscError
.
Level
.
NoCritical
);
if
(
0
==
error
)
window
[
"
Asc
"
][
"
editor
"
].
onUpdateDocumentModified
(
AscCommon
.
History
.
Is_Modified
());
{
window
[
"
Asc
"
][
"
editor
"
].
LastUserSavedIndex
=
undefined
;
if
(
window
.
SaveQuestionObjectBeforeSign
)
{
var
_obj
=
window
.
SaveQuestionObjectBeforeSign
;
editor
.
sendEvent
(
"
asc_onSignatureClick
"
,
_obj
.
guid
,
_obj
.
width
,
_obj
.
height
);
window
.
SaveQuestionObjectBeforeSign
=
null
;
}
}
if
(
hash
!==
null
&&
hash
!==
undefined
&&
hash
!=
""
)
if
(
2
==
error
)
{
window
[
"
Asc
"
][
"
editor
"
].
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationError
,
c_oAscError
.
Level
.
NoCritical
);
if
(
window
.
g_asc_plugins
&&
window
.
g_asc_plugins
.
isRunned
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
))
{
window
.
g_asc_plugins
.
init
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
,
{
"
type
"
:
"
setPasswordByFile
"
,
"
hash
"
:
hash
,
"
password
"
:
password
});
}
}
};
};
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
[
"
asc_addImageDrawingObject
"
]
=
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
.
asc_addImageDrawingObject
;
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
[
"
asc_addImageDrawingObject
"
]
=
window
[
"
Asc
"
][
'
spreadsheet_api
'
].
prototype
.
asc_addImageDrawingObject
;
...
@@ -312,20 +224,20 @@ window["DesktopOfflineAppDocumentAddImageEnd"] = function(url)
...
@@ -312,20 +224,20 @@ window["DesktopOfflineAppDocumentAddImageEnd"] = function(url)
{
{
if
(
url
==
""
)
if
(
url
==
""
)
return
;
return
;
var
ws
=
window
[
"
Asc
"
][
"
editor
"
].
wb
.
getWorksheet
();
var
ws
=
window
[
"
Asc
"
][
"
editor
"
].
wb
.
getWorksheet
();
if
(
ws
)
if
(
ws
)
{
{
var
_url
=
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrl
"
](
url
);
var
_url
=
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrl
"
](
url
);
ws
.
objectRender
.
addImageDrawingObject
([
AscCommon
.
g_oDocumentUrls
.
getImageUrl
(
_url
)]
,
null
);
ws
.
objectRender
.
addImageDrawingObject
(
AscCommon
.
g_oDocumentUrls
.
getImageUrl
(
_url
)
,
null
);
}
}
};
};
window
[
"
on_editor_native_message
"
]
=
function
(
sCommand
,
sParam
)
window
[
"
on_editor_native_message
"
]
=
function
(
sCommand
,
sParam
)
{
{
if
(
!
window
[
"
Asc
"
][
"
editor
"
])
if
(
!
window
[
"
Asc
"
][
"
editor
"
])
return
;
return
;
if
(
sCommand
==
"
save
"
)
if
(
sCommand
==
"
save
"
)
window
[
"
Asc
"
][
"
editor
"
].
asc_Save
();
window
[
"
Asc
"
][
"
editor
"
].
asc_Save
();
else
if
(
sCommand
==
"
saveAs
"
)
else
if
(
sCommand
==
"
saveAs
"
)
...
...
cell/api.js
View file @
c5b52c29
...
@@ -1625,6 +1625,7 @@ var editor;
...
@@ -1625,6 +1625,7 @@ var editor;
// Обновляем состояние возможности сохранения документа
// Обновляем состояние возможности сохранения документа
t
.
onUpdateDocumentModified
(
History
.
Have_Changes
());
t
.
onUpdateDocumentModified
(
History
.
Have_Changes
());
t
.
jio_save
();
if
(
undefined
!==
window
[
"
AscDesktopEditor
"
])
{
if
(
undefined
!==
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
OnSave
"
]();
window
[
"
AscDesktopEditor
"
][
"
OnSave
"
]();
}
}
...
...
common/Drawings/Externals.js
View file @
c5b52c29
...
@@ -424,9 +424,9 @@ function CFontFileLoader(id)
...
@@ -424,9 +424,9 @@ function CFontFileLoader(id)
g_fontNamesEncoder
=
new
ZBase32Encoder
();
g_fontNamesEncoder
=
new
ZBase32Encoder
();
//var _name = this.Id;
//var _name = this.Id;
var
_name
=
g_fontNamesEncoder
.
Encode
(
this
.
Id
)
+
"
.
js
"
;
var
_name
=
g_fontNamesEncoder
.
Encode
(
this
.
Id
)
+
"
.
ttf
"
;
xhr
.
open
(
'
GET
'
,
basePath
+
"
od
ttf/
"
+
_name
,
true
);
// TODO:
xhr
.
open
(
'
GET
'
,
basePath
+
"
ttf/
"
+
_name
,
true
);
// TODO:
if
(
typeof
ArrayBuffer
!==
'
undefined
'
&&
!
window
.
opera
)
if
(
typeof
ArrayBuffer
!==
'
undefined
'
&&
!
window
.
opera
)
xhr
.
responseType
=
'
arraybuffer
'
;
xhr
.
responseType
=
'
arraybuffer
'
;
...
@@ -482,14 +482,6 @@ function CFontFileLoader(id)
...
@@ -482,14 +482,6 @@ function CFontFileLoader(id)
oThis
.
SetStreamIndex
(
__font_data_idx
);
oThis
.
SetStreamIndex
(
__font_data_idx
);
}
}
// decode
var
guidOdttf
=
[
0xA0
,
0x66
,
0xD6
,
0x20
,
0x14
,
0x96
,
0x47
,
0xfa
,
0x95
,
0x69
,
0xB8
,
0x50
,
0xB0
,
0x41
,
0x49
,
0x48
];
var
_stream
=
g_fonts_streams
[
g_fonts_streams
.
length
-
1
];
var
_data
=
_stream
.
data
;
var
_count_decode
=
Math
.
min
(
32
,
_stream
.
size
);
for
(
var
i
=
0
;
i
<
_count_decode
;
++
i
)
_data
[
i
]
^=
guidOdttf
[
i
%
16
];
};
};
xhr
.
send
(
null
);
xhr
.
send
(
null
);
...
...
common/GlobalLoaders.js
View file @
c5b52c29
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
this
.
fonts_streams
=
[];
this
.
fonts_streams
=
[];
// теперь вся информация о всех возможных шрифтах. Они во всех редакторах должны быть одни и те же
// теперь вся информация о всех возможных шрифтах. Они во всех редакторах должны быть одни и те же
this
.
fontFilesPath
=
"
../../../..
/fonts/
"
;
this
.
fontFilesPath
=
"
onlyoffice
/fonts/
"
;
this
.
fontFiles
=
AscFonts
.
g_font_files
;
this
.
fontFiles
=
AscFonts
.
g_font_files
;
this
.
fontInfos
=
AscFonts
.
g_font_infos
;
this
.
fontInfos
=
AscFonts
.
g_font_infos
;
this
.
map_font_index
=
AscFonts
.
g_map_font_index
;
this
.
map_font_index
=
AscFonts
.
g_map_font_index
;
...
...
common/Local/common.js
View file @
c5b52c29
...
@@ -32,65 +32,65 @@
...
@@ -32,65 +32,65 @@
"
use strict
"
;
"
use strict
"
;
///////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////
////////////
//
FONTS ////////////////////////
//////////// FONTS ////////////////////////
///////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////
AscFonts
.
CFontFileLoader
.
prototype
.
LoadFontAsync
=
function
(
basePath
,
_callback
,
isEmbed
)
//
AscFonts.CFontFileLoader.prototype.LoadFontAsync = function(basePath, _callback, isEmbed)
{
//
{
this
.
callback
=
_callback
;
//
this.callback = _callback;
if
(
-
1
!=
this
.
Status
)
//
if (-1 != this.Status)
return
true
;
//
return true;
//
var
oThis
=
this
;
//
var oThis = this;
this
.
Status
=
2
;
//
this.Status = 2;
if
(
window
[
"
AscDesktopEditor
"
]
!==
undefined
&&
!
this
.
CanUseOriginalFormat
)
//
if (window["AscDesktopEditor"] !== undefined && !this.CanUseOriginalFormat)
{
//
{
this
.
callback
=
null
;
// this.callback = null;
window
[
"
AscDesktopEditor
"
][
"
LoadFontBase64
"
](
this
.
Id
);
//
window["AscDesktopEditor"]["LoadFontBase64"](this.Id);
this
.
_callback_font_load
();
//
this._callback_font_load();
return
;
//
return;
}
//
}
//
var
xhr
=
new
XMLHttpRequest
();
//
var xhr = new XMLHttpRequest();
xhr
.
open
(
'
GET
'
,
"
ascdesktop://fonts/
"
+
this
.
Id
,
true
);
//
xhr.open('GET', "ascdesktop://fonts/" + this.Id, true);
xhr
.
responseType
=
'
arraybuffer
'
;
//
xhr.responseType = 'arraybuffer';
//
if
(
xhr
.
overrideMimeType
)
//
if (xhr.overrideMimeType)
xhr
.
overrideMimeType
(
'
text/plain; charset=x-user-defined
'
);
//
xhr.overrideMimeType('text/plain; charset=x-user-defined');
else
//
else
xhr
.
setRequestHeader
(
'
Accept-Charset
'
,
'
x-user-defined
'
);
//
xhr.setRequestHeader('Accept-Charset', 'x-user-defined');
//
xhr
.
onload
=
function
()
//
xhr.onload = function()
{
//
{
if
(
this
.
status
!=
200
)
//
if (this.status != 200)
{
//
{
oThis
.
Status
=
1
;
//
oThis.Status = 1;
return
;
//
return;
}
//
}
//
oThis
.
Status
=
0
;
//
oThis.Status = 0;
//
var
fontStreams
=
AscFonts
.
g_fonts_streams
;
//
var fontStreams = AscFonts.g_fonts_streams;
if
(
this
.
response
)
//
if (this.response)
{
//
{
var
__font_data_idx
=
fontStreams
.
length
;
//
var __font_data_idx = fontStreams.length;
var
_uintData
=
new
Uint8Array
(
this
.
response
);
//
var _uintData = new Uint8Array(this.response);
fontStreams
[
__font_data_idx
]
=
new
AscFonts
.
FT_Stream
(
_uintData
,
_uintData
.
length
);
//
fontStreams[__font_data_idx] = new AscFonts.FT_Stream(_uintData, _uintData.length);
oThis
.
SetStreamIndex
(
__font_data_idx
);
//
oThis.SetStreamIndex(__font_data_idx);
}
//
}
else
//
else
{
//
{
var
__font_data_idx
=
fontStreams
.
length
;
//
var __font_data_idx = fontStreams.length;
fontStreams
[
__font_data_idx
]
=
AscFonts
.
CreateFontData3
(
this
.
responseText
);
//
fontStreams[__font_data_idx] = AscFonts.CreateFontData3(this.responseText);
oThis
.
SetStreamIndex
(
__font_data_idx
);
//
oThis.SetStreamIndex(__font_data_idx);
//
if
(
null
!=
oThis
.
callback
)
//
if (null != oThis.callback)
oThis
.
callback
();
//
oThis.callback();
}
//
}
};
//
};
//
xhr
.
send
(
null
);
//
xhr.send(null);
};
//
};
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
////////////// IMAGES ////////////////////////
////////////// IMAGES ////////////////////////
...
@@ -167,23 +167,23 @@ AscCommon.sendImgUrls = function(api, images, callback)
...
@@ -167,23 +167,23 @@ AscCommon.sendImgUrls = function(api, images, callback)
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
function
DesktopOfflineUpdateLocalName
(
_api
)
function
DesktopOfflineUpdateLocalName
(
_api
)
{
{
var
_name
=
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetSourcePath
"
]();
//
var _name = window["AscDesktopEditor"]["LocalFileGetSourcePath"]();
//
var
_ind1
=
_name
.
lastIndexOf
(
"
\\
"
);
//
var _ind1 = _name.lastIndexOf("\\");
var
_ind2
=
_name
.
lastIndexOf
(
"
/
"
);
//
var _ind2 = _name.lastIndexOf("/");
//
if
(
_ind1
==
-
1
)
//
if (_ind1 == -1)
_ind1
=
1000000
;
//
_ind1 = 1000000;
if
(
_ind2
==
-
1
)
//
if (_ind2 == -1)
_ind2
=
1000000
;
//
_ind2 = 1000000;
//
var
_ind
=
Math
.
min
(
_ind1
,
_ind2
);
//
var _ind = Math.min(_ind1, _ind2);
if
(
_ind
!=
1000000
)
//
if (_ind != 1000000)
_name
=
_name
.
substring
(
_ind
+
1
);
//
_name = _name.substring(_ind + 1);
//
_api
.
documentTitle
=
_name
;
//
_api.documentTitle = _name;
_api
.
sendEvent
(
"
asc_onDocumentName
"
,
_name
);
//
_api.sendEvent("asc_onDocumentName", _name);
window
[
"
AscDesktopEditor
"
][
"
SetDocumentName
"
](
_name
);
//
window["AscDesktopEditor"]["SetDocumentName"](_name);
}
}
AscCommon
.
CDocsCoApi
.
prototype
.
askSaveChanges
=
function
(
callback
)
AscCommon
.
CDocsCoApi
.
prototype
.
askSaveChanges
=
function
(
callback
)
...
@@ -192,343 +192,134 @@ AscCommon.CDocsCoApi.prototype.askSaveChanges = function(callback)
...
@@ -192,343 +192,134 @@ AscCommon.CDocsCoApi.prototype.askSaveChanges = function(callback)
};
};
AscCommon
.
CDocsCoApi
.
prototype
.
saveChanges
=
function
(
arrayChanges
,
deleteIndex
,
excelAdditionalInfo
)
AscCommon
.
CDocsCoApi
.
prototype
.
saveChanges
=
function
(
arrayChanges
,
deleteIndex
,
excelAdditionalInfo
)
{
{
window
[
"
AscDesktopEditor
"
][
"
LocalFileSaveChanges
"
](
arrayChanges
.
join
(
"
\"
,
\"
"
),
deleteIndex
,
arrayChanges
.
length
);
//
window["AscDesktopEditor"]["LocalFileSaveChanges"](arrayChanges.join("\",\""), deleteIndex, arrayChanges.length);
//
this.onUnSaveLock();
this
.
onUnSaveLock
();
};
};
window
[
"
NativeCorrectImageUrlOnCopy
"
]
=
function
(
url
)
//window["NativeCorrectImageUrlOnCopy"] = function(url)
{
//{
AscCommon
.
g_oDocumentUrls
.
getImageUrl
(
url
);
// AscCommon.g_oDocumentUrls.getImageUrl(url);
};
//};
window
[
"
NativeCorrectImageUrlOnPaste
"
]
=
function
(
url
)
//window["NativeCorrectImageUrlOnPaste"] = function(url)
{
//{
return
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrl
"
](
url
);
// return window["AscDesktopEditor"]["LocalFileGetImageUrl"](url);
};
//};
window
[
"
UpdateInstallPlugins
"
]
=
function
()
//window["UpdateInstallPlugins"] = function()
{
//{
var
_plugins
=
JSON
.
parse
(
window
[
"
AscDesktopEditor
"
][
"
GetInstallPlugins
"
]());
// var _plugins = JSON.parse(window["AscDesktopEditor"]["GetInstallPlugins"]());
_plugins
[
"
url
"
]
=
_plugins
[
"
url
"
].
replace
(
"
"
,
"
%20
"
);
// var _editor = window["Asc"]["editor"] ? window["Asc"]["editor"] : window.editor;
// _editor.asc_fireCallback("asc_onPluginsInit", _plugins);
for
(
var
i
=
0
;
i
<
_plugins
[
"
pluginsData
"
].
length
;
i
++
)
//};
{
var
_plugin
=
_plugins
[
"
pluginsData
"
][
i
];
//AscCommon.InitDragAndDrop = function(oHtmlElement, callback) {
_plugin
[
"
baseUrl
"
]
=
_plugins
[
"
url
"
]
+
_plugin
[
"
guid
"
].
substring
(
4
)
+
"
/
"
;
// if ("undefined" != typeof(FileReader) && null != oHtmlElement) {
// oHtmlElement["ondragover"] = function (e) {
var
isSystem
=
false
;
// e.preventDefault();
for
(
var
j
=
0
;
j
<
_plugin
[
"
variations
"
].
length
;
j
++
)
// e.dataTransfer.dropEffect = AscCommon.CanDropFiles(e) ? 'copy' : 'none';
{
// return false;
var
_variation
=
_plugin
[
"
variations
"
][
j
];
// };
if
(
_variation
[
"
initDataType
"
]
==
"
desktop
"
)
// oHtmlElement["ondrop"] = function (e) {
{
// e.preventDefault();
isSystem
=
true
;
//
break
;
// var _files = window["AscDesktopEditor"]["GetDropFiles"]();
}
// for (var i = 0; i < _files.length; i++)
}
// {
// if (window["AscDesktopEditor"]["IsImageFile"](_files[i]))
if
(
isSystem
)
// {
{
// window["DesktopOfflineAppDocumentAddImageEnd"](_files[i]);
_plugins
[
"
pluginsData
"
].
splice
(
i
,
1
);
// break;
--
i
;
// }
}
// }
}
// };
// }
var
_editor
=
window
[
"
Asc
"
][
"
editor
"
]
?
window
[
"
Asc
"
][
"
editor
"
]
:
window
.
editor
;
//};
_editor
.
sendEvent
(
"
asc_onPluginsInit
"
,
_plugins
);
};
window
[
"
UpdateSystemPlugins
"
]
=
function
()
{
var
_plugins
=
JSON
.
parse
(
window
[
"
AscDesktopEditor
"
][
"
GetInstallPlugins
"
]());
_plugins
[
"
url
"
]
=
_plugins
[
"
url
"
].
replace
(
"
"
,
"
%20
"
);
var
_len
=
_plugins
[
"
pluginsData
"
].
length
;
for
(
var
i
=
0
;
i
<
_len
;
i
++
)
_plugins
[
"
pluginsData
"
][
i
][
"
baseUrl
"
]
=
_plugins
[
"
url
"
]
+
_plugins
[
"
pluginsData
"
][
i
][
"
guid
"
].
substring
(
4
)
+
"
/
"
;
var
_editor
=
window
[
"
Asc
"
][
"
editor
"
]
?
window
[
"
Asc
"
][
"
editor
"
]
:
window
.
editor
;
var
_array
=
[];
for
(
var
i
=
0
;
i
<
_len
;
i
++
)
{
var
_plugin
=
_plugins
[
"
pluginsData
"
][
i
];
for
(
var
j
=
0
;
j
<
_plugin
[
"
variations
"
].
length
;
j
++
)
{
var
_variation
=
_plugin
[
"
variations
"
][
j
];
if
(
_variation
[
"
initDataType
"
]
==
"
desktop
"
)
{
_array
.
push
(
_plugin
);
break
;
}
}
}
var
_arraySystem
=
[];
for
(
var
i
=
0
;
i
<
_array
.
length
;
i
++
)
{
var
plugin
=
new
Asc
.
CPlugin
();
plugin
[
"
deserialize
"
](
_array
[
i
]);
_arraySystem
.
push
(
plugin
);
}
window
.
g_asc_plugins
.
registerSystem
(
""
,
_arraySystem
);
window
.
g_asc_plugins
.
runAllSystem
();
};
AscCommon
.
InitDragAndDrop
=
function
(
oHtmlElement
,
callback
)
{
if
(
"
undefined
"
!=
typeof
(
FileReader
)
&&
null
!=
oHtmlElement
)
{
oHtmlElement
[
"
ondragover
"
]
=
function
(
e
)
{
e
.
preventDefault
();
e
.
dataTransfer
.
dropEffect
=
AscCommon
.
CanDropFiles
(
e
)
?
'
copy
'
:
'
none
'
;
return
false
;
};
oHtmlElement
[
"
ondrop
"
]
=
function
(
e
)
{
e
.
preventDefault
();
var
_files
=
window
[
"
AscDesktopEditor
"
][
"
GetDropFiles
"
]();
for
(
var
i
=
0
;
i
<
_files
.
length
;
i
++
)
{
if
(
window
[
"
AscDesktopEditor
"
][
"
IsImageFile
"
](
_files
[
i
]))
{
window
[
"
DesktopOfflineAppDocumentAddImageEnd
"
](
_files
[
i
]);
break
;
}
}
};
}
}
window
[
"
asc_initAdvancedOptions
"
]
=
function
(
_code
,
_file_hash
)
{
var
_editor
=
window
[
"
Asc
"
][
"
editor
"
]
?
window
[
"
Asc
"
][
"
editor
"
]
:
window
.
editor
;
if
((
_code
==
90
||
_code
==
91
)
&&
window
.
g_asc_plugins
&&
window
.
g_asc_plugins
.
isRunned
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
))
{
window
.
g_asc_plugins
.
init
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
,
{
"
type
"
:
"
getPasswordByFile
"
,
"
hash
"
:
_file_hash
});
return
;
}
_editor
.
_onNeedParams
(
undefined
,
(
_code
==
90
||
_code
==
91
)
?
true
:
undefined
);
};
window
[
"
DesktopOfflineAppDocumentSignatures
"
]
=
function
(
_json
)
{
var
_editor
=
window
[
"
Asc
"
][
"
editor
"
]
?
window
[
"
Asc
"
][
"
editor
"
]
:
window
.
editor
;
_editor
.
signatures
=
[];
var
_signatures
=
null
;
try
// меняем среду
{
//AscBrowser.isSafari = false;
_signatures
=
JSON
.
parse
(
_json
);
//AscBrowser.isSafariMacOs = false;
}
//window.USER_AGENT_SAFARI_MACOS = false;
catch
(
err
)
{
return
;
}
if
(
!
_signatures
)
return
;
var
_count
=
_signatures
[
"
count
"
];
var
_data
=
_signatures
[
"
data
"
];
var
_sign
;
var
_add_sign
;
var
_images_loading
=
[];
for
(
var
i
=
0
;
i
<
_count
;
i
++
)
{
_sign
=
_data
[
i
];
_add_sign
=
new
window
[
"
AscCommon
"
].
asc_CSignatureLine
();
_add_sign
.
guid
=
_sign
[
"
guid
"
];
_add_sign
.
valid
=
_sign
[
"
valid
"
];
_add_sign
.
image
=
(
_add_sign
.
valid
==
0
)
?
_sign
[
"
image_valid
"
]
:
_sign
[
"
image_invalid
"
];
_add_sign
.
image
=
"
data:image/png;base64,
"
+
_add_sign
.
image
;
_add_sign
.
signer1
=
_sign
[
"
name
"
];
_add_sign
.
id
=
i
;
_editor
.
signatures
.
push
(
_add_sign
);
_images_loading
.
push
(
_add_sign
.
image
);
}
if
(
!
window
.
FirstSignaturesCall
)
{
_editor
.
asc_registerCallback
(
"
asc_onAddSignature
"
,
function
(
guid
)
{
var
_api
=
window
[
"
Asc
"
][
"
editor
"
]
?
window
[
"
Asc
"
][
"
editor
"
]
:
window
.
editor
;
_api
.
sendEvent
(
"
asc_onUpdateSignatures
"
,
_api
.
asc_getSignatures
(),
_api
.
asc_getRequestSignatures
());
});
_editor
.
asc_registerCallback
(
"
asc_onRemoveSignature
"
,
function
(
guid
)
{
var
_api
=
window
[
"
Asc
"
][
"
editor
"
]
?
window
[
"
Asc
"
][
"
editor
"
]
:
window
.
editor
;
_api
.
sendEvent
(
"
asc_onUpdateSignatures
"
,
_api
.
asc_getSignatures
(),
_api
.
asc_getRequestSignatures
());
AscCommon
.
readBlobAsDataURL
=
function
(
blob
)
{
var
fr
=
new
FileReader
();
return
new
RSVP
.
Promise
(
function
(
resolve
,
reject
,
notify
)
{
fr
.
addEventListener
(
"
load
"
,
function
()
{
resolve
(
fr
.
result
);
});
});
}
fr
.
addEventListener
(
"
error
"
,
reject
);
window
.
FirstSignaturesCall
=
true
;
fr
.
addEventListener
(
"
progress
"
,
notify
);
fr
.
readAsDataURL
(
blob
);
_editor
.
ImageLoader
.
LoadImagesWithCallback
(
_images_loading
,
function
()
{
},
function
()
{
if
(
this
.
WordControl
)
fr
.
abort
();
this
.
WordControl
.
OnRePaintAttack
();
});
},
null
);
_editor
.
sendEvent
(
"
asc_onUpdateSignatures
"
,
_editor
.
asc_getSignatures
(),
_editor
.
asc_getRequestSignatures
());
};
window
[
"
DesktopSaveQuestionReturn
"
]
=
function
(
isNeedSaved
)
{
if
(
isNeedSaved
)
{
var
_editor
=
window
[
"
Asc
"
][
"
editor
"
]
?
window
[
"
Asc
"
][
"
editor
"
]
:
window
.
editor
;
_editor
.
asc_Save
(
false
);
}
};
window
[
"
OnNativeReturnCallback
"
]
=
function
(
name
,
obj
)
{
var
_api
=
window
[
"
Asc
"
][
"
editor
"
]
?
window
[
"
Asc
"
][
"
editor
"
]
:
window
.
editor
;
_api
.
sendEvent
(
name
,
obj
);
};
window
[
"
OnNativeOpenFilenameDialog
"
]
=
function
(
file
)
{
window
.
on_native_open_filename_dialog
(
file
);
delete
window
.
on_native_open_filename_dialog
;
};
};
window
[
"
DesktopAfterOpen
"
]
=
function
(
_api
)
AscCommon
.
downloadUrlAsBlob
=
function
(
url
)
{
{
var
xhr
=
new
XMLHttpRequest
();
_api
.
asc_registerCallback
(
"
asc_onSignatureDblClick
"
,
function
(
guid
,
width
,
height
)
return
new
RSVP
.
Promise
(
function
(
resolve
,
reject
)
{
{
xhr
.
open
(
"
GET
"
,
url
);
var
_length
=
_api
.
signatures
.
length
;
xhr
.
responseType
=
"
blob
"
;
//force the HTTP response, response-type header to be blob
for
(
var
i
=
0
;
i
<
_length
;
i
++
)
xhr
.
onload
=
function
()
{
{
if
(
this
.
status
===
200
)
{
if
(
_api
.
signatures
[
i
].
guid
==
guid
)
resolve
(
xhr
.
response
);
{
}
else
{
window
[
"
AscDesktopEditor
"
][
"
ViewCertificate
"
](
_api
.
signatures
[
i
].
id
);
reject
(
this
.
status
);
return
;
}
}
}
};
xhr
.
onerror
=
reject
;
if
(
!
_api
.
isDocumentModify
)
xhr
.
send
();
{
},
function
()
{
_api
.
sendEvent
(
"
asc_onSignatureClick
"
,
guid
,
width
,
height
);
xhr
.
abort
();
return
;
}
window
.
SaveQuestionObjectBeforeSign
=
{
guid
:
guid
,
width
:
width
,
height
:
height
};
window
[
"
AscDesktopEditor
"
][
"
SaveQuestion
"
]();
});
});
_api
.
sendEvent
(
'
asc_onSpellCheckInit
'
,
[
"
1027
"
,
"
1029
"
,
"
1030
"
,
"
1031
"
,
"
1032
"
,
"
1033
"
,
"
1036
"
,
"
1038
"
,
"
1040
"
,
"
1042
"
,
"
1043
"
,
"
1044
"
,
"
1045
"
,
"
1046
"
,
"
1048
"
,
"
1049
"
,
"
1051
"
,
"
1053
"
,
"
1055
"
,
"
1058
"
,
"
1062
"
,
"
1063
"
,
"
1066
"
,
"
1068
"
,
"
2055
"
,
"
2057
"
,
"
2068
"
,
"
2070
"
,
"
3079
"
,
"
3081
"
,
"
3082
"
]);
};
};
function
getBinaryArray
(
_data
,
_len
)
AscCommon
.
baseEditorsApi
.
prototype
.
jio_open
=
function
()
{
{
var
t
=
this
,
var
_array
=
new
Uint8Array
(
_len
);
g
=
Common
.
Gateway
;
var
_index
=
0
;
return
g
.
jio_getAttachment
(
'
/
'
,
'
body.txt
'
)
var
_written
=
0
;
.
push
(
undefined
,
function
(
error
)
{
if
(
error
[
"
status_code
"
]
===
404
)
{
var
_data_len
=
_data
.
length
;
return
g
.
props
.
value
;
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
;
}
// OnlyPass ----------------------------------
var
_proto
=
Asc
[
'
asc_docs_api
'
]
?
Asc
[
'
asc_docs_api
'
]
:
Asc
[
'
spreadsheet_api
'
];
_proto
.
prototype
[
"
pluginMethod_OnlyPass
"
]
=
function
(
obj
)
{
switch
(
obj
.
type
)
{
case
"
generatePassword
"
:
{
window
[
"
DesktopOfflineAppDocumentStartSave
"
](
window
.
doadssIsSaveAs
,
obj
[
"
password
"
],
true
);
break
;
}
case
"
getPasswordByFile
"
:
{
if
(
""
!=
obj
[
"
password
"
])
{
var
_param
=
(
"
<m_sPassword>
"
+
AscCommon
.
CopyPasteCorrectString
(
obj
[
"
password
"
])
+
"
</m_sPassword>
"
);
window
[
"
AscDesktopEditor
"
][
"
SetAdvancedOptions
"
](
_param
);
}
}
else
throw
error
;
{
})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"
;
break
;
case
"
text
"
:
doc
=
window
.
g_sEmpty_bin
;
break
;
}
}
}
break
;
t
.
_OfflineAppDocumentEndLoad
(
''
,
doc
);
}
})
}
.
push
(
undefined
,
function
(
error
)
{
console
.
log
(
error
);
});
};
};
// -------------------------------------------
// меняем среду
AscCommon
.
baseEditorsApi
.
prototype
.
jio_save
=
function
()
{
//AscBrowser.isSafari = false;
var
t
=
this
,
//AscBrowser.isSafariMacOs = false;
g
=
Common
.
Gateway
,
//window.USER_AGENT_SAFARI_MACOS = false;
result
=
{},
\ No newline at end of file
data
=
t
.
asc_nativeGetFile
();
if
(
g
.
props
.
save_defer
)
{
// if we are run from getContent
result
[
g
.
props
.
key
]
=
data
;
g
.
props
.
save_defer
.
resolve
(
result
);
g
.
props
.
save_defer
=
null
;
}
else
{
// TODO: rewrite to put_attachment
return
g
.
jio_putAttachment
(
'
/
'
,
'
body.txt
'
,
data
)
.
push
(
undefined
,
function
(
error
)
{
console
.
log
(
error
);
});
}
};
\ No newline at end of file
common/editorscommon.js
View file @
c5b52c29
...
@@ -2826,13 +2826,65 @@
...
@@ -2826,13 +2826,65 @@
function
loadSdk
(
sdkName
,
callback
)
function
loadSdk
(
sdkName
,
callback
)
{
{
var
config_file
;
function
loadScriptPromise
(
src
)
{
return
new
RSVP
.
Promise
(
function
(
resolve
,
reject
)
{
var
s
;
s
=
document
.
createElement
(
'
script
'
);
s
.
src
=
src
;
s
.
onload
=
resolve
;
s
.
onerror
=
reject
;
document
.
head
.
appendChild
(
s
);
});
}
if
(
window
[
'
AscNotLoadAllScript
'
])
if
(
window
[
'
AscNotLoadAllScript
'
])
{
{
callback
();
callback
();
}
}
else
else
{
{
loadScript
(
'
./../../../../sdkjs/
'
+
sdkName
+
'
/sdk-all.js
'
,
callback
);
if
(
!
Common
.
Gateway
.
props
.
binary_loader
)
{
switch
(
sdkName
)
{
case
'
word
'
:
config_file
=
"
webword.json
"
;
break
;
case
'
cell
'
:
config_file
=
"
webexcel.json
"
;
break
;
case
'
slide
'
:
config_file
=
"
webpowerpoint.json
"
;
break
;
}
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
jIO
.
util
.
ajax
({
type
:
"
GET
"
,
dataType
:
"
json
"
,
url
:
Common
.
Gateway
.
props
.
base_url
+
"
sdkjs/build/configs/
"
+
config_file
});
})
.
push
(
function
(
response
)
{
var
queue
=
new
RSVP
.
Queue
(),
sdk
=
response
.
target
.
response
.
compile
.
sdk
,
list
=
sdk
.
common
;
list
=
list
.
concat
(
sdk
.
private
);
list
.
concat
(
sdk
.
desktop
.
common
).
forEach
(
function
(
url
)
{
url
=
url
.
replace
(
'
../
'
,
Common
.
Gateway
.
props
.
base_url
+
'
sdkjs/
'
);
queue
.
push
(
function
()
{
return
loadScriptPromise
(
url
);
});
});
return
queue
;
})
.
push
(
callback
);
}
loadScript
(
Common
.
Gateway
.
props
.
base_url
+
'
/sdkjs/
'
+
sdkName
+
'
/sdk-all.js
'
,
callback
);
}
}
}
}
...
...
common/externs/global.js
View file @
c5b52c29
...
@@ -42,6 +42,23 @@ var AscCommon;
...
@@ -42,6 +42,23 @@ var AscCommon;
var
AscCommonWord
;
var
AscCommonWord
;
var
AscCommonExcel
;
var
AscCommonExcel
;
var
AscCommonSlide
;
var
AscCommonSlide
;
var
Common
=
{};
Common
.
Gateway
=
{
props
:
{
value
:
""
,
documentType
:
""
,
binary_loader
:
true
,
base_url
:
""
}
};
/**
* @param {String} doc_id
* @param {String} attach_id
* @return {Object}
*/
Common
.
Gateway
.
jio_getAttachment
=
function
(
doc_id
,
attach_id
)
{};
function
jq
(){}
function
jq
(){}
function
DE
(){}
function
DE
(){}
...
...
slide/Local/api.js
View file @
c5b52c29
...
@@ -43,30 +43,27 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentStartLoad = function()
...
@@ -43,30 +43,27 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentStartLoad = function()
this
.
asc_registerCallback
(
'
asc_onDocumentContentReady
'
,
function
(){
this
.
asc_registerCallback
(
'
asc_onDocumentContentReady
'
,
function
(){
DesktopOfflineUpdateLocalName
(
editor
);
DesktopOfflineUpdateLocalName
(
editor
);
setTimeout
(
function
(){
window
[
"
UpdateInstallPlugins
"
]();},
10
);
//
setTimeout(function(){window["UpdateInstallPlugins"]();}, 10);
});
});
AscCommon
.
History
.
UserSaveMode
=
true
;
AscCommon
.
History
.
UserSaveMode
=
true
;
window
[
"
AscDesktopEditor
"
][
"
LocalStartOpen
"
]
();
return
this
.
jio_open
();
};
};
Asc
[
'
asc_docs_api
'
].
prototype
.
_OfflineAppDocumentEndLoad
=
function
(
_url
,
_
data
,
_len
)
Asc
[
'
asc_docs_api
'
].
prototype
.
_OfflineAppDocumentEndLoad
=
function
(
_url
,
_
binary
)
{
{
AscCommon
.
g_oIdCounter
.
m_sUserId
=
window
[
"
AscDesktopEditor
"
][
"
CheckUserId
"
]();
//
AscCommon.g_oIdCounter.m_sUserId = window["AscDesktopEditor"]["CheckUserId"]();
if
(
_
data
==
""
)
if
(
_
binary
==
""
)
{
{
this
.
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationOpenError
,
c_oAscError
.
Level
.
Critical
);
this
.
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationOpenError
,
c_oAscError
.
Level
.
Critical
);
return
;
return
;
}
}
var
_binary
=
getBinaryArray
(
_data
,
_len
);
this
.
OpenDocument2
(
_url
,
_binary
);
this
.
OpenDocument2
(
_url
,
_binary
);
this
.
WordControl
.
m_oLogicDocument
.
Set_FastCollaborativeEditing
(
false
);
this
.
WordControl
.
m_oLogicDocument
.
Set_FastCollaborativeEditing
(
false
);
this
.
DocumentOrientation
=
(
null
==
this
.
WordControl
.
m_oLogicDocument
)
?
true
:
!
this
.
WordControl
.
m_oLogicDocument
.
Orientation
;
this
.
DocumentOrientation
=
(
null
==
this
.
WordControl
.
m_oLogicDocument
)
?
true
:
!
this
.
WordControl
.
m_oLogicDocument
.
Orientation
;
DesktopOfflineUpdateLocalName
(
this
);
DesktopOfflineUpdateLocalName
(
this
);
window
[
"
DesktopAfterOpen
"
](
this
);
};
};
window
[
"
DesktopOfflineAppDocumentEndLoad
"
]
=
function
(
_url
,
_data
,
_len
)
window
[
"
DesktopOfflineAppDocumentEndLoad
"
]
=
function
(
_url
,
_data
)
{
{
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
_url
;
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
_url
;
if
(
AscCommon
.
g_oDocumentUrls
.
documentUrl
.
indexOf
(
"
file:
"
)
!=
0
)
if
(
AscCommon
.
g_oDocumentUrls
.
documentUrl
.
indexOf
(
"
file:
"
)
!=
0
)
...
@@ -75,8 +72,8 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data, _len)
...
@@ -75,8 +72,8 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data, _len)
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
/
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
/
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
file://
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
file://
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
}
}
editor
.
_OfflineAppDocumentEndLoad
(
_url
,
_data
,
_len
);
editor
.
_OfflineAppDocumentEndLoad
(
_url
,
_data
);
};
};
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
...
@@ -130,11 +127,11 @@ AscCommon.CHistory.prototype.Have_Changes = function(IsNotUserSave, IsNoSavedNoM
...
@@ -130,11 +127,11 @@ AscCommon.CHistory.prototype.Have_Changes = function(IsNotUserSave, IsNoSavedNoM
return
false
;
return
false
;
}
}
};
};
window
[
"
DesktopOfflineAppDocumentApplyChanges
"
]
=
function
(
_changes
)
window
[
"
DesktopOfflineAppDocumentApplyChanges
"
]
=
function
(
_changes
)
{
{
editor
.
_coAuthoringSetChanges
(
_changes
,
new
CDocumentColor
(
191
,
255
,
199
));
editor
.
_coAuthoringSetChanges
(
_changes
,
new
CDocumentColor
(
191
,
255
,
199
));
//editor["asc_nativeApplyChanges"](_changes);
//editor["asc_nativeApplyChanges"](_changes);
//editor["asc_nativeCalculateFile"]();
//editor["asc_nativeCalculateFile"]();
};
};
...
@@ -143,111 +140,46 @@ window["DesktopOfflineAppDocumentApplyChanges"] = function(_changes)
...
@@ -143,111 +140,46 @@ window["DesktopOfflineAppDocumentApplyChanges"] = function(_changes)
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
Asc
[
'
asc_docs_api
'
].
prototype
.
SetDocumentModified
=
function
(
bValue
)
Asc
[
'
asc_docs_api
'
].
prototype
.
SetDocumentModified
=
function
(
bValue
)
{
{
this
.
isDocumentModify
=
bValue
;
this
.
isDocumentModify
=
bValue
;
this
.
sendEvent
(
"
asc_onDocumentModifiedChanged
"
);
this
.
sendEvent
(
"
asc_onDocumentModifiedChanged
"
);
if
(
undefined
!==
window
[
"
AscDesktopEditor
"
])
if
(
undefined
!==
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
onDocumentModifiedChanged
"
](
AscCommon
.
History
?
AscCommon
.
History
.
Have_Changes
(
undefined
,
true
)
:
bValue
);
}
};
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_Save
=
function
(
isNoUserSave
,
isSaveAs
)
{
if
(
true
!==
isNoUserSave
)
this
.
IsUserSave
=
true
;
if
(
this
.
IsUserSave
)
{
{
this
.
LastUserSavedIndex
=
AscCommon
.
History
.
UserSavedIndex
;
window
[
"
AscDesktopEditor
"
][
"
onDocumentModifiedChanged
"
](
AscCommon
.
History
?
AscCommon
.
History
.
Have_Changes
(
undefined
,
true
)
:
bValue
);
}
if
(
true
===
this
.
canSave
&&
!
this
.
isLongAction
())
{
var
_isNaturalSave
=
this
.
IsUserSave
;
this
.
canSave
=
false
;
var
t
=
this
;
this
.
CoAuthoringApi
.
askSaveChanges
(
function
(
e
)
{
t
.
onSaveCallback
(
e
);
});
if
(
this
.
CoAuthoringApi
.
onUnSaveLock
)
this
.
CoAuthoringApi
.
onUnSaveLock
();
if
(
_isNaturalSave
===
true
)
window
[
"
DesktopOfflineAppDocumentStartSave
"
](
isSaveAs
);
}
}
};
};
window
[
"
DesktopOfflineAppDocumentStartSave
"
]
=
function
(
isSaveAs
,
password
,
isForce
)
{
window
.
doadssIsSaveAs
=
isSaveAs
;
if
(
true
!==
isForce
&&
window
.
g_asc_plugins
&&
window
.
g_asc_plugins
.
isRunned
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
))
{
window
.
g_asc_plugins
.
init
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
,
{
"
type
"
:
"
generatePassword
"
});
return
;
}
window
[
"
DesktopOfflineAppDocumentStartSave
"
]
=
function
(
isSaveAs
)
{
editor
.
sync_StartAction
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
Asc
.
c_oAscAsyncAction
.
Save
);
editor
.
sync_StartAction
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
Asc
.
c_oAscAsyncAction
.
Save
);
var
_param
=
""
;
var
_param
=
""
;
if
(
isSaveAs
===
true
)
if
(
isSaveAs
===
true
)
_param
+=
"
saveas=true;
"
;
_param
+=
"
saveas=true;
"
;
if
(
AscCommon
.
AscBrowser
.
isRetina
)
if
(
AscCommon
.
AscBrowser
.
isRetina
)
_param
+=
"
retina=true;
"
;
_param
+=
"
retina=true;
"
;
window
[
"
AscDesktopEditor
"
][
"
LocalFileSave
"
](
_param
,
password
);
window
[
"
AscDesktopEditor
"
][
"
LocalFileSave
"
](
_param
);
};
};
window
[
"
DesktopOfflineAppDocumentEndSave
"
]
=
function
(
error
,
hash
,
password
)
window
[
"
DesktopOfflineAppDocumentEndSave
"
]
=
function
(
error
)
{
{
editor
.
sync_EndAction
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
Asc
.
c_oAscAsyncAction
.
Save
);
editor
.
sync_EndAction
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
Asc
.
c_oAscAsyncAction
.
Save
);
if
(
0
==
error
)
if
(
0
==
error
)
DesktopOfflineUpdateLocalName
(
editor
);
DesktopOfflineUpdateLocalName
(
editor
);
else
else
AscCommon
.
History
.
UserSavedIndex
=
editor
.
LastUserSavedIndex
;
AscCommon
.
History
.
UserSavedIndex
=
editor
.
LastUserSavedIndex
;
editor
.
UpdateInterfaceState
();
editor
.
UpdateInterfaceState
();
editor
.
LastUserSavedIndex
=
undefined
;
editor
.
LastUserSavedIndex
=
undefined
;
if
(
2
==
error
)
if
(
2
==
error
)
editor
.
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationSaveError
,
c_oAscError
.
Level
.
Critical
);
editor
.
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationSaveError
,
c_oAscError
.
Level
.
Critical
);
if
(
0
==
error
)
{
if
(
window
.
SaveQuestionObjectBeforeSign
)
{
var
_obj
=
window
.
SaveQuestionObjectBeforeSign
;
editor
.
sendEvent
(
"
asc_onSignatureClick
"
,
_obj
.
guid
,
_obj
.
width
,
_obj
.
height
);
window
.
SaveQuestionObjectBeforeSign
=
null
;
}
}
if
(
hash
!==
null
&&
hash
!==
undefined
&&
hash
!=
""
)
{
if
(
window
.
g_asc_plugins
&&
window
.
g_asc_plugins
.
isRunned
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
))
{
window
.
g_asc_plugins
.
init
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
,
{
"
type
"
:
"
setPasswordByFile
"
,
"
hash
"
:
hash
,
"
password
"
:
password
});
}
}
};
};
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_DownloadAs
=
function
(
typeFile
,
bIsDownloadEvent
)
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_DownloadAs
=
function
(
typeFile
,
bIsDownloadEvent
)
{
{
this
.
asc_Save
(
false
,
true
);
this
.
asc_Save
(
false
,
true
);
};
};
Asc
[
'
asc_docs_api
'
].
prototype
.
AddImageUrl
=
function
(
url
,
imgProp
)
{
var
_url
=
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrl
"
](
url
);
this
.
AddImageUrlAction
(
AscCommon
.
g_oDocumentUrls
.
getImageUrl
(
_url
),
imgProp
);
};
Asc
[
'
asc_docs_api
'
].
prototype
.
AddImage
=
function
()
{
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrlFromOpenFileDialog
"
]();
};
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_addImage
=
function
()
{
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrlFromOpenFileDialog
"
]();
};
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_isOffline
=
function
()
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_isOffline
=
function
()
{
{
return
true
;
return
true
;
...
@@ -279,7 +211,7 @@ window["on_editor_native_message"] = function(sCommand, sParam)
...
@@ -279,7 +211,7 @@ window["on_editor_native_message"] = function(sCommand, sParam)
{
{
if
(
!
window
.
editor
)
if
(
!
window
.
editor
)
return
;
return
;
if
(
sCommand
==
"
save
"
)
if
(
sCommand
==
"
save
"
)
editor
.
asc_Save
();
editor
.
asc_Save
();
else
if
(
sCommand
==
"
saveAs
"
)
else
if
(
sCommand
==
"
saveAs
"
)
...
@@ -290,12 +222,7 @@ window["on_editor_native_message"] = function(sCommand, sParam)
...
@@ -290,12 +222,7 @@ window["on_editor_native_message"] = function(sCommand, sParam)
editor
.
EndDemonstration
(
true
);
editor
.
EndDemonstration
(
true
);
};
};
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_setAdvancedOptions
=
function
(
idOption
,
option
)
{
AscCommon
.
baseEditorsApi
.
prototype
.
getEmpty
=
function
()
{
if
(
window
[
"
Asc
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uAGcAAQoAAABpAG0AYQBnAGUAMgAuAHAAbgBnAPsraAAAAPoABQAAAEEAcgBpAGEAbAABCwAAAEQAZQBqAGEAVgB1ACAAUwBhAG4AcwACCgAAAFMAdABhAHIAUwB5AG0AYgBvAGwAAw8AAABUAGkAbQBlAHMAIABOAGUAdwAgAFIAbwBtAGEAbgD7KAcAAAD6AAEAAAD7KaQAAAABAAAAAJsAAAD6AAAAAAD7DAAAAAAHAAAA+gAAAAAA+wAHAAAA+gABAAAA+wAHAAAA+gACAAAA+wAHAAAA+gADAAAA+wAHAAAA+gAEAAAA+wAHAAAA+gAFAAAA+wAHAAAA+gAGAAAA+wAHAAAA+gAHAAAA+wAHAAAA+gAIAAAA+wAHAAAA+gAJAAAA+wAHAAAA+gAKAAAA+wAHAAAA+gALAAAA+w==
"
;
var
_param
=
""
;
};
_param
+=
(
"
<m_sPassword>
"
+
AscCommon
.
CopyPasteCorrectString
(
option
.
asc_getPassword
())
+
"
</m_sPassword>
"
);
\ No newline at end of file
window
[
"
AscDesktopEditor
"
][
"
SetAdvancedOptions
"
](
_param
);
}
};
Asc
[
'
asc_docs_api
'
].
prototype
[
"
asc_setAdvancedOptions
"
]
=
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_setAdvancedOptions
;
slide/api.js
View file @
c5b52c29
...
@@ -1899,6 +1899,7 @@ background-repeat: no-repeat;\
...
@@ -1899,6 +1899,7 @@ background-repeat: no-repeat;\
// Обновляем состояние возможности сохранения документа
// Обновляем состояние возможности сохранения документа
t
.
_onUpdateDocumentCanSave
();
t
.
_onUpdateDocumentCanSave
();
t
.
jio_save
();
if
(
undefined
!==
window
[
"
AscDesktopEditor
"
])
if
(
undefined
!==
window
[
"
AscDesktopEditor
"
])
{
{
window
[
"
AscDesktopEditor
"
][
"
OnSave
"
]();
window
[
"
AscDesktopEditor
"
][
"
OnSave
"
]();
...
...
word/Local/api.js
View file @
c5b52c29
...
@@ -43,32 +43,25 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentStartLoad = function()
...
@@ -43,32 +43,25 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentStartLoad = function()
this
.
asc_registerCallback
(
'
asc_onDocumentContentReady
'
,
function
(){
this
.
asc_registerCallback
(
'
asc_onDocumentContentReady
'
,
function
(){
DesktopOfflineUpdateLocalName
(
editor
);
DesktopOfflineUpdateLocalName
(
editor
);
setTimeout
(
function
(){
window
[
"
UpdateInstallPlugins
"
]();},
10
);
//
setTimeout(function(){window["UpdateInstallPlugins"]();}, 10);
});
});
AscCommon
.
History
.
UserSaveMode
=
true
;
AscCommon
.
History
.
UserSaveMode
=
true
;
window
[
"
AscDesktopEditor
"
][
"
LocalStartOpen
"
]
();
return
this
.
jio_open
();
};
};
Asc
[
'
asc_docs_api
'
].
prototype
.
_OfflineAppDocumentEndLoad
=
function
(
_url
,
_
data
,
_len
)
Asc
[
'
asc_docs_api
'
].
prototype
.
_OfflineAppDocumentEndLoad
=
function
(
_url
,
_
binary
)
{
{
AscCommon
.
g_oIdCounter
.
m_sUserId
=
window
[
"
AscDesktopEditor
"
][
"
CheckUserId
"
]();
//
AscCommon.g_oIdCounter.m_sUserId = window["AscDesktopEditor"]["CheckUserId"]();
if
(
_
data
==
""
)
if
(
_
binary
==
""
)
{
{
this
.
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationOpenError
,
c_oAscError
.
Level
.
Critical
);
this
.
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationOpenError
,
c_oAscError
.
Level
.
Critical
);
return
;
return
;
}
}
var
_binary
=
getBinaryArray
(
_data
,
_len
);
var
_sign_len
=
AscCommon
.
c_oSerFormat
.
Signature
.
length
;
var
_sign_len
=
AscCommon
.
c_oSerFormat
.
Signature
.
length
;
var
_signature
=
""
;
var
_signature
=
_binary
.
slice
(
0
,
_sign_len
);
if
(
_binary
.
length
>=
_sign_len
)
if
(
typeof
_signature
!==
'
string
'
)
{
{
_signature
=
String
.
fromCharCode
.
apply
(
null
,
_signature
);
for
(
var
i
=
0
;
i
<
_sign_len
;
i
++
)
{
_signature
+=
String
.
fromCharCode
(
_binary
[
i
]);
}
}
}
if
(
AscCommon
.
c_oSerFormat
.
Signature
!==
_signature
)
if
(
AscCommon
.
c_oSerFormat
.
Signature
!==
_signature
)
{
{
this
.
OpenDocument
(
_url
,
_binary
);
this
.
OpenDocument
(
_url
,
_binary
);
...
@@ -78,14 +71,9 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentEndLoad = function(_url, _data,
...
@@ -78,14 +71,9 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentEndLoad = function(_url, _data,
this
.
OpenDocument2
(
_url
,
_binary
);
this
.
OpenDocument2
(
_url
,
_binary
);
this
.
WordControl
.
m_oLogicDocument
.
Set_FastCollaborativeEditing
(
false
);
this
.
WordControl
.
m_oLogicDocument
.
Set_FastCollaborativeEditing
(
false
);
}
}
this
.
WordControl
.
m_oLogicDocument
.
Set_FastCollaborativeEditing
(
false
);
DesktopOfflineUpdateLocalName
(
this
);
DesktopOfflineUpdateLocalName
(
this
);
window
[
"
DesktopAfterOpen
"
](
this
);
};
};
window
[
"
DesktopOfflineAppDocumentEndLoad
"
]
=
function
(
_url
,
_data
,
_len
)
window
[
"
DesktopOfflineAppDocumentEndLoad
"
]
=
function
(
_url
,
_data
)
{
{
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
_url
;
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
_url
;
if
(
AscCommon
.
g_oDocumentUrls
.
documentUrl
.
indexOf
(
"
file:
"
)
!=
0
)
if
(
AscCommon
.
g_oDocumentUrls
.
documentUrl
.
indexOf
(
"
file:
"
)
!=
0
)
...
@@ -94,22 +82,22 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data, _len)
...
@@ -94,22 +82,22 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data, _len)
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
/
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
/
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
file://
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
AscCommon
.
g_oDocumentUrls
.
documentUrl
=
"
file://
"
+
AscCommon
.
g_oDocumentUrls
.
documentUrl
;
}
}
editor
.
_OfflineAppDocumentEndLoad
(
_url
,
_data
,
_len
);
editor
.
_OfflineAppDocumentEndLoad
(
_url
,
_data
);
};
};
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_setAdvancedOptions
=
function
(
idOption
,
option
)
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_setAdvancedOptions
=
function
(
idOption
,
option
)
{
{
if
(
window
[
"
Asc
"
].
c_oAscAdvancedOptionsID
.
TXT
===
idOption
)
{
if
(
window
[
"
Asc
"
].
c_oAscAdvancedOptionsID
.
TXT
===
idOption
)
{
var
_param
=
""
;
var
_param
=
""
;
_param
+=
(
"
<m_nCsvTxtEncoding>
"
+
option
.
asc_getCodePage
()
+
"
</m_nCsvTxtEncoding>
"
);
_param
+=
(
"
<m_nCsvTxtEncoding>
"
+
option
.
asc_getCodePage
()
+
"
</m_nCsvTxtEncoding>
"
);
window
[
"
AscDesktopEditor
"
][
"
SetAdvancedOptions
"
](
_param
);
window
[
"
AscDesktopEditor
"
][
"
SetAdvancedOptions
"
](
_param
);
}
}
else
if
(
window
[
"
Asc
"
].
c_oAscAdvancedOptionsID
.
DRM
===
idOption
)
{
else
if
(
window
[
"
Asc
"
].
c_oAscAdvancedOptionsID
.
DRM
===
idOption
)
{
var
_param
=
""
;
var
_param
=
""
;
_param
+=
(
"
<m_sPassword>
"
+
AscCommon
.
CopyPasteCorrectString
(
option
.
asc_getPassword
())
+
"
</m_sPassword>
"
);
_param
+=
(
"
<m_sPassword>
"
+
AscCommon
.
CopyPasteCorrectString
(
option
.
asc_getPassword
())
+
"
</m_sPassword>
"
);
window
[
"
AscDesktopEditor
"
][
"
SetAdvancedOptions
"
](
_param
);
window
[
"
AscDesktopEditor
"
][
"
SetAdvancedOptions
"
](
_param
);
}
}
};
};
Asc
[
'
asc_docs_api
'
].
prototype
[
"
asc_setAdvancedOptions
"
]
=
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_setAdvancedOptions
;
Asc
[
'
asc_docs_api
'
].
prototype
[
"
asc_setAdvancedOptions
"
]
=
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_setAdvancedOptions
;
...
@@ -164,131 +152,48 @@ AscCommon.CHistory.prototype.Have_Changes = function(IsNotUserSave, IsNoSavedNoM
...
@@ -164,131 +152,48 @@ AscCommon.CHistory.prototype.Have_Changes = function(IsNotUserSave, IsNoSavedNoM
return
false
;
return
false
;
}
}
};
};
window
[
"
DesktopOfflineAppDocumentApplyChanges
"
]
=
function
(
_changes
)
window
[
"
DesktopOfflineAppDocumentApplyChanges
"
]
=
function
(
_changes
)
{
{
editor
.
_coAuthoringSetChanges
(
_changes
,
new
AscCommonWord
.
CDocumentColor
(
191
,
255
,
199
));
editor
.
_coAuthoringSetChanges
(
_changes
,
new
AscCommonWord
.
CDocumentColor
(
191
,
255
,
199
));
//editor["asc_nativeApplyChanges"](_changes);
//editor["asc_nativeApplyChanges"](_changes);
//editor["asc_nativeCalculateFile"]();
//editor["asc_nativeCalculateFile"]();
};
};
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
//////////////// SAVE //////////////////////
//////////////// SAVE //////////////////////
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
Asc
[
'
asc_docs_api
'
].
prototype
.
SetDocumentModified
=
function
(
bValue
)
window
[
"
DesktopOfflineAppDocumentStartSave
"
]
=
function
(
isSaveAs
)
{
this
.
isDocumentModify
=
bValue
;
this
.
sendEvent
(
"
asc_onDocumentModifiedChanged
"
);
if
(
undefined
!==
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
onDocumentModifiedChanged
"
](
AscCommon
.
History
?
AscCommon
.
History
.
Have_Changes
(
undefined
,
true
)
:
bValue
);
}
};
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_Save
=
function
(
isNoUserSave
,
isSaveAs
)
{
{
if
(
true
!==
isNoUserSave
)
editor
.
sync_StartAction
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
Asc
.
c_oAscAsyncAction
.
Save
);
this
.
IsUserSave
=
true
;
if
(
this
.
IsUserSave
)
{
this
.
LastUserSavedIndex
=
AscCommon
.
History
.
UserSavedIndex
;
}
if
(
true
===
this
.
canSave
&&
!
this
.
isLongAction
())
{
var
_isNaturalSave
=
this
.
IsUserSave
;
this
.
canSave
=
false
;
if
(
this
.
WordControl
.
m_oLogicDocument
!=
null
)
{
var
t
=
this
;
this
.
CoAuthoringApi
.
askSaveChanges
(
function
(
e
)
{
t
.
onSaveCallback
(
e
);
});
if
(
this
.
CoAuthoringApi
.
onUnSaveLock
)
this
.
CoAuthoringApi
.
onUnSaveLock
();
}
else
{
this
.
canSave
=
true
;
}
if
(
_isNaturalSave
===
true
)
window
[
"
DesktopOfflineAppDocumentStartSave
"
](
isSaveAs
);
}
};
window
[
"
DesktopOfflineAppDocumentStartSave
"
]
=
function
(
isSaveAs
,
password
,
isForce
)
{
window
.
doadssIsSaveAs
=
isSaveAs
;
if
(
true
!==
isForce
&&
window
.
g_asc_plugins
&&
window
.
g_asc_plugins
.
isRunned
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
))
{
window
.
g_asc_plugins
.
init
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
,
{
"
type
"
:
"
generatePassword
"
});
return
;
}
editor
.
sync_StartAction
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
Asc
.
c_oAscAsyncAction
.
Save
);
var
_param
=
""
;
var
_param
=
""
;
if
(
isSaveAs
===
true
)
if
(
isSaveAs
===
true
)
_param
+=
"
saveas=true;
"
;
_param
+=
"
saveas=true;
"
;
if
(
AscCommon
.
AscBrowser
.
isRetina
)
if
(
AscCommon
.
AscBrowser
.
isRetina
)
_param
+=
"
retina=true;
"
;
_param
+=
"
retina=true;
"
;
window
[
"
AscDesktopEditor
"
][
"
LocalFileSave
"
](
_param
,
password
);
window
[
"
AscDesktopEditor
"
][
"
LocalFileSave
"
](
_param
);
};
};
window
[
"
DesktopOfflineAppDocumentEndSave
"
]
=
function
(
error
,
hash
,
password
)
window
[
"
DesktopOfflineAppDocumentEndSave
"
]
=
function
(
error
)
{
{
editor
.
sync_EndAction
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
Asc
.
c_oAscAsyncAction
.
Save
);
editor
.
sync_EndAction
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
Asc
.
c_oAscAsyncAction
.
Save
);
if
(
error
==
0
)
if
(
error
==
0
)
DesktopOfflineUpdateLocalName
(
editor
);
DesktopOfflineUpdateLocalName
(
editor
);
else
else
AscCommon
.
History
.
UserSavedIndex
=
editor
.
LastUserSavedIndex
;
AscCommon
.
History
.
UserSavedIndex
=
editor
.
LastUserSavedIndex
;
editor
.
UpdateInterfaceState
();
editor
.
UpdateInterfaceState
();
editor
.
LastUserSavedIndex
=
undefined
;
editor
.
LastUserSavedIndex
=
undefined
;
if
(
2
==
error
)
if
(
2
==
error
)
editor
.
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationSaveError
,
c_oAscError
.
Level
.
NoCritical
);
editor
.
sendEvent
(
"
asc_onError
"
,
c_oAscError
.
ID
.
ConvertationSaveError
,
c_oAscError
.
Level
.
NoCritical
);
if
(
0
==
error
)
{
if
(
window
.
SaveQuestionObjectBeforeSign
)
{
var
_obj
=
window
.
SaveQuestionObjectBeforeSign
;
editor
.
sendEvent
(
"
asc_onSignatureClick
"
,
_obj
.
guid
,
_obj
.
width
,
_obj
.
height
);
window
.
SaveQuestionObjectBeforeSign
=
null
;
}
}
if
(
hash
!==
null
&&
hash
!==
undefined
&&
hash
!=
""
)
{
if
(
window
.
g_asc_plugins
&&
window
.
g_asc_plugins
.
isRunned
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
))
{
window
.
g_asc_plugins
.
init
(
"
asc.{F2402876-659F-47FB-A646-67B49F2B57D0}
"
,
{
"
type
"
:
"
setPasswordByFile
"
,
"
hash
"
:
hash
,
"
password
"
:
password
});
}
}
};
};
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_DownloadAs
=
function
(
typeFile
,
bIsDownloadEvent
)
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_DownloadAs
=
function
(
typeFile
,
bIsDownloadEvent
)
{
{
this
.
asc_Save
(
false
,
true
);
this
.
asc_Save
(
false
,
true
);
};
};
Asc
[
'
asc_docs_api
'
].
prototype
.
AddImageUrl
=
function
(
url
,
imgProp
)
{
var
_url
=
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrl
"
](
url
);
this
.
AddImageUrlAction
(
AscCommon
.
g_oDocumentUrls
.
getImageUrl
(
_url
),
imgProp
);
};
Asc
[
'
asc_docs_api
'
].
prototype
.
AddImage
=
function
()
{
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrlFromOpenFileDialog
"
]();
};
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_addImage
=
function
()
{
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrlFromOpenFileDialog
"
]();
};
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_isOffline
=
function
()
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_isOffline
=
function
()
{
{
return
true
;
return
true
;
...
@@ -317,7 +222,7 @@ window["on_editor_native_message"] = function(sCommand, sParam)
...
@@ -317,7 +222,7 @@ window["on_editor_native_message"] = function(sCommand, sParam)
{
{
if
(
!
window
.
editor
)
if
(
!
window
.
editor
)
return
;
return
;
if
(
sCommand
==
"
save
"
)
if
(
sCommand
==
"
save
"
)
editor
.
asc_Save
();
editor
.
asc_Save
();
else
if
(
sCommand
==
"
saveAs
"
)
else
if
(
sCommand
==
"
saveAs
"
)
...
...
word/api.js
View file @
c5b52c29
...
@@ -2278,6 +2278,7 @@ background-repeat: no-repeat;\
...
@@ -2278,6 +2278,7 @@ background-repeat: no-repeat;\
// Обновляем состояние возможности сохранения документа
// Обновляем состояние возможности сохранения документа
t
.
_onUpdateDocumentCanSave
();
t
.
_onUpdateDocumentCanSave
();
t
.
jio_save
();
if
(
undefined
!==
window
[
"
AscDesktopEditor
"
])
if
(
undefined
!==
window
[
"
AscDesktopEditor
"
])
{
{
window
[
"
AscDesktopEditor
"
][
"
OnSave
"
]();
window
[
"
AscDesktopEditor
"
][
"
OnSave
"
]();
...
...
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