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

new version

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58202 954022d7-b5bf-4e40-9824-e11837661b57
parent f2067a39
function CTableOutlineDr() function CTableMarkup(Table)
{
this.Internal =
{
RowIndex : 0,
CellIndex : 0,
PageNum : 0
};
this.Table = Table;
this.X = 0; // Смещение таблицы от начала страницы до первой колонки
this.Cols = []; // массив ширин колонок
this.Margins = []; // массив левых и правых маргинов
this.Rows = []; // массив позиций, высот строк(для данной страницы)
// Rows = [ { Y : , H : }, ... ]
this.CurCol = 0; // текущая колонка
this.CurRow = 0; // текущая строка
this.TransformX = 0;
this.TransformY = 0;
}
CTableMarkup.prototype =
{
CreateDublicate : function()
{
var obj = new CTableMarkup(this.Table);
obj.Internal = { RowIndex : this.Internal.RowIndex, CellIndex : this.Internal.CellIndex, PageNum : this.Internal.PageNum };
obj.X = this.X;
var len = this.Cols.length;
for (var i = 0; i < len; i++)
obj.Cols[i] = this.Cols[i];
len = this.Margins.length;
for (var i = 0; i < len; i++)
obj.Margins[i] = { Left : this.Margins[i].Left, Right : this.Margins[i].Right };
len = this.Rows.length;
for (var i = 0; i < len; i++)
obj.Rows[i] = { Y : this.Rows[i].Y, H : this.Rows[i].H };
obj.CurRow = this.CurRow;
obj.CurCol = this.CurCol;
return obj;
},
CorrectFrom : function()
{
this.X += this.TransformX;
var _len = this.Rows.length;
for (var i = 0; i < _len; i++)
{
this.Rows[i].Y += this.TransformY;
}
},
CorrectTo : function()
{
this.X -= this.TransformX;
var _len = this.Rows.length;
for (var i = 0; i < _len; i++)
{
this.Rows[i].Y -= this.TransformY;
}
},
Get_X : function()
{
return this.X;
},
Get_Y : function()
{
var _Y = 0;
if (this.Rows.length > 0)
{
_Y = this.Rows[0].Y;
}
return _Y;
}
};
function CStyleImage(_name, _ind, _type, _uiPriority)
{
this.Name = _name;
this.ThumbnailOffset = _ind;
this.Type = _type;
this.uiPriority = _uiPriority;
}
function CTableOutline(Table, PageNum, X, Y, W, H)
{
this.Table = Table;
this.PageNum = PageNum;
this.X = X;
this.Y = Y;
this.W = W;
this.H = H;
}
function _rect()
{
this.x = 0;
this.y = 0;
this.w = 0;
this.h = 0;
}
function CTableOutlineDr()
{ {
this.image = {}; this.image = {};
this.image.width = 13; this.image.width = 13;
......
function CEditorPage(api) var g_dDpiX = 96.0;
var g_dDpiY = 96.0;
var g_dKoef_mm_to_pix = g_dDpiX / 25.4;
var g_dKoef_pix_to_mm = 25.4 / g_dDpiX;
var g_bIsMobile = AscBrowser.isMobile;
var g_bIsMouseUpLockedSend = false;
var Page_Width = 210;
var Page_Height = 297;
var X_Left_Margin = 30; // 3 cm
var X_Right_Margin = 15; // 1.5 cm
var Y_Bottom_Margin = 20; // 2 cm
var Y_Top_Margin = 20; // 2 cm
var Y_Default_Header = 12.5; // 1.25 cm расстояние от верха страницы до верха верхнего колонтитула
var Y_Default_Footer = 12.5; // 1.25 cm расстояние от низа страницы до низа нижнего колонтитула
var X_Left_Field = X_Left_Margin;
var X_Right_Field = Page_Width - X_Right_Margin;
var Y_Bottom_Field = Page_Height - Y_Bottom_Margin;
var Y_Top_Field = Y_Top_Margin;
var docpostype_Content = 0x00;
var docpostype_FlowObjects = 0x01;
var docpostype_HdrFtr = 0x02;
var selectionflag_Common = 0x00;
var selectionflag_Numbering = 0x01;
var selectionflag_DrawingObject = 0x002;
var orientation_Portrait = 0x00;
var orientation_Landscape = 0x01;
var tableSpacingMinValue = 0.02;//0.02мм
var GlobalSkinTeamlab = {
Name : "classic",
RulersButton : true,
NavigationButtons : true,
BackgroundColor : "#B0B0B0",
RulerDark : "#B0B0B0",
RulerLight : "EDEDED",
BackgroundScroll : "#D3D3D3",
RulerOutline : "#929292",
RulerMarkersFillColor : "#E7E7E7",
PageOutline : "#81878F",
STYLE_THUMBNAIL_WIDTH : 80,
STYLE_THUMBNAIL_HEIGHT : 40
};
var GlobalSkinFlat = {
Name : "flat",
RulersButton : false,
NavigationButtons : false,
BackgroundColor : "#F4F4F4",
RulerDark : "#CFCFCF",
RulerLight : "#FFFFFF",
BackgroundScroll : "#F1F1F1",
RulerOutline : "#BBBEC2",
RulerMarkersFillColor : "#FFFFFF",
PageOutline : "#BBBEC2",
STYLE_THUMBNAIL_WIDTH : 109,
STYLE_THUMBNAIL_HEIGHT : 45,
isNeedInvertOnActive: false
};
var GlobalSkin = GlobalSkinTeamlab;
function CEditorPage(api)
{ {
this.Name = ""; this.Name = "";
......
This diff is collapsed.
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