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
7d0427cb
Commit
7d0427cb
authored
Aug 30, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add asc_endPaste
parent
2bc9ed37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
cell/api.js
cell/api.js
+3
-0
common/plugins.js
common/plugins.js
+10
-5
No files found.
cell/api.js
View file @
7d0427cb
...
...
@@ -3247,6 +3247,9 @@ var editor;
History
.
StartTransaction
();
return
true
;
};
spreadsheet_api
.
prototype
.
asc_endPaste
=
function
()
{
History
.
EndTransaction
();
};
spreadsheet_api
.
prototype
.
asc_Recalculate
=
function
()
{
History
.
EndTransaction
();
this
.
_onUpdateAfterApplyChanges
();
...
...
common/plugins.js
View file @
7d0427cb
...
...
@@ -404,11 +404,12 @@
{
if
(
pluginData
.
privateData
.
resize
||
window
.
g_asc_plugins
.
api
.
asc_canPaste
())
{
var
oLogicDocument
,
i
;
var
editorId
=
window
.
g_asc_plugins
.
api
.
getEditorId
();
if
(
AscCommon
.
c_oEditorId
.
Word
===
editorId
||
AscCommon
.
c_oEditorId
.
Presentation
===
editorId
)
{
var
oLogicDocument
=
window
.
g_asc_plugins
.
api
.
WordControl
?
oLogicDocument
=
window
.
g_asc_plugins
.
api
.
WordControl
?
window
.
g_asc_plugins
.
api
.
WordControl
.
m_oLogicDocument
:
null
;
if
(
AscCommon
.
c_oEditorId
.
Word
===
editorId
){
oLogicDocument
.
LockPanelStyles
();
...
...
@@ -420,16 +421,15 @@
if
(
pluginData
.
getAttribute
(
"
recalculate
"
)
==
true
)
{
var
editorId
=
window
.
g_asc_plugins
.
api
.
getEditorId
();
if
(
AscCommon
.
c_oEditorId
.
Word
===
editorId
||
AscCommon
.
c_oEditorId
.
Presentation
===
editorId
)
{
var
oLogicDocument
=
window
.
g_asc_plugins
.
api
.
WordControl
?
oLogicDocument
=
window
.
g_asc_plugins
.
api
.
WordControl
?
window
.
g_asc_plugins
.
api
.
WordControl
.
m_oLogicDocument
:
null
;
var
_fonts
=
oLogicDocument
.
Document_Get_AllFontNames
();
var
_imagesArray
=
oLogicDocument
.
Get_AllImageUrls
();
var
_images
=
{};
for
(
var
i
=
0
;
i
<
_imagesArray
.
length
;
i
++
)
for
(
i
=
0
;
i
<
_imagesArray
.
length
;
i
++
)
{
_images
[
_imagesArray
[
i
]]
=
_imagesArray
[
i
];
}
...
...
@@ -458,7 +458,7 @@
var
oFonts
=
oApi
.
wbModel
.
_generateFontMap
();
var
aImages
=
oApi
.
wbModel
.
getAllImageUrls
();
var
oImages
=
{};
for
(
var
i
=
0
;
i
<
aImages
.
length
;
i
++
)
for
(
i
=
0
;
i
<
aImages
.
length
;
i
++
)
{
oImages
[
aImages
[
i
]]
=
aImages
[
i
];
}
...
...
@@ -470,6 +470,11 @@
window
.
g_asc_plugins
.
api
.
asc_Recalculate
();
});
}
}
else
{
if
(
AscCommon
.
c_oEditorId
.
Spreadsheet
===
editorId
)
{
// На asc_canPaste создается точка в истории и startTransaction. Поэтому нужно ее закрыть без пересчета.
window
.
g_asc_plugins
.
api
.
asc_endPaste
();
}
}
}
}
catch
(
err
)
...
...
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