Commit c326fe33 authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix build presentation sdk for mobile version

parent 09edaef6
...@@ -2,10 +2,10 @@ CD /D %~dp0 ...@@ -2,10 +2,10 @@ CD /D %~dp0
call npm install -g grunt-cli call npm install -g grunt-cli
call npm install call npm install
rem call grunt --level=WHITESPACE_ONLY --mobile=true --formatting=PRETTY_PRINT 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 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 + ..\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 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 @@ ...@@ -224,20 +224,16 @@
] ]
}, },
"mobile_banners": { "mobile_banners": {
"min": [ "min": [
"../common/Native/native.js", "../common/Native/Wrappers/memory.js"
"../common/Native/jquery_native.js",
"../../web-apps/vendor/xregexp/xregexp-all-min.js"
], ],
"common": [] "common": []
}, },
"mobile": [ "mobile": [
"../common/Native/Wrappers/memory.js",
"../common/Native/Wrappers/TextMeasurerWrapper.js", "../common/Native/Wrappers/TextMeasurerWrapper.js",
"../common/Native/Wrappers/DrawingStream.js", "../common/Native/Wrappers/DrawingStream.js",
"../common/Native/Wrappers/ShapeDrawer.js", "../common/Native/Wrappers/ShapeDrawer.js",
"../common/Native/Wrappers/Overlay.js", "../common/Native/Wrappers/Overlay.js",
"../slide/Native/native.js",
"../slide/Native/Wrappers/api.js", "../slide/Native/Wrappers/api.js",
"../slide/Native/Wrappers/HtmlPage.js", "../slide/Native/Wrappers/HtmlPage.js",
"../slide/Native/Wrappers/DrawingDocument.js", "../slide/Native/Wrappers/DrawingDocument.js",
......
...@@ -39,15 +39,6 @@ var FOCUS_OBJECT_NOTES = 2; ...@@ -39,15 +39,6 @@ var FOCUS_OBJECT_NOTES = 2;
var COMMENT_WIDTH = 18; var COMMENT_WIDTH = 18;
var COMMENT_HEIGHT = 16; var COMMENT_HEIGHT = 16;
function CDrawingPage()
{
this.left = 0;
this.top = 0;
this.right = 0;
this.bottom = 0;
this.cachedImage = null;
}
function CDrawingDocument() function CDrawingDocument()
{ {
...@@ -74,410 +65,428 @@ function CDrawingDocument() ...@@ -74,410 +65,428 @@ function CDrawingDocument()
this.AutoShapesTrack = new AscCommon.CAutoshapeTrack(); this.AutoShapesTrack = new AscCommon.CAutoshapeTrack();
}
this.RenderPage = function(nPageIndex)
{
var _graphics = new CDrawingStream();
this.m_oWordControl.m_oLogicDocument.DrawPage(nPageIndex, _graphics);
}
this.AfterLoad = function() CDrawingDocument.prototype.AfterLoad = function()
{ {
this.m_oWordControl = this; this.m_oWordControl = this;
this.Api = window.editor; this.Api = window.editor;
this.m_oApi = this.Api; this.m_oApi = this.Api;
this.m_oApi.DocumentUrl = ""; this.m_oApi.DocumentUrl = "";
this.LogicDocument = window.editor.WordControl.m_oLogicDocument; this.LogicDocument = window.editor.WordControl.m_oLogicDocument;
this.LogicDocument.DrawingDocument = this; this.LogicDocument.DrawingDocument = this;
}
this.Start_CollaborationEditing = function()
{
this.Native["DD_Start_CollaborationEditing"]();
}
this.IsMobileVersion = function() this.selectionMatrix = null;
{ };
return true;
}
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_oWordControl.m_oApi.isPaintFormat && (("default" === sType) || ("text" === sType)))
if ("" == this.m_sLockedCursorType) sResultCursorType = AscCommon.kCurFormatPainterWord;
{
if (this.m_oWordControl.m_oApi.isPaintFormat && (("default" == sType) || ("text" == sType)))
sResultCursorType = AscCommon.kCurFormatPainterWord;
else
sResultCursorType = sType;
}
else else
sResultCursorType = this.m_sLockedCursorType; sResultCursorType = sType;
if ( "undefined" === typeof(Data) || null === Data ) }
Data = new AscCommon.CMouseMoveData(); else
this.Native["DD_SetCursorType"](sResultCursorType, Data); sResultCursorType = this.m_sLockedCursorType;
} if ( "undefined" === typeof(Data) || null === Data )
this.LockCursorType = function(sType) Data = new AscCommon.CMouseMoveData();
{ this.Native["DD_SetCursorType"](sResultCursorType, Data);
this.m_sLockedCursorType = sType; };
CDrawingDocument.prototype.LockCursorType = function(sType)
{
this.m_sLockedCursorType = sType;
this.Native["DD_LockCursorType"](sType); this.Native["DD_LockCursorType"](sType);
} };
this.LockCursorTypeCur = function() CDrawingDocument.prototype.LockCursorTypeCur = function()
{ {
this.m_sLockedCursorType = this.Native["DD_LockCursorType"](); this.m_sLockedCursorType = this.Native["DD_LockCursorType"]();
} };
this.UnlockCursorType = function() CDrawingDocument.prototype.UnlockCursorType = function()
{ {
this.m_sLockedCursorType = ""; this.m_sLockedCursorType = "";
this.Native["DD_UnlockCursorType"](); 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) CDrawingDocument.prototype.SetTargetColor = function(r, g, b)
{ {
this.Native["DD_SetTargetColor"](r, g, b); this.Native["DD_SetTargetColor"](r, g, b);
} };
this.StartTrackTable = function() CDrawingDocument.prototype.StartTrackTable = function()
{}; {};
this.OnRecalculatePage = function(index, pageObject) CDrawingDocument.prototype.OnRecalculatePage = function(index, pageObject)
{ {
this.Native["DD_OnRecalculatePage"](index, pageObject.Width, pageObject.Height); this.Native["DD_OnRecalculatePage"](index, pageObject.Width, pageObject.Height);
} };
this.OnEndRecalculate = function() CDrawingDocument.prototype.OnEndRecalculate = function()
{ {
this.Native["DD_OnEndRecalculate"](); 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() CDrawingDocument.prototype.ClearCachePages = function()
{ {
this.Native["DD_ClearCachePages"](); this.Native["DD_ClearCachePages"]();
} };
this.FirePaint = function() CDrawingDocument.prototype.FirePaint = function()
{ {
this.Native["DD_FirePaint"](); this.Native["DD_FirePaint"]();
} };
this.ConvertCoordsFromCursor2 = function(x, y) CDrawingDocument.prototype.ConvertCoordsFromCursor2 = function(x, y)
{ {
return this.Native["DD_ConvertCoordsFromCursor2"](); 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) CDrawingDocument.prototype.ConvertCoordsToCursorWR = function(x, y, pageIndex, transform)
{ {
return this.Native["DD_ConvertCoordsToCursorWR"](); return this.Native["DD_ConvertCoordsToCursorWR"]();
} };
this.ConvertCoordsToCursorWR_2 = function(x, y) CDrawingDocument.prototype.ConvertCoordsToCursorWR_2 = function(x, y)
{ {
return this.Native["DD_ConvertCoordsToCursorWR_2"](); return this.Native["DD_ConvertCoordsToCursorWR_2"]();
} };
this.ConvertCoordsToCursorWR_Comment = function(x, y) CDrawingDocument.prototype.ConvertCoordsToCursorWR_Comment = function(x, y)
{ {
return this.Native["DD_ConvertCoordsToCursorWR_Comment"](); return this.Native["DD_ConvertCoordsToCursorWR_Comment"]();
} };
this.ConvertCoordsToCursor = function(x, y) CDrawingDocument.prototype.ConvertCoordsToCursor = function(x, y)
{ {
return this.Native["DD_ConvertCoordsToCursor"](); return this.Native["DD_ConvertCoordsToCursor"]();
} };
this.TargetStart = function() CDrawingDocument.prototype.TargetStart = function()
{ {
return this.Native["DD_TargetStart"](); return this.Native["DD_TargetStart"]();
} };
this.TargetEnd = function() CDrawingDocument.prototype.TargetEnd = function()
{ {
return this.Native["DD_TargetEnd"](); return this.Native["DD_TargetEnd"]();
} };
this.UpdateTargetNoAttack = function() CDrawingDocument.prototype.UpdateTargetNoAttack = function()
{ {
} };
this.CheckTargetDraw = function(x, y) CDrawingDocument.prototype.CheckTargetDraw = function(x, y)
{ {
return this.Native["DD_CheckTargetDraw"](x, y); return this.Native["DD_CheckTargetDraw"](x, y);
} };
this.UpdateTarget = function(x, y, pageIndex) CDrawingDocument.prototype.UpdateTarget = function(x, y, pageIndex)
{ {
return this.Native["DD_UpdateTarget"](x, y, pageIndex); return this.Native["DD_UpdateTarget"](x, y, pageIndex);
} };
this.SetTargetSize = function(size) CDrawingDocument.prototype.SetTargetSize = function(size)
{ {
return this.Native["DD_SetTargetSize"](size); return this.Native["DD_SetTargetSize"](size);
} };
this.DrawTarget = function() CDrawingDocument.prototype.DrawTarget = function()
{ {
return this.Native["DD_DrawTarget"](); return this.Native["DD_DrawTarget"]();
} };
this.TargetShow = function() CDrawingDocument.prototype.TargetShow = function()
{ {
return this.Native["DD_TargetShow"](); return this.Native["DD_TargetShow"]();
} };
this.CheckTargetShow = function() CDrawingDocument.prototype.CheckTargetShow = function()
{ {
return this.Native["DD_CheckTargetShow"](); return this.Native["DD_CheckTargetShow"]();
} };
this.SetCurrentPage = function(PageIndex) CDrawingDocument.prototype.SetCurrentPage = function(PageIndex)
{ {
return this.Native["DD_SetCurrentPage"](PageIndex); return this.Native["DD_SetCurrentPage"](PageIndex);
} };
this.SelectEnabled = function(bIsEnabled) CDrawingDocument.prototype.SelectEnabled = function(bIsEnabled)
{ {
return this.Native["DD_SelectEnabled"](bIsEnabled); return this.Native["DD_SelectEnabled"](bIsEnabled);
} };
this.SelectClear = function() CDrawingDocument.prototype.SelectClear = function()
{ {
return this.Native["DD_SelectClear"](); return this.Native["DD_SelectClear"]();
} };
this.SearchClear = function() CDrawingDocument.prototype.SearchClear = function()
{ {
return this.Native["DD_SearchClear"](); return this.Native["DD_SearchClear"]();
} };
this.AddPageSearch = function(findText, rects) CDrawingDocument.prototype.AddPageSearch = function(findText, rects)
{ {
return this.Native["DD_AddPageSearch"](findText, rects); return this.Native["DD_AddPageSearch"](findText, rects);
} };
this.StartSearch = function() CDrawingDocument.prototype.StartSearch = function()
{ {
this.Native["DD_StartSearch"](); this.Native["DD_StartSearch"]();
} };
this.EndSearch = function(bIsChange) CDrawingDocument.prototype.EndSearch = function(bIsChange)
{ {
this.Native["DD_EndSearch"](bIsChange); this.Native["DD_EndSearch"](bIsChange);
} };
this.AddPageSelection = function(pageIndex, x, y, width, height) CDrawingDocument.prototype.AddPageSelection = function(pageIndex, x, y, width, height)
{ {
this.Native["DD_AddPageSelection"](pageIndex, x, y, width, height); this.Native["DD_AddPageSelection"](pageIndex, x, y, width, height);
} };
this.SelectShow = function() CDrawingDocument.prototype.SelectShow = function()
{ {
this.Native["DD_SelectShow"](); this.Native["DD_SelectShow"]();
} };
this.Set_RulerState_Table = function(markup, transform) CDrawingDocument.prototype.Set_RulerState_Table = function(markup, transform)
{ {
this.Native["DD_Set_RulerState_Table"](markup, transform); this.Native["DD_Set_RulerState_Table"](markup, transform);
} };
this.Set_RulerState_Paragraph = function(obj, margins) CDrawingDocument.prototype.Set_RulerState_Paragraph = function(obj, margins)
{ {
this.Native["DD_Set_RulerState_Paragraph"](obj, margins); this.Native["DD_Set_RulerState_Paragraph"](obj, margins);
} };
this.Update_ParaTab = function(Default_Tab, ParaTabs) CDrawingDocument.prototype.Update_ParaTab = function(Default_Tab, ParaTabs)
{ {
this.Native["DD_Update_ParaTab"](Default_Tab, ParaTabs); this.Native["DD_Update_ParaTab"](Default_Tab, ParaTabs);
} };
this.UpdateTableRuler = function(isCols, index, position) CDrawingDocument.prototype.UpdateTableRuler = function(isCols, index, position)
{ {
this.Native["DD_UpdateTableRuler"](isCols, index, position); this.Native["DD_UpdateTableRuler"](isCols, index, position);
} };
this.GetDotsPerMM = function(value) CDrawingDocument.prototype.GetDotsPerMM = function(value)
{ {
this.Native["DD_GetDotsPerMM"](value); this.Native["DD_GetDotsPerMM"](value);
} };
this.GetMMPerDot = function(value) CDrawingDocument.prototype.GetMMPerDot = function(value)
{ {
return value / this.GetDotsPerMM( 1 ); return value / this.GetDotsPerMM( 1 );
} };
this.GetVisibleMMHeight = function() CDrawingDocument.prototype.GetVisibleMMHeight = function()
{ {
return this.Native["DD_GetVisibleMMHeight"](); return this.Native["DD_GetVisibleMMHeight"]();
} };
// вот оооочень важная функция. она выкидывает из кэша неиспользуемые шрифты // вот оооочень важная функция. она выкидывает из кэша неиспользуемые шрифты
this.CheckFontCache = function() CDrawingDocument.prototype.CheckFontCache = function()
{ {
return this.Native["DD_CheckFontCache"](); return this.Native["DD_CheckFontCache"]();
} };
this.CheckFontNeeds = function() CDrawingDocument.prototype.CheckFontNeeds = function()
{ {
} };
this.CorrectRulerPosition = function(pos) CDrawingDocument.prototype.CorrectRulerPosition = function(pos)
{ {
return this.Native["DD_CorrectRulerPosition"](pos); return this.Native["DD_CorrectRulerPosition"](pos);
} };
// вот здесь весь трекинг // вот здесь весь трекинг
this.DrawTrack = function(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.AutoShapesTrack.DrawTrack(type, matrix, left, top, width, height, isLine, canRotate, isNoMove);
} };
this.LockSlide = function(slideNum) CDrawingDocument.prototype.LockSlide = function(slideNum)
{ {
this.Native["DD_LockSlide"](slideNum); this.Native["DD_LockSlide"](slideNum);
} };
this.UnLockSlide = function(slideNum) CDrawingDocument.prototype.UnLockSlide = function(slideNum)
{ {
this.Native["DD_UnLockSlide"](slideNum); this.Native["DD_UnLockSlide"](slideNum);
} };
this.DrawTrackSelectShapes = function(x, y, w, h) CDrawingDocument.prototype.DrawTrackSelectShapes = function(x, y, w, h)
{ {
this.AutoShapesTrack.DrawTrackSelectShapes(x, y, w, h); this.AutoShapesTrack.DrawTrackSelectShapes(x, y, w, h);
} };
this.DrawAdjustment = function(matrix, x, y, bTextWarp) CDrawingDocument.prototype.DrawAdjustment = function(matrix, x, y, bTextWarp)
{ {
this.AutoShapesTrack.DrawAdjustment(matrix, x, y, bTextWarp); this.AutoShapesTrack.DrawAdjustment(matrix, x, y, bTextWarp);
} };
// cursor // cursor
this.UpdateTargetTransform = function(matrix) CDrawingDocument.prototype.UpdateTargetTransform = function(matrix)
{
if (matrix)
{ {
if (matrix) if (null == this.TextMatrix)
{ this.TextMatrix = new AscCommon.CMatrix();
if (null == this.TextMatrix) this.TextMatrix.sx = matrix.sx;
this.TextMatrix = new AscCommon.CMatrix(); this.TextMatrix.shy = matrix.shy;
this.TextMatrix.sx = matrix.sx; this.TextMatrix.shx = matrix.shx;
this.TextMatrix.shy = matrix.shy; this.TextMatrix.sy = matrix.sy;
this.TextMatrix.shx = matrix.shx; this.TextMatrix.tx = matrix.tx;
this.TextMatrix.sy = matrix.sy; this.TextMatrix.ty = matrix.ty;
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"]();
}
}
this.UpdateThumbnailsAttack = function() this.Native["DD_UpdateTargetTransform"](matrix.sx, matrix.shy, matrix.shx, matrix.sy, matrix.tx, matrix.ty);
{
//this.m_oWordControl.Thumbnails.RecalculateAll();
} }
else
this.CheckGuiControlColors = function(bIsAttack)
{ {
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 CDrawingDocument.prototype.GetCommentWidth = function(type)
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.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) function DrawBackground(graphics, unifill, w, h)
{ {
...@@ -525,7 +534,7 @@ function DrawBackground(graphics, unifill, w, h) ...@@ -525,7 +534,7 @@ function DrawBackground(graphics, unifill, w, h)
checker._l(0, this.extY); checker._l(0, this.extY);
checker._z(); checker._z();
checker._e(); checker._e();
} };
var shape_drawer = new AscCommon.CShapeDrawer(); var shape_drawer = new AscCommon.CShapeDrawer();
shape_drawer.fromShape2(_shape, graphics, null); shape_drawer.fromShape2(_shape, graphics, null);
......
...@@ -42,12 +42,6 @@ var X_Right_Margin = 15; // 1.5 cm ...@@ -42,12 +42,6 @@ var X_Right_Margin = 15; // 1.5 cm
var Y_Bottom_Margin = 20; // 2 cm var Y_Bottom_Margin = 20; // 2 cm
var Y_Top_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 = { var GlobalSkinTeamlab = {
Name : "classic", Name : "classic",
RulersButton : true, RulersButton : true,
...@@ -124,401 +118,426 @@ function CEditorPage(api) ...@@ -124,401 +118,426 @@ function CEditorPage(api)
this.m_oDrawingDocument.m_oLogicDocument = this.m_oLogicDocument; this.m_oDrawingDocument.m_oLogicDocument = this.m_oLogicDocument;
this.m_oApi = api; this.m_oApi = api;
this.Native = window["native"]; this.Native = window["native"];
}
CEditorPage.prototype.MainScrollLock = function()
{
};
this.MainScrollLock = function() CEditorPage.prototype.MainScrollUnLock = function()
{ {
} };
this.MainScrollUnLock = function()
{
}
this.checkBodySize = function() CEditorPage.prototype.checkBodySize = function()
{ {
} };
this.Init = function() CEditorPage.prototype.Init = function()
{ {
} };
this.CheckLayouts = function(){ CEditorPage.prototype.CheckLayouts = function(){
} };
this.CheckRetinaDisplay = function() CEditorPage.prototype.CheckRetinaDisplay = function()
{ {
} };
this.CheckRetinaElement = function(htmlElem) CEditorPage.prototype.CheckRetinaElement = function(htmlElem)
{ {
} };
this.ShowOverlay = function() CEditorPage.prototype.ShowOverlay = function()
{ {
} };
this.UnShowOverlay = function()
{ CEditorPage.prototype.UnShowOverlay = function()
} {
this.CheckUnShowOverlay = function() };
{
} CEditorPage.prototype.CheckUnShowOverlay = function()
this.CheckShowOverlay = function() {
{ };
}
CEditorPage.prototype.CheckShowOverlay = function()
this.initEvents = function() {
{ };
} CEditorPage.prototype.initEvents = function()
{
this.initEvents2MobileAdvances = function()
{ };
}
this.onButtonRulersClick = function() CEditorPage.prototype.initEvents2MobileAdvances = function()
{ {
} };
this.HideRulers = function() CEditorPage.prototype.onButtonRulersClick = function()
{ {
} };
this.zoom_FitToWidth = function() CEditorPage.prototype.HideRulers = function()
{ {
} };
this.zoom_FitToPage = function()
{ CEditorPage.prototype.zoom_FitToWidth = function()
} {
};
this.zoom_Fire = function(type)
{ CEditorPage.prototype.zoom_FitToPage = function()
} {
};
this.zoom_Out = function()
{ CEditorPage.prototype.zoom_Fire = function(type)
} {
};
this.zoom_In = function()
{ CEditorPage.prototype.zoom_Out = function()
} {
};
this.DisableRulerMarkers = function()
{ CEditorPage.prototype.zoom_In = function()
} {
};
this.EnableRulerMarkers = function()
{ CEditorPage.prototype.DisableRulerMarkers = function()
} {
};
this.ToSearchResult = function()
{ CEditorPage.prototype.EnableRulerMarkers = function()
} {
};
this.onButtonTabsClick = function()
{ CEditorPage.prototype.ToSearchResult = function()
} {
};
this.onButtonTabsDraw = function()
{ CEditorPage.prototype.onButtonTabsClick = function()
} {
};
this.onPrevPage = function()
{ CEditorPage.prototype.onButtonTabsDraw = function()
} {
this.onNextPage = function() };
{
} CEditorPage.prototype.onPrevPage = function()
{
this.horRulerMouseDown = function(e) };
{
} CEditorPage.prototype.onNextPage = function()
this.horRulerMouseUp = function(e) {
{ };
}
this.horRulerMouseMove = function(e) CEditorPage.prototype.horRulerMouseDown = function(e)
{ {
} };
this.verRulerMouseDown = function(e) CEditorPage.prototype.horRulerMouseUp = function(e)
{ {
} };
this.verRulerMouseUp = function(e)
{ CEditorPage.prototype.horRulerMouseMove = function(e)
} {
this.verRulerMouseMove = function(e) };
{
} CEditorPage.prototype.verRulerMouseDown = function(e)
{
this.SelectWheel = function() };
{
} CEditorPage.prototype.verRulerMouseUp = function(e)
{
this.createSplitterDiv = function(bIsVert) };
{
} CEditorPage.prototype.verRulerMouseMove = function(e)
{
this.onBodyMouseDown = function(e) };
{
} CEditorPage.prototype.SelectWheel = function()
{
this.onBodyMouseMove = function(e) };
{
} CEditorPage.prototype.createSplitterDiv = function(bIsVert)
{
this.OnResizeSplitter = function() };
{
} CEditorPage.prototype.onBodyMouseDown = function(e)
{
this.onBodyMouseUp = function(e) };
{
} CEditorPage.prototype.onBodyMouseMove = function(e)
{
this.onMouseDown = function(e) };
{
} CEditorPage.prototype.OnResizeSplitter = function()
{
this.onMouseMove = function(e) };
{
} CEditorPage.prototype.onBodyMouseUp = function(e)
this.onMouseMove2 = function() {
{ };
}
this.onMouseUp = function(e, bIsWindow) CEditorPage.prototype.onMouseDown = function(e)
{ {
} };
this.onMouseUpExternal = function(x, y) CEditorPage.prototype.onMouseMove = function(e)
{ {
} };
CEditorPage.prototype.onMouseMove2 = function()
this.onMouseWhell = function(e) {
{ };
} CEditorPage.prototype.onMouseUp = function(e, bIsWindow)
{
this.onKeyUp = function(e) };
{
} CEditorPage.prototype.onMouseUpExternal = function(x, y)
{
this.onKeyDown = function(e) };
{
} CEditorPage.prototype.onMouseWhell = function(e)
{
this.onKeyDownNoActiveControl = function(e) };
{
} CEditorPage.prototype.onKeyUp = function(e)
{
this.onKeyDownTBIM = function(e) };
{
} CEditorPage.prototype.onKeyDown = function(e)
{
this.DisableTextEATextboxAttack = function() };
{
} CEditorPage.prototype.onKeyDownNoActiveControl = function(e)
{
this.onKeyPress = function(e) };
{
} CEditorPage.prototype.onKeyDownTBIM = function(e)
{
// -------------------------------------------------------- // };
// -----------------end demonstration---------------------- //
// -------------------------------------------------------- // CEditorPage.prototype.DisableTextEATextboxAttack = function()
{
this.verticalScroll = function(sender,scrollPositionY,maxY,isAtTop,isAtBottom) };
{
} CEditorPage.prototype.onKeyPress = function(e)
this.verticalScrollMouseUp = function(sender, e) {
{ };
}
this.CorrectSpeedVerticalScroll = function(newScrollPos) // -------------------------------------------------------- //
{ // -----------------end demonstration---------------------- //
} // -------------------------------------------------------- //
this.CorrectVerticalScrollByYDelta = function(delta)
{ CEditorPage.prototype.verticalScroll = function(sender,scrollPositionY,maxY,isAtTop,isAtBottom)
} {
};
this.horizontalScroll = function(sender,scrollPositionX,maxX,isAtLeft,isAtRight)
{ CEditorPage.prototype.verticalScrollMouseUp = function(sender, e)
} {
};
this.UpdateScrolls = function()
{ CEditorPage.prototype.CorrectSpeedVerticalScroll = function(newScrollPos)
} {
};
this.OnRePaintAttack = function()
{ CEditorPage.prototype.CorrectVerticalScrollByYDelta = function(delta)
} {
};
this.DeleteVerticalScroll = function()
{ CEditorPage.prototype.horizontalScroll = function(sender,scrollPositionX,maxX,isAtLeft,isAtRight)
{
} };
this.OnResize = function(isAttack) CEditorPage.prototype.UpdateScrolls = function()
{ {
} };
this.OnResize2 = function(isAttack) CEditorPage.prototype.OnRePaintAttack = function()
{ {
};
}
CEditorPage.prototype.DeleteVerticalScroll = function()
this.checkNeedRules = function() {
{
};
}
this.checkNeedHorScroll = function() CEditorPage.prototype.OnResize = function(isAttack)
{ {
} };
this.StartUpdateOverlay = function() CEditorPage.prototype.OnResize2 = function(isAttack)
{ {
}
this.EndUpdateOverlay = function() };
{
} CEditorPage.prototype.checkNeedRules = function()
{
this.OnUpdateOverlay = function()
{ };
}
CEditorPage.prototype.checkNeedHorScroll = function()
this.GetDrawingPageInfo = function(nPageIndex) {
{ };
}
CEditorPage.prototype.StartUpdateOverlay = function()
this.OnCalculatePagesPlace = function() {
{ };
}
CEditorPage.prototype.EndUpdateOverlay = function()
this.OnPaint = function() {
{ };
}
CEditorPage.prototype.OnUpdateOverlay = function()
this.CheckFontCache = function() {
{ };
}
this.OnScroll = function() CEditorPage.prototype.GetDrawingPageInfo = function(nPageIndex)
{ {
} };
this.CheckZoom = function() CEditorPage.prototype.OnCalculatePagesPlace = function()
{ {
} };
this.CalculateDocumentSize = function(bIsAttack) CEditorPage.prototype.OnPaint = function()
{ {
} };
this.CheckCalculateDocumentSize = function(_bounds) CEditorPage.prototype.CheckFontCache = function()
{ {
} };
this.InitDocument = function(bIsEmpty) CEditorPage.prototype.OnScroll = function()
{ {
} };
this.InitControl = function() CEditorPage.prototype.CheckZoom = function()
{ {
} };
this.StartMainTimer = function() CEditorPage.prototype.CalculateDocumentSize = function(bIsAttack)
{ {
} };
this.onTimerScroll = function(isThUpdateSync) CEditorPage.prototype.CheckCalculateDocumentSize = function(_bounds)
{ {
} };
this.onTimerScroll_sync = function(isThUpdateSync) CEditorPage.prototype.InitDocument = function(bIsEmpty)
{ {
} };
this.UpdateHorRuler = function() CEditorPage.prototype.InitControl = function()
{ {
} };
this.UpdateVerRuler = function()
{ CEditorPage.prototype.StartMainTimer = function()
} {
};
this.SetCurrentPage = function()
{ CEditorPage.prototype.onTimerScroll = function(isThUpdateSync)
} {
};
this.UpdateHorRulerBack = function()
{ CEditorPage.prototype.onTimerScroll_sync = function(isThUpdateSync)
} {
this.UpdateVerRulerBack = function() };
{
} CEditorPage.prototype.UpdateHorRuler = function()
{
this.CreateBackgroundHorRuler = function(margins) };
{
} CEditorPage.prototype.UpdateVerRuler = function()
this.CreateBackgroundVerRuler = function(margins) {
{ };
}
CEditorPage.prototype.SetCurrentPage = function()
this.ThemeGenerateThumbnails = function(_master) {
{ };
}
CEditorPage.prototype.UpdateHorRulerBack = function()
this.CheckLayouts = function(bIsAttack) {
{ };
}
CEditorPage.prototype.UpdateVerRulerBack = function()
this.GoToPage = function(lPageNum) {
{ };
this.Native["WC_GoToPage"](lPageNum);
} CEditorPage.prototype.CreateBackgroundHorRuler = function(margins)
{
this.GetVerticalScrollTo = function(y) };
{
} CEditorPage.prototype.CreateBackgroundVerRuler = function(margins)
{
this.GetHorizontalScrollTo = function(x) };
{
} CEditorPage.prototype.ThemeGenerateThumbnails = function(_master)
{
// -------------------------------------------------------- // };
// -------------------- east asian fonts ------------------ //
// -------------------------------------------------------- // CEditorPage.prototype.CheckLayouts = function(bIsAttack)
{
this.ReinitTB = function() };
{
} CEditorPage.prototype.GoToPage = function(lPageNum)
{
this.SetTextBoxMode = function(isEA) this.Native["WC_GoToPage"](lPageNum);
{ };
}
CEditorPage.prototype.GetVerticalScrollTo = function(y)
this.TextBoxFocus = function() {
{ };
}
CEditorPage.prototype.GetHorizontalScrollTo = function(x)
this.OnTextBoxInput = function() {
{ };
}
// -------------------------------------------------------- //
this.CheckTextBoxSize = function() // -------------------- east asian fonts ------------------ //
{ // -------------------------------------------------------- //
}
CEditorPage.prototype.ReinitTB = function()
this.TextBoxOnKeyDown = function(e) {
{ };
}
CEditorPage.prototype.SetTextBoxMode = function(isEA)
this.onChangeTB = function() {
{ };
}
this.CheckTextBoxInputPos = function() CEditorPage.prototype.TextBoxFocus = function()
{ {
} };
this.SaveDocument = 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---------------------------------------------------- //------------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {}; window['AscCommon'] = window['AscCommon'] || {};
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
var global_memory_stream_menu = CreateNativeMemoryStream(); var global_memory_stream_menu = CreateNativeMemoryStream();
// endsectionPr ----------------------------------------------------------------------------------------- // endsectionPr -----------------------------------------------------------------------------------------
// font engine ------------------------------------- // font engine -------------------------------------
var FontStyle = var FontStyle =
{ {
...@@ -51,6 +52,25 @@ window["use_native_fonts_only"] = true; ...@@ -51,6 +52,25 @@ window["use_native_fonts_only"] = true;
window["ftm"] = FT_Memory; 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) Asc['asc_docs_api'].prototype["Native_Editor_Initialize_Settings"] = function(_params)
{ {
window["NativeSupportTimeouts"] = true; 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