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
80ab337f
Commit
80ab337f
authored
Jan 25, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes into getBinaryForCopy
wsview->specialPaste
parent
f44f33aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
12 deletions
+29
-12
cell/model/clipboard.js
cell/model/clipboard.js
+8
-2
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+21
-10
No files found.
cell/model/clipboard.js
View file @
80ab337f
...
...
@@ -295,6 +295,11 @@
var
t
=
this
;
t
.
pasteProcessor
.
clean
();
if
(
null
===
this
.
specialPasteProps
)
{
this
.
pasteProcessor
.
oSpecialPaste
.
activeRange
=
ws
.
model
.
selectionRange
.
clone
(
ws
.
model
);
}
switch
(
_format
)
{
case
AscCommon
.
c_oAscClipboardDataFormat
.
HtmlElement
:
...
...
@@ -402,7 +407,7 @@
return
{
base64
:
sBase64
,
html
:
container
.
innerHTML
};
},
getBinaryForCopy
:
function
(
worksheet
)
getBinaryForCopy
:
function
(
worksheet
,
activeRange
)
{
var
objectRender
=
worksheet
.
objectRender
;
var
isIntoShape
=
objectRender
.
controller
.
getTargetDocContent
();
...
...
@@ -418,7 +423,8 @@
pptx_content_writer
.
Start_UseFullUrl
();
// ToDo multiselect ?
var
oBinaryFileWriter
=
new
AscCommonExcel
.
BinaryFileWriter
(
worksheet
.
model
.
workbook
,
worksheet
.
model
.
selectionRange
.
getLast
());
var
selectionRange
=
activeRange
?
activeRange
:
worksheet
.
model
.
selectionRange
.
getLast
();
var
oBinaryFileWriter
=
new
AscCommonExcel
.
BinaryFileWriter
(
worksheet
.
model
.
workbook
,
selectionRange
);
sBase64
=
"
xslData;
"
+
oBinaryFileWriter
.
Write
();
pptx_content_writer
.
End_UseFullUrl
();
...
...
cell/view/WorksheetView.js
View file @
80ab337f
...
...
@@ -8704,9 +8704,13 @@
}
else
{
newRange
=
this
.
_pasteFromHTML
(
val
,
true
);
}
var
sBinary
=
window
[
"
Asc
"
][
"
editor
"
].
wb
.
clipboard
.
copyProcessor
.
getBinaryForCopy
(
this
);
if
(
!
window
[
"
Asc
"
][
"
editor
"
].
wb
.
clipboard
.
specialPasteProps
)
{
var
sBinary
=
window
[
"
Asc
"
][
"
editor
"
].
wb
.
clipboard
.
copyProcessor
.
getBinaryForCopy
(
this
,
newRange
);
window
[
"
Asc
"
][
"
editor
"
].
wb
.
clipboard
.
pasteProcessor
.
oSpecialPaste
.
undoBinary
=
sBinary
;
//this.oSpecialPaste.undoImgsId;
}
checkRange
=
[
newRange
];
}
...
...
@@ -8722,6 +8726,12 @@
//откатываемся до того, что было до вставки
if
(
api
.
wb
.
clipboard
.
pasteProcessor
.
oSpecialPaste
.
undoBinary
)
{
var
tempProps
=
new
AscCommonExcel
.
SpecialPasteProps
();
api
.
wb
.
clipboard
.
specialPasteProps
=
tempProps
;
//меняем activeRange
this
.
model
.
selectionRange
=
api
.
wb
.
clipboard
.
pasteProcessor
.
oSpecialPaste
.
activeRange
.
clone
(
this
.
model
);
//откатываем данные в ячейках
api
.
wb
.
clipboard
.
pasteProcessor
.
pasteFromBinary
(
this
,
api
.
wb
.
clipboard
.
pasteProcessor
.
oSpecialPaste
.
undoBinary
);
...
...
@@ -8730,11 +8740,12 @@
}
//далее специальная вставка
if
(
api
.
wb
.
clipboard
.
pasteProcessor
.
oSpecialPaste
.
oPreSpecialPasteData
)
{
var
tempProps
=
new
AscCommonExcel
.
SpecialPasteProps
();
tempProps
.
setProps
(
props
);
api
.
wb
.
clipboard
.
specialPasteProps
=
tempProps
;
if
(
api
.
wb
.
clipboard
.
pasteProcessor
.
oSpecialPaste
.
oPreSpecialPasteData
)
{
var
oPreSpecialPasteData
=
api
.
wb
.
clipboard
.
pasteProcessor
.
oSpecialPaste
.
oPreSpecialPasteData
;
api
.
wb
.
clipboard
.
pasteData
(
this
,
oPreSpecialPasteData
.
_format
,
oPreSpecialPasteData
.
data1
,
oPreSpecialPasteData
.
data2
,
oPreSpecialPasteData
.
text_data
);
}
...
...
@@ -9479,7 +9490,7 @@
var
skipFormat
=
null
;
var
noSkipVal
=
null
;
rangeStyle
.
val
ue
=
newVal
.
getValue
();
rangeStyle
.
val
=
newVal
.
getValue
();
var
value2
=
newVal
.
getValue2
();
for
(
var
nF
=
0
;
nF
<
value2
.
length
;
nF
++
)
{
if
(
value2
[
nF
]
&&
value2
[
nF
].
sId
)
{
...
...
@@ -9581,11 +9592,11 @@
{
arrFormula
.
push
(
rangeStyle
.
formula
);
}
else
if
(
rangeStyle
.
cellValueData
)
else
if
(
rangeStyle
.
cellValueData
&&
specialPasteProps
.
font
)
{
rangeStyle
.
cellValueData
.
cell
.
setValueData
(
rangeStyle
.
cellValueData
.
valueData
);
}
else
if
(
rangeStyle
.
value2
)
else
if
(
rangeStyle
.
value2
&&
specialPasteProps
.
font
)
{
if
(
formulaProps
)
{
...
...
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