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
98f68569
Commit
98f68569
authored
Mar 28, 2016
by
Anna Pavlova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Файлы с SVN : branch Math_ForcedBreak
parent
89c25361
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
129 additions
and
441 deletions
+129
-441
word/Editor/Math.js
word/Editor/Math.js
+44
-135
word/Math/base.js
word/Math/base.js
+0
-25
word/Math/borderBox.js
word/Math/borderBox.js
+0
-24
word/Math/degree.js
word/Math/degree.js
+12
-32
word/Math/fraction.js
word/Math/fraction.js
+17
-29
word/Math/limit.js
word/Math/limit.js
+10
-30
word/Math/mathContent.js
word/Math/mathContent.js
+6
-45
word/Math/mathTypes.js
word/Math/mathTypes.js
+0
-24
word/Math/matrix.js
word/Math/matrix.js
+5
-32
word/Math/nary.js
word/Math/nary.js
+27
-40
word/Math/radical.js
word/Math/radical.js
+8
-25
No files found.
word/Editor/Math.js
View file @
98f68569
This diff is collapsed.
Click to expand it.
word/Math/base.js
View file @
98f68569
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"
use strict
"
;
"
use strict
"
;
/**
/**
...
@@ -47,7 +23,6 @@ function CMathBase(bInside)
...
@@ -47,7 +23,6 @@ function CMathBase(bInside)
this
.
CtrPrp
=
new
CTextPr
();
this
.
CtrPrp
=
new
CTextPr
();
this
.
CompiledCtrPrp
=
new
CTextPr
();
this
.
CompiledCtrPrp
=
new
CTextPr
();
this
.
TextPrControlLetter
=
new
CTextPr
();
this
.
TextPrControlLetter
=
new
CTextPr
();
//this.CtrPr = new CCtrPr();
this
.
ArgSize
=
new
CMathArgSize
();
this
.
ArgSize
=
new
CMathArgSize
();
...
...
word/Math/borderBox.js
View file @
98f68569
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"
use strict
"
;
"
use strict
"
;
function
CMathBreak
()
function
CMathBreak
()
...
...
word/Math/degree.js
View file @
98f68569
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"
use strict
"
;
"
use strict
"
;
function
CMathDegreePr
()
function
CMathDegreePr
()
...
@@ -109,12 +85,14 @@ CDegreeBase.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsI
...
@@ -109,12 +85,14 @@ CDegreeBase.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsI
var
ArgSzDegr
=
ArgSize
.
Copy
();
var
ArgSzDegr
=
ArgSize
.
Copy
();
ArgSzDegr
.
Decrease
();
ArgSzDegr
.
Decrease
();
var
RPIDegr
=
RPI
.
Copy
();
RPIDegr
.
bDecreasedComp
=
true
;
this
.
bNaryInline
=
RPI
.
bNaryInline
;
this
.
bNaryInline
=
RPI
.
bNaryInline
;
this
.
iterContent
.
PreRecalc
(
this
,
ParaMath
,
ArgSzDegr
,
RPIDegr
);
var
bDecreasedComp
=
RPI
.
bDecreasedComp
;
RPI
.
bDecreasedComp
=
true
;
this
.
iterContent
.
PreRecalc
(
this
,
ParaMath
,
ArgSzDegr
,
RPI
);
RPI
.
bDecreasedComp
=
bDecreasedComp
;
};
};
CDegreeBase
.
prototype
.
Resize
=
function
(
oMeasure
,
RPI
)
CDegreeBase
.
prototype
.
Resize
=
function
(
oMeasure
,
RPI
)
{
{
...
@@ -560,11 +538,13 @@ CIterators.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsIn
...
@@ -560,11 +538,13 @@ CIterators.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsIn
this
.
Set_CompiledCtrPrp
(
Parent
,
ParaMath
,
RPI
);
this
.
Set_CompiledCtrPrp
(
Parent
,
ParaMath
,
RPI
);
var
RPI_ITER
=
RPI
.
Copy
();
var
bDecreasedComp
=
RPI
.
bDecreasedComp
;
RPI_ITER
.
bDecreasedComp
=
true
;
RPI
.
bDecreasedComp
=
true
;
this
.
iterUp
.
PreRecalc
(
this
,
ParaMath
,
ArgSzIters
,
RPI
);
this
.
iterDn
.
PreRecalc
(
this
,
ParaMath
,
ArgSzIters
,
RPI
);
this
.
iterUp
.
PreRecalc
(
this
,
ParaMath
,
ArgSzIters
,
RPI_ITER
);
RPI
.
bDecreasedComp
=
bDecreasedComp
;
this
.
iterDn
.
PreRecalc
(
this
,
ParaMath
,
ArgSzIters
,
RPI_ITER
);
};
};
CIterators
.
prototype
.
recalculateSize
=
function
(
oMeasure
,
dH
,
ascent
)
CIterators
.
prototype
.
recalculateSize
=
function
(
oMeasure
,
dH
,
ascent
)
{
{
...
...
word/Math/fraction.js
View file @
98f68569
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"
use strict
"
;
"
use strict
"
;
function
CMathFractionPr
()
function
CMathFractionPr
()
...
@@ -327,7 +303,12 @@ CFraction.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsInf
...
@@ -327,7 +303,12 @@ CFraction.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsInf
var
ArgSzNumDen
=
ArgSize
.
Copy
();
var
ArgSzNumDen
=
ArgSize
.
Copy
();
if
(
RPI
.
bInline
==
true
&&
(
this
.
Pr
.
type
===
BAR_FRACTION
||
this
.
Pr
.
type
==
NO_BAR_FRACTION
))
// уменьшае размер числителя и знаменателя
var
oMathSettings
=
Get_WordDocumentDefaultMathSettings
();
var
bInlineBarFaction
=
RPI
.
bInline
==
true
&&
(
this
.
Pr
.
type
===
BAR_FRACTION
||
this
.
Pr
.
type
==
NO_BAR_FRACTION
),
bReduceSize
=
(
RPI
.
bSmallFraction
||
RPI
.
bDecreasedComp
==
true
)
&&
true
==
oMathSettings
.
Get_SmallFrac
();
if
(
bInlineBarFaction
||
bReduceSize
)
// уменьшае размер числителя и знаменателя
{
{
ArgSzNumDen
.
Decrease
();
// для контентов числителя и знаменателя
ArgSzNumDen
.
Decrease
();
// для контентов числителя и знаменателя
this
.
ArgSize
.
SetValue
(
-
1
);
// для CtrPrp
this
.
ArgSize
.
SetValue
(
-
1
);
// для CtrPrp
...
@@ -346,17 +327,24 @@ CFraction.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsInf
...
@@ -346,17 +327,24 @@ CFraction.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsInf
this
.
ApplyProperties
(
RPI
);
this
.
ApplyProperties
(
RPI
);
var
NewRPI
=
RPI
.
Copy
();
var
bDecreasedComp
=
RPI
.
bDecreasedComp
,
bSmallFraction
=
RPI
.
bSmallFraction
;
if
(
this
.
Pr
.
type
!==
LINEAR_FRACTION
)
if
(
this
.
Pr
.
type
!==
LINEAR_FRACTION
)
NewRPI
.
bDecreasedComp
=
true
;
RPI
.
bDecreasedComp
=
true
;
RPI
.
bSmallFraction
=
true
;
// setGaps обязательно после того как смержили CtrPrp (Set_CompiledCtrPrp)
// setGaps обязательно после того как смержили CtrPrp (Set_CompiledCtrPrp)
if
(
this
.
bInside
==
false
)
if
(
this
.
bInside
==
false
)
GapsInfo
.
setGaps
(
this
,
this
.
TextPrControlLetter
.
FontSize
);
GapsInfo
.
setGaps
(
this
,
this
.
TextPrControlLetter
.
FontSize
);
this
.
Numerator
.
PreRecalc
(
this
,
ParaMath
,
ArgSzNumDen
,
NewRPI
);
this
.
Numerator
.
PreRecalc
(
this
,
ParaMath
,
ArgSzNumDen
,
RPI
);
this
.
Denominator
.
PreRecalc
(
this
,
ParaMath
,
ArgSzNumDen
,
NewRPI
);
this
.
Denominator
.
PreRecalc
(
this
,
ParaMath
,
ArgSzNumDen
,
RPI
);
RPI
.
bDecreasedComp
=
bDecreasedComp
;
RPI
.
bSmallFraction
=
bSmallFraction
;
};
};
CFraction
.
prototype
.
recalculateSize
=
function
(
oMeasure
)
CFraction
.
prototype
.
recalculateSize
=
function
(
oMeasure
)
{
{
...
...
word/Math/limit.js
View file @
98f68569
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"
use strict
"
;
"
use strict
"
;
function
CMathLimitPr
()
function
CMathLimitPr
()
...
@@ -111,10 +87,12 @@ CLimitPrimary.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, Gap
...
@@ -111,10 +87,12 @@ CLimitPrimary.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, Gap
var
ArgSzIter
=
ArgSize
.
Copy
();
var
ArgSzIter
=
ArgSize
.
Copy
();
ArgSzIter
.
Decrease
();
ArgSzIter
.
Decrease
();
var
NewRPI
=
RPI
.
Copy
()
;
var
bDecreasedComp
=
RPI
.
bDecreasedComp
;
New
RPI
.
bDecreasedComp
=
true
;
RPI
.
bDecreasedComp
=
true
;
this
.
Iterator
.
PreRecalc
(
this
,
ParaMath
,
ArgSzIter
,
NewRPI
);
this
.
Iterator
.
PreRecalc
(
this
,
ParaMath
,
ArgSzIter
,
RPI
);
RPI
.
bDecreasedComp
=
bDecreasedComp
;
};
};
CLimitPrimary
.
prototype
.
Resize
=
function
(
oMeasure
,
RPI
)
CLimitPrimary
.
prototype
.
Resize
=
function
(
oMeasure
,
RPI
)
{
{
...
@@ -367,10 +345,12 @@ CMathFunc.prototype.init = function(props)
...
@@ -367,10 +345,12 @@ CMathFunc.prototype.init = function(props)
};
};
CMathFunc
.
prototype
.
PreRecalc
=
function
(
Parent
,
ParaMath
,
ArgSize
,
RPI
,
GapsInfo
)
CMathFunc
.
prototype
.
PreRecalc
=
function
(
Parent
,
ParaMath
,
ArgSize
,
RPI
,
GapsInfo
)
{
{
var
NewRPI
=
RPI
.
Copy
();
var
bMathFunc
=
RPI
.
bMathFunc
;
NewRPI
.
bMathFunc
=
true
;
RPI
.
bMathFunc
=
true
;
CMathFunc
.
superclass
.
PreRecalc
.
call
(
this
,
Parent
,
ParaMath
,
ArgSize
,
RPI
,
GapsInfo
);
CMathFunc
.
superclass
.
PreRecalc
.
call
(
this
,
Parent
,
ParaMath
,
ArgSize
,
NewRPI
,
GapsInfo
)
;
RPI
.
bMathFunc
=
bMathFunc
;
};
};
CMathFunc
.
prototype
.
GetLastElement
=
function
()
CMathFunc
.
prototype
.
GetLastElement
=
function
()
{
{
...
...
word/Math/mathContent.js
View file @
98f68569
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"
use strict
"
;
"
use strict
"
;
function
CRPI
()
function
CRPI
()
...
@@ -34,22 +10,8 @@ function CRPI()
...
@@ -34,22 +10,8 @@ function CRPI()
this
.
bMathFunc
=
false
;
this
.
bMathFunc
=
false
;
this
.
bRecalcCtrPrp
=
false
;
// пересчет ctrPrp нужен, когда на Undo и тп изменился размер первого Run, а ctrPrp уже для мат объектов пересчитались
this
.
bRecalcCtrPrp
=
false
;
// пересчет ctrPrp нужен, когда на Undo и тп изменился размер первого Run, а ctrPrp уже для мат объектов пересчитались
this
.
bCorrect_ConvertFontSize
=
false
;
this
.
bCorrect_ConvertFontSize
=
false
;
this
.
bSmallFraction
=
false
;
}
}
CRPI
.
prototype
.
Copy
=
function
()
{
var
RPI
=
new
CRPI
();
RPI
.
bInline
=
this
.
bInline
;
RPI
.
bDecreasedComp
=
this
.
bDecreasedComp
;
RPI
.
bChangeInline
=
this
.
bChangeInline
;
RPI
.
bNaryInline
=
this
.
bNaryInline
;
RPI
.
bEqArray
=
this
.
bEqArray
;
RPI
.
bMathFunc
=
this
.
bMathFunc
;
RPI
.
bRecalcCtrPrp
=
this
.
bRecalcCtrPrp
;
RPI
.
bCorrect_ConvertFontSize
=
this
.
bCorrect_ConvertFontSize
;
return
RPI
;
};
CRPI
.
prototype
.
MergeMathInfo
=
function
(
MathInfo
)
CRPI
.
prototype
.
MergeMathInfo
=
function
(
MathInfo
)
{
{
this
.
bInline
=
MathInfo
.
bInline
||
(
MathInfo
.
bInternalRanges
==
true
&&
MathInfo
.
bStartRanges
==
false
);
this
.
bInline
=
MathInfo
.
bInline
||
(
MathInfo
.
bInternalRanges
==
true
&&
MathInfo
.
bStartRanges
==
false
);
...
@@ -1331,10 +1293,9 @@ CMathContent.prototype.Correct_Content = function(bInnerCorrection)
...
@@ -1331,10 +1293,9 @@ CMathContent.prototype.Correct_Content = function(bInnerCorrection)
{
{
bEmptyContent
=
false
;
bEmptyContent
=
false
;
}
}
}
}
if
(
bEmptyContent
)
if
(
bEmptyContent
==
true
&&
this
.
bRoot
==
false
)
{
{
this
.
Content
[
0
].
fillPlaceholders
();
this
.
Content
[
0
].
fillPlaceholders
();
this
.
Content
[
0
].
Recalc_CompiledPr
(
true
);
this
.
Content
[
0
].
Recalc_CompiledPr
(
true
);
...
@@ -1497,7 +1458,7 @@ CMathContent.prototype.GetMathTextPrForMenu = function(ContentPos, Depth)
...
@@ -1497,7 +1458,7 @@ CMathContent.prototype.GetMathTextPrForMenu = function(ContentPos, Depth)
return
this
.
Content
[
pos
].
GetMathTextPrForMenu
(
ContentPos
,
Depth
+
1
);
return
this
.
Content
[
pos
].
GetMathTextPrForMenu
(
ContentPos
,
Depth
+
1
);
};
};
CMathContent
.
prototype
.
Apply_TextPr
=
function
(
TextPr
,
IncFontSize
,
ApplyToAll
,
PosForMenu
)
CMathContent
.
prototype
.
Apply_TextPr
=
function
(
TextPr
,
IncFontSize
,
ApplyToAll
,
StartPos
,
EndPos
)
{
{
if
(
true
===
ApplyToAll
)
if
(
true
===
ApplyToAll
)
{
{
...
@@ -1508,10 +1469,10 @@ CMathContent.prototype.Apply_TextPr = function(TextPr, IncFontSize, ApplyToAll,
...
@@ -1508,10 +1469,10 @@ CMathContent.prototype.Apply_TextPr = function(TextPr, IncFontSize, ApplyToAll,
{
{
var
StartPos
,
EndPos
,
bMenu
=
false
;
var
StartPos
,
EndPos
,
bMenu
=
false
;
if
(
PosForMenu
!==
undefined
)
if
(
StartPos
!==
undefined
&&
EndPos
!==
undefined
)
{
{
StartPos
=
PosForMenu
.
StartPos
;
StartPos
=
StartPos
;
EndPos
=
PosForMenu
.
EndPos
;
EndPos
=
EndPos
;
bMenu
=
true
;
bMenu
=
true
;
}
}
...
...
word/Math/mathTypes.js
View file @
98f68569
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"
use strict
"
;
"
use strict
"
;
var
MATH_FRACTION
=
0
;
var
MATH_FRACTION
=
0
;
...
...
word/Math/matrix.js
View file @
98f68569
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"
use strict
"
;
"
use strict
"
;
var
MATH_MC_JC
=
MCJC_CENTER
;
var
MATH_MC_JC
=
MCJC_CENTER
;
...
@@ -1347,17 +1323,15 @@ CEqArray.prototype.getColsCount = function()
...
@@ -1347,17 +1323,15 @@ CEqArray.prototype.getColsCount = function()
};
};
CEqArray
.
prototype
.
Resize
=
function
(
oMeasure
,
RPI
)
CEqArray
.
prototype
.
Resize
=
function
(
oMeasure
,
RPI
)
{
{
// на случай, чтобы не затереть массив
var
bEqArray
=
RPI
.
bEqArray
;
//var CurrAmperWPoints = RPI.AmperWPoints,
RPI
.
bEqArray
=
true
;
// CurrEqArray = RPI.bEqArray;
var
NewRPI
=
RPI
.
Copy
();
NewRPI
.
bEqArray
=
true
;
for
(
var
i
=
0
;
i
<
this
.
nRow
;
i
++
)
for
(
var
i
=
0
;
i
<
this
.
nRow
;
i
++
)
this
.
elements
[
i
][
0
].
Resize
(
oMeasure
,
New
RPI
);
this
.
elements
[
i
][
0
].
Resize
(
oMeasure
,
RPI
);
this
.
recalculateSize
(
oMeasure
);
this
.
recalculateSize
(
oMeasure
);
RPI
.
bEqArray
=
bEqArray
;
};
};
CEqArray
.
prototype
.
getMetrics
=
function
()
CEqArray
.
prototype
.
getMetrics
=
function
()
{
{
...
@@ -1367,7 +1341,6 @@ CEqArray.prototype.getMetrics = function()
...
@@ -1367,7 +1341,6 @@ CEqArray.prototype.getMetrics = function()
// нумерация начинается с нуля, поэтому все четные точки идут с нечетными номерами в массиве
// нумерация начинается с нуля, поэтому все четные точки идут с нечетными номерами в массиве
//var lngW = RPI.Widths.length; // this.nRow
var
EndWidths
=
0
;
var
EndWidths
=
0
;
var
even
,
// четная точка
var
even
,
// четная точка
...
...
word/Math/nary.js
View file @
98f68569
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"
use strict
"
;
"
use strict
"
;
//величина символа "сигма" не меняется в зависимости от аргумента
//величина символа "сигма" не меняется в зависимости от аргумента
...
@@ -329,12 +305,14 @@ CNary.prototype.private_GetLimLoc = function()
...
@@ -329,12 +305,14 @@ CNary.prototype.private_GetLimLoc = function()
};
};
CNary
.
prototype
.
PreRecalc
=
function
(
Parent
,
ParaMath
,
ArgSize
,
RPI
,
GapsInfo
)
CNary
.
prototype
.
PreRecalc
=
function
(
Parent
,
ParaMath
,
ArgSize
,
RPI
,
GapsInfo
)
{
{
var
NewRPI
=
RPI
.
Copy
()
;
var
bNaryInline
=
RPI
.
bNaryInline
;
if
(
RPI
.
bInline
||
RPI
.
bDecreasedComp
)
if
(
RPI
.
bInline
||
RPI
.
bDecreasedComp
)
New
RPI
.
bNaryInline
=
true
;
RPI
.
bNaryInline
=
true
;
CNary
.
superclass
.
PreRecalc
.
call
(
this
,
Parent
,
ParaMath
,
ArgSize
,
NewRPI
,
GapsInfo
);
CNary
.
superclass
.
PreRecalc
.
call
(
this
,
Parent
,
ParaMath
,
ArgSize
,
RPI
,
GapsInfo
);
RPI
.
bNaryInline
=
bNaryInline
;
};
};
CNary
.
prototype
.
getSign
=
function
(
chrCode
,
chrType
)
CNary
.
prototype
.
getSign
=
function
(
chrCode
,
chrType
)
{
{
...
@@ -895,11 +873,14 @@ CNaryUnd.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI)
...
@@ -895,11 +873,14 @@ CNaryUnd.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI)
var
ArgSzUnd
=
ArgSize
.
Copy
();
var
ArgSzUnd
=
ArgSize
.
Copy
();
ArgSzUnd
.
Decrease
();
ArgSzUnd
.
Decrease
();
var
RPIUnd
=
RPI
.
Copy
();
RPIUnd
.
bDecreasedComp
=
true
;
this
.
elements
[
0
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSzUnd
,
RPIUnd
);
this
.
elements
[
1
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSize
,
RPI
);
this
.
elements
[
1
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSize
,
RPI
);
var
bDecreasedComp
=
RPI
.
bDecreasedComp
;
RPI
.
bDecreasedComp
=
true
;
this
.
elements
[
0
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSzUnd
,
RPI
);
RPI
.
bDecreasedComp
=
bDecreasedComp
;
};
};
CNaryUnd
.
prototype
.
setBase
=
function
(
base
)
CNaryUnd
.
prototype
.
setBase
=
function
(
base
)
{
{
...
@@ -933,11 +914,14 @@ CNaryOvr.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI)
...
@@ -933,11 +914,14 @@ CNaryOvr.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI)
var
ArgSzOvr
=
ArgSize
.
Copy
();
var
ArgSzOvr
=
ArgSize
.
Copy
();
ArgSzOvr
.
Decrease
();
ArgSzOvr
.
Decrease
();
var
RPIOvr
=
RPI
.
Copy
();
RPIOvr
.
bDecreasedComp
=
true
;
this
.
elements
[
0
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSize
,
RPI
);
this
.
elements
[
0
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSize
,
RPI
);
this
.
elements
[
1
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSzOvr
,
RPIOvr
);
var
bDecreasedComp
=
RPI
.
bDecreasedComp
;
RPI
.
bDecreasedComp
=
true
;
this
.
elements
[
1
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSzOvr
,
RPI
);
RPI
.
bDecreasedComp
=
bDecreasedComp
;
};
};
CNaryOvr
.
prototype
.
recalculateSize
=
function
()
CNaryOvr
.
prototype
.
recalculateSize
=
function
()
{
{
...
@@ -1000,13 +984,16 @@ CNaryUndOvr.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI)
...
@@ -1000,13 +984,16 @@ CNaryUndOvr.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI)
var
ArgSzIter
=
ArgSize
.
Copy
();
var
ArgSzIter
=
ArgSize
.
Copy
();
ArgSzIter
.
Decrease
();
ArgSzIter
.
Decrease
();
var
RPI_Iter
=
RPI
.
Copy
();
this
.
elements
[
1
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSize
,
RPI
);
RPI_Iter
.
bDecreasedComp
=
true
;
var
bDecreasedComp
=
RPI
.
bDecreasedComp
;
RPI
.
bDecreasedComp
=
true
;
this
.
elements
[
0
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSzIter
,
RPI
);
this
.
elements
[
0
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSzIter
,
RPI_Iter
);
this
.
elements
[
2
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSzIter
,
RPI
);
this
.
elements
[
1
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSize
,
RPI
);
this
.
elements
[
2
][
0
].
PreRecalc
(
this
,
ParaMath
,
ArgSzIter
,
RPI_Iter
)
;
RPI
.
bDecreasedComp
=
bDecreasedComp
;
};
};
CNaryUndOvr
.
prototype
.
recalculateSize
=
function
()
CNaryUndOvr
.
prototype
.
recalculateSize
=
function
()
{
{
...
...
word/Math/radical.js
View file @
98f68569
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"
use strict
"
;
"
use strict
"
;
function
CSignRadical
()
function
CSignRadical
()
...
@@ -442,9 +418,16 @@ CRadical.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsInfo
...
@@ -442,9 +418,16 @@ CRadical.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsInfo
var
ArgSzIter
=
new
CMathArgSize
();
var
ArgSzIter
=
new
CMathArgSize
();
ArgSzIter
.
SetValue
(
-
2
);
ArgSzIter
.
SetValue
(
-
2
);
this
.
Iterator
.
PreRecalc
(
this
,
ParaMath
,
ArgSzIter
,
RPI
);
this
.
RealBase
.
PreRecalc
(
this
,
ParaMath
,
ArgSize
,
RPI
);
this
.
RealBase
.
PreRecalc
(
this
,
ParaMath
,
ArgSize
,
RPI
);
var
bDecreasedComp
=
RPI
.
bDecreasedComp
;
RPI
.
bDecreasedComp
=
true
;
this
.
Iterator
.
PreRecalc
(
this
,
ParaMath
,
ArgSzIter
,
RPI
);
RPI
.
bDecreasedComp
=
bDecreasedComp
;
if
(
this
.
bInside
==
false
)
if
(
this
.
bInside
==
false
)
GapsInfo
.
setGaps
(
this
,
this
.
TextPrControlLetter
.
FontSize
);
GapsInfo
.
setGaps
(
this
,
this
.
TextPrControlLetter
.
FontSize
);
};
};
...
...
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