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
fe6933e2
Commit
fe6933e2
authored
May 05, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change function GetTextContent
parent
83291e14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
word/Math/mathContent.js
word/Math/mathContent.js
+24
-13
No files found.
word/Math/mathContent.js
View file @
fe6933e2
...
...
@@ -7241,9 +7241,9 @@ CMathContent.prototype.ReplaceAutoCorrect = function(AutoCorrectEngine, bCursorS
CMathContent
.
prototype
.
GetTextContent
=
function
()
{
//TODO временная функция. пересмотреть!
var
arr
=
[],
str
=
""
,
bIsContainsOperator
=
false
;
var
addText
=
function
(
value
,
bIsAddParenthesis
)
{
if
(
bIsAddParenthesis
&&
value
.
length
>
1
&&
value
.
match
())
...
...
@@ -7278,11 +7278,13 @@ CMathContent.prototype.GetTextContent = function()
{
if
(
DEGREE_SUPERSCRIPT
===
elem
.
Pr
.
type
)
{
res
.
push
(
getVal
(
"
^
"
));
//res.push(getVal("^"));
res
.
push
(
getVal
(
String
.
fromCharCode
(
94
)));
}
else
{
res
.
push
(
getVal
(
"
_
"
));
//res.push(getVal("_"));
res
.
push
(
getVal
(
String
.
fromCharCode
(
95
)));
}
}
else
if
(
elem
instanceof
CDelimiter
)
...
...
@@ -7295,7 +7297,8 @@ CMathContent.prototype.GetTextContent = function()
res
.
push
(
getVal
(
String
.
fromCharCode
(
elem
.
Pr
.
chr
),
true
));
if
(
!
elem
.
Pr
.
supHide
)
{
res
.
push
(
getVal
(
"
_
"
,
true
));
res
.
push
(
getVal
(
String
.
fromCharCode
(
95
),
true
))
//res.push(getVal("_", true));
}
else
{
...
...
@@ -7303,13 +7306,15 @@ CMathContent.prototype.GetTextContent = function()
}
if
(
!
elem
.
Pr
.
subHide
)
{
res
.
push
(
getVal
(
"
^
"
,
true
));
res
.
push
(
getVal
(
String
.
fromCharCode
(
94
),
true
));
//res.push(getVal("^", true));//94
}
else
{
res
.
push
(
null
);
}
res
.
push
(
getVal
(
"
▒
"
,
true
));
res
.
push
(
getVal
(
String
.
fromCharCode
(
9618
),
true
));
//res.push(getVal("▒", true));//9618
}
else
if
(
elem
instanceof
CFraction
)
{
...
...
@@ -7317,28 +7322,34 @@ CMathContent.prototype.GetTextContent = function()
}
else
if
(
elem
instanceof
CRadical
)
{
res
.
push
(
getVal
(
"
√
"
,
true
));
//8730;
res
.
push
(
getVal
(
"
&
"
,
true
));
//res.push(getVal("√", true));
res
.
push
(
getVal
(
String
.
fromCharCode
(
8730
),
true
));
//res.push(getVal("&", true));
res
.
push
(
getVal
(
String
.
fromCharCode
(
38
),
true
));
}
else
if
(
elem
instanceof
CMathMatrix
)
{
res
[
-
1
]
=
getVal
(
"
■
"
,
true
);
//res[-1] = getVal("■", true);//9632
res
[
-
1
]
=
getVal
(
String
.
fromCharCode
(
9632
),
true
);
for
(
var
row
=
0
;
row
<
elem
.
nRow
;
row
++
)
{
for
(
var
col
=
1
;
col
<
elem
.
nCol
;
col
++
)
{
res
.
push
(
getVal
(
"
&
"
));
res
.
push
(
getVal
(
String
.
fromCharCode
(
38
)));
//res.push(getVal("&"));
}
if
(
row
!==
elem
.
nRow
-
1
)
{
res
.
push
(
getVal
(
"
@
"
));
res
.
push
(
getVal
(
String
.
fromCharCode
(
64
)));
//res.push(getVal("@"));
}
}
}
else
if
(
elem
instanceof
CMathFunc
)
{
//
todo сивмол должен быть другим!
res
.
push
(
getVal
(
"
#
"
));
//
res.push(getVal("#"));//8289
res
.
push
(
getVal
(
String
.
fromCharCode
(
8289
)
));
}
return
res
;
...
...
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