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

Поправлены баги на открытие

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55503 954022d7-b5bf-4e40-9824-e11837661b57
parent 00568060
...@@ -373,6 +373,9 @@ ParaMath.prototype = ...@@ -373,6 +373,9 @@ ParaMath.prototype =
var TextPr = new CTextPr(); var TextPr = new CTextPr();
TextPr.Init_Default(); TextPr.Init_Default();
this.Math.RecalculateComposition(g_oTextMeasurer, TextPr); this.Math.RecalculateComposition(g_oTextMeasurer, TextPr);
this.Math.absPos = {x: PRS.X, y: PRS.Y};
var Size = this.Math.Size; var Size = this.Math.Size;
this.Width = Size.Width; this.Width = Size.Width;
......
...@@ -1170,7 +1170,6 @@ CAccent.prototype.init = function(properties) ...@@ -1170,7 +1170,6 @@ CAccent.prototype.init = function(properties)
this.setDimension(1, 1); this.setDimension(1, 1);
this.setContent(); this.setContent();
//this.setOperator(accent); //this.setOperator(accent);
this.elements[0][0].SetDot(true); this.elements[0][0].SetDot(true);
} }
......
...@@ -1402,7 +1402,8 @@ CMathBase.prototype = ...@@ -1402,7 +1402,8 @@ CMathBase.prototype =
{ {
for(var i=0; i < this.nRow; i++) for(var i=0; i < this.nRow; i++)
for(var j = 0; j < this.nCol; j++) for(var j = 0; j < this.nCol; j++)
this.elements[i][j].SetRunEmptyToContent(bAll); if(!this.elements[i][j].IsJustDraw())
this.elements[i][j].SetRunEmptyToContent(bAll);
} }
////////////////////////// //////////////////////////
......
...@@ -5149,7 +5149,7 @@ CMathContent.prototype = ...@@ -5149,7 +5149,7 @@ CMathContent.prototype =
return posChange; return posChange;
}, },
// выставить курсор в начало конента // выставить курсор в начало конента
cursor_MoveToStartPos: function() // home => cursor_MoveToStartPos old_cursor_MoveToStartPos: function() // home => cursor_MoveToStartPos
{ {
if( !this.IsEmpty() ) if( !this.IsEmpty() )
{ {
...@@ -5166,7 +5166,7 @@ CMathContent.prototype = ...@@ -5166,7 +5166,7 @@ CMathContent.prototype =
} }
}, },
// выставить курсор в конец конента // выставить курсор в конец конента
cursor_MoveToEndPos: function() // end => cursor_MoveToEndPos old_cursor_MoveToEndPos: function() // end => cursor_MoveToEndPos
{ {
if( !this.IsEmpty() ) if( !this.IsEmpty() )
{ {
...@@ -5176,34 +5176,7 @@ CMathContent.prototype = ...@@ -5176,34 +5176,7 @@ CMathContent.prototype =
this.setLogicalPosition(0); this.setLogicalPosition(0);
} }
}, },
Cursor_Is_Start: function()
{
var result = false;
if( !this.IsEmpty() )
{
if(this.CurPos == 0)
result = this.content[0].Cursor_Is_Start();
}
return result;
},
Cursor_Is_End: function()
{
var result = false;
if(!this.IsEmpty())
{
var len = this.content.length - 1;
if(this.CurPos == len && this.content[len].typeObj == MATH_RUN_PRP)
{
result = this.content[len].Cursor_Is_End();
}
}
return result;
},
////////////////////////////////////// //////////////////////////////////////
// не вызываем из mouseDown эту ф-ию, тк иначе не установим селект для внутреннего объекта (setStart_Selection) // не вызываем из mouseDown эту ф-ию, тк иначе не установим селект для внутреннего объекта (setStart_Selection)
...@@ -6491,7 +6464,6 @@ CMathContent.prototype = ...@@ -6491,7 +6464,6 @@ CMathContent.prototype =
{ {
this.plhHide = flag; this.plhHide = flag;
}, },
///////// RunPrp, CtrPrp ///////// RunPrp, CtrPrp
addRunPrp: function(rPrp) addRunPrp: function(rPrp)
{ {
...@@ -7695,6 +7667,21 @@ CMathContent.prototype = ...@@ -7695,6 +7667,21 @@ CMathContent.prototype =
return result; return result;
}, },
Get_StartPos: function(ContentPos, Depth)
{
ContentPos.Update( 0, Depth );
Depth++;
this.content[0].Get_StartPos(ContentPos, Depth);
},
Get_EndPos: function(BehindEnd, ContentPos, Depth)
{
var len = this.content.length - 1;
ContentPos.Update(len, Depth);
Depth++;
this.content[len].Get_EndPos(BehindEnd, ContentPos, Depth);
},
Get_Id : function() Get_Id : function()
{ {
return this.GetId(); return this.GetId();
...@@ -7729,8 +7716,6 @@ CMathContent.prototype = ...@@ -7729,8 +7716,6 @@ CMathContent.prototype =
NewContent.push( new ParaRun(this.Composition.Parent.Paragraph, true) ); NewContent.push( new ParaRun(this.Composition.Parent.Paragraph, true) );
NewContent.push( this.content[i] ); // Math Object NewContent.push( this.content[i] ); // Math Object
this.content[i].SetRunEmptyToContent(bAll);
left = current; left = current;
} }
...@@ -7739,6 +7724,10 @@ CMathContent.prototype = ...@@ -7739,6 +7724,10 @@ CMathContent.prototype =
NewContent.push(this.content[i]); NewContent.push(this.content[i]);
left = current; left = current;
} }
if(bCurrComp && bAll == true)
this.content[i].SetRunEmptyToContent(bAll);
} }
if(this.content[len - 1].typeObj == MATH_COMP) if(this.content[len - 1].typeObj == MATH_COMP)
...@@ -7748,10 +7737,50 @@ CMathContent.prototype = ...@@ -7748,10 +7737,50 @@ CMathContent.prototype =
this.content = NewContent; this.content = NewContent;
},
Cursor_MoveToStartPos: function()
{
if(!this.IsEmpty())
{
this.content[0].Cursor_MoveToStartPos();
}
},
Cursor_MoveToEndPos: function()
{
if(!this.IsEmpty())
{
var len = this.content.length - 1;
this.content[len].Cursor_MoveToEndPos();
}
},
Cursor_Is_Start: function()
{
var result = false;
if( !this.IsEmpty() )
{
if(this.CurPos == 0)
result = this.content[0].Cursor_Is_Start();
}
return result;
}, },
////////////////////////// Cursor_Is_End: function()
{
var result = false;
if(!this.IsEmpty())
{
var len = this.content.length - 1;
if(this.CurPos == len)
{
result = this.content[len].Cursor_Is_End();
}
}
return result;
},
//////////////////////////
//////////////// Test function for test_math ////////////////// //////////////// Test function for test_math //////////////////
...@@ -8561,7 +8590,7 @@ CMathComposition.prototype = ...@@ -8561,7 +8590,7 @@ CMathComposition.prototype =
//this.RecalculateComposition(g_oTextMeasurer); //this.RecalculateComposition(g_oTextMeasurer);
//// ////
this.absPos = {x: x, y: y - this.Root.size.ascent}; //this.absPos = {x: x, y: y - this.Root.size.ascent};
this.Root.draw(this.absPos.x, this.absPos.y , pGraphics); this.Root.draw(this.absPos.x, this.absPos.y , pGraphics);
}, },
......
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