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
a409cd22
Commit
a409cd22
authored
8 years ago
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix copy (write to binary)
parent
d4ee817d
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
30 deletions
+28
-30
cell/model/Serialize.js
cell/model/Serialize.js
+28
-30
No files found.
cell/model/Serialize.js
View file @
a409cd22
...
...
@@ -3063,45 +3063,43 @@
this
.
memory
.
WriteByte
(
c_oSerPropLenType
.
Variable
);
this
.
bs
.
WriteItemWithLength
(
function
(){
oThis
.
WriteCells
(
oRow
);});
};
this
.
WriteCells
=
function
(
row
)
{
this
.
WriteCells
=
function
(
row
)
{
var
oThis
=
this
;
var
aIndexes
=
[];
var
bIsTablePartContainActiveRange
;
if
(
oThis
.
isCopyPaste
)
{
for
(
var
i
=
oThis
.
isCopyPaste
.
c1
;
i
<=
oThis
.
isCopyPaste
.
c2
;
i
++
)
var
bIsTablePartContainActiveRange
;
if
(
oThis
.
isCopyPaste
)
{
for
(
var
i
=
oThis
.
isCopyPaste
.
c1
;
i
<=
oThis
.
isCopyPaste
.
c2
;
i
++
)
{
aIndexes
.
push
(
i
);
var
api
=
window
[
"
Asc
"
][
"
editor
"
];
var
ws
=
api
.
wb
.
getWorksheet
();
bIsTablePartContainActiveRange
=
ws
.
model
.
autoFilters
.
isTablePartContainActiveRange
(
ws
.
activeRange
);
}
else
{
for
(
var
i
in
row
.
c
)
}
var
api
=
window
[
"
Asc
"
][
"
editor
"
];
var
ws
=
api
.
wb
.
getWorksheet
();
bIsTablePartContainActiveRange
=
ws
.
model
.
autoFilters
.
isTablePartContainActiveRange
(
ws
.
model
.
selectionRange
.
getLast
());
}
else
{
for
(
var
i
in
row
.
c
)
{
aIndexes
.
push
(
i
-
0
);
}
}
aIndexes
.
sort
(
AscCommon
.
fSortAscending
);
for
(
var
i
=
0
,
length
=
aIndexes
.
length
;
i
<
length
;
++
i
)
{
for
(
var
i
=
0
,
length
=
aIndexes
.
length
;
i
<
length
;
++
i
)
{
var
cell
=
row
.
c
[
aIndexes
[
i
]];
//готовим ячейку к записи
if
(
!
oThis
.
isCopyPaste
||
(
oThis
.
isCopyPaste
&&
cell
))
{
var
nXfsId
;
var
cellXfs
=
cell
.
xfs
;
if
(
oThis
.
isCopyPaste
&&
bIsTablePartContainActiveRange
)
{
nXfsId
=
this
.
prepareXfs
(
cell
.
compiledXfs
);
cellXfs
=
cell
.
compiledXfs
;
}
else
nXfsId
=
this
.
prepareXfs
(
cell
.
xfs
);
if
(
!
oThis
.
isCopyPaste
||
(
oThis
.
isCopyPaste
&&
cell
))
{
var
nXfsId
;
var
cellXfs
=
cell
.
xfs
;
if
(
oThis
.
isCopyPaste
&&
bIsTablePartContainActiveRange
)
{
nXfsId
=
this
.
prepareXfs
(
cell
.
compiledXfs
);
cellXfs
=
cell
.
compiledXfs
;
}
else
{
nXfsId
=
this
.
prepareXfs
(
cell
.
xfs
);
}
//сохраняем как и Excel даже пустой стиль(нужно чтобы убрать стиль строки/колонки)
if
(
null
!=
cellXfs
||
false
==
cell
.
isEmptyText
())
this
.
bs
.
WriteItem
(
c_oSerRowTypes
.
Cell
,
function
(){
oThis
.
WriteCell
(
cell
,
nXfsId
,
row
.
index
);});
if
(
null
!=
cellXfs
||
false
==
cell
.
isEmptyText
())
{
this
.
bs
.
WriteItem
(
c_oSerRowTypes
.
Cell
,
function
()
{
oThis
.
WriteCell
(
cell
,
nXfsId
,
row
.
index
);
});
}
}
}
};
...
...
This diff is collapsed.
Click to expand it.
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