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
9be7cd5d
Commit
9be7cd5d
authored
Mar 01, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
special paste column width
parent
0d7b9966
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
7 deletions
+26
-7
cell/model/clipboard.js
cell/model/clipboard.js
+7
-0
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+19
-7
No files found.
cell/model/clipboard.js
View file @
9be7cd5d
...
...
@@ -95,6 +95,8 @@
this
.
formatTable
=
true
;
this
.
images
=
true
;
this
.
width
=
null
;
}
С
SpecialPasteProps
.
prototype
=
{
...
...
@@ -121,6 +123,8 @@
this
.
formatTable
=
true
;
this
.
images
=
true
;
this
.
width
=
null
;
},
revert
:
function
()
{
...
...
@@ -142,6 +146,8 @@
this
.
formatTable
=
null
;
this
.
images
=
null
;
this
.
width
=
null
;
},
asc_setProps
:
function
(
props
)
{
...
...
@@ -183,6 +189,7 @@
}
case
c_oSpecialPasteProps
.
formulaColumnWidth
:
{
this
.
width
=
true
;
break
;
}
case
c_oSpecialPasteProps
.
mergeConditionalFormating
:
...
...
cell/view/WorksheetView.js
View file @
9be7cd5d
...
...
@@ -8777,7 +8777,7 @@
}
};
WorksheetView
.
prototype
.
specialPaste
=
function
(
preSpecialPaste
Data
,
specialPasteData
,
props
)
{
WorksheetView
.
prototype
.
specialPaste
=
function
(
specialPasteUndo
Data
,
specialPasteData
,
props
)
{
var
api
=
window
[
"
Asc
"
][
"
editor
"
];
var
t
=
this
;
...
...
@@ -8798,7 +8798,7 @@
var
undoPreviousPaste
=
function
()
{
//откатываем данные в ячейках
var
sBase64
=
preSpecialPaste
Data
.
data
.
split
(
'
xslData;
'
)[
1
];
var
sBase64
=
specialPasteUndo
Data
.
data
.
split
(
'
xslData;
'
)[
1
];
var
oBinaryFileReader
=
new
AscCommonExcel
.
BinaryFileReader
(
true
);
var
tempWorkbook
=
new
AscCommonExcel
.
Workbook
();
pptx_content_loader
.
Start_UseFullUrl
();
...
...
@@ -8813,9 +8813,9 @@
}
//удаляем вставленные изображения
if
(
preSpecialPaste
Data
.
images
)
if
(
specialPasteUndo
Data
.
images
)
{
var
images
=
preSpecialPaste
Data
.
images
;
var
images
=
specialPasteUndo
Data
.
images
;
for
(
var
i
=
0
;
i
<
images
.
length
;
i
++
)
{
var
id
=
images
[
i
];
...
...
@@ -8835,9 +8835,10 @@
//откатываемся до того, что было до вставки
//курсор и специальная вставка не в шейпе + курсор в шейпе, специальная вставка на листе
if
(
preSpecialPasteData
&&
preSpecialPaste
Data
.
data
&&
!
window
[
'
AscCommon
'
].
g_clipboardBase
.
specialPasteButtonProps
.
shapeId
)
if
(
specialPasteUndoData
&&
specialPasteUndo
Data
.
data
&&
!
window
[
'
AscCommon
'
].
g_clipboardBase
.
specialPasteButtonProps
.
shapeId
)
{
var
tempProps
=
new
Asc
.
SpecialPasteProps
();
tempProps
.
width
=
true
;
window
[
'
AscCommon
'
].
g_clipboardBase
.
specialPasteProps
=
tempProps
;
//переводим фокус из шейпа на лист
...
...
@@ -8857,10 +8858,10 @@
undoPreviousPaste
();
}
else
if
(
isIntoShape
&&
preSpecialPasteData
&&
preSpecialPaste
Data
.
shapeSelectionState
)
//курсор и специальная вставка в шейпе
else
if
(
isIntoShape
&&
specialPasteUndoData
&&
specialPasteUndo
Data
.
shapeSelectionState
)
//курсор и специальная вставка в шейпе
{
//таким образом удаляю вставляенный фрагмент до специальной вставки
var
State
=
preSpecialPaste
Data
.
shapeSelectionState
;
var
State
=
specialPasteUndo
Data
.
shapeSelectionState
;
isIntoShape
.
Set_SelectionState
(
State
,
State
.
length
-
1
);
isIntoShape
.
Remove
(
1
,
true
,
true
);
}
...
...
@@ -9609,6 +9610,7 @@
}
pastedRangeProps
.
tableDxf
=
getTableDxf
(
pasteRow
,
pasteCol
,
newVal
);
pastedRangeProps
.
width
=
val
.
_getCol
(
pasteCol
);
//apply props by cell
var
formulaProps
=
{
firstRange
:
firstRange
,
arrFormula
:
arrFormula
,
tablesMap
:
tablesMap
,
newVal
:
newVal
,
isOneMerge
:
isOneMerge
,
val
:
val
};
...
...
@@ -9756,6 +9758,16 @@
}
};
//column width
if
(
specialPasteProps
.
width
&&
rangeStyle
.
width
)
{
var
widthProp
=
rangeStyle
.
width
;
t
.
model
.
setColWidth
(
widthProp
.
width
,
range
.
bbox
.
c1
,
range
.
bbox
.
c1
);
t
.
model
.
setColHidden
(
widthProp
.
hd
,
range
.
bbox
.
c1
,
range
.
bbox
.
c1
);
t
.
model
.
setColBestFit
(
widthProp
.
BestFit
,
widthProp
.
width
,
range
.
bbox
.
c1
,
range
.
bbox
.
c1
);
}
//offsetLast
if
(
rangeStyle
.
offsetLast
&&
specialPasteProps
.
merge
)
{
...
...
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