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
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;BAKAAgAAA7kDAAAEzAMAAABaBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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ADvsAQgAAAAIAAAABGAAAAPoABgAAAGEAOgB0AGkAbgB0AAFAnAAA+wEcAAAA+gAIAAAAYQA6AHMAYQB0AE0AbwBkAAEwVwUA+wB7AAAA+gBAnAAA+wBvAAAAA2oAAAD6AA77AGEAAAADAAAAARgAAAD6AAYAAABhADoAdABpAG4AdAAByK8AAPsBGgAAAPoABwAAAGEAOgBzAGgAYQBkAGUAAbiCAQD7ARwAAAD6AAgAAABhADoAcwBhAHQATQBvAGQAATBXBQD7AF4AAAD6AKCGAQD7AFIAAAADTQAAAPoADvsARAAAAAIAAAABGgAAAPoABwAAAGEAOgBzAGgAYQBkAGUAASBOAAD7ARwAAAD6AAgAAABhADoAcwBhAHQATQBvAGQAARjkAwD7AksAAAD6AAD7AEIAAAD6AAUAAAA1ADAAMAAwADAAAQYAAAAtADgAMAAwADAAMAACBQAAADUAMAAwADAAMAADBgAAADEAOAAwADAAMAAwAPsAIgEAAAQdAQAA+gEB+wDIAAAAAgAAAABcAAAA+gAAAAAA+wBQAAAAA0sAAAD6AA77AEIAAAACAAAAARgAAAD6AAYAAABhADoAdABpAG4AdAABgDgBAPsBHAAAAPoACAAAAGEAOgBzAGEAdABNAG8AZAAB4JMEAPsAXgAAAPoAoIYBAPsAUgAAAANNAAAA+gAO+wBEAAAAAgAAAAEaAAAA+gAHAAAAYQA6AHMAaABhAGQAZQABMHUAAPsBHAAAAPoACAAAAGEAOgBzAGEAdABNAG8AZAABQA0DAPsCRwAAAPoAAPsAPgAAAPoABQAAADUAMAAwADAAMAABBQAAADUAMAAwADAAMAACBQAAADUAMAAwADAAMAADBQAAADUAMAAwADAAMAD7BAQAAAAAAAAA
"
;
}
...
...
cell/model/CellInfo.js
View file @
6c8a7d40
"
use strict
"
;
(
/**
* @param {Window} window
* @param {undefined} undefined
*/
* @param {Window} window
* @param {undefined} undefined
*/
function
(
window
,
undefined
)
{
// Import
var
c_oAscBorderStyles
=
AscCommon
.
c_oAscBorderStyles
;
// Import
var
c_oAscBorderStyles
=
AscCommon
.
c_oAscBorderStyles
;
/** @constructor */
function
asc_CCellFlag
(
m
,
s
,
w
,
t
,
l
)
{
this
.
merge
=
!!
m
;
this
.
shrinkToFit
=
!!
s
;
this
.
wrapText
=
!!
w
;
this
.
selectionType
=
t
;
this
.
lockText
=
!!
l
;
}
asc_CCellFlag
.
prototype
=
{
/** @constructor */
function
asc_CCellFlag
(
m
,
s
,
w
,
t
,
l
)
{
this
.
merge
=
!!
m
;
this
.
shrinkToFit
=
!!
s
;
this
.
wrapText
=
!!
w
;
this
.
selectionType
=
t
;
this
.
lockText
=
!!
l
;
}
asc_CCellFlag
.
prototype
=
{
asc_getMerge
:
function
()
{
return
this
.
merge
;
},
asc_getShrinkToFit
:
function
()
{
...
...
@@ -28,21 +28,21 @@
},
asc_getLockText
:
function
()
{
return
this
.
lockText
;
}
};
};
/** @constructor */
function
asc_CFont
(
name
,
size
,
color
,
b
,
i
,
u
,
s
,
sub
,
sup
)
{
this
.
name
=
name
!==
undefined
?
name
:
"
Arial
"
;
this
.
size
=
size
!==
undefined
?
size
:
10
;
this
.
color
=
color
!==
undefined
?
color
:
null
;
this
.
bold
=
!!
b
;
this
.
italic
=
!!
i
;
this
.
underline
=
!!
u
;
this
.
strikeout
=
!!
s
;
this
.
subscript
=
!!
sub
;
this
.
superscript
=
!!
sup
;
}
asc_CFont
.
prototype
=
{
/** @constructor */
function
asc_CFont
(
name
,
size
,
color
,
b
,
i
,
u
,
s
,
sub
,
sup
)
{
this
.
name
=
name
!==
undefined
?
name
:
"
Arial
"
;
this
.
size
=
size
!==
undefined
?
size
:
10
;
this
.
color
=
color
!==
undefined
?
color
:
null
;
this
.
bold
=
!!
b
;
this
.
italic
=
!!
i
;
this
.
underline
=
!!
u
;
this
.
strikeout
=
!!
s
;
this
.
subscript
=
!!
sub
;
this
.
superscript
=
!!
sup
;
}
asc_CFont
.
prototype
=
{
asc_getName
:
function
()
{
return
this
.
name
;
},
asc_getSize
:
function
()
{
...
...
@@ -62,23 +62,23 @@
},
asc_getColor
:
function
()
{
return
this
.
color
;
}
};
};
/** @constructor */
function
asc_CFill
(
color
)
{
this
.
color
=
color
!==
undefined
?
color
:
null
;
}
asc_CFill
.
prototype
=
{
/** @constructor */
function
asc_CFill
(
color
)
{
this
.
color
=
color
!==
undefined
?
color
:
null
;
}
asc_CFill
.
prototype
=
{
asc_getColor
:
function
()
{
return
this
.
color
;
}
};
};
/** @constructor */
function
asc_CBorder
(
style
,
color
)
{
// ToDo заглушка для создания border-а
if
(
typeof
style
===
"
string
"
)
{
switch
(
style
)
{
/** @constructor */
function
asc_CBorder
(
style
,
color
)
{
// ToDo заглушка для создания border-а
if
(
typeof
style
===
"
string
"
)
{
switch
(
style
)
{
case
"
thin
"
:
this
.
style
=
c_oAscBorderStyles
.
Thin
;
break
;
...
...
@@ -91,30 +91,30 @@
default
:
this
.
style
=
c_oAscBorderStyles
.
None
;
break
;
}
}
else
{
this
.
style
=
style
!==
undefined
?
style
:
c_oAscBorderStyles
.
None
;
}
this
.
color
=
color
!==
undefined
?
color
:
null
;
}
asc_CBorder
.
prototype
=
{
}
}
else
{
this
.
style
=
style
!==
undefined
?
style
:
c_oAscBorderStyles
.
None
;
}
this
.
color
=
color
!==
undefined
?
color
:
null
;
}
asc_CBorder
.
prototype
=
{
asc_getStyle
:
function
()
{
return
this
.
style
;
},
asc_getColor
:
function
()
{
return
this
.
color
;
}
};
};
/** @constructor */
function
asc_CBorders
()
{
this
.
left
=
null
;
this
.
top
=
null
;
this
.
right
=
null
;
this
.
bottom
=
null
;
this
.
diagDown
=
null
;
this
.
diagUp
=
null
;
}
asc_CBorders
.
prototype
=
{
/** @constructor */
function
asc_CBorders
()
{
this
.
left
=
null
;
this
.
top
=
null
;
this
.
right
=
null
;
this
.
bottom
=
null
;
this
.
diagDown
=
null
;
this
.
diagUp
=
null
;
}
asc_CBorders
.
prototype
=
{
asc_getLeft
:
function
()
{
return
this
.
left
;
},
asc_getTop
:
function
()
{
...
...
@@ -128,16 +128,18 @@
},
asc_getDiagUp
:
function
()
{
return
this
.
diagUp
;
}
};
};
/** @constructor */
function
asc_CAutoFilterInfo
()
{
this
.
isApplyAutoFilter
=
false
;
// Кнопка очистить фильтр: false - disable, true - pressed button
this
.
isAutoFilter
=
false
;
// Кнопка автофильтр (также влияет на formatTable и Sort). Возможные состояния:
// - null - мы в пересечении с таблицой (но не полностью в ней)
// - true/false - когда мы полностью в таблице или вне ее (true/false в зависимости от того применен фильтр или нет)
}
asc_CAutoFilterInfo
.
prototype
=
{
/** @constructor */
function
asc_CAutoFilterInfo
()
{
this
.
tableStyleName
=
null
;
this
.
tableName
=
null
;
this
.
isApplyAutoFilter
=
false
;
// Кнопка очистить фильтр: false - disable, true - pressed button
this
.
isAutoFilter
=
false
;
// Кнопка автофильтр (также влияет на formatTable и Sort). Возможные состояния:
// - null - мы в пересечении с таблицой (но не полностью в ней)
// - true/false - когда мы полностью в таблице или вне ее (true/false в зависимости от того применен фильтр или нет)
}
asc_CAutoFilterInfo
.
prototype
=
{
asc_getTableStyleName
:
function
()
{
return
this
.
tableStyleName
;
},
asc_getTableName
:
function
()
{
...
...
@@ -147,29 +149,29 @@
},
asc_getIsApplyAutoFilter
:
function
()
{
return
this
.
isApplyAutoFilter
;
}
};
};
/** @constructor */
/** @constructor */
function
asc_CFormatTableInfo
()
{
this
.
tableStyleName
=
null
;
this
.
tableName
=
null
;
this
.
tableStyleName
=
null
;
this
.
tableName
=
null
;
this
.
isShowColumnStripes
=
null
;
this
.
isShowFirstColumn
=
null
;
this
.
isShowLastColumn
=
null
;
this
.
isShowRowStripes
=
null
;
this
.
isShowTotalRow
=
null
;
this
.
isShowHeaderRow
=
null
;
this
.
tableRange
=
null
;
this
.
isInsertRowAbove
=
null
;
this
.
isInsertRowBelow
=
null
;
this
.
isInsertColumnLeft
=
null
;
this
.
isInsertColumnRight
=
null
;
this
.
isDeleteRow
=
null
;
this
.
isDeleteColumn
=
null
;
this
.
isDeleteTable
=
null
;
this
.
isShowTotalRow
=
null
;
this
.
isShowHeaderRow
=
null
;
this
.
tableRange
=
null
;
this
.
isInsertRowAbove
=
null
;
this
.
isInsertRowBelow
=
null
;
this
.
isInsertColumnLeft
=
null
;
this
.
isInsertColumnRight
=
null
;
this
.
isDeleteRow
=
null
;
this
.
isDeleteColumn
=
null
;
this
.
isDeleteTable
=
null
;
}
asc_CFormatTableInfo
.
prototype
=
{
asc_getTableStyleName
:
function
()
{
...
...
@@ -177,7 +179,7 @@
},
asc_getTableName
:
function
()
{
return
this
.
tableName
;
},
asc_getFirstRow
:
function
()
{
return
this
.
firstRow
;
},
asc_getLastRow
:
function
()
{
...
...
@@ -195,7 +197,7 @@
},
asc_getTableRange
:
function
()
{
return
this
.
tableRange
;
},
asc_getIsInsertRowAbove
:
function
()
{
return
this
.
isInsertRowAbove
;
},
asc_getIsInsertRowBelow
:
function
()
{
...
...
@@ -213,29 +215,29 @@
}
};
/** @constructor */
function
asc_CCellInfo
()
{
this
.
name
=
null
;
this
.
formula
=
""
;
this
.
text
=
""
;
this
.
halign
=
"
left
"
;
this
.
valign
=
"
top
"
;
this
.
flags
=
null
;
this
.
font
=
null
;
this
.
fill
=
null
;
this
.
border
=
null
;
this
.
innertext
=
null
;
this
.
numFormat
=
null
;
this
.
hyperlink
=
null
;
this
.
comments
=
[];
this
.
isLocked
=
false
;
this
.
styleName
=
null
;
this
.
numFormatType
=
null
;
this
.
angle
=
null
;
this
.
autoFilterInfo
=
null
;
/** @constructor */
function
asc_CCellInfo
()
{
this
.
name
=
null
;
this
.
formula
=
""
;
this
.
text
=
""
;
this
.
halign
=
"
left
"
;
this
.
valign
=
"
top
"
;
this
.
flags
=
null
;
this
.
font
=
null
;
this
.
fill
=
null
;
this
.
border
=
null
;
this
.
innertext
=
null
;
this
.
numFormat
=
null
;
this
.
hyperlink
=
null
;
this
.
comments
=
[];
this
.
isLocked
=
false
;
this
.
styleName
=
null
;
this
.
numFormatType
=
null
;
this
.
angle
=
null
;
this
.
autoFilterInfo
=
null
;
this
.
formatTableInfo
=
null
;
}
asc_CCellInfo
.
prototype
=
{
}
asc_CCellInfo
.
prototype
=
{
asc_getName
:
function
()
{
return
this
.
name
;
},
asc_getFormula
:
function
()
{
...
...
@@ -286,7 +288,7 @@
asc_getClearFilter
:
function
()
{
return
null
}
//TODO DELETE
};
};
/** @constructor */
function
asc_CDefName
(
n
,
r
,
s
,
t
,
h
,
l
)
{
...
...
@@ -341,7 +343,7 @@
window
[
"
AscCommonExcel
"
].
asc_CFont
=
asc_CFont
;
prot
=
asc_CFont
.
prototype
;
prot
[
"
asc_getName
"
]
=
prot
.
asc_getName
;
prot
[
"
asc_getName
"
]
=
prot
.
asc_getName
;
prot
[
"
asc_getSize
"
]
=
prot
.
asc_getSize
;
prot
[
"
asc_getBold
"
]
=
prot
.
asc_getBold
;
prot
[
"
asc_getItalic
"
]
=
prot
.
asc_getItalic
;
...
...
@@ -399,41 +401,41 @@
window
[
"
AscCommonExcel
"
].
asc_CCellInfo
=
asc_CCellInfo
;
prot
=
asc_CCellInfo
.
prototype
;
prot
[
"
asc_getName
"
]
=
prot
.
asc_getName
;
prot
[
"
asc_getFormula
"
]
=
prot
.
asc_getFormula
;
prot
[
"
asc_getText
"
]
=
prot
.
asc_getText
;
prot
[
"
asc_getHorAlign
"
]
=
prot
.
asc_getHorAlign
;
prot
[
"
asc_getVertAlign
"
]
=
prot
.
asc_getVertAlign
;
prot
[
"
asc_getFlags
"
]
=
prot
.
asc_getFlags
;
prot
[
"
asc_getFont
"
]
=
prot
.
asc_getFont
;
prot
[
"
asc_getFill
"
]
=
prot
.
asc_getFill
;
prot
[
"
asc_getBorders
"
]
=
prot
.
asc_getBorders
;
prot
[
"
asc_getInnerText
"
]
=
prot
.
asc_getInnerText
;
prot
[
"
asc_getNumFormat
"
]
=
prot
.
asc_getNumFormat
;
prot
[
"
asc_getHyperlink
"
]
=
prot
.
asc_getHyperlink
;
prot
[
"
asc_getComments
"
]
=
prot
.
asc_getComments
;
prot
[
"
asc_getLocked
"
]
=
prot
.
asc_getLocked
;
prot
[
"
asc_getStyleName
"
]
=
prot
.
asc_getStyleName
;
prot
[
"
asc_getNumFormatType
"
]
=
prot
.
asc_getNumFormatType
;
prot
[
"
asc_getAngle
"
]
=
prot
.
asc_getAngle
;
prot
[
"
asc_getAutoFilterInfo
"
]
=
prot
.
asc_getAutoFilterInfo
;
prot
[
"
asc_getFormula
"
]
=
prot
.
asc_getFormula
;
prot
[
"
asc_getText
"
]
=
prot
.
asc_getText
;
prot
[
"
asc_getHorAlign
"
]
=
prot
.
asc_getHorAlign
;
prot
[
"
asc_getVertAlign
"
]
=
prot
.
asc_getVertAlign
;
prot
[
"
asc_getFlags
"
]
=
prot
.
asc_getFlags
;
prot
[
"
asc_getFont
"
]
=
prot
.
asc_getFont
;
prot
[
"
asc_getFill
"
]
=
prot
.
asc_getFill
;
prot
[
"
asc_getBorders
"
]
=
prot
.
asc_getBorders
;
prot
[
"
asc_getInnerText
"
]
=
prot
.
asc_getInnerText
;
prot
[
"
asc_getNumFormat
"
]
=
prot
.
asc_getNumFormat
;
prot
[
"
asc_getHyperlink
"
]
=
prot
.
asc_getHyperlink
;
prot
[
"
asc_getComments
"
]
=
prot
.
asc_getComments
;
prot
[
"
asc_getLocked
"
]
=
prot
.
asc_getLocked
;
prot
[
"
asc_getStyleName
"
]
=
prot
.
asc_getStyleName
;
prot
[
"
asc_getNumFormatType
"
]
=
prot
.
asc_getNumFormatType
;
prot
[
"
asc_getAngle
"
]
=
prot
.
asc_getAngle
;
prot
[
"
asc_getAutoFilterInfo
"
]
=
prot
.
asc_getAutoFilterInfo
;
prot
[
"
asc_getFormatTableInfo
"
]
=
prot
.
asc_getFormatTableInfo
;
prot
[
"
asc_getIsFormatTable
"
]
=
prot
.
asc_getIsFormatTable
;
//TODO DELETE
prot
[
"
asc_getIsAutoFilter
"
]
=
prot
.
asc_getIsAutoFilter
;
//TODO DELETE
prot
[
"
asc_getTableStyleName
"
]
=
prot
.
asc_getTableStyleName
;
//TODO DELETE
prot
[
"
asc_getClearFilter
"
]
=
prot
.
asc_getClearFilter
;
//TODO DELETE
prot
[
"
asc_getIsFormatTable
"
]
=
prot
.
asc_getIsFormatTable
;
//TODO DELETE
prot
[
"
asc_getIsAutoFilter
"
]
=
prot
.
asc_getIsAutoFilter
;
//TODO DELETE
prot
[
"
asc_getTableStyleName
"
]
=
prot
.
asc_getTableStyleName
;
//TODO DELETE
prot
[
"
asc_getClearFilter
"
]
=
prot
.
asc_getClearFilter
;
//TODO DELETE
window
[
"
Asc
"
].
asc_CDefName
=
window
[
"
Asc
"
][
"
asc_CDefName
"
]
=
asc_CDefName
;
prot
=
asc_CDefName
.
prototype
;
prot
[
"
asc_getName
"
]
=
prot
.
asc_getName
;
prot
[
"
asc_getScope
"
]
=
prot
.
asc_getScope
;
prot
[
"
asc_getRef
"
]
=
prot
.
asc_getRef
;
prot
[
"
asc_getIsTable
"
]
=
prot
.
asc_getIsTable
;
prot
[
"
asc_getIsHidden
"
]
=
prot
.
asc_getIsHidden
;
prot
[
"
asc_getIsLock
"
]
=
prot
.
asc_getIsLock
;
window
[
"
Asc
"
].
asc_CDefName
=
window
[
"
Asc
"
][
"
asc_CDefName
"
]
=
asc_CDefName
;
prot
=
asc_CDefName
.
prototype
;
prot
[
"
asc_getName
"
]
=
prot
.
asc_getName
;
prot
[
"
asc_getScope
"
]
=
prot
.
asc_getScope
;
prot
[
"
asc_getRef
"
]
=
prot
.
asc_getRef
;
prot
[
"
asc_getIsTable
"
]
=
prot
.
asc_getIsTable
;
prot
[
"
asc_getIsHidden
"
]
=
prot
.
asc_getIsHidden
;
prot
[
"
asc_getIsLock
"
]
=
prot
.
asc_getIsLock
;
window
[
"
Asc
"
].
asc_CCheckDefName
=
window
[
"
Asc
"
][
"
asc_CCheckDefName
"
]
=
asc_CCheckDefName
;
prot
=
asc_CCheckDefName
.
prototype
;
prot
[
"
asc_getStatus
"
]
=
prot
.
asc_getStatus
;
prot
[
"
asc_getReason
"
]
=
prot
.
asc_getReason
;
window
[
"
Asc
"
].
asc_CCheckDefName
=
window
[
"
Asc
"
][
"
asc_CCheckDefName
"
]
=
asc_CCheckDefName
;
prot
=
asc_CCheckDefName
.
prototype
;
prot
[
"
asc_getStatus
"
]
=
prot
.
asc_getStatus
;
prot
[
"
asc_getReason
"
]
=
prot
.
asc_getReason
;
})(
window
);
\ No newline at end of file
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