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
46b48509
Commit
46b48509
authored
Sep 29, 2017
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
errors SheetMemory.insertRange,copyRangeByChunk
parent
544ff7de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
cell/model/Workbook.js
cell/model/Workbook.js
+17
-12
No files found.
cell/model/Workbook.js
View file @
46b48509
...
...
@@ -2500,12 +2500,14 @@
}
};
SheetMemory
.
prototype
.
insertRange
=
function
(
start
,
insertCount
)
{
this
.
checkSize
(
this
.
count
+
insertCount
);
var
startOffset
=
start
*
this
.
structSize
;
var
endOffset
=
(
start
+
insertCount
)
*
this
.
structSize
;
var
endData
=
(
this
.
count
-
insertCount
)
*
this
.
structSize
;
this
.
data
.
set
(
this
.
data
.
subarray
(
startOffset
,
endData
),
endOffset
);
this
.
data
.
fill
(
0
,
startOffset
,
endOffset
);
if
(
start
<
this
.
count
)
{
this
.
checkSize
(
this
.
count
+
insertCount
);
var
startOffset
=
start
*
this
.
structSize
;
var
endOffset
=
(
start
+
insertCount
)
*
this
.
structSize
;
var
endData
=
(
this
.
count
-
insertCount
)
*
this
.
structSize
;
this
.
data
.
set
(
this
.
data
.
subarray
(
startOffset
,
endData
),
endOffset
);
this
.
data
.
fill
(
0
,
startOffset
,
endOffset
);
}
};
SheetMemory
.
prototype
.
copyRange
=
function
(
sheetMemory
,
startFrom
,
startTo
,
count
)
{
sheetMemory
.
checkSize
(
startFrom
+
count
);
...
...
@@ -2517,11 +2519,14 @@
this
.
data
.
set
(
sheetMemory
.
data
.
subarray
(
startOffsetFrom
,
endOffsetFrom
),
startOffsetTo
);
};
SheetMemory
.
prototype
.
copyRangeByChunk
=
function
(
from
,
fromCount
,
to
,
toCount
)
{
var
fromStartOffset
=
from
*
this
.
structSize
;
var
fromEndOffset
=
(
from
+
fromCount
)
*
this
.
structSize
;
var
fromSubArray
=
this
.
data
.
subarray
(
fromStartOffset
,
fromEndOffset
);
for
(
var
i
=
to
;
i
<
to
+
toCount
;
i
+=
fromCount
)
{
this
.
data
.
set
(
fromSubArray
,
i
*
this
.
structSize
);
if
(
from
<
this
.
count
)
{
this
.
checkSize
(
to
+
toCount
);
var
fromStartOffset
=
from
*
this
.
structSize
;
var
fromEndOffset
=
Math
.
min
((
from
+
fromCount
),
this
.
count
)
*
this
.
structSize
;
var
fromSubArray
=
this
.
data
.
subarray
(
fromStartOffset
,
fromEndOffset
);
for
(
var
i
=
to
;
i
<
to
+
toCount
;
i
+=
fromCount
)
{
this
.
data
.
set
(
fromSubArray
,
i
*
this
.
structSize
);
}
}
};
SheetMemory
.
prototype
.
fill
=
function
(
value
,
start
,
end
)
{
...
...
@@ -4407,7 +4412,7 @@
}
else
{
toData
=
oThis
.
getColDataNoEmpty
(
to
);
if
(
toData
)
{
toData
.
copyRange
(
fromData
,
r1From
,
r1To
,
count
);
toData
.
fill
(
0
,
r1To
,
r1To
+
count
);
}
}
};
...
...
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