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
b48dbad6
Commit
b48dbad6
authored
Oct 07, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
capitalization independent defname check while modify
parent
935a5375
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
14 deletions
+10
-14
cell/model/FormulaObjects/parserFormula.js
cell/model/FormulaObjects/parserFormula.js
+8
-4
cell/model/Workbook.js
cell/model/Workbook.js
+2
-10
No files found.
cell/model/FormulaObjects/parserFormula.js
View file @
b48dbad6
...
...
@@ -1557,6 +1557,13 @@ cName.prototype.Calculate = function () {
cName
.
prototype
.
getDefName
=
function
()
{
return
this
.
wb
.
getDefinesNames
(
this
.
value
,
this
.
ws
?
this
.
ws
.
getId
()
:
null
);
};
cName
.
prototype
.
changeDefName
=
function
(
from
,
to
)
{
var
LocalSheetId
=
this
.
ws
?
this
.
ws
.
getIndex
()
:
null
;
if
(
AscCommonExcel
.
getDefNameIndex
(
this
.
value
)
==
AscCommonExcel
.
getDefNameIndex
(
from
.
Name
)
&&
(
null
==
from
.
LocalSheetId
||
LocalSheetId
==
from
.
LocalSheetId
))
{
this
.
value
=
to
.
Name
;
}
};
/** @constructor */
function
cStrucTable
(
val
,
wb
,
ws
)
{
...
...
@@ -4730,10 +4737,7 @@ parserFormula.prototype.calculate = function(opt_defName, opt_range) {
for
(
i
=
0
;
i
<
this
.
outStack
.
length
;
i
++
)
{
elem
=
this
.
outStack
[
i
];
if
(
elem
.
type
==
cElementType
.
name
||
elem
.
type
==
cElementType
.
name3D
)
{
LocalSheetId
=
elem
.
ws
?
elem
.
ws
.
getIndex
()
:
null
;
if
(
elem
.
value
==
from
.
Name
&&
(
null
==
from
.
LocalSheetId
||
LocalSheetId
==
from
.
LocalSheetId
))
{
elem
.
value
=
to
.
Name
;
}
elem
.
changeDefName
(
from
,
to
);
}
else
if
(
elem
.
type
==
cElementType
.
table
)
{
LocalSheetId
=
elem
.
ws
?
elem
.
ws
.
getIndex
()
:
null
;
if
(
elem
.
tableName
==
from
.
Name
&&
(
null
==
from
.
LocalSheetId
||
LocalSheetId
==
from
.
LocalSheetId
))
{
...
...
cell/model/Workbook.js
View file @
b48dbad6
...
...
@@ -59,7 +59,6 @@ var UndoRedoData_IndexSimpleProp = AscCommonExcel.UndoRedoData_IndexSimpleProp;
var
UndoRedoData_BBox
=
AscCommonExcel
.
UndoRedoData_BBox
;
var
UndoRedoData_SheetAdd
=
AscCommonExcel
.
UndoRedoData_SheetAdd
;
var
UndoRedoData_SheetPositions
=
AscCommonExcel
.
UndoRedoData_SheetPositions
;
var
UndoRedoData_DefinedNames
=
AscCommonExcel
.
UndoRedoData_DefinedNames
;
var
UndoRedoData_DefinedNamesChange
=
AscCommonExcel
.
UndoRedoData_DefinedNamesChange
;
var
g_oDefaultFormat
=
AscCommonExcel
.
g_oDefaultFormat
;
var
Border
=
AscCommonExcel
.
Border
;
...
...
@@ -67,8 +66,6 @@ var RangeDataManagerElem = AscCommonExcel.RangeDataManagerElem;
var
RangeDataManager
=
AscCommonExcel
.
RangeDataManager
;
var
cElementType
=
AscCommonExcel
.
cElementType
;
var
cArea3D
=
AscCommonExcel
.
cArea3D
;
var
cRef3D
=
AscCommonExcel
.
cRef3D
;
var
parserFormula
=
AscCommonExcel
.
parserFormula
;
...
...
@@ -90,7 +87,6 @@ var g_nAllColIndex = -1;
var
g_nAllRowIndex
=
-
1
;
var
aStandartNumFormats
=
[];
var
aStandartNumFormatsId
=
{};
var
arrRecalc
=
{},
arrDefNameRecalc
=
{};
var
oFormulaLocaleInfo
=
{
Parse
:
true
,
DigitSep
:
true
...
...
@@ -152,7 +148,7 @@ function getRangeType(oBBox){
}
function
getDefNameIndex
(
name
)
{
//
можно создавать имена в разном регистре, но уникальность проверяется независимо от регистра
//
uniqueness is checked without capitalization
return
name
?
name
.
toLowerCase
()
:
name
;
}
...
...
@@ -1250,10 +1246,6 @@ function getRangeType(oBBox){
}
};
function
getVertexId
(
sheetId
,
cellId
){
return
sheetId
+
AscCommon
.
g_cCharDelimiter
+
cellId
;
}
function
angleFormatToInterface
(
val
)
{
var
nRes
=
0
;
...
...
@@ -8929,7 +8921,7 @@ DrawingObjectsManager.prototype.rebuildCharts = function(data)
window
[
'
AscCommonExcel
'
].
aStandartNumFormats
=
aStandartNumFormats
;
window
[
'
AscCommonExcel
'
].
aStandartNumFormatsId
=
aStandartNumFormatsId
;
window
[
'
AscCommonExcel
'
].
oFormulaLocaleInfo
=
oFormulaLocaleInfo
;
window
[
'
AscCommonExcel
'
].
get
VertexId
=
getVertexId
;
window
[
'
AscCommonExcel
'
].
get
DefNameIndex
=
getDefNameIndex
;
window
[
'
AscCommonExcel
'
].
angleFormatToInterface2
=
angleFormatToInterface2
;
window
[
'
AscCommonExcel
'
].
angleInterfaceToFormat
=
angleInterfaceToFormat
;
window
[
'
AscCommonExcel
'
].
Workbook
=
Workbook
;
...
...
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