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
08709a29
Commit
08709a29
authored
Jan 27, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete last pasted images before special paste
parent
7df8b4a4
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
172 additions
and
145 deletions
+172
-145
cell/model/clipboard.js
cell/model/clipboard.js
+156
-140
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+16
-5
No files found.
cell/model/clipboard.js
View file @
08709a29
This diff is collapsed.
Click to expand it.
cell/view/WorksheetView.js
View file @
08709a29
...
...
@@ -8748,7 +8748,6 @@
{
var
sBinary
=
window
[
"
Asc
"
][
"
editor
"
].
wb
.
clipboard
.
copyProcessor
.
getBinaryForCopy
(
this
,
newRange
);
window
[
'
AscCommon
'
].
g_clipboardBase
.
specialPasteUndoData
.
data
=
sBinary
;
//window['AscCommon'].g_clipboardBase.specialPasteUndoData.images = images;
}
checkRange
=
[
newRange
];
...
...
@@ -8762,21 +8761,33 @@
WorksheetView
.
prototype
.
specialPaste
=
function
(
props
)
{
var
api
=
window
[
"
Asc
"
][
"
editor
"
];
var
g_clipboardBase
=
window
[
'
AscCommon
'
].
g_clipboardBase
;
//откатываемся до того, что было до вставки
if
(
window
[
'
AscCommon
'
].
g_clipboardBase
.
specialPasteUndoData
.
data
)
if
(
g_clipboardBase
.
specialPasteUndoData
.
data
)
{
var
tempProps
=
new
AscCommonExcel
.
SpecialPasteProps
();
api
.
wb
.
clipboard
.
specialPasteProps
=
tempProps
;
//меняем activeRange
if
(
window
[
'
AscCommon
'
].
g_clipboardBase
.
specialPasteData
&&
window
[
'
AscCommon
'
].
g_clipboardBase
.
specialPasteData
.
activeRange
)
if
(
g_clipboardBase
.
specialPasteData
&&
g_clipboardBase
.
specialPasteData
.
activeRange
)
{
this
.
model
.
selectionRange
=
window
[
'
AscCommon
'
].
g_clipboardBase
.
specialPasteData
.
activeRange
.
clone
(
this
.
model
);
this
.
model
.
selectionRange
=
g_clipboardBase
.
specialPasteData
.
activeRange
.
clone
(
this
.
model
);
}
//откатываем данные в ячейках
api
.
wb
.
clipboard
.
pasteProcessor
.
pasteFromBinary
(
this
,
window
[
'
AscCommon
'
].
g_clipboardBase
.
specialPasteUndoData
.
data
);
api
.
wb
.
clipboard
.
pasteProcessor
.
pasteFromBinary
(
this
,
g_clipboardBase
.
specialPasteUndoData
.
data
);
//удаляем вставленные изображения
if
(
g_clipboardBase
.
specialPasteUndoData
.
images
)
{
var
images
=
g_clipboardBase
.
specialPasteUndoData
.
images
;
for
(
var
i
=
0
;
i
<
images
.
length
;
i
++
)
{
var
id
=
images
[
i
];
var
oObject
=
AscCommon
.
g_oTableId
.
Get_ById
(
id
);
oObject
.
deleteDrawingBase
(
true
);
oObject
.
setBDeleted
(
true
);
}
}
}
//далее специальная вставка
...
...
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