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

native

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53225 954022d7-b5bf-4e40-9824-e11837661b57
parent cbbb09f2
......@@ -5,6 +5,9 @@ var bIsLocalFontsUse = false;
function _is_support_cors()
{
if (window.NATIVE_EDITOR_ENJINE === true)
return false;
var xhrSupported = new XMLHttpRequest();
return !!xhrSupported && ("withCredentials" in xhrSupported);
}
......@@ -741,6 +744,8 @@ CFontInfo.prototype =
else
fontfile = font_loader.fontFiles[index];
if (window.NATIVE_EDITOR_ENJINE === undefined)
{
if (fontfile.Status != 0 && (this.Type == FONT_TYPE_STANDART || this.Type == FONT_TYPE_ADDITIONAL) &&
null != _embedded_cur.map_name_cutindex && undefined !== _embedded_cur.map_name_cutindex[this.Name])
{
......@@ -752,6 +757,14 @@ CFontInfo.prototype =
return _font_info.LoadFont(window.g_font_loader, fontManager, fEmSize, lStyle, dHorDpi, dVerDpi, transform);
}
}
}
else
{
if (fontfile.Status != 0)
{
fontfile.LoadFontNative();
}
}
var _ext = "";
if (bNeedBold)
......
......@@ -1155,11 +1155,20 @@ CMetafile.prototype =
return;
}
var _src = "";
if (!window.native)
{
var _img = window.editor.ImageLoader.map_image_index[img];
if (_img == undefined || _img.Image == null)
return;
var _src = _img.src;
_src = _img.src;
}
else
{
_src = img;
}
var _search = window.editor.DocumentUrl;
if (0 == _src.indexOf(_search))
_src = _src.substring(_search.length);
......@@ -1311,7 +1320,7 @@ CMetafile.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{
_lastFont.Index = g_map_font_index[_lastFont.Name];
_lastFont.Index = window.g_map_font_index[_lastFont.Name];
}
_lastFont.Size = this.m_oTextPr.FontSize;
......@@ -1327,7 +1336,7 @@ CMetafile.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{
_lastFont.Index = g_map_font_index[_lastFont.Name];
_lastFont.Index = window.g_map_font_index[_lastFont.Name];
}
_lastFont.Size = this.m_oTextPr.FontSizeCS;
......@@ -1343,7 +1352,7 @@ CMetafile.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{
_lastFont.Index = g_map_font_index[_lastFont.Name];
_lastFont.Index = window.g_map_font_index[_lastFont.Name];
}
_lastFont.Size = this.m_oTextPr.FontSize;
......@@ -1360,7 +1369,7 @@ CMetafile.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{
_lastFont.Index = g_map_font_index[_lastFont.Name];
_lastFont.Index = window.g_map_font_index[_lastFont.Name];
}
_lastFont.Size = this.m_oTextPr.FontSize;
......@@ -1592,6 +1601,9 @@ CDocumentRenderer.prototype =
// images
drawImage : function(img,x,y,w,h,alpha,srcRect)
{
if (img == null || img == undefined || img == "")
return;
if (0 != this.m_lPagesCount)
{
if (!srcRect)
......@@ -1906,6 +1918,9 @@ CDocumentRenderer.prototype =
},
put_brushTexture : function(src, mode)
{
if (src == null || src == undefined)
src = "";
if (0 != this.m_lPagesCount)
this.m_arrayPages[this.m_lPagesCount - 1].put_brushTexture(src, mode);
},
......
......@@ -1356,6 +1356,12 @@ CDocument.prototype =
this.FullRecalc.Start = _bStart;
this.FullRecalc.StartIndex = _StartIndex;
if (window.NATIVE_EDITOR_ENJINE_SYNC_RECALC === true)
{
this.Recalculate_Page( _PageIndex, _bStart, _StartIndex );
return;
}
//this.Recalculate_Page( _PageIndex, _bStart, _StartIndex );
if ( _PageIndex > this.FullRecalc.StartPage + 2 )
......
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