Commit a04421a6 authored by alexey.musinov's avatar alexey.musinov

[mobile] правки для сборки компонент скриптом

parent 85997957
...@@ -9,4 +9,5 @@ cd $BASEDIR ...@@ -9,4 +9,5 @@ cd $BASEDIR
npm install npm install
grunt --level=WHITESPACE_ONLY --mobile=true --formatting=PRETTY_PRINT --noclosure=true grunt --level=WHITESPACE_ONLY --mobile=true --formatting=PRETTY_PRINT --noclosure=true
cat "../word/sdk-all-min.js" "../word/sdk-all.js" > "../../mobile-apps/ios/Vendor/ONLYOFFICE/SDKData/documents/script.bin"
cat "../cell/sdk-all-min.js" "../cell/sdk-all.js" > "../../mobile-apps/ios/Vendor/ONLYOFFICE/SDKData/spreadsheets/script.bin" cat "../cell/sdk-all-min.js" "../cell/sdk-all.js" > "../../mobile-apps/ios/Vendor/ONLYOFFICE/SDKData/spreadsheets/script.bin"
...@@ -183,10 +183,33 @@ ...@@ -183,10 +183,33 @@
] ]
}, },
"mobile_banners": { "mobile_banners": {
"min": [], "min": [
"../../web-apps/vendor/xregexp/xregexp-all-min.js",
"../../web-apps/vendor/underscore/underscore-min.js",
"../common/Native/native.js",
"../common/Native/Wrappers/memory.js",
"../common/Native/jquery_native.js"
],
"common": [] "common": []
}, },
"exclude_mobile": [], "mobile": [
"../common/Native/Wrappers/TextMeasurerWrapper.js",
"../common/Native/Wrappers/DrawingStream.js",
"../common/Native/Wrappers/ShapeDrawer.js",
"../common/Native/Wrappers/Overlay.js",
"../common/Native/Wrappers/DrawingDocument.js",
"../common/Native/Wrappers/api.js"
],
"exclude_mobile": [
"../common/Overlay.js",
"../word/Drawing/ShapeDrawer.js",
"../word/Drawing/DrawingDocument.js",
"../common/FontsFreeType/font_engine.js",
"../common/FontsFreeType/FontFile.js",
"../common/FontsFreeType/FontManager.js",
"../common/FontsFreeType/TextMeasurer.js",
"../common/Scrolls/iscroll.js"
],
"dst": "../word", "dst": "../word",
"externs": [ "externs": [
"../common/Build/Externs.js", "../common/Build/Externs.js",
......
// Import // Import
var FontStyle = AscFonts.FontStyle;
var g_fontApplication = AscFonts.g_fontApplication;
var CColor = AscCommon.CColor;
var CAscMathCategory = AscCommon.CAscMathCategory;
var g_oTableId = AscCommon.g_oTableId;
var g_oTextMeasurer = AscCommon.g_oTextMeasurer;
var global_mouseEvent = AscCommon.global_mouseEvent; var global_mouseEvent = AscCommon.global_mouseEvent;
var History = AscCommon.History;
var global_MatrixTransformer = AscCommon.global_MatrixTransformer;
var g_dKoef_pix_to_mm = AscCommon.g_dKoef_pix_to_mm;
var g_dKoef_mm_to_pix = AscCommon.g_dKoef_mm_to_pix;
var _canvas_tables = null;
var _table_styles = null;
function CColumnsMarkupColumn()
{
this.W = 0;
this.Space = 0;
}
function CColumnsMarkup()
{
this.CurCol = 0;
this.X = 0; // левое поле
this.R = 0; // правое поле
this.EqualWidth = true;
this.Num = 1;
this.Space = 30;
this.Cols = [];
this.SectPr = null;
}
CColumnsMarkup.prototype.Update_FromSectPr = function(SectPr)
{
if (!SectPr)
return;
this.SectPr = SectPr;
var Columns = SectPr.Columns;
this.X = SectPr.Get_PageMargin_Left();
this.R = SectPr.Get_PageWidth() - SectPr.Get_PageMargin_Right();
this.EqualWidth = Columns.EqualWidth;
this.Num = Columns.Num;
this.Space = Columns.Space;
this.Cols = [];
for (var Index = 0, Count = Columns.Cols.length; Index < Count; ++Index)
{
this.Cols[Index] = new CColumnsMarkupColumn();
this.Cols[Index].W = Columns.Cols[Index].W;
this.Cols[Index].Space = Columns.Cols[Index].Space;
}
};
CColumnsMarkup.prototype.Set_CurCol = function(CurCol)
{
this.CurCol = CurCol;
};
CColumnsMarkup.prototype.CreateDuplicate = function()
{
var _ret = new CColumnsMarkup();
_ret.SectPr = this.SectPr;
_ret.CurCol = this.CurCol;
_ret.X = this.X;
_ret.R = this.R;
_ret.EqualWidth = this.EqualWidth;
_ret.Num = this.Num;
_ret.Space = this.Space;
_ret.Cols = [];
for (var i = 0; i < this.Cols.length; i++)
{
var _col = new CColumnsMarkupColumn();
_col.W = this.Cols[i].W;
_col.Space = this.Cols[i].Space;
_ret.Cols.push(_col);
}
return _ret;
};
function CTableOutlineDr() function CTableOutlineDr()
{ {
this.image = {}; this.image = {};
...@@ -1122,12 +1205,16 @@ CDrawingDocument.prototype = ...@@ -1122,12 +1205,16 @@ CDrawingDocument.prototype =
BeginDrawTracking: function() BeginDrawTracking: function()
{ {
this.AutoShapesTrack.BeginDrawTracking(); if (this.AutoShapesTrack.BeginDrawTracking) {
this.AutoShapesTrack.BeginDrawTracking();
}
}, },
EndDrawTracking: function() EndDrawTracking: function()
{ {
this.AutoShapesTrack.EndDrawTracking(); if (this.AutoShapesTrack.EndDrawTracking) {
this.AutoShapesTrack.EndDrawTracking();
}
}, },
// треки // треки
...@@ -2836,4 +2923,6 @@ function check_MouseUpEvent(e) ...@@ -2836,4 +2923,6 @@ function check_MouseUpEvent(e)
//--------------------------------------------------------export---------------------------------------------------- //--------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {}; window['AscCommon'] = window['AscCommon'] || {};
window['AscCommonWord'] = window['AscCommonWord'] || {};
//window['AscCommon'].CPage = CPage;
window['AscCommon'].CDrawingDocument = CDrawingDocument; window['AscCommon'].CDrawingDocument = CDrawingDocument;
\ No newline at end of file
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
This diff is collapsed.
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
var global_memory_stream_menu = CreateNativeMemoryStream();
Asc['asc_docs_api'].prototype.Update_ParaInd = function( Ind ) Asc['asc_docs_api'].prototype.Update_ParaInd = function( Ind )
{ {
...@@ -5228,7 +5227,6 @@ CStylesPainter.prototype = ...@@ -5228,7 +5227,6 @@ CStylesPainter.prototype =
} }
}; };
window["use_native_fonts_only"] = true;
// ------------------------------------------------- // -------------------------------------------------
// declarate unused methods and objects // declarate unused methods and objects
...@@ -5425,15 +5423,6 @@ Asc['asc_docs_api'].prototype.pre_Paste = function(_fonts, _images, callback) ...@@ -5425,15 +5423,6 @@ Asc['asc_docs_api'].prototype.pre_Paste = function(_fonts, _images, callback)
}; };
/************************************************************************/ /************************************************************************/
window["NativeCorrectImageUrlOnPaste"] = function(url)
{
return window["native"]["CorrectImageUrlOnPaste"](url);
};
window["NativeCorrectImageUrlOnCopy"] = function(url)
{
return window["native"]["CorrectImageUrlOnCopy"](url);
};
// chat styles // chat styles
AscCommon.ChartPreviewManager.prototype.clearPreviews = function() AscCommon.ChartPreviewManager.prototype.clearPreviews = function()
{ {
...@@ -5506,111 +5495,4 @@ AscCommon.ChartPreviewManager.prototype.getChartPreviews = function(chartType) ...@@ -5506,111 +5495,4 @@ AscCommon.ChartPreviewManager.prototype.getChartPreviews = function(chartType)
_api.WordControl.m_oDrawingDocument.Native["DD_EndNativeDraw"](_stream); _api.WordControl.m_oDrawingDocument.Native["DD_EndNativeDraw"](_stream);
} }
} }
}; };
\ No newline at end of file
// FT_Common
function _FT_Common()
{
this.UintToInt = function(v)
{
return (v>2147483647)?v-4294967296:v;
};
this.UShort_To_Short = function(v)
{
return (v>32767)?v-65536:v;
};
this.IntToUInt = function(v)
{
return (v<0)?v+4294967296:v;
};
this.Short_To_UShort = function(v)
{
return (v<0)?v+65536:v;
};
this.memset = function(d,v,s)
{
for (var i=0;i<s;i++)
d[i]=v;
};
this.memcpy = function(d,s,l)
{
for (var i=0;i<l;i++)
d[i]=s[i];
};
this.memset_p = function(d,v,s)
{
var _d = d.data;
var _e = d.pos+s;
for (var i=d.pos;i<_e;i++)
_d[i]=v;
};
this.memcpy_p = function(d,s,l)
{
var _d1=d.data;
var _p1=d.pos;
var _d2=s.data;
var _p2=s.pos;
for (var i=0;i<l;i++)
_d1[_p1++]=_d2[_p2++];
};
this.memcpy_p2 = function(d,s,p,l)
{
var _d1=d.data;
var _p1=d.pos;
var _p2=p;
for (var i=0;i<l;i++)
_d1[_p1++]=s[_p2++];
};
this.realloc = function(memory, pointer, cur_count, new_count)
{
var ret = { block: null, err : 0, size : new_count};
if (cur_count < 0 || new_count < 0)
{
/* may help catch/prevent nasty security issues */
ret.err = 6;
}
else if (new_count == 0)
{
ret.block = null;
}
else if (cur_count == 0)
{
ret.block = memory.Alloc(new_count);
}
else
{
var block2 = memory.Alloc(new_count);
FT_Common.memcpy_p(block2, pointer, cur_count);
ret.block = block2;
}
return ret;
};
this.realloc_long = function(memory, pointer, cur_count, new_count)
{
var ret = { block: null, err : 0, size : new_count};
if (cur_count < 0 || new_count < 0)
{
/* may help catch/prevent nasty security issues */
ret.err = 6;
}
else if (new_count == 0)
{
ret.block = null;
}
else if (cur_count == 0)
{
ret.block = CreateIntArray(new_count);
}
else
{
var block2 = CreateIntArray(new_count);
for (var i = 0; i < cur_count; i++)
block2[i] = pointer[i];
ret.block = block2;
}
return ret;
};
}
var FT_Common = new _FT_Common();
\ No newline at end of file
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
...@@ -554,6 +554,131 @@ var console = { ...@@ -554,6 +554,131 @@ var console = {
log : function(param) { window.native.ConsoleLog(param); } log : function(param) { window.native.ConsoleLog(param); }
}; };
window["NativeCorrectImageUrlOnPaste"] = function(url) {
return window["native"]["CorrectImageUrlOnPaste"](url);
};
window["NativeCorrectImageUrlOnCopy"] = function(url) {
return window["native"]["CorrectImageUrlOnCopy"](url);
};
window['AscFonts'].CFontManager = function CFontManager() {
this.m_oLibrary = {};
this.Initialize = function(){};
this.ClearFontsRasterCache = function(){};
};
window["use_native_fonts_only"] = true;
// FT_Common
function _FT_Common() {
this.UintToInt = function(v)
{
return (v>2147483647)?v-4294967296:v;
};
this.UShort_To_Short = function(v)
{
return (v>32767)?v-65536:v;
};
this.IntToUInt = function(v)
{
return (v<0)?v+4294967296:v;
};
this.Short_To_UShort = function(v)
{
return (v<0)?v+65536:v;
};
this.memset = function(d,v,s)
{
for (var i=0;i<s;i++)
d[i]=v;
};
this.memcpy = function(d,s,l)
{
for (var i=0;i<l;i++)
d[i]=s[i];
};
this.memset_p = function(d,v,s)
{
var _d = d.data;
var _e = d.pos+s;
for (var i=d.pos;i<_e;i++)
_d[i]=v;
};
this.memcpy_p = function(d,s,l)
{
var _d1=d.data;
var _p1=d.pos;
var _d2=s.data;
var _p2=s.pos;
for (var i=0;i<l;i++)
_d1[_p1++]=_d2[_p2++];
};
this.memcpy_p2 = function(d,s,p,l)
{
var _d1=d.data;
var _p1=d.pos;
var _p2=p;
for (var i=0;i<l;i++)
_d1[_p1++]=s[_p2++];
};
this.realloc = function(memory, pointer, cur_count, new_count)
{
var ret = { block: null, err : 0, size : new_count};
if (cur_count < 0 || new_count < 0)
{
/* may help catch/prevent nasty security issues */
ret.err = 6;
}
else if (new_count == 0)
{
ret.block = null;
}
else if (cur_count == 0)
{
ret.block = memory.Alloc(new_count);
}
else
{
var block2 = memory.Alloc(new_count);
FT_Common.memcpy_p(block2, pointer, cur_count);
ret.block = block2;
}
return ret;
};
this.realloc_long = function(memory, pointer, cur_count, new_count)
{
var ret = { block: null, err : 0, size : new_count};
if (cur_count < 0 || new_count < 0)
{
/* may help catch/prevent nasty security issues */
ret.err = 6;
}
else if (new_count == 0)
{
ret.block = null;
}
else if (cur_count == 0)
{
ret.block = CreateIntArray(new_count);
}
else
{
var block2 = CreateIntArray(new_count);
for (var i = 0; i < cur_count; i++)
block2[i] = pointer[i];
ret.block = block2;
}
return ret;
};
}
var FT_Common = new _FT_Common();
var global_memory_stream_menu = CreateNativeMemoryStream();
window['AscFonts'] = window['AscFonts'] || {};
window['AscFonts'].FT_Common = FT_Common;
// HTML page interface // HTML page interface
window.native.Call_OnUpdateOverlay = function(param) window.native.Call_OnUpdateOverlay = function(param)
{ {
......
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