Commit 64a1b0c2 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

operators (new)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48295 954022d7-b5bf-4e40-9824-e11837661b57
parent 09c6d5eb
......@@ -15,16 +15,16 @@ function CBorderBox()
// this.bDown = false;
// this.bTop = false;
// this.bLDiag = true;
// this.bRDiag = true;
/*this.bLDiag = true;
this.bRDiag = true;*/
CMathBase.call(this, 1, 1);
CMathBase.call(this);
}
extend(CBorderBox, CMathBase);
CBorderBox.prototype.init = function(params)
CBorderBox.prototype.init = function()
{
this.gapBrd = params.font.FontSize *0.08104587131076388;
this.params = Common_CopyObj(params);
this.setDimension(1, 1);
this.setContent();
}
CBorderBox.prototype.recalculateSize = function()
{
......@@ -34,6 +34,8 @@ CBorderBox.prototype.recalculateSize = function()
var height = ss.height;
var center = ss.center;
this.gapBrd = this.getTxtPrp().FontSize *0.08104587131076388;
if(this.bTop)
{
height += this.gapBrd;
......@@ -54,7 +56,7 @@ CBorderBox.prototype.draw = function()
{
this.elements[0][0].draw();
var penW = this.params.font.FontSize* 25.4/96 * 0.08 ;
var penW = this.getTxtPrp().FontSize* 25.4/96 * 0.08 ;
if(this.bTop)
{
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -46,13 +46,24 @@ CLogarithm.prototype.getArgument = function()
return this.elements[0][1];
}
function CMinimaxFunc(num)
function CMinimaxFunc()
{
this.num = num;
CMathBase.call(this, 2, 1);
CMathBase.call(this);
}
extend(CMinimaxFunc, CMathBase);
CMinimaxFunc.prototype.setContent = function()
CMinimaxFunc.prototype.init = function()
{
this.setDimension(2, 1);
var oBase = new CMathContent();
oBase.mergeTxtPrp({Italic: false});
var oIter = new CMathContent();
oIter.setReduct(DEGR_REDUCT);
this.addMCToContent(oBase, oIter);
}
CMinimaxFunc.prototype.old_setContent = function()
{
var oBase = new CMathContent();
var GParams = Common_CopyObj(this.params);
......@@ -97,33 +108,41 @@ CMinimaxFunc.prototype.old_setDistance = function()
this.dW = 0;
//this.dH = this.params.font.FontSize/16*g_dKoef_pt_to_mm;
}
CMinimaxFunc.prototype.setDistance = function()
{
this.dH = 0.03674768518518519*this.getTxtPrp().FontSize;
}
function CMinimax(num)
function CMinimax()
{
CSubMathBase.call(this, 1, 2);
if(this.num !== this.num - 0 && this.num < 0 && this.num > 2)
this.num = 0;
else
this.num = num;
CSubMathBase.call(this);
}
extend(CMinimax, CSubMathBase);
CMinimax.prototype.setContent = function()
CMinimax.prototype.init = function()
{
this.setDimension(1, 2);
var oFunc = new CMinimaxFunc();
oFunc.init();
var oArg = new CMathContent();
this.addMCToContent(oFunc, oArg);
}
CMinimax.prototype.old_setContent = function()
{
var oFunc = new CMinimaxFunc(this.num);
oFunc.init(this.params);
oFunc.relate(this);
oFunc.setContent();
var oArg = new CMathContent();
oArg.init(this.params);
oArg.relate(this);
oArg.fillPlaceholders();
CMinimax.superclass.setContent.call(this, oFunc, oArg);
}
CMinimax.prototype.setDistance = function()
CMinimax.prototype.old_setDistance = function()
{
//todo
//переделать !
......@@ -144,7 +163,7 @@ CMinimax.prototype.getArgument = function()
}
CMinimax.prototype.setDistance = function()
{
this.dW = this.params.font.FontSize/6*g_dKoef_pt_to_mm;
this.dW = this.getTxtPrp().FontSize/6*g_dKoef_pt_to_mm;
this.dH = 0;
}
......@@ -159,20 +178,6 @@ CMathFunc.prototype.init = function()
this.setContent();
this.elements[0][0].mergeTxtPrp({Italic: false}); // trigonometrical function
}
CMathFunc.prototype.old_setContent = function()
{
var oFunc = new CMathContent();
var GParms = Common_CopyObj(this.params);
GParms.bMText = false; //!!
oFunc.init(GParms);
var oArg = new CMathContent();
oArg.init(this.params);
oArg.fillPlaceholders();
CMathFunc.superclass.setContent.call(this, oFunc, oArg);
}
CMathFunc.prototype.setDistance = function()
{
this.dW = this.getTxtPrp().FontSize/6*g_dKoef_pt_to_mm;
......@@ -186,43 +191,6 @@ CMathFunc.prototype.getArgument = function()
return this.elements[0][1];
}
function old_CMathFunc(num)
{
if(num > 19)
return;
this.num = num;
CMathBase.call(this, 1,2);
}
//extend(old_CMathFunc,CSubMathBase);
extend(old_CMathFunc, CMathBase);
old_CMathFunc.prototype.setContent = function()
{
var oFunc = new CMathContent();
var GParms = Common_CopyObj(this.params);
GParms.bMText = false;
oFunc.init(GParms);
oFunc.addText(NameFunctions[this.num]);
var oArg = new CMathContent();
oArg.init(this.params);
oArg.fillPlaceholders();
old_CMathFunc.superclass.setContent.call(this, oFunc, oArg);
}
old_CMathFunc.prototype.setDistance = function()
{
//todo
//переделать!
this.dW = slashWidth(this.params.font);
this.dH = 0;
}
old_CMathFunc.prototype.addText = function(txt)
{
this.elements[0][1].addText(txt);
}
function old_CDifferential(num)
{
......
This diff is collapsed.
......@@ -124,6 +124,10 @@ CMathText.prototype =
this.value = code;
},
add: function(code)
{
this.value = code;
},
fillPlaceholders: function()
{
this.value = StartTextElement;
......@@ -168,10 +172,11 @@ CMathText.prototype =
var _ascent = metricsTxt.Ascent;
var _descent = (metricsTxt.Height - metricsTxt.Ascent);
var _height = _ascent + _descent;
var widthG = metricsTxt.WidthG;
var _center = _ascent - 0.2798833819241982*g_oTextMeasurer.GetHeight(); // смещаем центр
this.size = {width: _width, height: _height, center: _center, ascent: _ascent, descent: _descent};
this.size = {width: _width, widthG: widthG, height: _height, center: _center, ascent: _ascent, descent: _descent};
},
draw: function()
{
......@@ -263,11 +268,30 @@ CMathText.prototype =
},
IsJustDraw: function()
{
return bJDraw;
return this.bJDraw;
},
relate: function(parent) // for symbol only drawing
{
this.Parent = parent;
},
IsIncline: function()
{
// возвращаем не Italic, т.к. могут быть мат. текст, но буквы без наклона (placeholder и т.п.)
var bIncline = false;
bIncline = bIncline || (this.value == 0x210E);
bIncline = bIncline || (this.value == 0x1D6A4);
bIncline = bIncline || (this.value == 0x1D6A5);
bIncline = bIncline || (this.value > 0x0040 && this.value < 0x005B);
bIncline = bIncline || (this.value > 0x0060 && this.value < 0x007b);
return bIncline;
},
setJustDraw: function(bJustDraw)
{
this.bJDraw = bJustDraw;
}
/*draw2: function()
......@@ -772,6 +796,10 @@ old_CMathText.prototype =
this.value = code;
},
IsIncline: function()
{
},
/*IsIncline: function()
{
var flag = false;
......@@ -783,7 +811,7 @@ old_CMathText.prototype =
flag = true;
return flag;
},
},*/
ResizeDirect: function()
{
this.recalculateSize();
......
This diff is collapsed.
......@@ -22,9 +22,13 @@
<script src="../Common/downloaderfiles.js"></script>
<script src="../Common/docscoapisettings.js"></script>
<script src="../Common/docscoapicommon.js"></script>
<script type="text/javascript" src="../Common/spellCheckLanguage.js"></script>
<script type="text/javascript" src="../Common/spellCheckLanguagesAll.js"></script>
<script type="text/javascript" src="../Common/3rdparty/Underscore/underscore-min.js"></script>
<script type="text/javascript" src="../Common/3rdparty/Sockjs/sockjs-0.3.min.js"></script>
<script type="text/javascript" src="../Common/docscoapi.js"></script>
<script type="text/javascript" src="../Common/spellcheckapisettings.js"></script>
<script type="text/javascript" src="../Common/spellcheckapi.js"></script>
<script type="text/javascript" src="../Common/wordcopypaste.js"></script>
<script type="text/javascript" src="../Common/CommonDefines.js"></script>
<script type="text/javascript" src="../Common/NumFormat.js"></script>
......@@ -88,7 +92,7 @@
<!--<script type="text/javascript" src="Math/docfiles/main_menu.js"></script>-->
<script type="text/javascript" src="Math/docfiles/Document.js"></script>
<script type="text/javascript" src="Math/drawingBracket.js"></script>
<script type="text/javascript" src="Math/docfiles/DrawingDocument.js"></script>
<!--<script type="text/javascript" src="Math/docfiles/DrawingDocument.js"></script>-->
<!---->
<script type="text/javascript" src="Drawing/translations.js"></script>
......@@ -132,6 +136,7 @@
<script type="text/javascript" src="Editor/Serialize2.js"></script>
<script type="text/javascript" src="Editor/Search.js"></script>
<script type="text/javascript" src="Editor/FontClassification.js"></script>
<script type="text/javascript" src="Editor/Spelling.js"></script>
<script type="text/javascript" src="Drawing/Graphics.js"></script>
<script type="text/javascript" src="Drawing/ArcTo.js"></script>
......@@ -163,14 +168,13 @@
<!---->
<script type = "text/javascript" src ="Math/print.js"></script>
<script type="text/javascript" src = "Math/mathText.js"></script>
<script type="text/javascript" src = "Math/mathContent.js"></script>
<script type="text/javascript" src = "Math/actions.js"></script>
<script type="text/javascript" src = "Math/base.js"></script>
<script type="text/javascript" src = "Math/subBase.js"></script>
<script type="text/javascript" src = "Math/fraction.js"></script>
<script type="text/javascript" src = "Math/mathText.js"></script>
<script type="text/javascript" src ="Math/degree.js"></script>
<script type="text/javascript" src = "Math/matrix.js"></script>
......@@ -187,6 +191,12 @@
<!---->
<!--for presentation-->
<script type="text/javascript" src="../Common/PresentationSerializeAdapter.js"></script>
<!--for charts-->
<script type="text/javascript" src="../Excel/graphics/DrawingContextWord.js"></script>
</head>
<body id="id_body" class="block_elem" style="-moz-user-select:none;-khtml-user-select:none;user-select:none;width:100%;height:100%;background-color:#B0B0B0;overflow:hidden;position:fixed;" UNSELECTABLE="on">
<div id="id_menu" class="block_elem" style="width:100%;height:21mm;background-color:#F4F5F6;">
......@@ -2017,12 +2027,12 @@
</div>
<input id="imgApply" type="button" value="imgApply"/>
</div>
<div id="prPropDrag" style="display:none;width:300px;background-color:#fff;top:415px;left:25px;z-index:100;position:absolute;padding-top: 5px;border: 4px ridge silver;cursor:move;">
<div id="prPropDrag" style="display:none;width:300px;background-color:#fff;top:106px;left:66px;z-index:100;position:absolute;padding-top: 5px;border: 4px ridge silver;cursor:move;">
<div id="prPropDragCaption" style="float:left;width:300px;text-align: center;cursor:move;">
<b>Paragraph</b>
</div>
</div>
<div id="prProp" style="display:none;width:300px;background-color:#fff;top:445px;left:25px;z-index:100;position:absolute;padding-top: 5px;border: 4px ridge silver;">
<div id="prProp" style="display:none;width:300px;background-color:#fff;top:136px;left:66px;z-index:100;position:absolute;padding-top: 5px;border: 4px ridge silver;">
<div style="float:left;width:300px">
<div style="float:left;width:300px;height:25px;text-align: center;">Indent</div>
<div style="float:left;width:140px;padding-left: 10px">
......@@ -2077,6 +2087,12 @@
<div style="float:left;width:300px;padding-left: 10px">
<input id="prKeepLines" type="checkbox"/> Keep Lines
</div>
<div style="float:left;width:300px;padding-left: 10px">
<input id="prKeepNext" type="checkbox"/> Keep Next
</div>
<div style="float:left;width:300px;padding-left: 10px">
<input id="prWidowControl" type="checkbox"/> Widow Control
</div>
</div>
<div style="float:left;border-top: 2px ridge silver;width:300px">
<div style="float:left;width:300px;height:25px;text-align: center;">Borders</div>
......@@ -2118,6 +2134,10 @@
</tbody>
</table>
</div>
<div id="prBrdSpace" style="float:left;width:150px;">
<input id="prBrdSpaceVals" style="width: 100px" /> Space
</div>
<div style="float:left;width:150px;">
<input id="prBrdType" type="checkbox" checked="true"/> Single
</div>
......@@ -2182,6 +2202,33 @@
<input id="prTextPosition" style="width:30px;" value="0"/> Position
</div>
</div>
<div style="float:left;border-top: 2px ridge silver;width:300px">
<div style="float:left;width:300px;height:25px;padding-left: 10px">Default language</div>
<div style="float:left;width:300px">
<select id="prDefaultLang" style="float:left">
<option value="0">Английский (США)</option>
<option value="1">Русский</option>
<option value="2">Немецкий</option>
</select>
</div>
</div>
<div style="float:left;border-top: 2px ridge silver;width:300px">
<div style="float:left;width:300px;height:25px;padding-left: 10px">Spelling</div>
<select id="prLang" style="float:left">
<option value="0">Английский (США)</option>
<option value="1">Русский</option>
<option value="2">Немецкий</option>
</select>
<select id="prSpellingVariants" style="float:left">
</select>
<div id="prIgnoreMisspelling_div" style="float:left;width:300px">
<input id="prIgnoreMisspelling" type="button" value="Ignore"/>
<input id="prIgnoreAllMisspelling" type="button" value="Ignore All"/>
</div>
</div>
</div>
<!---->
......@@ -2311,6 +2358,9 @@
</div>
</div>
<div style="float:left;width:400px;">
<input id="tblLayout" type="checkbox" /> AutoFit
</div>
</div>
<div style="float:left;border-top: 2px ridge silver;padding-left:5px;width:400px">
<div style="float:left;width:400px;text-align: center;">Wrap</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment