Commit 6f2e9405 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

text properties (через api)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49025 954022d7-b5bf-4e40-9824-e11837661b57
parent fcb655b6
......@@ -110,6 +110,13 @@ CMathBase.prototype =
for(var j = 0; j < this.nCol; j++)
this.elements[i][j].setTxtPrp(this.getTxtPrp());
},
setOwnTPrp: function(txtPrp)
{
for(var i=0; i < this.nRow; i++)
for(var j = 0; j < this.nCol; j++)
if( !this.elements[i][j].IsJustDraw())
this.elements[i][j].setOwnTPrp(txtPrp);
},
getOwnTPrp: function()
{
return this.textPrp;
......
......@@ -89,7 +89,6 @@ function CMathContent()
this.TxtPrp = new CMathTextPrp();
this.OwnTPrp = new CMathTextPrp();
this.TxtH = 0;
this.Composition = null; // ссылка на общую формулу
......@@ -127,7 +126,8 @@ CMathContent.prototype =
setTxtPrp: function(txtPrp)
{
this.TxtPrp.Merge(txtPrp);
this.setTPrpToInterval(txtPrp, 0, this.content.length);
for(var i = 0; i < this.content.length; i++)
this.content[i].value.setTxtPrp(txtPrp);
},
changeTxtPrp: function(txtPrp)
{
......@@ -144,16 +144,14 @@ CMathContent.prototype =
}
}
this.setTPrpToInterval(txtPrp, start, end);
},
setTPrpToInterval: function(txtPrp, start, end)
{
for(var i = start; i < end; i++)
this.content[i].value.setTxtPrp(txtPrp);
this.content[i].value.setOwnTPrp(txtPrp);
},
setOwnTPrp: function(txtPrp)
{
this.OwnTPrp.Merge(txtPrp);
for(var i = 0; i < this.content.length; i++)
this.content[i].value.setOwnTPrp(txtPrp);
},
getRunPrp: function(pos)
{
......@@ -163,12 +161,12 @@ CMathContent.prototype =
{
if(pos == 0)
{
var rPrp = this.content[pos+1].value.getRunPrp();
var rPrp = this.content[pos+1].value.getTxtPrp();
runPrp.Merge(rPrp);
}
else
{
var rPrp = this.content[pos].value.getRunPrp();
var rPrp = this.content[pos].value.getTxtPrp();
runPrp.Merge(rPrp);
}
}
......@@ -3978,8 +3976,8 @@ CMathComposition.prototype =
},
SetTxtPrp: function(txtPrp)
{
//this.SelectContent.changeTxtPrp(txtPrp, false);
this.SelectContent.setTxtPrp(txtPrp, false);
this.SelectContent.changeTxtPrp(txtPrp, false);
//this.SelectContent.setTxtPrp(txtPrp, false);
this.Resize();
this.UpdatePosition();
this.UpdateCursor();
......@@ -4119,5 +4117,6 @@ function CEmpty()
this.IsHighElement = function() { return false; };
this.setTxtPrp = function(txtPrp) { this.TxtPrp.Merge(txtPrp); };
this.getRunPrp = function() {return this.TxtPrp; };
this.setOwnTPrp = function() {};
}
......@@ -150,6 +150,10 @@ CMathText.prototype =
this.TxtPrp = new CMathTextPrp();
this.TxtPrp.Merge(txtPrp);
},
setOwnTPrp: function(txtPrp)
{
this.OwnTPrp.Merge(txtPrp);
},
setLIterator: function(bIterator)
{
this.bIterator = bIterator; // символы другие , чуть толще
......
......@@ -155,9 +155,13 @@
<script type="text/javascript" src="Drawing/documentrenderer.js"></script>
<script type="text/javascript" src="apiDefines.js"></script>
<script type="text/javascript" src="apiCommon.js"></script>
<script type="text/javascript" src="api.js"></script>
<!--<script type="text/javascript" src="api.js"></script>-->
<script type="text/javascript" src="Drawing/scrolls/scroll.js"></script>
<!---->
<script type="text/javascript" src="Math/docfiles/api.js"></script>
<!---->
<script type="text/javascript" src="../Common/Shapes/EditorSettings.js"></script>
<script type="text/javascript" src="../Common/Shapes/Serialize.js"></script>
<script type="text/javascript" src="../Common/Shapes/SerializeWriter.js"></script>
......
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