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
009b7a61
Commit
009b7a61
authored
Jul 22, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start defnames and tablenames
parent
ae551ee7
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
402 additions
and
332 deletions
+402
-332
cell/model/ConditionalFormatting.js
cell/model/ConditionalFormatting.js
+2
-1
cell/model/FormulaObjects/parserFormula.js
cell/model/FormulaObjects/parserFormula.js
+94
-100
cell/model/Workbook.js
cell/model/Workbook.js
+279
-213
cell/model/WorkbookElems.js
cell/model/WorkbookElems.js
+13
-9
cell/model/autofilters.js
cell/model/autofilters.js
+4
-3
cell/view/CellEditorView.js
cell/view/CellEditorView.js
+6
-4
cell/view/WorkbookView.js
cell/view/WorkbookView.js
+1
-1
common/commonDefines.js
common/commonDefines.js
+3
-1
No files found.
cell/model/ConditionalFormatting.js
View file @
009b7a61
...
...
@@ -321,7 +321,8 @@
};
CFormulaCF
.
prototype
.
getValue
=
function
(
ws
)
{
this
.
init
(
ws
);
return
this
.
_f
.
calculate
().
getValue
();
//todo bbox
return
this
.
_f
.
calculate
(
null
,
null
).
getValue
();
};
function
CIconSet
()
{
...
...
cell/model/FormulaObjects/parserFormula.js
View file @
009b7a61
This diff is collapsed.
Click to expand it.
cell/model/Workbook.js
View file @
009b7a61
This diff is collapsed.
Click to expand it.
cell/model/WorkbookElems.js
View file @
009b7a61
...
...
@@ -4733,7 +4733,7 @@ TablePart.prototype.moveRef = function(col, row) {
this
.
Ref
=
ref
;
//event
this
.
handlers
.
trigger
(
"
changeRefTablePart
"
,
this
.
DisplayName
,
this
.
Ref
);
this
.
handlers
.
trigger
(
"
changeRefTablePart
"
,
this
.
DisplayName
,
this
.
getRangeWithoutHeaderFooter
()
);
if
(
this
.
AutoFilter
)
this
.
AutoFilter
.
moveRef
(
col
,
row
);
...
...
@@ -4748,9 +4748,7 @@ TablePart.prototype.changeRef = function(col, row, bIsFirst) {
this
.
Ref
=
ref
;
//event
var
endRow
=
this
.
TotalsRowCount
?
this
.
Ref
.
r2
-
1
:
this
.
Ref
.
r2
;
var
refNamedRanges
=
Asc
.
Range
(
this
.
Ref
.
c1
,
this
.
Ref
.
r1
,
this
.
Ref
.
c2
,
endRow
);
this
.
handlers
.
trigger
(
"
changeRefTablePart
"
,
this
.
DisplayName
,
refNamedRanges
);
this
.
handlers
.
trigger
(
"
changeRefTablePart
"
,
this
.
DisplayName
,
this
.
getRangeWithoutHeaderFooter
());
if
(
this
.
AutoFilter
)
this
.
AutoFilter
.
changeRef
(
col
,
row
,
bIsFirst
);
...
...
@@ -4793,9 +4791,8 @@ TablePart.prototype.changeRefOnRange = function(range, autoFilters, generateNewT
}
}
this
.
Ref
=
Asc
.
Range
(
range
.
c1
,
range
.
r1
,
range
.
c2
,
range
.
r2
);
//event
this
.
handlers
.
trigger
(
"
changeRefTablePart
"
,
this
.
DisplayName
,
this
.
Ref
);
this
.
handlers
.
trigger
(
"
changeRefTablePart
"
,
this
.
DisplayName
,
this
.
getRangeWithoutHeaderFooter
()
);
if
(
this
.
AutoFilter
)
this
.
AutoFilter
.
changeRefOnRange
(
range
);
...
...
@@ -4927,9 +4924,15 @@ TablePart.prototype.getTableRangeForFormula = function(objectParam)
}
case
FormulaTablePartInfo
.
thisRow
:
{
// if( this.Ref.containsRange( objectParam.cell ) ){
res
=
new
Asc
.
Range
(
this
.
Ref
.
c1
,
objectParam
.
cell
.
r1
,
this
.
Ref
.
c2
,
objectParam
.
cell
.
r1
);
// }
if
(
objectParam
.
cell
)
{
res
=
new
Asc
.
Range
(
this
.
Ref
.
c1
,
objectParam
.
cell
.
r1
,
this
.
Ref
.
c2
,
objectParam
.
cell
.
r1
);
}
else
{
//like FormulaTablePartInfo.data
var
startRow
=
this
.
HeaderRowCount
===
null
?
this
.
Ref
.
r1
+
1
:
this
.
Ref
.
r1
;
var
endRow
=
this
.
TotalsRowCount
?
this
.
Ref
.
r2
-
1
:
this
.
Ref
.
r2
;
res
=
new
Asc
.
Range
(
this
.
Ref
.
c1
,
startRow
,
this
.
Ref
.
c2
,
endRow
);
}
break
;
}
case
FormulaTablePartInfo
.
columns
:
...
...
@@ -5234,6 +5237,7 @@ AutoFilter.prototype.isShowButton = function()
AutoFilter
.
prototype
.
getRangeWithoutHeaderFooter
=
function
()
{
//todo
return
Asc
.
Range
(
this
.
Ref
.
c1
,
this
.
Ref
.
r1
+
1
,
this
.
Ref
.
c2
,
this
.
Ref
.
r2
);
};
...
...
cell/model/autofilters.js
View file @
009b7a61
...
...
@@ -949,6 +949,7 @@
this
.
_setStyleTables
(
cloneData
.
newFilterRef
);
//event
//todo
worksheet
.
handlers
.
trigger
(
"
changeRefTablePart
"
,
cloneData
.
oldFilter
.
DisplayName
,
cloneData
.
oldFilter
.
Ref
);
break
;
...
...
@@ -1064,7 +1065,7 @@
if
(
cloneData
.
Ref
.
isEqual
(
worksheet
.
TableParts
[
l
].
Ref
))
{
this
.
_cleanStyleTable
(
cloneData
.
Ref
);
worksheet
.
workbook
.
dependencyFormulas
.
delTableName
(
worksheet
.
TableParts
[
l
].
DisplayName
,
worksheet
.
getName
()
);
worksheet
.
workbook
.
dependencyFormulas
.
delTableName
(
worksheet
.
TableParts
[
l
].
DisplayName
);
worksheet
.
TableParts
.
splice
(
l
,
1
);
}
}
...
...
@@ -1150,7 +1151,7 @@
t
.
_addHistoryObj
(
oldFilter
,
AscCH
.
historyitem_AutoFilter_Empty
,
{
activeCells
:
activeCells
},
null
,
oldFilter
.
Ref
);
if
(
isTablePart
)
worksheet
.
workbook
.
dependencyFormulas
.
delTableName
(
oldFilter
.
DisplayName
,
worksheet
.
getName
()
)
worksheet
.
workbook
.
dependencyFormulas
.
delTableName
(
oldFilter
.
DisplayName
)
}
else
return
oldFilter
;
};
...
...
@@ -2543,7 +2544,7 @@
History
.
StartTransaction
();
//TODO добавлять в историю смену именного диапазона
worksheet
.
workbook
.
dependencyFormulas
.
changeTable
Ref
(
tableName
,
worksheet
,
newName
);
worksheet
.
workbook
.
dependencyFormulas
.
changeTable
Name
(
tableName
,
newName
);
tablePart
.
changeDisplayName
(
newName
);
...
...
cell/view/CellEditorView.js
View file @
009b7a61
...
...
@@ -836,7 +836,8 @@
// var __e__ = new Date().getTime();
// console.log("e-s "+ (__e__ - __s__));
this
.
_formula
=
new
AscCommonExcel
.
parserFormula
(
s
.
substr
(
1
),
this
.
options
.
cellName
,
ws
);
var
bbox
=
AscCommonExcel
.
g_oRangeCache
.
getActiveRange
(
this
.
options
.
cellName
);
this
.
_formula
=
new
AscCommonExcel
.
parserFormula
(
s
.
substr
(
1
),
null
,
ws
);
this
.
_formula
.
parse
();
var
r
,
offset
,
_e
,
_s
,
wsName
=
null
,
refStr
,
isName
=
false
,
...
...
@@ -896,7 +897,7 @@
case
cElementType
.
table
:
case
cElementType
.
name
:
{
var
nameRef
=
r
.
oper
.
toRef
();
var
nameRef
=
r
.
oper
.
toRef
(
bbox
);
if
(
nameRef
instanceof
AscCommonExcel
.
cError
)
continue
;
switch
(
nameRef
.
type
)
{
...
...
@@ -961,7 +962,8 @@
wsOPEN
=
this
.
handlers
.
trigger
(
"
getCellFormulaEnterWSOpen
"
),
ws
=
wsOPEN
?
wsOPEN
.
model
:
this
.
handlers
.
trigger
(
"
getActiveWS
"
);
this
.
_formula
=
new
AscCommonExcel
.
parserFormula
(
s
.
substr
(
1
),
this
.
options
.
cellName
,
ws
);
var
bbox
=
AscCommonExcel
.
g_oRangeCache
.
getActiveRange
(
this
.
options
.
cellName
);
this
.
_formula
=
new
AscCommonExcel
.
parserFormula
(
s
.
substr
(
1
),
null
,
ws
);
this
.
_formula
.
parse
();
if
(
this
.
_formula
.
RefPos
&&
this
.
_formula
.
RefPos
.
length
>
0
)
{
...
...
@@ -1015,7 +1017,7 @@
case
cElementType
.
table
:
case
cElementType
.
name
:
{
var
nameRef
=
r
.
oper
.
toRef
();
var
nameRef
=
r
.
oper
.
toRef
(
bbox
);
if
(
nameRef
instanceof
AscCommonExcel
.
cError
)
continue
;
switch
(
nameRef
.
type
)
{
...
...
cell/view/WorkbookView.js
View file @
009b7a61
...
...
@@ -2298,7 +2298,7 @@
var
delDefinedNamesCallback
=
function
(
res
)
{
if
(
res
)
{
t
.
handlers
.
trigger
(
"
asc_onDelDefName
"
,
t
.
model
.
delDefinesNames
(
oldName
)
);
t
.
model
.
delDefinesNames
(
oldName
);
t
.
handlers
.
trigger
(
"
asc_onRefreshDefNameList
"
);
}
else
{
t
.
handlers
.
trigger
(
"
asc_onError
"
,
c_oAscError
.
ID
.
LockCreateDefName
,
c_oAscError
.
Level
.
NoCritical
);
...
...
common/commonDefines.js
View file @
009b7a61
...
...
@@ -815,7 +815,9 @@ var c_oAscPrintDefaultSettings = {
Dirty
:
0
,
Shift
:
1
,
Move
:
2
,
Delete
:
3
Delete
:
3
,
ChangeDefName
:
4
,
ChangeDefNameTable
:
5
};
var
c_oDashType
=
{
...
...
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