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
15accf65
Commit
15accf65
authored
Jan 13, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for merged cells(from html)
parent
604cce8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+20
-15
No files found.
cell/view/WorksheetView.js
View file @
15accf65
...
...
@@ -9098,21 +9098,23 @@
//for merge
var
isMerged
=
false
;
for
(
var
mergeCheck
=
0
;
mergeCheck
<
mergeArr
.
length
;
++
mergeCheck
)
{
var
tempRow
=
r
+
1
+
autoR
*
plRow
;
var
tempCol
=
c
+
autoC
*
pl
Col
+
1
;
var
tempRow
=
pasteIntoRow
+
1
;
var
tempCol
=
pasteInto
Col
+
1
;
if
(
tempRow
<=
mergeArr
[
mergeCheck
].
r2
&&
tempRow
>=
mergeArr
[
mergeCheck
].
r1
&&
tempCol
<=
mergeArr
[
mergeCheck
].
c2
&&
tempCol
>=
mergeArr
[
mergeCheck
].
c1
)
{
isMerged
=
true
;
}
}
if
((
currentObj
.
colSpan
>
1
||
currentObj
.
rowSpan
>
1
)
&&
!
isMerged
)
{
pastedRangeProps
.
offsetLast
=
{
offsetCol
:
currentObj
.
colSpan
-
1
,
offsetRow
:
currentObj
.
rowSpan
-
1
};
if
((
currentObj
.
colSpan
>
1
||
currentObj
.
rowSpan
>
1
)
&&
!
isMerged
)
{
var
offsetCol
=
currentObj
.
colSpan
-
1
;
var
offsetRow
=
currentObj
.
rowSpan
-
1
;
pastedRangeProps
.
offsetLast
=
{
offsetCol
:
offsetCol
,
offsetRow
:
offsetRow
};
mergeArr
[
n
]
=
{
r1
:
range
.
first
.
row
,
r2
:
range
.
last
.
row
,
c1
:
range
.
first
.
col
,
c2
:
range
.
last
.
c
ol
r1
:
range
.
first
.
row
,
r2
:
range
.
last
.
row
+
offsetRow
,
c1
:
range
.
first
.
col
,
c2
:
range
.
last
.
col
+
offsetC
ol
};
n
++
;
if
(
contentCurrentObj
[
0
]
==
undefined
)
{
pastedRangeProps
.
val
=
''
;
}
}
pastedRangeProps
.
merge
=
c_oAscMergeOptions
.
Merge
;
}
...
...
@@ -9121,11 +9123,11 @@
pastedRangeProps
.
borders
=
currentObj
.
borders
;
}
//wrap
pastedRangeProps
.
wrap
=
currentObj
.
wrap
;
//wrap
pastedRangeProps
.
wrap
=
currentObj
.
wrap
;
//fill
if
(
currentObj
.
bc
&&
currentObj
.
bc
.
rgb
)
{
if
(
currentObj
.
bc
&&
currentObj
.
bc
.
rgb
)
{
pastedRangeProps
.
fill
=
currentObj
.
bc
;
}
...
...
@@ -9133,15 +9135,15 @@
var
link
=
pasteContent
.
content
[
r
][
c
].
hyperLink
;
if
(
link
)
{
pastedRangeProps
.
hyperLink
=
pasteContent
.
content
[
r
][
c
];
}
//apply props by cell
}
//apply props by cell
applyPropertiesByRange
(
range
,
pastedRangeProps
);
}
}
}
}
}
}
if
(
isMultiple
)
{
arn
.
r2
=
lastSelection
.
r2
;
...
...
@@ -9149,8 +9151,11 @@
}
t
.
isChanged
=
true
;
var
arnFor
=
[
arn
,
arrFormula
];
lastSelection
.
c2
=
arn
.
c2
;
lastSelection
.
r2
=
arn
.
r2
;
var
arnFor
=
[];
arnFor
[
0
]
=
arn
;
arnFor
[
1
]
=
arrFormula
;
return
arnFor
;
};
...
...
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