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
d33b5f57
Commit
d33b5f57
authored
Nov 28, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 33540
parent
d2f6e6f5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
6 deletions
+49
-6
cell/model/History.js
cell/model/History.js
+1
-1
cell/model/Workbook.js
cell/model/Workbook.js
+1
-1
cell/model/WorkbookElems.js
cell/model/WorkbookElems.js
+39
-4
cell/utils/utils.js
cell/utils/utils.js
+8
-0
No files found.
cell/model/History.js
View file @
d33b5f57
...
...
@@ -170,7 +170,7 @@ function (window, undefined) {
window
[
'
AscCH
'
].
historyitem_Sparkline_ColorHigh
=
24
;
window
[
'
AscCH
'
].
historyitem_Sparkline_ColorLow
=
25
;
window
[
'
AscCH
'
].
historyitem_Sparkline_F
=
26
;
window
[
'
AscCH
'
].
historyitem_Sparkline_C
loneSparklines
=
27
;
window
[
'
AscCH
'
].
historyitem_Sparkline_C
hangeData
=
27
;
window
[
'
AscCH
'
].
historyitem_Sparkline_RemoveData
=
28
;
window
[
'
AscCH
'
].
historyitem_Sparkline_RemoveSparkline
=
29
;
...
...
cell/model/Workbook.js
View file @
d33b5f57
...
...
@@ -3516,7 +3516,7 @@ Woorksheet.prototype.clone=function(sNewId, sName, tableNames){
var
newSparkline
;
for
(
i
=
0
;
i
<
this
.
aSparklineGroups
.
length
;
++
i
)
{
newSparkline
=
this
.
aSparklineGroups
[
i
].
clone
();
newSparkline
.
setWorksheet
(
oNewWs
);
newSparkline
.
setWorksheet
(
oNewWs
,
wsFrom
);
oNewWs
.
aSparklineGroups
.
push
(
newSparkline
);
}
};
...
...
cell/model/WorkbookElems.js
View file @
d33b5f57
...
...
@@ -4785,7 +4785,7 @@ CellArea.prototype = {
w
.
WriteString2
(
data
.
newPr
);
}
break
;
case
AscCH
.
historyitem_Sparkline_C
loneSparklines
:
case
AscCH
.
historyitem_Sparkline_C
hangeData
:
if
(
data
.
newPr
)
{
w
.
WriteLong
(
data
.
newPr
.
length
);
data
.
newPr
.
forEach
(
function
(
item
)
{
...
...
@@ -4902,7 +4902,8 @@ CellArea.prototype = {
case
AscCH
.
historyitem_Sparkline_F
:
this
.
f
=
r
.
GetBool
()
?
r
.
GetString2
()
:
null
;
break
;
case
AscCH
.
historyitem_Sparkline_CloneSparklines
:
case
AscCH
.
historyitem_Sparkline_ChangeData
:
this
.
arrSparklines
=
[];
var
count
=
r
.
GetLong
(),
oSparkline
;
for
(
var
i
=
0
;
i
<
count
;
++
i
)
{
oSparkline
=
new
sparkline
();
...
...
@@ -4942,6 +4943,7 @@ CellArea.prototype = {
}
};
sparklineGroup
.
prototype
.
Undo
=
function
(
data
)
{
var
t
=
this
;
switch
(
data
.
Type
)
{
case
AscCH
.
historyitem_Sparkline_Type
:
this
.
type
=
data
.
oldPr
;
...
...
@@ -5021,6 +5023,14 @@ CellArea.prototype = {
case
AscCH
.
historyitem_Sparkline_F
:
this
.
f
=
data
.
oldPr
;
break
;
case
AscCH
.
historyitem_Sparkline_ChangeData
:
this
.
arrSparklines
=
[];
if
(
data
.
oldPr
)
{
data
.
oldPr
.
forEach
(
function
(
item
)
{
t
.
arrSparklines
.
push
(
item
.
clone
());
});
}
break
;
case
AscCH
.
historyitem_Sparkline_RemoveData
:
this
.
arrSparklines
.
push
(
data
.
oldPr
);
break
;
...
...
@@ -5034,6 +5044,7 @@ CellArea.prototype = {
this
.
cleanCache
();
};
sparklineGroup
.
prototype
.
Redo
=
function
(
data
)
{
var
t
=
this
;
switch
(
data
.
Type
)
{
case
AscCH
.
historyitem_Sparkline_Type
:
this
.
type
=
data
.
newPr
;
...
...
@@ -5113,6 +5124,14 @@ CellArea.prototype = {
case
AscCH
.
historyitem_Sparkline_F
:
this
.
f
=
data
.
newPr
;
break
;
case
AscCH
.
historyitem_Sparkline_ChangeData
:
this
.
arrSparklines
=
[];
if
(
data
.
newPr
)
{
data
.
newPr
.
forEach
(
function
(
item
)
{
t
.
arrSparklines
.
push
(
item
.
clone
());
});
}
break
;
case
AscCH
.
historyitem_Sparkline_RemoveData
:
this
.
remove
(
data
.
oldPr
.
sqref
);
break
;
...
...
@@ -5156,8 +5175,18 @@ CellArea.prototype = {
this
.
colorHigh
=
new
RgbColor
(
defaultOtherColor
);
this
.
colorLow
=
new
RgbColor
(
defaultOtherColor
);
};
sparklineGroup
.
prototype
.
setWorksheet
=
function
(
worksheet
)
{
sparklineGroup
.
prototype
.
setWorksheet
=
function
(
worksheet
,
oldWorksheet
)
{
this
.
worksheet
=
worksheet
;
if
(
oldWorksheet
)
{
var
oldSparklines
=
[];
var
newSparklines
=
[];
for
(
var
i
=
0
;
i
<
this
.
arrSparklines
.
length
;
++
i
)
{
oldSparklines
.
push
(
this
.
arrSparklines
[
i
].
clone
());
this
.
arrSparklines
[
i
].
updateWorksheet
(
worksheet
.
sName
,
oldWorksheet
.
sName
);
newSparklines
.
push
(
this
.
arrSparklines
[
i
].
clone
());
}
History
.
Add
(
this
,
{
Type
:
AscCH
.
historyitem_Sparkline_ChangeData
,
oldPr
:
oldSparklines
,
newPr
:
newSparklines
});
}
};
sparklineGroup
.
prototype
.
set
=
function
(
val
)
{
var
t
=
this
;
...
...
@@ -5214,7 +5243,7 @@ CellArea.prototype = {
res
.
arrSparklines
.
push
(
this
.
arrSparklines
[
i
].
clone
());
newSparklines
.
push
(
this
.
arrSparklines
[
i
].
clone
());
}
History
.
Add
(
res
,
{
Type
:
AscCH
.
historyitem_Sparkline_C
loneSparklines
,
oldPr
:
null
,
newPr
:
newSparklines
});
History
.
Add
(
res
,
{
Type
:
AscCH
.
historyitem_Sparkline_C
hangeData
,
oldPr
:
null
,
newPr
:
newSparklines
});
}
return
res
;
...
...
@@ -5601,6 +5630,12 @@ CellArea.prototype = {
this
.
f
=
f
;
this
.
_f
=
AscCommonExcel
.
g_oRangeCache
.
getRange3D
(
this
.
f
);
};
sparkline
.
prototype
.
updateWorksheet
=
function
(
sheet
,
oldSheet
)
{
if
(
this
.
_f
&&
oldSheet
===
this
.
_f
.
sheet
&&
(
null
===
this
.
_f
.
sheet2
||
oldSheet
===
this
.
_f
.
sheet2
))
{
this
.
_f
.
setSheet
(
sheet
);
this
.
f
=
this
.
_f
.
getName
();
}
};
sparkline
.
prototype
.
checkInRange
=
function
(
range
)
{
return
this
.
sqref
?
range
.
isIntersect
(
this
.
sqref
)
:
false
;
};
...
...
cell/utils/utils.js
View file @
d33b5f57
...
...
@@ -585,6 +585,7 @@
*/
function
Range3D
()
{
this
.
sheet
=
''
;
this
.
sheet2
=
''
;
if
(
3
==
arguments
.
length
)
{
var
range
=
arguments
[
0
];
...
...
@@ -613,6 +614,13 @@
Range3D
.
prototype
.
clone
=
function
()
{
return
new
Range3D
(
ActiveRange
.
superclass
.
clone
.
apply
(
this
,
arguments
),
this
.
sheet
,
this
.
sheet2
);
};
Range3D
.
prototype
.
setSheet
=
function
(
sheet
,
sheet2
)
{
this
.
sheet
=
sheet
;
this
.
sheet2
=
sheet2
?
sheet2
:
sheet
;
};
Range3D
.
prototype
.
getName
=
function
()
{
return
AscCommon
.
parserHelp
.
get3DRef
(
this
.
sheet
,
Range3D
.
superclass
.
getName
.
apply
(
this
));
};
/**
* @constructor
...
...
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