Commit c326fe33 authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix build presentation sdk for mobile version

parent 09edaef6
......@@ -2,10 +2,10 @@ CD /D %~dp0
call npm install -g grunt-cli
call npm install
rem call grunt --level=WHITESPACE_ONLY --mobile=true --formatting=PRETTY_PRINT
call grunt --level=ADVANCED --mobile=true
call grunt --level=WHITESPACE_ONLY --mobile=true --noclosure=true --formatting=PRETTY_PRINT
echo.> tmp_newline.txt
copy /b/y ..\..\web-apps\vendor\xregexp\xregexp-all-min.js + tmp_newline.txt + ..\..\web-apps\vendor\underscore\underscore-min.js + tmp_newline.txt + ..\common\Native\native.js + tmp_newline.txt + ..\common\Native\jquery_native.js + tmp_newline.txt ..\mobile_banners.js
copy /b/y ..\..\web-apps\vendor\xregexp\xregexp-all-min.js + tmp_newline.txt + ..\..\web-apps\vendor\underscore\underscore-min.js + tmp_newline.txt + ..\common\Native\Wrappers\common.js + tmp_newline.txt + ..\common\Native\jquery_native.js + tmp_newline.txt ..\mobile_banners.js
copy /b/y ..\mobile_banners.js + ..\word\sdk-all-min.js + ..\word\sdk-all.js ..\..\core\build\jsnative\word\script.bin
copy /b/y ..\mobile_banners.js + ..\cell\sdk-all-min.js + ..\cell\sdk-all.js ..\..\core\build\jsnative\cell\script.bin
......
......@@ -224,20 +224,16 @@
]
},
"mobile_banners": {
"min": [
"../common/Native/native.js",
"../common/Native/jquery_native.js",
"../../web-apps/vendor/xregexp/xregexp-all-min.js"
"min": [
"../common/Native/Wrappers/memory.js"
],
"common": []
},
"mobile": [
"../common/Native/Wrappers/memory.js",
"../common/Native/Wrappers/TextMeasurerWrapper.js",
"../common/Native/Wrappers/DrawingStream.js",
"../common/Native/Wrappers/ShapeDrawer.js",
"../common/Native/Wrappers/Overlay.js",
"../slide/Native/native.js",
"../slide/Native/Wrappers/api.js",
"../slide/Native/Wrappers/HtmlPage.js",
"../slide/Native/Wrappers/DrawingDocument.js",
......
......@@ -39,15 +39,6 @@ var FOCUS_OBJECT_NOTES = 2;
var COMMENT_WIDTH = 18;
var COMMENT_HEIGHT = 16;
function CDrawingPage()
{
this.left = 0;
this.top = 0;
this.right = 0;
this.bottom = 0;
this.cachedImage = null;
}
function CDrawingDocument()
{
......@@ -74,410 +65,428 @@ function CDrawingDocument()
this.AutoShapesTrack = new AscCommon.CAutoshapeTrack();
}
this.RenderPage = function(nPageIndex)
{
var _graphics = new CDrawingStream();
this.m_oWordControl.m_oLogicDocument.DrawPage(nPageIndex, _graphics);
}
this.AfterLoad = function()
{
this.m_oWordControl = this;
this.Api = window.editor;
this.m_oApi = this.Api;
this.m_oApi.DocumentUrl = "";
this.LogicDocument = window.editor.WordControl.m_oLogicDocument;
this.LogicDocument.DrawingDocument = this;
}
this.Start_CollaborationEditing = function()
{
this.Native["DD_Start_CollaborationEditing"]();
}
CDrawingDocument.prototype.AfterLoad = function()
{
this.m_oWordControl = this;
this.Api = window.editor;
this.m_oApi = this.Api;
this.m_oApi.DocumentUrl = "";
this.LogicDocument = window.editor.WordControl.m_oLogicDocument;
this.LogicDocument.DrawingDocument = this;
this.IsMobileVersion = function()
{
return true;
}
this.selectionMatrix = null;
};
this.ConvertCoordsToAnotherPage = function(x, y)
{
return {X: x, Y: y};
};
this.SetCursorType = function(sType, Data)
CDrawingDocument.prototype.Notes_GetWidth = function()
{
return 100;
};
CDrawingDocument.prototype.RenderPage = function(nPageIndex)
{
var _graphics = new CDrawingStream();
this.m_oWordControl.m_oLogicDocument.DrawPage(nPageIndex, _graphics);
};
CDrawingDocument.prototypeAfterLoad = function()
{
this.m_oWordControl = this;
this.Api = window.editor;
this.m_oApi = this.Api;
this.m_oApi.DocumentUrl = "";
this.LogicDocument = window.editor.WordControl.m_oLogicDocument;
this.LogicDocument.DrawingDocument = this;
};
CDrawingDocument.prototype.Start_CollaborationEditing = function()
{
this.Native["DD_Start_CollaborationEditing"]();
};
CDrawingDocument.prototype.IsMobileVersion = function()
{
return true;
};
CDrawingDocument.prototype.ConvertCoordsToAnotherPage = function(x, y)
{
return {X: x, Y: y};
};
CDrawingDocument.prototype.SetCursorType = function(sType, Data)
{
var sResultCursorType = sType;
if ("" === this.m_sLockedCursorType)
{
var sResultCursorType = sType;
if ("" == this.m_sLockedCursorType)
{
if (this.m_oWordControl.m_oApi.isPaintFormat && (("default" == sType) || ("text" == sType)))
sResultCursorType = AscCommon.kCurFormatPainterWord;
else
sResultCursorType = sType;
}
if (this.m_oWordControl.m_oApi.isPaintFormat && (("default" === sType) || ("text" === sType)))
sResultCursorType = AscCommon.kCurFormatPainterWord;
else
sResultCursorType = this.m_sLockedCursorType;
if ( "undefined" === typeof(Data) || null === Data )
Data = new AscCommon.CMouseMoveData();
this.Native["DD_SetCursorType"](sResultCursorType, Data);
}
this.LockCursorType = function(sType)
{
this.m_sLockedCursorType = sType;
sResultCursorType = sType;
}
else
sResultCursorType = this.m_sLockedCursorType;
if ( "undefined" === typeof(Data) || null === Data )
Data = new AscCommon.CMouseMoveData();
this.Native["DD_SetCursorType"](sResultCursorType, Data);
};
CDrawingDocument.prototype.LockCursorType = function(sType)
{
this.m_sLockedCursorType = sType;
this.Native["DD_LockCursorType"](sType);
}
this.LockCursorTypeCur = function()
{
this.m_sLockedCursorType = this.Native["DD_LockCursorType"]();
}
this.UnlockCursorType = function()
{
this.m_sLockedCursorType = "";
this.Native["DD_UnlockCursorType"]();
}
this.Native["DD_LockCursorType"](sType);
};
CDrawingDocument.prototype.LockCursorTypeCur = function()
{
this.m_sLockedCursorType = this.Native["DD_LockCursorType"]();
};
CDrawingDocument.prototype.UnlockCursorType = function()
{
this.m_sLockedCursorType = "";
this.Native["DD_UnlockCursorType"]();
};
this.OnStartRecalculate = function(pageCount)
{
CDrawingDocument.prototype.OnStartRecalculate = function(pageCount)
{
this.Native["DD_OnStartRecalculate"](pageCount);
}
this.Native["DD_OnStartRecalculate"](pageCount);
};
this.SetTargetColor = function(r, g, b)
{
this.Native["DD_SetTargetColor"](r, g, b);
}
CDrawingDocument.prototype.SetTargetColor = function(r, g, b)
{
this.Native["DD_SetTargetColor"](r, g, b);
};
this.StartTrackTable = function()
{};
CDrawingDocument.prototype.StartTrackTable = function()
{};
this.OnRecalculatePage = function(index, pageObject)
{
this.Native["DD_OnRecalculatePage"](index, pageObject.Width, pageObject.Height);
}
CDrawingDocument.prototype.OnRecalculatePage = function(index, pageObject)
{
this.Native["DD_OnRecalculatePage"](index, pageObject.Width, pageObject.Height);
};
this.OnEndRecalculate = function()
{
this.Native["DD_OnEndRecalculate"]();
}
CDrawingDocument.prototype.OnEndRecalculate = function()
{
this.Native["DD_OnEndRecalculate"]();
};
this.ChangePageAttack = function(pageIndex)
{
}
CDrawingDocument.prototype.ChangePageAttack = function(pageIndex)
{
};
this.InitGuiCanvasTextProps = function(div_id)
{
CDrawingDocument.prototype.InitGuiCanvasTextProps = function(div_id)
{
}
};
this.DrawGuiCanvasTextProps = function(props)
{
CDrawingDocument.prototype.DrawGuiCanvasTextProps = function(props)
{
}
};
this.DrawSearch = function(overlay)
{
}
CDrawingDocument.prototype.DrawSearch = function(overlay)
{
};
this.DrawSearchCur = function(overlay, place)
{
}
CDrawingDocument.prototype.DrawSearchCur = function(overlay, place)
{
};
this.StopRenderingPage = function(pageIndex)
{
CDrawingDocument.prototype.StopRenderingPage = function(pageIndex)
{
}
};
this.ClearCachePages = function()
{
this.Native["DD_ClearCachePages"]();
}
CDrawingDocument.prototype.ClearCachePages = function()
{
this.Native["DD_ClearCachePages"]();
};
this.FirePaint = function()
{
this.Native["DD_FirePaint"]();
}
CDrawingDocument.prototype.FirePaint = function()
{
this.Native["DD_FirePaint"]();
};
this.ConvertCoordsFromCursor2 = function(x, y)
{
return this.Native["DD_ConvertCoordsFromCursor2"]();
}
CDrawingDocument.prototype.ConvertCoordsFromCursor2 = function(x, y)
{
return this.Native["DD_ConvertCoordsFromCursor2"]();
};
this.IsCursorInTableCur = function(x, y, page)
{
CDrawingDocument.prototype.IsCursorInTableCur = function(x, y, page)
{
return false;
}
return false;
};
this.ConvertCoordsToCursorWR = function(x, y, pageIndex, transform)
{
return this.Native["DD_ConvertCoordsToCursorWR"]();
}
CDrawingDocument.prototype.ConvertCoordsToCursorWR = function(x, y, pageIndex, transform)
{
return this.Native["DD_ConvertCoordsToCursorWR"]();
};
this.ConvertCoordsToCursorWR_2 = function(x, y)
{
return this.Native["DD_ConvertCoordsToCursorWR_2"]();
}
CDrawingDocument.prototype.ConvertCoordsToCursorWR_2 = function(x, y)
{
return this.Native["DD_ConvertCoordsToCursorWR_2"]();
};
this.ConvertCoordsToCursorWR_Comment = function(x, y)
{
return this.Native["DD_ConvertCoordsToCursorWR_Comment"]();
}
CDrawingDocument.prototype.ConvertCoordsToCursorWR_Comment = function(x, y)
{
return this.Native["DD_ConvertCoordsToCursorWR_Comment"]();
};
this.ConvertCoordsToCursor = function(x, y)
{
return this.Native["DD_ConvertCoordsToCursor"]();
}
CDrawingDocument.prototype.ConvertCoordsToCursor = function(x, y)
{
return this.Native["DD_ConvertCoordsToCursor"]();
};
this.TargetStart = function()
{
return this.Native["DD_TargetStart"]();
}
this.TargetEnd = function()
{
return this.Native["DD_TargetEnd"]();
}
this.UpdateTargetNoAttack = function()
{
}
CDrawingDocument.prototype.TargetStart = function()
{
return this.Native["DD_TargetStart"]();
};
CDrawingDocument.prototype.TargetEnd = function()
{
return this.Native["DD_TargetEnd"]();
};
CDrawingDocument.prototype.UpdateTargetNoAttack = function()
{
};
this.CheckTargetDraw = function(x, y)
{
return this.Native["DD_CheckTargetDraw"](x, y);
}
CDrawingDocument.prototype.CheckTargetDraw = function(x, y)
{
return this.Native["DD_CheckTargetDraw"](x, y);
};
this.UpdateTarget = function(x, y, pageIndex)
{
return this.Native["DD_UpdateTarget"](x, y, pageIndex);
}
CDrawingDocument.prototype.UpdateTarget = function(x, y, pageIndex)
{
return this.Native["DD_UpdateTarget"](x, y, pageIndex);
};
this.SetTargetSize = function(size)
{
return this.Native["DD_SetTargetSize"](size);
}
this.DrawTarget = function()
{
return this.Native["DD_DrawTarget"]();
}
this.TargetShow = function()
{
return this.Native["DD_TargetShow"]();
}
this.CheckTargetShow = function()
{
return this.Native["DD_CheckTargetShow"]();
}
CDrawingDocument.prototype.SetTargetSize = function(size)
{
return this.Native["DD_SetTargetSize"](size);
};
CDrawingDocument.prototype.DrawTarget = function()
{
return this.Native["DD_DrawTarget"]();
};
CDrawingDocument.prototype.TargetShow = function()
{
return this.Native["DD_TargetShow"]();
};
CDrawingDocument.prototype.CheckTargetShow = function()
{
return this.Native["DD_CheckTargetShow"]();
};
this.SetCurrentPage = function(PageIndex)
{
return this.Native["DD_SetCurrentPage"](PageIndex);
}
CDrawingDocument.prototype.SetCurrentPage = function(PageIndex)
{
return this.Native["DD_SetCurrentPage"](PageIndex);
};
this.SelectEnabled = function(bIsEnabled)
{
return this.Native["DD_SelectEnabled"](bIsEnabled);
}
this.SelectClear = function()
{
return this.Native["DD_SelectClear"]();
}
this.SearchClear = function()
{
return this.Native["DD_SearchClear"]();
}
this.AddPageSearch = function(findText, rects)
{
return this.Native["DD_AddPageSearch"](findText, rects);
}
CDrawingDocument.prototype.SelectEnabled = function(bIsEnabled)
{
return this.Native["DD_SelectEnabled"](bIsEnabled);
};
CDrawingDocument.prototype.SelectClear = function()
{
return this.Native["DD_SelectClear"]();
};
CDrawingDocument.prototype.SearchClear = function()
{
return this.Native["DD_SearchClear"]();
};
CDrawingDocument.prototype.AddPageSearch = function(findText, rects)
{
return this.Native["DD_AddPageSearch"](findText, rects);
};
this.StartSearch = function()
{
this.Native["DD_StartSearch"]();
}
this.EndSearch = function(bIsChange)
{
this.Native["DD_EndSearch"](bIsChange);
}
this.AddPageSelection = function(pageIndex, x, y, width, height)
{
this.Native["DD_AddPageSelection"](pageIndex, x, y, width, height);
}
this.SelectShow = function()
{
this.Native["DD_SelectShow"]();
}
CDrawingDocument.prototype.StartSearch = function()
{
this.Native["DD_StartSearch"]();
};
CDrawingDocument.prototype.EndSearch = function(bIsChange)
{
this.Native["DD_EndSearch"](bIsChange);
};
CDrawingDocument.prototype.AddPageSelection = function(pageIndex, x, y, width, height)
{
this.Native["DD_AddPageSelection"](pageIndex, x, y, width, height);
};
CDrawingDocument.prototype.SelectShow = function()
{
this.Native["DD_SelectShow"]();
};
this.Set_RulerState_Table = function(markup, transform)
{
this.Native["DD_Set_RulerState_Table"](markup, transform);
}
CDrawingDocument.prototype.Set_RulerState_Table = function(markup, transform)
{
this.Native["DD_Set_RulerState_Table"](markup, transform);
};
this.Set_RulerState_Paragraph = function(obj, margins)
{
this.Native["DD_Set_RulerState_Paragraph"](obj, margins);
}
CDrawingDocument.prototype.Set_RulerState_Paragraph = function(obj, margins)
{
this.Native["DD_Set_RulerState_Paragraph"](obj, margins);
};
this.Update_ParaTab = function(Default_Tab, ParaTabs)
{
this.Native["DD_Update_ParaTab"](Default_Tab, ParaTabs);
}
CDrawingDocument.prototype.Update_ParaTab = function(Default_Tab, ParaTabs)
{
this.Native["DD_Update_ParaTab"](Default_Tab, ParaTabs);
};
this.UpdateTableRuler = function(isCols, index, position)
{
this.Native["DD_UpdateTableRuler"](isCols, index, position);
}
this.GetDotsPerMM = function(value)
{
this.Native["DD_GetDotsPerMM"](value);
}
CDrawingDocument.prototype.UpdateTableRuler = function(isCols, index, position)
{
this.Native["DD_UpdateTableRuler"](isCols, index, position);
};
CDrawingDocument.prototype.GetDotsPerMM = function(value)
{
this.Native["DD_GetDotsPerMM"](value);
};
this.GetMMPerDot = function(value)
{
return value / this.GetDotsPerMM( 1 );
}
this.GetVisibleMMHeight = function()
{
return this.Native["DD_GetVisibleMMHeight"]();
}
CDrawingDocument.prototype.GetMMPerDot = function(value)
{
return value / this.GetDotsPerMM( 1 );
};
CDrawingDocument.prototype.GetVisibleMMHeight = function()
{
return this.Native["DD_GetVisibleMMHeight"]();
};
// вот оооочень важная функция. она выкидывает из кэша неиспользуемые шрифты
this.CheckFontCache = function()
{
return this.Native["DD_CheckFontCache"]();
}
// вот оооочень важная функция. она выкидывает из кэша неиспользуемые шрифты
CDrawingDocument.prototype.CheckFontCache = function()
{
return this.Native["DD_CheckFontCache"]();
};
this.CheckFontNeeds = function()
{
}
CDrawingDocument.prototype.CheckFontNeeds = function()
{
};
this.CorrectRulerPosition = function(pos)
{
return this.Native["DD_CorrectRulerPosition"](pos);
}
CDrawingDocument.prototype.CorrectRulerPosition = function(pos)
{
return this.Native["DD_CorrectRulerPosition"](pos);
};
// вот здесь весь трекинг
this.DrawTrack = function(type, matrix, left, top, width, height, isLine, canRotate, isNoMove)
{
this.AutoShapesTrack.DrawTrack(type, matrix, left, top, width, height, isLine, canRotate, isNoMove);
}
// вот здесь весь трекинг
CDrawingDocument.prototype.DrawTrack = function(type, matrix, left, top, width, height, isLine, canRotate, isNoMove)
{
this.AutoShapesTrack.DrawTrack(type, matrix, left, top, width, height, isLine, canRotate, isNoMove);
};
this.LockSlide = function(slideNum)
{
this.Native["DD_LockSlide"](slideNum);
}
CDrawingDocument.prototype.LockSlide = function(slideNum)
{
this.Native["DD_LockSlide"](slideNum);
};
this.UnLockSlide = function(slideNum)
{
this.Native["DD_UnLockSlide"](slideNum);
}
CDrawingDocument.prototype.UnLockSlide = function(slideNum)
{
this.Native["DD_UnLockSlide"](slideNum);
};
this.DrawTrackSelectShapes = function(x, y, w, h)
{
this.AutoShapesTrack.DrawTrackSelectShapes(x, y, w, h);
}
CDrawingDocument.prototype.DrawTrackSelectShapes = function(x, y, w, h)
{
this.AutoShapesTrack.DrawTrackSelectShapes(x, y, w, h);
};
this.DrawAdjustment = function(matrix, x, y, bTextWarp)
{
this.AutoShapesTrack.DrawAdjustment(matrix, x, y, bTextWarp);
}
CDrawingDocument.prototype.DrawAdjustment = function(matrix, x, y, bTextWarp)
{
this.AutoShapesTrack.DrawAdjustment(matrix, x, y, bTextWarp);
};
// cursor
this.UpdateTargetTransform = function(matrix)
// cursor
CDrawingDocument.prototype.UpdateTargetTransform = function(matrix)
{
if (matrix)
{
if (matrix)
{
if (null == this.TextMatrix)
this.TextMatrix = new AscCommon.CMatrix();
this.TextMatrix.sx = matrix.sx;
this.TextMatrix.shy = matrix.shy;
this.TextMatrix.shx = matrix.shx;
this.TextMatrix.sy = matrix.sy;
this.TextMatrix.tx = matrix.tx;
this.TextMatrix.ty = matrix.ty;
this.Native["DD_UpdateTargetTransform"](matrix.sx, matrix.shy, matrix.shx, matrix.sy, matrix.tx, matrix.ty);
}
else
{
this.TextMatrix = null;
this.Native["DD_RemoveTargetTransform"]();
}
}
if (null == this.TextMatrix)
this.TextMatrix = new AscCommon.CMatrix();
this.TextMatrix.sx = matrix.sx;
this.TextMatrix.shy = matrix.shy;
this.TextMatrix.shx = matrix.shx;
this.TextMatrix.sy = matrix.sy;
this.TextMatrix.tx = matrix.tx;
this.TextMatrix.ty = matrix.ty;
this.UpdateThumbnailsAttack = function()
{
//this.m_oWordControl.Thumbnails.RecalculateAll();
this.Native["DD_UpdateTargetTransform"](matrix.sx, matrix.shy, matrix.shx, matrix.sy, matrix.tx, matrix.ty);
}
this.CheckGuiControlColors = function(bIsAttack)
else
{
this.TextMatrix = null;
this.Native["DD_RemoveTargetTransform"]();
}
};
this.SendControlColors = function(bIsAttack)
{
}
CDrawingDocument.prototype.UpdateThumbnailsAttack = function()
{
//this.m_oWordControl.Thumbnails.RecalculateAll();
};
this.DrawImageTextureFillShape = function(url)
{
}
CDrawingDocument.prototype.CheckGuiControlColors = function(bIsAttack)
{
};
this.DrawImageTextureFillSlide = function(url)
{
}
CDrawingDocument.prototype.SendControlColors = function(bIsAttack)
{
};
CDrawingDocument.prototype.DrawImageTextureFillShape = function(url)
{
};
CDrawingDocument.prototype.DrawImageTextureFillSlide = function(url)
{
};
this.DrawImageTextureFillTextArt = function(url)
{
}
this.InitGuiCanvasShape = function(div_id)
{
}
this.InitGuiCanvasSlide = function(div_id)
{
}
CDrawingDocument.prototype.DrawImageTextureFillTextArt = function(url)
{
};
this.InitGuiCanvasTextArt = function(div_id)
{
}
CDrawingDocument.prototype.InitGuiCanvasShape = function(div_id)
{
};
this.CheckTableStyles = function()
{
}
CDrawingDocument.prototype.InitGuiCanvasSlide = function(div_id)
{
};
this.OnSelectEnd = function()
{
}
CDrawingDocument.prototype.InitGuiCanvasTextArt = function(div_id)
{
};
this.GetCommentWidth = function(type)
{
}
CDrawingDocument.prototype.CheckTableStyles = function()
{
};
this.GetCommentHeight = function(type)
{
}
CDrawingDocument.prototype.OnSelectEnd = function()
{
};
// collaborative targets
this.Collaborative_UpdateTarget = function(_id, _x, _y, _size, _page, _transform, is_from_paint)
{
this.Native["DD_Collaborative_UpdateTarget"](_id, _x, _y, _size, _page, _transform, is_from_paint);
};
this.Collaborative_RemoveTarget = function(_id)
{
this.Native["DD_Collaborative_RemoveTarget"](_id);
};
this.Collaborative_TargetsUpdate = function(bIsChangePosition)
{
this.Native["DD_Collaborative_TargetsUpdate"](bIsChangePosition);
};
}
CDrawingDocument.prototype.GetCommentWidth = function(type)
{
};
CDrawingDocument.prototype.GetCommentHeight = function(type)
{
};
// collaborative targets
CDrawingDocument.prototype.Collaborative_UpdateTarget = function(_id, _x, _y, _size, _page, _transform, is_from_paint)
{
this.Native["DD_Collaborative_UpdateTarget"](_id, _x, _y, _size, _page, _transform, is_from_paint);
};
CDrawingDocument.prototype.Collaborative_RemoveTarget = function(_id)
{
this.Native["DD_Collaborative_RemoveTarget"](_id);
};
CDrawingDocument.prototype.Collaborative_TargetsUpdate = function(bIsChangePosition)
{
this.Native["DD_Collaborative_TargetsUpdate"](bIsChangePosition);
};
function DrawBackground(graphics, unifill, w, h)
{
......@@ -525,7 +534,7 @@ function DrawBackground(graphics, unifill, w, h)
checker._l(0, this.extY);
checker._z();
checker._e();
}
};
var shape_drawer = new AscCommon.CShapeDrawer();
shape_drawer.fromShape2(_shape, graphics, null);
......
......@@ -42,12 +42,6 @@ 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_Right_Field = Page_Width - X_Right_Margin;
var Y_Bottom_Field = Page_Height - Y_Bottom_Margin;
var GlobalSkinTeamlab = {
Name : "classic",
RulersButton : true,
......@@ -124,401 +118,426 @@ function CEditorPage(api)
this.m_oDrawingDocument.m_oLogicDocument = this.m_oLogicDocument;
this.m_oApi = api;
this.Native = window["native"];
}
CEditorPage.prototype.MainScrollLock = function()
{
};
this.MainScrollLock = function()
{
}
this.MainScrollUnLock = function()
{
}
CEditorPage.prototype.MainScrollUnLock = function()
{
};
this.checkBodySize = function()
{
}
this.Init = function()
{
}
this.CheckLayouts = function(){
}
this.CheckRetinaDisplay = function()
{
}
this.CheckRetinaElement = function(htmlElem)
{
}
this.ShowOverlay = function()
{
}
this.UnShowOverlay = function()
{
}
this.CheckUnShowOverlay = function()
{
}
this.CheckShowOverlay = function()
{
}
this.initEvents = function()
{
}
this.initEvents2MobileAdvances = function()
{
}
this.onButtonRulersClick = function()
{
}
this.HideRulers = function()
{
}
this.zoom_FitToWidth = function()
{
}
this.zoom_FitToPage = function()
{
}
this.zoom_Fire = function(type)
{
}
this.zoom_Out = function()
{
}
this.zoom_In = function()
{
}
this.DisableRulerMarkers = function()
{
}
this.EnableRulerMarkers = function()
{
}
this.ToSearchResult = function()
{
}
this.onButtonTabsClick = function()
{
}
this.onButtonTabsDraw = function()
{
}
this.onPrevPage = function()
{
}
this.onNextPage = function()
{
}
this.horRulerMouseDown = function(e)
{
}
this.horRulerMouseUp = function(e)
{
}
this.horRulerMouseMove = function(e)
{
}
this.verRulerMouseDown = function(e)
{
}
this.verRulerMouseUp = function(e)
{
}
this.verRulerMouseMove = function(e)
{
}
this.SelectWheel = function()
{
}
this.createSplitterDiv = function(bIsVert)
{
}
this.onBodyMouseDown = function(e)
{
}
this.onBodyMouseMove = function(e)
{
}
this.OnResizeSplitter = function()
{
}
this.onBodyMouseUp = function(e)
{
}
this.onMouseDown = function(e)
{
}
this.onMouseMove = function(e)
{
}
this.onMouseMove2 = function()
{
}
this.onMouseUp = function(e, bIsWindow)
{
}
this.onMouseUpExternal = function(x, y)
{
}
this.onMouseWhell = function(e)
{
}
this.onKeyUp = function(e)
{
}
this.onKeyDown = function(e)
{
}
this.onKeyDownNoActiveControl = function(e)
{
}
this.onKeyDownTBIM = function(e)
{
}
this.DisableTextEATextboxAttack = function()
{
}
this.onKeyPress = function(e)
{
}
// -------------------------------------------------------- //
// -----------------end demonstration---------------------- //
// -------------------------------------------------------- //
this.verticalScroll = function(sender,scrollPositionY,maxY,isAtTop,isAtBottom)
{
}
this.verticalScrollMouseUp = function(sender, e)
{
}
this.CorrectSpeedVerticalScroll = function(newScrollPos)
{
}
this.CorrectVerticalScrollByYDelta = function(delta)
{
}
this.horizontalScroll = function(sender,scrollPositionX,maxX,isAtLeft,isAtRight)
{
}
this.UpdateScrolls = function()
{
}
this.OnRePaintAttack = function()
{
}
this.DeleteVerticalScroll = function()
{
}
this.OnResize = function(isAttack)
{
}
this.OnResize2 = function(isAttack)
{
}
this.checkNeedRules = function()
{
}
this.checkNeedHorScroll = function()
{
}
this.StartUpdateOverlay = function()
{
}
this.EndUpdateOverlay = function()
{
}
this.OnUpdateOverlay = function()
{
}
this.GetDrawingPageInfo = function(nPageIndex)
{
}
this.OnCalculatePagesPlace = function()
{
}
this.OnPaint = function()
{
}
this.CheckFontCache = function()
{
}
this.OnScroll = function()
{
}
this.CheckZoom = function()
{
}
this.CalculateDocumentSize = function(bIsAttack)
{
}
this.CheckCalculateDocumentSize = function(_bounds)
{
}
this.InitDocument = function(bIsEmpty)
{
}
this.InitControl = function()
{
}
this.StartMainTimer = function()
{
}
this.onTimerScroll = function(isThUpdateSync)
{
}
this.onTimerScroll_sync = function(isThUpdateSync)
{
}
this.UpdateHorRuler = function()
{
}
this.UpdateVerRuler = function()
{
}
this.SetCurrentPage = function()
{
}
this.UpdateHorRulerBack = function()
{
}
this.UpdateVerRulerBack = function()
{
}
this.CreateBackgroundHorRuler = function(margins)
{
}
this.CreateBackgroundVerRuler = function(margins)
{
}
this.ThemeGenerateThumbnails = function(_master)
{
}
this.CheckLayouts = function(bIsAttack)
{
}
this.GoToPage = function(lPageNum)
{
this.Native["WC_GoToPage"](lPageNum);
}
this.GetVerticalScrollTo = function(y)
{
}
this.GetHorizontalScrollTo = function(x)
{
}
// -------------------------------------------------------- //
// -------------------- east asian fonts ------------------ //
// -------------------------------------------------------- //
this.ReinitTB = function()
{
}
this.SetTextBoxMode = function(isEA)
{
}
this.TextBoxFocus = function()
{
}
this.OnTextBoxInput = function()
{
}
this.CheckTextBoxSize = function()
{
}
this.TextBoxOnKeyDown = function(e)
{
}
this.onChangeTB = function()
{
}
this.CheckTextBoxInputPos = function()
{
}
this.SaveDocument = function()
{
}
}
CEditorPage.prototype.checkBodySize = function()
{
};
CEditorPage.prototype.Init = function()
{
};
CEditorPage.prototype.CheckLayouts = function(){
};
CEditorPage.prototype.CheckRetinaDisplay = function()
{
};
CEditorPage.prototype.CheckRetinaElement = function(htmlElem)
{
};
CEditorPage.prototype.ShowOverlay = function()
{
};
CEditorPage.prototype.UnShowOverlay = function()
{
};
CEditorPage.prototype.CheckUnShowOverlay = function()
{
};
CEditorPage.prototype.CheckShowOverlay = function()
{
};
CEditorPage.prototype.initEvents = function()
{
};
CEditorPage.prototype.initEvents2MobileAdvances = function()
{
};
CEditorPage.prototype.onButtonRulersClick = function()
{
};
CEditorPage.prototype.HideRulers = function()
{
};
CEditorPage.prototype.zoom_FitToWidth = function()
{
};
CEditorPage.prototype.zoom_FitToPage = function()
{
};
CEditorPage.prototype.zoom_Fire = function(type)
{
};
CEditorPage.prototype.zoom_Out = function()
{
};
CEditorPage.prototype.zoom_In = function()
{
};
CEditorPage.prototype.DisableRulerMarkers = function()
{
};
CEditorPage.prototype.EnableRulerMarkers = function()
{
};
CEditorPage.prototype.ToSearchResult = function()
{
};
CEditorPage.prototype.onButtonTabsClick = function()
{
};
CEditorPage.prototype.onButtonTabsDraw = function()
{
};
CEditorPage.prototype.onPrevPage = function()
{
};
CEditorPage.prototype.onNextPage = function()
{
};
CEditorPage.prototype.horRulerMouseDown = function(e)
{
};
CEditorPage.prototype.horRulerMouseUp = function(e)
{
};
CEditorPage.prototype.horRulerMouseMove = function(e)
{
};
CEditorPage.prototype.verRulerMouseDown = function(e)
{
};
CEditorPage.prototype.verRulerMouseUp = function(e)
{
};
CEditorPage.prototype.verRulerMouseMove = function(e)
{
};
CEditorPage.prototype.SelectWheel = function()
{
};
CEditorPage.prototype.createSplitterDiv = function(bIsVert)
{
};
CEditorPage.prototype.onBodyMouseDown = function(e)
{
};
CEditorPage.prototype.onBodyMouseMove = function(e)
{
};
CEditorPage.prototype.OnResizeSplitter = function()
{
};
CEditorPage.prototype.onBodyMouseUp = function(e)
{
};
CEditorPage.prototype.onMouseDown = function(e)
{
};
CEditorPage.prototype.onMouseMove = function(e)
{
};
CEditorPage.prototype.onMouseMove2 = function()
{
};
CEditorPage.prototype.onMouseUp = function(e, bIsWindow)
{
};
CEditorPage.prototype.onMouseUpExternal = function(x, y)
{
};
CEditorPage.prototype.onMouseWhell = function(e)
{
};
CEditorPage.prototype.onKeyUp = function(e)
{
};
CEditorPage.prototype.onKeyDown = function(e)
{
};
CEditorPage.prototype.onKeyDownNoActiveControl = function(e)
{
};
CEditorPage.prototype.onKeyDownTBIM = function(e)
{
};
CEditorPage.prototype.DisableTextEATextboxAttack = function()
{
};
CEditorPage.prototype.onKeyPress = function(e)
{
};
// -------------------------------------------------------- //
// -----------------end demonstration---------------------- //
// -------------------------------------------------------- //
CEditorPage.prototype.verticalScroll = function(sender,scrollPositionY,maxY,isAtTop,isAtBottom)
{
};
CEditorPage.prototype.verticalScrollMouseUp = function(sender, e)
{
};
CEditorPage.prototype.CorrectSpeedVerticalScroll = function(newScrollPos)
{
};
CEditorPage.prototype.CorrectVerticalScrollByYDelta = function(delta)
{
};
CEditorPage.prototype.horizontalScroll = function(sender,scrollPositionX,maxX,isAtLeft,isAtRight)
{
};
CEditorPage.prototype.UpdateScrolls = function()
{
};
CEditorPage.prototype.OnRePaintAttack = function()
{
};
CEditorPage.prototype.DeleteVerticalScroll = function()
{
};
CEditorPage.prototype.OnResize = function(isAttack)
{
};
CEditorPage.prototype.OnResize2 = function(isAttack)
{
};
CEditorPage.prototype.checkNeedRules = function()
{
};
CEditorPage.prototype.checkNeedHorScroll = function()
{
};
CEditorPage.prototype.StartUpdateOverlay = function()
{
};
CEditorPage.prototype.EndUpdateOverlay = function()
{
};
CEditorPage.prototype.OnUpdateOverlay = function()
{
};
CEditorPage.prototype.GetDrawingPageInfo = function(nPageIndex)
{
};
CEditorPage.prototype.OnCalculatePagesPlace = function()
{
};
CEditorPage.prototype.OnPaint = function()
{
};
CEditorPage.prototype.CheckFontCache = function()
{
};
CEditorPage.prototype.OnScroll = function()
{
};
CEditorPage.prototype.CheckZoom = function()
{
};
CEditorPage.prototype.CalculateDocumentSize = function(bIsAttack)
{
};
CEditorPage.prototype.CheckCalculateDocumentSize = function(_bounds)
{
};
CEditorPage.prototype.InitDocument = function(bIsEmpty)
{
};
CEditorPage.prototype.InitControl = function()
{
};
CEditorPage.prototype.StartMainTimer = function()
{
};
CEditorPage.prototype.onTimerScroll = function(isThUpdateSync)
{
};
CEditorPage.prototype.onTimerScroll_sync = function(isThUpdateSync)
{
};
CEditorPage.prototype.UpdateHorRuler = function()
{
};
CEditorPage.prototype.UpdateVerRuler = function()
{
};
CEditorPage.prototype.SetCurrentPage = function()
{
};
CEditorPage.prototype.UpdateHorRulerBack = function()
{
};
CEditorPage.prototype.UpdateVerRulerBack = function()
{
};
CEditorPage.prototype.CreateBackgroundHorRuler = function(margins)
{
};
CEditorPage.prototype.CreateBackgroundVerRuler = function(margins)
{
};
CEditorPage.prototype.ThemeGenerateThumbnails = function(_master)
{
};
CEditorPage.prototype.CheckLayouts = function(bIsAttack)
{
};
CEditorPage.prototype.GoToPage = function(lPageNum)
{
this.Native["WC_GoToPage"](lPageNum);
};
CEditorPage.prototype.GetVerticalScrollTo = function(y)
{
};
CEditorPage.prototype.GetHorizontalScrollTo = function(x)
{
};
// -------------------------------------------------------- //
// -------------------- east asian fonts ------------------ //
// -------------------------------------------------------- //
CEditorPage.prototype.ReinitTB = function()
{
};
CEditorPage.prototype.SetTextBoxMode = function(isEA)
{
};
CEditorPage.prototype.TextBoxFocus = function()
{
};
CEditorPage.prototype.OnTextBoxInput = function()
{
};
CEditorPage.prototype.CheckTextBoxSize = function()
{
};
CEditorPage.prototype.TextBoxOnKeyDown = function(e)
{
};
CEditorPage.prototype.onChangeTB = function()
{
};
CEditorPage.prototype.setNodesEnable = function()
{};
CEditorPage.prototype.CheckTextBoxInputPos = function()
{
};
CEditorPage.prototype.SaveDocument = function()
{
};
//------------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
......
......@@ -33,6 +33,7 @@
var global_memory_stream_menu = CreateNativeMemoryStream();
// endsectionPr -----------------------------------------------------------------------------------------
// font engine -------------------------------------
var FontStyle =
{
......@@ -51,6 +52,25 @@ window["use_native_fonts_only"] = true;
window["ftm"] = FT_Memory;
function NativeOpenFileP(_params){
console.log("NativeOpenFileP");
window["CreateMainTextMeasurerWrapper"]();
window.g_file_path = "native_open_file";
window.NATIVE_DOCUMENT_TYPE = window.native.GetEditorType();
var doc_bin = window.native.GetFileString(window.g_file_path);
if ("presentation" !== window.NATIVE_DOCUMENT_TYPE){
return;
}
_api = new window["Asc"]["asc_docs_api"]("");
_api.Native_Editor_Initialize_Settings(_params);
_api.asc_nativeOpenFile(doc_bin);
_api.WordControl.m_oDrawingDocument.AfterLoad();
Api = _api;
}
Asc['asc_docs_api'].prototype["Native_Editor_Initialize_Settings"] = function(_params)
{
window["NativeSupportTimeouts"] = true;
......
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
function Call_CheckSlideBounds(nSlideIndex){
return _api.CheckSlideBounds(nSlideIndex);
};
\ No newline at end of file
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