Commit e304ec3c authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

Math types to menu

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59293 954022d7-b5bf-4e40-9824-e11837661b57
parent fe378e75
......@@ -481,6 +481,8 @@ function CRasterHeapChuck()
this.LinesBusy = [];
this.CurLine = null;
this.FindOnlyEqualHeight = false;
}
CRasterHeapChuck.prototype =
{
......@@ -537,6 +539,9 @@ CRasterHeapChuck.prototype =
// линию не нашли. Начинаем искать из свободной памяти
// ищем 3/2 от нужного размера. и параллельно 1
var _need_height1 = (3 * _need_height) >> 1;
if (this.FindOnlyEqualHeight)
_need_height1 = _need_height;
var _free_len = this.LinesFree.length;
var _index_found_koef1 = -1;
for (var i = 0; i < _free_len; i++)
......@@ -572,7 +577,7 @@ CRasterHeapChuck.prototype =
// 3/2 не нашли. если нашли для 1, то выделяем там
if (-1 != _index_found_koef1)
{
var _line = this.LinesFree[i];
var _line = this.LinesFree[_index_found_koef1];
var _new_line = new CRasterHeapLine();
_new_line.CreatePlaces(_need_height, _need_height, this.Width);
......@@ -666,9 +671,9 @@ CRasterHeapChuck.prototype =
}
};
function CRasterHeapTotal()
function CRasterHeapTotal(_size)
{
this.ChunkHeapSize = 3000; // 4 * 3000 * 3000 = 36Mb
this.ChunkHeapSize = (undefined === _size) ? 3000 : _size; // 4 * 3000 * 3000 = 36Mb
this.Chunks = [];
}
CRasterHeapTotal.prototype =
......@@ -706,12 +711,12 @@ CRasterHeapTotal.prototype =
this.Chunks[this.Chunks.length] = _chunk;
},
CreateFirstChuck : function()
CreateFirstChuck : function(_w, _h)
{
if (0 == this.Chunks.length)
{
this.Chunks[0] = new CRasterHeapChuck();
this.Chunks[0].Create(this.ChunkHeapSize, this.ChunkHeapSize);
this.Chunks[0].Create((undefined == _w) ? this.ChunkHeapSize : _w, (undefined == _h) ? this.ChunkHeapSize : _h);
}
}
};
......
......@@ -1086,17 +1086,25 @@ var g_oArrUserColors = [15064320, 58807, 16724950, 1759488, 9981439, 56805, 1505
function CAscMathType()
{
this.Id = 0;
this.Image = "";
this.X = 0;
this.Y = 0;
}
CAscMathType.prototype.get_Id = function(){ return this.Id; };
CAscMathType.prototype.get_Image = function(){ return this.Image; };
CAscMathType.prototype.get_X = function(){ return this.X; };
CAscMathType.prototype.get_Y = function(){ return this.Y; };
function CAscMathCategory()
{
this.Id = 0;
this.Data = [];
this.W = 0;
this.H = 0;
}
CAscMathCategory.prototype.get_Id = function(){ return this.Id; };
CAscMathCategory.prototype.get_Data = function(){ return this.Data; };
CAscMathCategory.prototype.get_W = function(){ return this.W; };
CAscMathCategory.prototype.get_H = function(){ return this.H; };
CAscMathCategory.prototype.private_Sort = function(){ this.Data.sort( function(a,b){ return a.Id- b.Id; } ); };
\ No newline at end of file
This diff is collapsed.
......@@ -1118,17 +1118,7 @@ ParaMath.prototype.MathToImageConverter = function(bCopy, _canvasInput, _widthPx
}
return _ret;
}
else
{
try
{
return _canvas.toDataURL("image/png");
}
catch (err)
{
}
return "";
}
return null;
};
ParaMath.prototype.ApplyArgSize = function(FontSize, argSize)
......
......@@ -2712,7 +2712,7 @@ CMathContent.prototype.Add_Symbol = function(Code)
Symbol.add(Code);
MathRun.Add(Symbol, true);
this.Internal_Content_Add(this.content.length, MathRun, true);
this.Internal_Content_Add(this.Content.length, MathRun, true);
};
CMathContent.prototype.Add_Fraction = function(Pr, NumText, DenText)
{
......
......@@ -641,8 +641,6 @@ function asc_docs_api(name)
this.TrackFile = null;
this.MathDrawer = new CMathPainter(this);
var oThis = this;
if(window.addEventListener)
window.addEventListener("message", function(){
......@@ -2010,12 +2008,11 @@ asc_docs_api.prototype.put_FramePr = function(Obj)
asc_docs_api.prototype.asyncFontEndLoaded_MathDraw = function(Obj)
{
this.sync_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadFont);
this.MathDrawer.Generate();
Obj.Generate2();
}
asc_docs_api.prototype.sendMathTypesToMenu = function(_math)
{
this.asc_fireCallback("asc_onMathTypes", _math);
this.MathDrawer = null;
}
asc_docs_api.prototype.asyncFontEndLoaded_DropCap = function(Obj)
......@@ -6482,7 +6479,9 @@ asc_docs_api.prototype.OpenDocumentEndCallback = function()
}
this.WordControl.InitControl();
//this.MathDrawer.StartLoad();
if (!this.isViewMode)
this.WordControl.m_oDrawingDocument.SendMathToMenu();
if (this.isViewMode)
this.SetViewMode(true);
......
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