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
6c8a7d40
Commit
6c8a7d40
authored
May 19, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore cells
parent
4616b950
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
337 additions
and
328 deletions
+337
-328
cell/.unit-tests/testsForFWB.html.js
cell/.unit-tests/testsForFWB.html.js
+3
-0
cell/apiDefines.js
cell/apiDefines.js
+10
-12
cell/document/empty-workbook.js
cell/document/empty-workbook.js
+6
-0
cell/model/CellInfo.js
cell/model/CellInfo.js
+145
-143
cell/model/Workbook.js
cell/model/Workbook.js
+141
-141
cell/model/autofilters.js
cell/model/autofilters.js
+17
-17
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+15
-15
No files found.
cell/.unit-tests/testsForFWB.html.js
View file @
6c8a7d40
$
(
function
(){
// Import
var
CellFormat
=
AscCommon
.
CellFormat
;
var
fGetFormatedText
=
function
(
aFormated
)
{
var
res
=
""
;
...
...
cell/apiDefines.js
View file @
6c8a7d40
...
...
@@ -196,19 +196,19 @@ var c_oAscChangeFilterOptions = {
};
var
c_oAscChangeSelectionFormatTable
=
{
all
:
1
,
data
:
2
,
row
:
3
,
column
:
4
all
:
1
,
data
:
2
,
row
:
3
,
column
:
4
};
var
c_oAscChangeTableStyleInfo
=
{
columnFirst
:
1
,
columnLast
:
2
,
columnBanded
:
3
,
rowHeader
:
4
,
rowTotal
:
5
,
rowBanded
:
6
,
columnFirst
:
1
,
columnLast
:
2
,
columnBanded
:
3
,
rowHeader
:
4
,
rowTotal
:
5
,
rowBanded
:
6
,
filterButton
:
7
};
...
...
@@ -484,6 +484,4 @@ var c_oAscPopUpSelectorType = {
prot
[
'
Func
'
]
=
prot
.
Func
;
prot
[
'
Range
'
]
=
prot
.
Range
;
prot
[
'
Table
'
]
=
prot
.
Table
;
window
[
'
Asc
'
][
'
c_oAscChangeSelectionFormatTable
'
]
=
c_oAscChangeSelectionFormatTable
;
window
[
'
Asc
'
][
'
c_oAscChangeTableStyleInfo
'
]
=
c_oAscChangeTableStyleInfo
;
})(
window
);
cell/document/empty-workbook.js
View file @
6c8a7d40
(
/**
* @param {Window} window
* @param {undefined} undefined
*/
function
(
window
,
undefined
)
{
function
getEmptyWorkbook
()
{
return
"
XLSY;v2;5958;BAKAAgAAA7kDAAAEzAMAAABaBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAPoADvsAQgAAAAIAAAABGAAAAPoABgAAAGEAOgB0AGkAbgB0AAFAnAAA+wEcAAAA+gAIAAAAYQA6AHMAYQB0AE0AbwBkAAEwVwUA+wB7AAAA+gBAnAAA+wBvAAAAA2oAAAD6AA77AGEAAAADAAAAARgAAAD6AAYAAABhADoAdABpAG4AdAAByK8AAPsBGgAAAPoABwAAAGEAOgBzAGgAYQBkAGUAAbiCAQD7ARwAAAD6AAgAAABhADoAcwBhAHQATQBvAGQAATBXBQD7AF4AAAD6AKCGAQD7AFIAAAADTQAAAPoADvsARAAAAAIAAAABGgAAAPoABwAAAGEAOgBzAGgAYQBkAGUAASBOAAD7ARwAAAD6AAgAAABhADoAcwBhAHQATQBvAGQAARjkAwD7AksAAAD6AAD7AEIAAAD6AAUAAAA1ADAAMAAwADAAAQYAAAAtADgAMAAwADAAMAACBQAAADUAMAAwADAAMAADBgAAADEAOAAwADAAMAAwAPsAIgEAAAQdAQAA+gEB+wDIAAAAAgAAAABcAAAA+gAAAAAA+wBQAAAAA0sAAAD6AA77AEIAAAACAAAAARgAAAD6AAYAAABhADoAdABpAG4AdAABgDgBAPsBHAAAAPoACAAAAGEAOgBzAGEAdABNAG8AZAAB4JMEAPsAXgAAAPoAoIYBAPsAUgAAAANNAAAA+gAO+wBEAAAAAgAAAAEaAAAA+gAHAAAAYQA6AHMAaABhAGQAZQABMHUAAPsBHAAAAPoACAAAAGEAOgBzAGEAdABNAG8AZAABQA0DAPsCRwAAAPoAAPsAPgAAAPoABQAAADUAMAAwADAAMAABBQAAADUAMAAwADAAMAACBQAAADUAMAAwADAAMAADBQAAADUAMAAwADAAMAD7BAQAAAAAAAAA
"
;
}
...
...
cell/model/CellInfo.js
View file @
6c8a7d40
This diff is collapsed.
Click to expand it.
cell/model/Workbook.js
View file @
6c8a7d40
...
...
@@ -3179,70 +3179,70 @@ function Woorksheet(wb, _index, sId){
this
.
oAllCol
=
null
;
this
.
aComments
=
[];
this
.
aCommentsCoords
=
[];
var
oThis
=
this
;
this
.
mergeManager
=
new
RangeDataManager
(
function
(
data
,
from
,
to
)
{
if
(
History
.
Is_On
()
&&
(
null
!=
from
||
null
!=
to
))
{
if
(
null
!=
from
)
{
from
=
from
.
clone
();
}
if
(
null
!=
to
)
to
=
to
.
clone
();
var
oHistoryRange
=
from
;
if
(
null
==
oHistoryRange
)
oHistoryRange
=
to
;
var
oThis
=
this
;
this
.
mergeManager
=
new
RangeDataManager
(
function
(
data
,
from
,
to
)
{
if
(
History
.
Is_On
()
&&
(
null
!=
from
||
null
!=
to
))
{
if
(
null
!=
from
)
from
=
from
.
clone
();
if
(
null
!=
to
)
to
=
to
.
clone
();
var
oHistoryRange
=
from
;
if
(
null
==
oHistoryRange
)
oHistoryRange
=
to
;
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoWorksheet
,
AscCH
.
historyitem_Worksheet_ChangeMerge
,
oThis
.
getId
(),
oHistoryRange
,
new
UndoRedoData_FromTo
(
new
UndoRedoData_BBox
(
from
),
new
UndoRedoData_BBox
(
to
)));
}
//расширяем границы
if
(
null
!=
to
)
{
if
(
to
.
r2
>=
oThis
.
nRowsCount
)
oThis
.
nRowsCount
=
to
.
r2
+
1
;
if
(
to
.
c2
>=
oThis
.
nColsCount
)
oThis
.
nColsCount
=
to
.
c2
+
1
;
}
});
this
.
hyperlinkManager
=
new
RangeDataManager
(
function
(
data
,
from
,
to
,
oChangeParam
)
{
if
(
History
.
Is_On
()
&&
(
null
!=
from
||
null
!=
to
))
{
if
(
null
!=
from
)
from
=
from
.
clone
();
if
(
null
!=
to
)
to
=
to
.
clone
();
var
oHistoryRange
=
from
;
if
(
null
==
oHistoryRange
)
oHistoryRange
=
to
;
var
oHistoryData
=
null
;
if
(
null
==
from
||
null
==
to
)
oHistoryData
=
data
.
clone
();
}
//расширяем границы
if
(
null
!=
to
){
if
(
to
.
r2
>=
oThis
.
nRowsCount
)
oThis
.
nRowsCount
=
to
.
r2
+
1
;
if
(
to
.
c2
>=
oThis
.
nColsCount
)
oThis
.
nColsCount
=
to
.
c2
+
1
;
}
});
this
.
hyperlinkManager
=
new
RangeDataManager
(
function
(
data
,
from
,
to
,
oChangeParam
){
if
(
History
.
Is_On
()
&&
(
null
!=
from
||
null
!=
to
))
{
if
(
null
!=
from
)
from
=
from
.
clone
();
if
(
null
!=
to
)
to
=
to
.
clone
();
var
oHistoryRange
=
from
;
if
(
null
==
oHistoryRange
)
oHistoryRange
=
to
;
var
oHistoryData
=
null
;
if
(
null
==
from
||
null
==
to
)
oHistoryData
=
data
.
clone
();
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoWorksheet
,
AscCH
.
historyitem_Worksheet_ChangeHyperlink
,
oThis
.
getId
(),
oHistoryRange
,
new
AscCommonExcel
.
UndoRedoData_FromToHyperlink
(
from
,
to
,
oHistoryData
));
}
if
(
null
!=
to
)
data
.
Ref
=
oThis
.
getRange3
(
to
.
r1
,
to
.
c1
,
to
.
r2
,
to
.
c2
);
else
if
(
oChangeParam
&&
oChangeParam
.
removeStyle
&&
null
!=
data
.
Ref
)
data
.
Ref
.
cleanFormat
();
//расширяем границы
if
(
null
!=
to
)
{
if
(
to
.
r2
>=
oThis
.
nRowsCount
)
oThis
.
nRowsCount
=
to
.
r2
+
1
;
if
(
to
.
c2
>=
oThis
.
nColsCount
)
oThis
.
nColsCount
=
to
.
c2
+
1
;
}
});
this
.
hyperlinkManager
.
setDependenceManager
(
this
.
mergeManager
);
}
if
(
null
!=
to
)
data
.
Ref
=
oThis
.
getRange3
(
to
.
r1
,
to
.
c1
,
to
.
r2
,
to
.
c2
);
else
if
(
oChangeParam
&&
oChangeParam
.
removeStyle
&&
null
!=
data
.
Ref
)
data
.
Ref
.
cleanFormat
();
//расширяем границы
if
(
null
!=
to
)
{
if
(
to
.
r2
>=
oThis
.
nRowsCount
)
oThis
.
nRowsCount
=
to
.
r2
+
1
;
if
(
to
.
c2
>=
oThis
.
nColsCount
)
oThis
.
nColsCount
=
to
.
c2
+
1
;
}
});
this
.
hyperlinkManager
.
setDependenceManager
(
this
.
mergeManager
);
this
.
DrawingDocument
=
new
AscCommon
.
CDrawingDocument
();
this
.
sheetViews
=
[];
this
.
aConditionalFormatting
=
[];
this
.
sheetPr
=
null
;
this
.
aFormulaExt
=
null
;
this
.
sheetViews
=
[];
this
.
aConditionalFormatting
=
[];
this
.
sheetPr
=
null
;
this
.
aFormulaExt
=
null
;
this
.
autoFilters
=
AscCommonExcel
.
AutoFilters
!==
undefined
?
new
AscCommonExcel
.
AutoFilters
(
this
)
:
null
;
this
.
sparklineGroups
=
new
sparklineGroups
();
this
.
oDrawingOjectsManager
=
new
DrawingObjectsManager
(
this
);
this
.
oDrawingOjectsManager
=
new
DrawingObjectsManager
(
this
);
this
.
contentChanges
=
new
AscCommon
.
CContentChanges
();
this
.
aSparklineGroups
=
[];
/*handlers*/
this
.
handlers
=
null
;
/*handlers*/
this
.
handlers
=
null
;
}
Woorksheet
.
prototype
.
addContentChanges
=
function
(
changes
)
...
...
@@ -4141,7 +4141,7 @@ Woorksheet.prototype._insertColsBefore=function(index, count){
}
this
.
autoFilters
.
insertColumn
(
"
insCells
"
,
new
Asc
.
Range
(
index
,
0
,
index
+
count
-
1
,
gc_nMaxRow0
),
c_oAscInsertOptions
.
InsertColumns
);
this
.
workbook
.
unLockDraw
();
this
.
workbook
.
buildRecalc
();
...
...
@@ -8622,27 +8622,27 @@ Range.prototype.sort=function(nOption, nStartCol, sortColor){
{
if
(
nLastRow0
<
nRow0
)
nLastRow0
=
nRow0
;
var
val
=
oCell
.
getValueWithoutFormat
();
//for sort color
var
colorFillCell
,
colorsTextCell
=
null
;
if
(
colorFill
)
{
var
styleCell
=
oCell
.
getStyle
();
var
val
=
oCell
.
getValueWithoutFormat
();
//for sort color
var
colorFillCell
,
colorsTextCell
=
null
;
if
(
colorFill
)
{
var
styleCell
=
oCell
.
getStyle
();
colorFillCell
=
styleCell
!==
null
&&
styleCell
.
fill
?
styleCell
.
fill
.
bg
:
null
;
}
else
if
(
colorText
)
{
var
value2
=
oCell
.
getValue2
();
for
(
var
n
=
0
;
n
<
value2
.
length
;
n
++
)
{
}
else
if
(
colorText
)
{
var
value2
=
oCell
.
getValue2
();
for
(
var
n
=
0
;
n
<
value2
.
length
;
n
++
)
{
if
(
null
===
colorsTextCell
)
{
colorsTextCell
=
[];
}
}
colorsTextCell
.
push
(
value2
[
n
].
format
.
c
);
}
}
}
var
nNumber
=
null
;
...
...
@@ -8655,10 +8655,10 @@ Range.prototype.sort=function(nOption, nStartCol, sortColor){
else
sText
=
val
;
aSortElems
.
push
({
row
:
nRow0
,
num
:
nNumber
,
text
:
sText
,
colorFill
:
colorFillCell
,
colorsText
:
colorsTextCell
});
}
else
if
(
isSortColor
)
{
aSortElems
.
push
({
row
:
nRow0
,
num
:
nNumber
,
text
:
sText
,
colorFill
:
colorFillCell
,
colorsText
:
colorsTextCell
});
}
else
if
(
isSortColor
)
{
aSortElems
.
push
({
row
:
nRow0
,
num
:
nNumber
,
text
:
sText
,
colorFill
:
colorFillCell
,
colorsText
:
colorsTextCell
});
}
}
}
...
...
@@ -8687,77 +8687,77 @@ Range.prototype.sort=function(nOption, nStartCol, sortColor){
}
function
strcmp
(
str1
,
str2
)
{
return
(
(
str1
==
str2
)
?
0
:
(
(
str1
>
str2
)
?
1
:
-
1
)
);
}
//color sort
var
colorFillCmp
=
function
(
color1
,
color2
)
{
var
res
=
false
;
}
//color sort
var
colorFillCmp
=
function
(
color1
,
color2
)
{
var
res
=
false
;
//TODO возможно так сравнивать не правильно, позже пересмотреть
if
(
colorFill
)
{
if
(
colorFill
)
{
res
=
(
color1
!==
null
&&
color2
!==
null
&&
color1
.
rgb
===
color2
.
rgb
)
||
(
color1
===
color2
)
?
true
:
false
;
}
else
if
(
colorText
&&
color1
&&
color1
.
length
)
{
for
(
var
n
=
0
;
n
<
color1
.
length
;
n
++
)
{
}
else
if
(
colorText
&&
color1
&&
color1
.
length
)
{
for
(
var
n
=
0
;
n
<
color1
.
length
;
n
++
)
{
if
(
color1
[
n
]
&&
color2
!==
null
&&
color1
[
n
].
rgb
===
color2
.
rgb
)
{
res
=
true
;
break
;
}
}
}
return
res
;
};
if
(
isSortColor
)
{
var
newArrayNeedColor
=
[];
var
newArrayAnotherColor
=
[];
for
(
var
i
=
0
;
i
<
aSortElems
.
length
;
i
++
)
{
{
res
=
true
;
break
;
}
}
}
return
res
;
};
if
(
isSortColor
)
{
var
newArrayNeedColor
=
[];
var
newArrayAnotherColor
=
[];
for
(
var
i
=
0
;
i
<
aSortElems
.
length
;
i
++
)
{
var
color
=
colorFill
?
aSortElems
[
i
].
colorFill
:
aSortElems
[
i
].
colorsText
;
if
(
colorFillCmp
(
color
,
sortColor
))
{
newArrayNeedColor
.
push
(
aSortElems
[
i
]);
}
else
{
newArrayAnotherColor
.
push
(
aSortElems
[
i
]);
}
}
if
(
colorFillCmp
(
color
,
sortColor
))
{
newArrayNeedColor
.
push
(
aSortElems
[
i
]);
}
else
{
newArrayAnotherColor
.
push
(
aSortElems
[
i
]);
}
}
aSortElems
=
newArrayNeedColor
.
concat
(
newArrayAnotherColor
);
}
else
{
aSortElems
.
sort
(
function
(
a
,
b
){
var
res
=
0
;
if
(
null
!=
a
.
text
)
{
if
(
null
!=
b
.
text
)
res
=
strcmp
(
a
.
text
.
toUpperCase
(),
b
.
text
.
toUpperCase
());
else
res
=
1
;
}
else
if
(
null
!=
a
.
num
)
{
if
(
null
!=
b
.
num
)
res
=
a
.
num
-
b
.
num
;
else
res
=
-
1
;
}
if
(
0
==
res
)
res
=
a
.
row
-
b
.
row
;
else
if
(
!
bAscent
)
res
=
-
res
;
return
res
;
});
}
else
{
aSortElems
.
sort
(
function
(
a
,
b
){
var
res
=
0
;
if
(
null
!=
a
.
text
)
{
if
(
null
!=
b
.
text
)
res
=
strcmp
(
a
.
text
.
toUpperCase
(),
b
.
text
.
toUpperCase
());
else
res
=
1
;
}
else
if
(
null
!=
a
.
num
)
{
if
(
null
!=
b
.
num
)
res
=
a
.
num
-
b
.
num
;
else
res
=
-
1
;
}
if
(
0
==
res
)
res
=
a
.
row
-
b
.
row
;
else
if
(
!
bAscent
)
res
=
-
res
;
return
res
;
});
}
//проверяем что это не пустая операция
...
...
cell/model/autofilters.js
View file @
6c8a7d40
"
use strict
"
;
"
use strict
"
;
(
/**
* @param {jQuery} $
...
...
@@ -455,7 +455,7 @@
History
.
EndTransaction
();
};
addFilterCallBack
(
true
);
},
...
...
@@ -1600,7 +1600,7 @@
{
activeCells
:
cellIdRange
,
type
:
type
,
cellId
:
cellId
,
displayName
:
displayName
},
null
,
curFilter
.
Ref
);
History
.
EndTransaction
();
};
var
onSortColorAutoFilterCallback
=
function
(
type
)
{
...
...
@@ -1615,9 +1615,9 @@
curFilter
.
SortState
=
new
SortState
();
curFilter
.
SortState
.
Ref
=
new
Asc
.
Range
(
startCol
,
curFilter
.
Ref
.
r1
,
startCol
,
maxFilterRow
);
curFilter
.
SortState
.
SortConditions
=
[];
curFilter
.
SortState
.
SortConditions
[
0
]
=
new
SortCondition
();
curFilter
.
SortState
.
SortConditions
[
0
]
=
new
AscCommonExcel
.
SortCondition
();
}
curFilter
.
SortState
.
SortConditions
[
0
]
=
new
SortCondition
();
curFilter
.
SortState
.
SortConditions
[
0
]
=
new
AscCommonExcel
.
SortCondition
();
var
cellIdRange
=
new
Asc
.
Range
(
startCol
,
filterRef
.
r1
,
startCol
,
filterRef
.
r1
);
...
...
@@ -1663,13 +1663,13 @@
}
}
},
getPropForSort
:
function
(
cellId
,
activeRange
,
displayName
)
{
var
worksheet
=
this
.
worksheet
;
var
t
=
this
;
var
curFilter
,
sortRange
,
filterRef
,
startCol
,
maxFilterRow
;
var
isCellIdString
=
false
;
if
(
cellId
!==
undefined
&&
cellId
!=
""
&&
typeof
cellId
==
'
string
'
)
{
...
...
@@ -1766,7 +1766,7 @@
{
return
this
.
_cleanFilterColumnsAndSortState
(
tablePart
,
activeCell
);
}
}
}
}
else
{
...
...
@@ -1925,7 +1925,7 @@
//проверяем покрывает ли диапазон хотя бы один автофильтр
var
worksheet
=
this
.
worksheet
;
var
isUpdate
=
null
;
var
bUndoChanges
=
worksheet
.
workbook
.
bUndoChanges
;
var
bRedoChanges
=
worksheet
.
workbook
.
bRedoChanges
;
...
...
@@ -2001,20 +2001,20 @@
this
.
_cleanStyleTable
(
oCurFilter
[
i
].
Ref
);
this
.
_setColorStyleTable
(
findFilters
[
i
].
Ref
,
findFilters
[
i
]);
}
if
(
!
bUndoChanges
&&
!
bRedoChanges
)
{
if
(
!
addRedo
&&
!
data
)
{
if
(
!
addRedo
&&
!
data
)
{
this
.
_addHistoryObj
(
oCurFilter
,
AscCH
.
historyitem_AutoFilter_Move
,
{
arnTo
:
arnTo
,
arnFrom
:
arnFrom
,
activeCells
:
activeRange
});
addRedo
=
true
;
}
else
if
(
!
data
&&
addRedo
)
addRedo
=
true
;
}
else
if
(
!
data
&&
addRedo
)
this
.
_addHistoryObj
(
oCurFilter
,
AscCH
.
historyitem_AutoFilter_Move
,
null
,
null
,
null
,
null
,
activeRange
);
}
}
}
}
}
var
arnToRange
=
new
Asc
.
Range
(
arnTo
.
c1
,
arnTo
.
r1
,
arnTo
.
c2
,
arnTo
.
r2
);
var
intersectionRangeWithTableParts
=
this
.
_intersectionRangeWithTableParts
(
arnToRange
);
...
...
@@ -3658,7 +3658,7 @@
//filter current button
var
checkValue
=
isDateTimeFormat
?
val
:
text
;
if
(
!
currentFilterColumn
.
Top10
&&
!
currentFilterColumn
.
CustomFiltersObj
&&
!
currentFilterColumn
.
ColorFilter
&&
!
currentFilterColumn
.
isHideValue
(
checkValue
,
isDateTimeFormat
,
null
,
cell
))
!
currentFilterColumn
.
ColorFilter
&&
!
currentFilterColumn
.
isHideValue
(
checkValue
,
isDateTimeFormat
))
{
if
(
isOpenHiddenRows
)
worksheet
.
setRowHidden
(
false
,
i
,
i
);
...
...
cell/view/WorksheetView.js
View file @
6c8a7d40
...
...
@@ -5401,14 +5401,14 @@
}
};
WorksheetView
.
prototype
.
prepareDepCells
=
function
(
se
)
{
WorksheetView
.
prototype
.
prepareDepCells
=
function
(
se
)
{
var
activeCell
=
this
.
activeRange
,
mc
=
this
.
model
.
getMergedByCell
(
activeCell
.
startRow
,
activeCell
.
startCol
),
c1
=
mc
?
mc
.
c1
:
activeCell
.
startCol
,
r1
=
mc
?
mc
.
r1
:
activeCell
.
startRow
,
c
=
this
.
_getVisibleCell
(
c1
,
r1
),
nodes
=
(
se
==
AscCommonExcel
.
c_oAscDrawDepOptions
.
Master
)
?
this
.
model
.
workbook
.
dependencyFormulas
.
getMasterNodes
(
this
.
model
.
getId
(),
c
.
getName
()
)
:
this
.
model
.
workbook
.
dependencyFormulas
.
getSlaveNodes
(
this
.
model
.
getId
(),
c
.
getName
()
);
if
(
!
nodes
)
{
if
(
!
nodes
)
{
return
;
}
if
(
!
this
.
depDrawCells
)
{
if
(
!
this
.
depDrawCells
)
{
this
.
depDrawCells
=
{};
}
...
...
@@ -5420,9 +5420,9 @@
else
{
var
to
=
{},
to1
,
id
=
AscCommonExcel
.
getVertexId
(
this
.
model
.
getId
(),
c
.
getName
()
);
to
[
AscCommonExcel
.
getVertexId
(
this
.
model
.
getId
(),
c
.
getName
()
)]
=
this
.
model
.
workbook
.
dependencyFormulas
.
getNode
(
this
.
model
.
getId
(),
c
.
getName
()
);
to1
=
this
.
model
.
workbook
.
dependencyFormulas
.
getNode
(
this
.
model
.
getId
(),
c
.
getName
()
);
for
(
var
id2
in
nodes
)
{
if
(
this
.
depDrawCells
[
id2
]
)
{
to1
=
this
.
model
.
workbook
.
dependencyFormulas
.
getNode
(
this
.
model
.
getId
(),
c
.
getName
()
);
for
(
var
id2
in
nodes
)
{
if
(
this
.
depDrawCells
[
id2
]
)
{
$
.
extend
(
this
.
depDrawCells
[
id2
].
to
,
to
)
}
else
{
...
...
@@ -8767,7 +8767,7 @@
this
.
handlers
.
trigger
(
"
onErrorEvent
"
,
c_oAscError
.
ID
.
CannotMoveRange
,
c_oAscError
.
Level
.
NoCritical
);
this
.
_cleanSelectionMoveRange
();
}
else
if
(
resmove
===
-
1
&&
this
.
af_isCheckMoveRange
(
arnFrom
,
arnTo
)
)
{
else
if
(
resmove
===
-
1
)
{
var
t
=
this
;
this
.
model
.
workbook
.
handlers
.
trigger
(
"
asc_onConfirmAction
"
,
Asc
.
c_oAscConfirm
.
ConfirmReplaceRange
,
function
(
can
)
{
if
(
can
)
{
...
...
@@ -8821,7 +8821,7 @@
t
.
model
.
_moveRange
(
arnFrom
,
arnTo
,
copyRange
);
t
.
cellCommentator
.
moveRangeComments
(
arnFrom
,
arnTo
);
t
.
objectRender
.
moveRangeDrawingObject
(
arnFrom
,
arnTo
);
// Вызываем функцию пересчета для заголовков форматированной таблицы
t
.
model
.
autoFilters
.
renameTableColumn
(
arnFrom
);
t
.
model
.
autoFilters
.
renameTableColumn
(
arnTo
);
...
...
@@ -11811,7 +11811,7 @@
var
t
=
this
;
var
ar
=
t
.
activeRange
.
clone
(
true
);
var
isChangeAutoFilterToTablePart
=
function
(
addFormatTableOptionsObj
)
{
var
res
=
false
;
...
...
@@ -11870,7 +11870,7 @@
if
(
styleName
===
null
)
{
addFilterCallBack
();
}
}
else
{
var
filterInfo
=
t
.
model
.
autoFilters
.
_getFilterInfoByAddTableProps
(
ar
,
addFormatTableOptionsObj
);
...
...
@@ -11929,7 +11929,7 @@
t
.
af_drawButtons
(
filterRange
);
t
.
_onUpdateFormatTable
(
filterRange
,
false
,
true
);
}
}
t
.
_isLockedCells
(
filterRange
,
/*subType*/
null
,
deleteFilterCallBack
);
...
...
@@ -11940,7 +11940,7 @@
{
History
.
Create_NewPoint
();
History
.
StartTransaction
();
t
.
model
.
autoFilters
.
addAutoFilter
(
null
,
ar
);
t
.
_onUpdateFormatTable
(
filterRange
,
false
,
true
);
...
...
@@ -12201,7 +12201,7 @@
return
;
}
var
sortProps
=
t
.
model
.
autoFilters
.
getPropForSort
(
cellId
,
ar
,
displayName
);
var
onSortAutoFilterCallBack
=
function
()
{
History
.
Create_NewPoint
();
...
...
@@ -12215,7 +12215,7 @@
t
.
_onUpdateFormatTable
(
sortProps
.
sortRange
.
bbox
,
false
);
History
.
EndTransaction
();
};
};
if
(
null
===
sortProps
)
{
...
...
@@ -12387,7 +12387,7 @@
}
return
arrResult
;
};
WorksheetView
.
prototype
.
af_setStyleAfterOpen
=
function
()
{
var
worksheet
=
this
.
model
;
...
...
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