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
b63ab906
Commit
b63ab906
authored
Mar 20, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 34421
parent
5d3c555e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
cell/model/FormulaObjects/parserFormula.js
cell/model/FormulaObjects/parserFormula.js
+12
-12
common/editorscommon.js
common/editorscommon.js
+2
-2
No files found.
cell/model/FormulaObjects/parserFormula.js
View file @
b63ab906
...
@@ -1696,11 +1696,11 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
...
@@ -1696,11 +1696,11 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
}
}
if
(
this
.
oneColumnIndex
)
{
if
(
this
.
oneColumnIndex
)
{
var
columns_1
=
this
.
oneColumnIndex
.
name
.
replace
(
/#/g
,
"
'#
"
)
columns_1
=
this
.
oneColumnIndex
.
name
.
replace
(
/
([
#[
\]])
/g
,
"
'$1
"
);
tblStr
+=
"
[
"
+
columns_1
+
"
]
"
;
tblStr
+=
"
[
"
+
columns_1
+
"
]
"
;
}
else
if
(
this
.
colStartIndex
&&
this
.
colEndIndex
)
{
}
else
if
(
this
.
colStartIndex
&&
this
.
colEndIndex
)
{
columns_1
=
this
.
colStartIndex
.
name
.
replace
(
/
#/g
,
"
'#
"
);
columns_1
=
this
.
colStartIndex
.
name
.
replace
(
/
([
#[
\]])
/g
,
"
'$1
"
);
columns_2
=
this
.
colEndIndex
.
name
.
replace
(
/
#/g
,
"
'#
"
);
columns_2
=
this
.
colEndIndex
.
name
.
replace
(
/
([
#[
\]])
/g
,
"
'$1
"
);
tblStr
+=
"
[[
"
+
columns_1
+
"
]:[
"
+
columns_2
+
"
]]
"
;
tblStr
+=
"
[[
"
+
columns_1
+
"
]:[
"
+
columns_2
+
"
]]
"
;
}
else
if
(
null
!=
this
.
reservedColumnIndex
)
{
}
else
if
(
null
!=
this
.
reservedColumnIndex
)
{
tblStr
+=
"
[
"
+
this
.
_buildLocalTableString
(
this
.
reservedColumnIndex
,
isLocal
)
+
"
]
"
;
tblStr
+=
"
[
"
+
this
.
_buildLocalTableString
(
this
.
reservedColumnIndex
,
isLocal
)
+
"
]
"
;
...
@@ -1725,10 +1725,10 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
...
@@ -1725,10 +1725,10 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
tblStr
+=
FormulaSeparators
.
functionArgumentSeparatorDef
;
tblStr
+=
FormulaSeparators
.
functionArgumentSeparatorDef
;
}
}
}
}
var
hdtcstart
=
this
.
hdtcstartIndex
.
name
.
replace
(
/
#/g
,
"
'#
"
);
var
hdtcstart
=
this
.
hdtcstartIndex
.
name
.
replace
(
/
([
#[
\]])
/g
,
"
'$1
"
);
tblStr
+=
"
[
"
+
hdtcstart
+
"
]
"
;
tblStr
+=
"
[
"
+
hdtcstart
+
"
]
"
;
if
(
this
.
hdtcendIndex
)
{
if
(
this
.
hdtcendIndex
)
{
var
hdtcend
=
this
.
hdtcendIndex
.
name
.
replace
(
/
#/g
,
"
'#
"
);
var
hdtcend
=
this
.
hdtcendIndex
.
name
.
replace
(
/
([
#[
\]])
/g
,
"
'$1
"
);
tblStr
+=
"
:[
"
+
hdtcend
+
"
]
"
;
tblStr
+=
"
:[
"
+
hdtcend
+
"
]
"
;
}
}
}
}
...
@@ -1739,15 +1739,15 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
...
@@ -1739,15 +1739,15 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
return
tblStr
;
return
tblStr
;
};
};
cStrucTable
.
prototype
.
_parseVal
=
function
(
val
)
{
cStrucTable
.
prototype
.
_parseVal
=
function
(
val
)
{
var
bRes
=
true
;
var
bRes
=
true
,
startCol
,
endCol
;
this
.
tableName
=
val
[
'
tableName
'
];
this
.
tableName
=
val
[
'
tableName
'
];
if
(
val
[
'
oneColumn
'
])
{
if
(
val
[
'
oneColumn
'
])
{
var
startCol
=
val
[
'
oneColumn
'
].
replace
(
/'#/g
,
"
#
"
);
startCol
=
val
[
'
oneColumn
'
].
replace
(
/'
([
#[
\]])
/g
,
'
$1
'
);
this
.
oneColumnIndex
=
this
.
wb
.
getTableIndexColumnByName
(
this
.
tableName
,
startCol
);
this
.
oneColumnIndex
=
this
.
wb
.
getTableIndexColumnByName
(
this
.
tableName
,
startCol
);
bRes
=
!!
this
.
oneColumnIndex
;
bRes
=
!!
this
.
oneColumnIndex
;
}
else
if
(
val
[
'
columnRange
'
])
{
}
else
if
(
val
[
'
columnRange
'
])
{
var
startCol
=
val
[
'
colStart
'
].
replace
(
/'#/g
,
"
#
"
);
startCol
=
val
[
'
colStart
'
].
replace
(
/'
([
#[
\]])
/g
,
'
$1
'
);
var
endCol
=
val
[
'
colEnd
'
].
replace
(
/'#/g
,
"
#
"
);
endCol
=
val
[
'
colEnd
'
].
replace
(
/'
([
#[
\]])
/g
,
'
$1
'
);
if
(
!
endCol
)
{
if
(
!
endCol
)
{
endCol
=
startCol
;
endCol
=
startCol
;
}
}
...
@@ -1765,7 +1765,7 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
...
@@ -1765,7 +1765,7 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
this
.
hdtIndexes
=
[];
this
.
hdtIndexes
=
[];
var
hdtcstart
=
val
[
'
hdtcstart
'
];
var
hdtcstart
=
val
[
'
hdtcstart
'
];
var
hdtcend
=
val
[
'
hdtcend
'
];
var
hdtcend
=
val
[
'
hdtcend
'
];
var
re
=
/
\[(
.*
?)\]
/ig
,
m
,
data
,
range
;
var
re
=
/
\[(
.*
?)\]
/ig
,
m
;
while
(
null
!==
(
m
=
re
.
exec
(
val
[
'
hdt
'
])))
{
while
(
null
!==
(
m
=
re
.
exec
(
val
[
'
hdt
'
])))
{
var
param
=
parserHelp
.
getColumnTypeByName
(
m
[
1
]);
var
param
=
parserHelp
.
getColumnTypeByName
(
m
[
1
]);
if
(
AscCommon
.
FormulaTablePartInfo
.
thisRow
==
param
||
if
(
AscCommon
.
FormulaTablePartInfo
.
thisRow
==
param
||
...
@@ -1776,11 +1776,11 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
...
@@ -1776,11 +1776,11 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
}
}
if
(
hdtcstart
)
{
if
(
hdtcstart
)
{
var
startCol
=
hdtcstart
.
replace
(
/'#/g
,
"
#
"
);
startCol
=
hdtcstart
.
replace
(
/'
([
#[
\]])
/g
,
'
$1
'
);
this
.
hdtcstartIndex
=
this
.
wb
.
getTableIndexColumnByName
(
this
.
tableName
,
startCol
);
this
.
hdtcstartIndex
=
this
.
wb
.
getTableIndexColumnByName
(
this
.
tableName
,
startCol
);
bRes
=
!!
this
.
hdtcstartIndex
;
bRes
=
!!
this
.
hdtcstartIndex
;
if
(
bRes
&&
hdtcend
)
{
if
(
bRes
&&
hdtcend
)
{
var
endCol
=
hdtcend
.
replace
(
/'#/g
,
"
#
"
);
endCol
=
hdtcend
.
replace
(
/'
([
#[
\]])
/g
,
'
$1
'
);
this
.
hdtcendIndex
=
this
.
wb
.
getTableIndexColumnByName
(
this
.
tableName
,
endCol
);
this
.
hdtcendIndex
=
this
.
wb
.
getTableIndexColumnByName
(
this
.
tableName
,
endCol
);
bRes
=
!!
this
.
hdtcendIndex
;
bRes
=
!!
this
.
hdtcendIndex
;
}
}
...
...
common/editorscommon.js
View file @
b63ab906
...
@@ -728,12 +728,12 @@ function build_rx_table_cur(){
...
@@ -728,12 +728,12 @@ function build_rx_table_cur(){
loc_this_row
=
cStrucTableLocalColumns
[
'
tr
'
],
loc_this_row
=
cStrucTableLocalColumns
[
'
tr
'
],
structured_tables_headata
=
new
XRegExp
(
'
(?:
\\
[
\\
#
'
+
loc_headers
+
'
\\
]
\\
'
+
FormulaSeparators
.
functionArgumentSeparator
+
'
\\
[
\\
#
'
+
loc_data
+
'
\\
])
'
),
structured_tables_headata
=
new
XRegExp
(
'
(?:
\\
[
\\
#
'
+
loc_headers
+
'
\\
]
\\
'
+
FormulaSeparators
.
functionArgumentSeparator
+
'
\\
[
\\
#
'
+
loc_data
+
'
\\
])
'
),
structured_tables_datals
=
new
XRegExp
(
'
(?:
\\
[
\\
#
'
+
loc_data
+
'
\\
]
\\
'
+
FormulaSeparators
.
functionArgumentSeparator
+
'
\\
[
\\
#
'
+
loc_totals
+
'
\\
])
'
),
structured_tables_datals
=
new
XRegExp
(
'
(?:
\\
[
\\
#
'
+
loc_data
+
'
\\
]
\\
'
+
FormulaSeparators
.
functionArgumentSeparator
+
'
\\
[
\\
#
'
+
loc_totals
+
'
\\
])
'
),
structured_tables_userColumn
=
new
XRegExp
(
'
(?:[
'
+
str_namedRanges
+
'
\\
d.]|
\\
u0027[#
\\
[
\\
]
\\
u0027]|
\\
u0020|
\\
u0025|
\\
u0028|
\\
u0029|
\\
u002B
)+
'
),
structured_tables_userColumn
=
new
XRegExp
(
'
(?:
\'\\
[|
\'\\
]|[^[
\\
]]
)+
'
),
structured_tables_reservedColumn
=
new
XRegExp
(
'
\\
#(?:
'
+
loc_all
+
'
|
'
+
loc_headers
+
'
|
'
+
loc_totals
+
'
|
'
+
loc_data
+
'
|
'
+
loc_this_row
+
'
)|@
'
);
structured_tables_reservedColumn
=
new
XRegExp
(
'
\\
#(?:
'
+
loc_all
+
'
|
'
+
loc_headers
+
'
|
'
+
loc_totals
+
'
|
'
+
loc_data
+
'
|
'
+
loc_this_row
+
'
)|@
'
);
return
XRegExp
.
build
(
'
^(?<tableName>{{tableName}})
\\
[(?<columnName>{{columnName}})?
\\
]
'
,
{
return
XRegExp
.
build
(
'
^(?<tableName>{{tableName}})
\\
[(?<columnName>{{columnName}})?
\\
]
'
,
{
"
tableName
"
:
new
XRegExp
(
"
^(:?[
"
+
str_namedRanges
+
"
][
"
+
str_namedRanges
+
"
\\
d.]*)
"
),
"
tableName
"
:
new
XRegExp
(
"
^(:?[
"
+
str_namedRanges
+
"
][
"
+
str_namedRanges
+
"
\\
d.]*)
"
),
"
columnName
"
:
XRegExp
.
build
(
'
(?<
reservedColumn>{{reservedColumn}})|(?<
oneColumn>{{userColumn}})|(?<columnRange>{{userColumnRange}})|(?<hdtcc>{{hdtcc}})
'
,
{
"
columnName
"
:
XRegExp
.
build
(
'
(?<oneColumn>{{userColumn}})|(?<columnRange>{{userColumnRange}})|(?<hdtcc>{{hdtcc}})
'
,
{
"
userColumn
"
:
structured_tables_userColumn
,
"
userColumn
"
:
structured_tables_userColumn
,
"
reservedColumn
"
:
structured_tables_reservedColumn
,
"
reservedColumn
"
:
structured_tables_reservedColumn
,
"
userColumnRange
"
:
XRegExp
.
build
(
'
\\
[(?<colStart>{{uc}})
\\
]
\\
:
\\
[(?<colEnd>{{uc}})
\\
]
'
,
{
"
userColumnRange
"
:
XRegExp
.
build
(
'
\\
[(?<colStart>{{uc}})
\\
]
\\
:
\\
[(?<colEnd>{{uc}})
\\
]
'
,
{
...
...
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