Commit fc63a0de authored by Anna.Pavlova's avatar Anna.Pavlova

operators (new)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48295 954022d7-b5bf-4e40-9824-e11837661b57
parent 182828b7
...@@ -15,16 +15,16 @@ function CBorderBox() ...@@ -15,16 +15,16 @@ function CBorderBox()
// this.bDown = false; // this.bDown = false;
// this.bTop = false; // this.bTop = false;
// this.bLDiag = true; /*this.bLDiag = true;
// this.bRDiag = true; this.bRDiag = true;*/
CMathBase.call(this, 1, 1); CMathBase.call(this);
} }
extend(CBorderBox, CMathBase); extend(CBorderBox, CMathBase);
CBorderBox.prototype.init = function(params) CBorderBox.prototype.init = function()
{ {
this.gapBrd = params.font.FontSize *0.08104587131076388; this.setDimension(1, 1);
this.params = Common_CopyObj(params); this.setContent();
} }
CBorderBox.prototype.recalculateSize = function() CBorderBox.prototype.recalculateSize = function()
{ {
...@@ -34,6 +34,8 @@ CBorderBox.prototype.recalculateSize = function() ...@@ -34,6 +34,8 @@ CBorderBox.prototype.recalculateSize = function()
var height = ss.height; var height = ss.height;
var center = ss.center; var center = ss.center;
this.gapBrd = this.getTxtPrp().FontSize *0.08104587131076388;
if(this.bTop) if(this.bTop)
{ {
height += this.gapBrd; height += this.gapBrd;
...@@ -54,7 +56,7 @@ CBorderBox.prototype.draw = function() ...@@ -54,7 +56,7 @@ CBorderBox.prototype.draw = function()
{ {
this.elements[0][0].draw(); 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) if(this.bTop)
{ {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -46,13 +46,24 @@ CLogarithm.prototype.getArgument = function() ...@@ -46,13 +46,24 @@ CLogarithm.prototype.getArgument = function()
return this.elements[0][1]; return this.elements[0][1];
} }
function CMinimaxFunc(num) function CMinimaxFunc()
{ {
this.num = num; CMathBase.call(this);
CMathBase.call(this, 2, 1);
} }
extend(CMinimaxFunc, CMathBase); 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 oBase = new CMathContent();
var GParams = Common_CopyObj(this.params); var GParams = Common_CopyObj(this.params);
...@@ -97,33 +108,41 @@ CMinimaxFunc.prototype.old_setDistance = function() ...@@ -97,33 +108,41 @@ CMinimaxFunc.prototype.old_setDistance = function()
this.dW = 0; this.dW = 0;
//this.dH = this.params.font.FontSize/16*g_dKoef_pt_to_mm; //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); CSubMathBase.call(this);
if(this.num !== this.num - 0 && this.num < 0 && this.num > 2)
this.num = 0;
else
this.num = num;
} }
extend(CMinimax, CSubMathBase); 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); var oFunc = new CMinimaxFunc(this.num);
oFunc.init(this.params); oFunc.init(this.params);
oFunc.relate(this); oFunc.relate(this);
oFunc.setContent(); oFunc.setContent();
var oArg = new CMathContent(); var oArg = new CMathContent();
oArg.init(this.params); oArg.init(this.params);
oArg.relate(this); oArg.relate(this);
oArg.fillPlaceholders(); oArg.fillPlaceholders();
CMinimax.superclass.setContent.call(this, oFunc, oArg); CMinimax.superclass.setContent.call(this, oFunc, oArg);
} }
CMinimax.prototype.setDistance = function() CMinimax.prototype.old_setDistance = function()
{ {
//todo //todo
//переделать ! //переделать !
...@@ -144,7 +163,7 @@ CMinimax.prototype.getArgument = function() ...@@ -144,7 +163,7 @@ CMinimax.prototype.getArgument = function()
} }
CMinimax.prototype.setDistance = 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; this.dH = 0;
} }
...@@ -159,20 +178,6 @@ CMathFunc.prototype.init = function() ...@@ -159,20 +178,6 @@ CMathFunc.prototype.init = function()
this.setContent(); this.setContent();
this.elements[0][0].mergeTxtPrp({Italic: false}); // trigonometrical function 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() CMathFunc.prototype.setDistance = function()
{ {
this.dW = this.getTxtPrp().FontSize/6*g_dKoef_pt_to_mm; this.dW = this.getTxtPrp().FontSize/6*g_dKoef_pt_to_mm;
...@@ -186,43 +191,6 @@ CMathFunc.prototype.getArgument = function() ...@@ -186,43 +191,6 @@ CMathFunc.prototype.getArgument = function()
return this.elements[0][1]; 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) function old_CDifferential(num)
{ {
......
This diff is collapsed.
...@@ -124,6 +124,10 @@ CMathText.prototype = ...@@ -124,6 +124,10 @@ CMathText.prototype =
this.value = code; this.value = code;
}, },
add: function(code)
{
this.value = code;
},
fillPlaceholders: function() fillPlaceholders: function()
{ {
this.value = StartTextElement; this.value = StartTextElement;
...@@ -168,10 +172,11 @@ CMathText.prototype = ...@@ -168,10 +172,11 @@ CMathText.prototype =
var _ascent = metricsTxt.Ascent; var _ascent = metricsTxt.Ascent;
var _descent = (metricsTxt.Height - metricsTxt.Ascent); var _descent = (metricsTxt.Height - metricsTxt.Ascent);
var _height = _ascent + _descent; var _height = _ascent + _descent;
var widthG = metricsTxt.WidthG;
var _center = _ascent - 0.2798833819241982*g_oTextMeasurer.GetHeight(); // смещаем центр 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() draw: function()
{ {
...@@ -263,11 +268,30 @@ CMathText.prototype = ...@@ -263,11 +268,30 @@ CMathText.prototype =
}, },
IsJustDraw: function() IsJustDraw: function()
{ {
return bJDraw; return this.bJDraw;
}, },
relate: function(parent) // for symbol only drawing relate: function(parent) // for symbol only drawing
{ {
this.Parent = parent; 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() /*draw2: function()
...@@ -772,6 +796,10 @@ old_CMathText.prototype = ...@@ -772,6 +796,10 @@ old_CMathText.prototype =
this.value = code; this.value = code;
}, },
IsIncline: function() IsIncline: function()
{
},
/*IsIncline: function()
{ {
var flag = false; var flag = false;
...@@ -783,7 +811,7 @@ old_CMathText.prototype = ...@@ -783,7 +811,7 @@ old_CMathText.prototype =
flag = true; flag = true;
return flag; return flag;
}, },*/
ResizeDirect: function() ResizeDirect: function()
{ {
this.recalculateSize(); this.recalculateSize();
......
This diff is collapsed.
...@@ -22,9 +22,13 @@ ...@@ -22,9 +22,13 @@
<script src="../Common/downloaderfiles.js"></script> <script src="../Common/downloaderfiles.js"></script>
<script src="../Common/docscoapisettings.js"></script> <script src="../Common/docscoapisettings.js"></script>
<script src="../Common/docscoapicommon.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/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/3rdparty/Sockjs/sockjs-0.3.min.js"></script>
<script type="text/javascript" src="../Common/docscoapi.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/wordcopypaste.js"></script>
<script type="text/javascript" src="../Common/CommonDefines.js"></script> <script type="text/javascript" src="../Common/CommonDefines.js"></script>
<script type="text/javascript" src="../Common/NumFormat.js"></script> <script type="text/javascript" src="../Common/NumFormat.js"></script>
...@@ -88,7 +92,7 @@ ...@@ -88,7 +92,7 @@
<!--<script type="text/javascript" src="Math/docfiles/main_menu.js"></script>--> <!--<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/docfiles/Document.js"></script>
<script type="text/javascript" src="Math/drawingBracket.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> <script type="text/javascript" src="Drawing/translations.js"></script>
...@@ -132,6 +136,7 @@ ...@@ -132,6 +136,7 @@
<script type="text/javascript" src="Editor/Serialize2.js"></script> <script type="text/javascript" src="Editor/Serialize2.js"></script>
<script type="text/javascript" src="Editor/Search.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/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/Graphics.js"></script>
<script type="text/javascript" src="Drawing/ArcTo.js"></script> <script type="text/javascript" src="Drawing/ArcTo.js"></script>
...@@ -163,14 +168,13 @@ ...@@ -163,14 +168,13 @@
<!----> <!---->
<script type = "text/javascript" src ="Math/print.js"></script> <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/mathContent.js"></script>
<script type="text/javascript" src = "Math/actions.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/base.js"></script>
<script type="text/javascript" src = "Math/subBase.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/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/degree.js"></script>
<script type="text/javascript" src = "Math/matrix.js"></script> <script type="text/javascript" src = "Math/matrix.js"></script>
...@@ -187,6 +191,12 @@ ...@@ -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> </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"> <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;"> <div id="id_menu" class="block_elem" style="width:100%;height:21mm;background-color:#F4F5F6;">
...@@ -2017,12 +2027,12 @@ ...@@ -2017,12 +2027,12 @@
</div> </div>
<input id="imgApply" type="button" value="imgApply"/> <input id="imgApply" type="button" value="imgApply"/>
</div> </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;"> <div id="prPropDragCaption" style="float:left;width:300px;text-align: center;cursor:move;">
<b>Paragraph</b> <b>Paragraph</b>
</div> </div>
</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">
<div style="float:left;width:300px;height:25px;text-align: center;">Indent</div> <div style="float:left;width:300px;height:25px;text-align: center;">Indent</div>
<div style="float:left;width:140px;padding-left: 10px"> <div style="float:left;width:140px;padding-left: 10px">
...@@ -2077,6 +2087,12 @@ ...@@ -2077,6 +2087,12 @@
<div style="float:left;width:300px;padding-left: 10px"> <div style="float:left;width:300px;padding-left: 10px">
<input id="prKeepLines" type="checkbox"/> Keep Lines <input id="prKeepLines" type="checkbox"/> Keep Lines
</div> </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>
<div style="float:left;border-top: 2px ridge silver;width:300px"> <div style="float:left;border-top: 2px ridge silver;width:300px">
<div style="float:left;width:300px;height:25px;text-align: center;">Borders</div> <div style="float:left;width:300px;height:25px;text-align: center;">Borders</div>
...@@ -2118,6 +2134,10 @@ ...@@ -2118,6 +2134,10 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div id="prBrdSpace" style="float:left;width:150px;">
<input id="prBrdSpaceVals" style="width: 100px" /> Space
</div>
<div style="float:left;width:150px;"> <div style="float:left;width:150px;">
<input id="prBrdType" type="checkbox" checked="true"/> Single <input id="prBrdType" type="checkbox" checked="true"/> Single
</div> </div>
...@@ -2182,6 +2202,33 @@ ...@@ -2182,6 +2202,33 @@
<input id="prTextPosition" style="width:30px;" value="0"/> Position <input id="prTextPosition" style="width:30px;" value="0"/> Position
</div> </div>
</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> </div>
<!----> <!---->
...@@ -2311,6 +2358,9 @@ ...@@ -2311,6 +2358,9 @@
</div> </div>
</div> </div>
<div style="float:left;width:400px;">
<input id="tblLayout" type="checkbox" /> AutoFit
</div>
</div> </div>
<div style="float:left;border-top: 2px ridge silver;padding-left:5px;width:400px"> <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> <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