Remove 'insert image from URL' menus in OO

pull/1/head
yflory 4 years ago
parent 9d83715f90
commit 54750aea42

@ -1293,15 +1293,28 @@ define([
'#title-user-name { display: none !important; }' +
(supportsXLSX() ? '' : '#slot-btn-dt-print { display: none !important; }') +
// New OO:
'#asc-gen257 { display: none !important; }' + // Insert image from url
'section[data-tab="ins"] .separator:nth-last-child(2) { display: none !important; }' + // separator
'#slot-btn-insequation { display: none !important; }' + // Insert equation
'#asc-gen125 { display: none !important; }' + // Disable presenter mode
//'.toolbar .tabs .ribtab:not(.canedit) { display: none !important; }' + // Switch collaborative mode
'#fm-btn-info { display: none !important; }' + // Author name, doc title, etc. in "File" (menu entry)
'#panel-info { display: none !important; }' + // Same but content
'#image-button-from-url { display: none !important; }' + // Inline image settings: replace with url
'#asc-gen257 { display: none !important; }' + // Insert image from url
'#asc-gen1839 { display: none !important; }' + // Image context menu: replace with url
'#asc-gen5883 { display: none !important; }' + // Rightside image menu: replace with url
'#asc-gen1211 { display: none !important; }' + // Slide Image context menu: replace with url
'#asc-gen3880 { display: none !important; }' + // Rightside slide image menu: replace with url
'#asc-gen2218 { display: none !important; }' + // Rightside slide menu: fill slide with image url
'#asc-gen849 { display: none !important; }' + // Toolbar slide: insert image from url
'#asc-gen857 { display: none !important; }' + // Toolbar slide: insert image from url (insert tab)
'#asc-gen180 { display: none !important; }' + // Doc Insert image from url
'#asc-gen1760 { display: none !important; }' + // Doc Image context menu: replace with url
'#asc-gen3319 { display: none !important; }' + // Doc Rightside image menu: replace with url
'#file-menu-panel .devider { display: none !important; }' + // separator in the "File" menu
'#left-btn-spellcheck, #left-btn-about { display: none !important; }'+
'div.btn-users.dropdown-toggle { display: none; !important }';
@ -1536,6 +1549,7 @@ define([
APP.loadingImage = 0;
APP.getImageURL = function(name, callback) {
if (name && /^data:image/.test(name)) {
return void callback('');
var b = Util.dataURIToBlob(name);
var url = URL.createObjectURL(blob);
return void callback(url);

@ -781,19 +781,19 @@ true;if(nTTRemainder<=0){sResult=sGroup+sResult;if(nRemValue<=0)break;continue}v
false}else if(!isPrevZero){sGroup+=arrChinese[0];isPrevZero=true}if(nRemainder<=0){sResult=sGroup+sResult;if(nRemValue<=0)break;continue}nQuotient=nRemainder/10|0;nRemainder=nRemainder-nQuotient*10;if(0!==nQuotient){sGroup+=arrChinese[nQuotient]+arrChinese[10];isPrevZero=false}else if(!isPrevZero){sGroup+=arrChinese[0];isPrevZero=true}if(0!==nRemainder)sGroup+=arrChinese[nRemainder];sResult=sGroup+sResult;if(nRemValue<=0)break}break}}return sResult}var c_oAscSpaces=[];c_oAscSpaces[10]=1;c_oAscSpaces[32]=
1;c_oAscSpaces[8194]=1;c_oAscSpaces[8195]=1;c_oAscSpaces[8197]=1;c_oAscSpaces[12288]=1;function IsSpace(nUnicode){return!!c_oAscSpaces[nUnicode]}function private_IsAbbreviation(sWord){if(sWord.toUpperCase()===sWord){for(var nPos=0,nLen=sWord.length;nPos<nLen;++nPos){var nCharCode=sWord.charCodeAt(nPos);if(44032<=nCharCode&&nCharCode<=55203||4352<=nCharCode&&nCharCode<=4607||12592<=nCharCode&&nCharCode<=12687||43360<=nCharCode&&nCharCode<=43391||55216<=nCharCode&&nCharCode<=55295||19968<=nCharCode&&
nCharCode<=40959||13312<=nCharCode&&nCharCode<=19903||131072<=nCharCode&&nCharCode<=173791||173824<=nCharCode&&nCharCode<=177983||177984<=nCharCode&&nCharCode<=178207||178208<=nCharCode&&nCharCode<=183983||63744<=nCharCode&&nCharCode<=64255||194560<=nCharCode&&nCharCode<=195103)return false}return true}return false}var g_oUserColorById={},g_oUserNextColorIndex=0;function getUserColorById(userId,userName,isDark,isNumericValue){if(window.parent.APP&&window.parent.APP.getUserColor)try{var CPColor=window.parent.APP.getUserColor(userId);
if(CPColor)return true===isNumericValue?CPColor.r<<16&16711680|CPColor.g<<8&65280|CPColor.b&255:CPColor}catch(e){}if((!userId||""===userId)&&(!userName||""===userName))return new CColor(0,0,0,255);var res;if(g_oUserColorById.hasOwnProperty(userId))res=g_oUserColorById[userId];else if(g_oUserColorById.hasOwnProperty(userName))res=g_oUserColorById[userName];else{var nColor=Asc.c_oAscArrUserColors[g_oUserNextColorIndex%Asc.c_oAscArrUserColors.length];++g_oUserNextColorIndex;res=g_oUserColorById[userId||
userName]=new CUserCacheColor(nColor)}if(!res)return new CColor(0,0,0,255);var oColor=true===isDark?res.Dark:res.Light;return true===isNumericValue?oColor.r<<16&16711680|oColor.g<<8&65280|oColor.b&255:oColor}function isNullOrEmptyString(str){return str==undefined||str==null||str==""}function unleakString(s){return(" "+s).substr(1)}function readValAttr(attr){if(attr()){var val=attr()["val"];return val?val:null}return null}function getNumFromXml(val){return val?val-0:null}function getColorFromXml(attr){if(attr()){var vals=
attr();if(null!=vals["theme"])return AscCommonExcel.g_oColorManager.getThemeColor(getNumFromXml(vals["theme"]),getNumFromXml(vals["tint"]));else if(null!=vals["rgb"])return new AscCommonExcel.RgbColor(16777215&getNumFromXml(vals["rgb"]))}return null}function getBoolFromXml(val){return"0"!==val&&"false"!==val&&"off"!==val}function CUserCacheColor(nColor){this.Light=null;this.Dark=null;this.init(nColor)}CUserCacheColor.prototype.init=function(nColor){var r=nColor>>16&255;var g=nColor>>8&255;var b=nColor&
255;var Y=Math.max(0,Math.min(255,.299*r+.587*g+.114*b));var Cb=Math.max(0,Math.min(255,128-.168736*r-.331264*g+.5*b));var Cr=Math.max(0,Math.min(255,128+.5*r-.418688*g-.081312*b));if(Y>63)Y=63;var R=Math.max(0,Math.min(255,Y+1.402*(Cr-128)))|0;var G=Math.max(0,Math.min(255,Y-.34414*(Cb-128)-.71414*(Cr-128)))|0;var B=Math.max(0,Math.min(255,Y+1.772*(Cb-128)))|0;this.Light=new CColor(r,g,b,255);this.Dark=new CColor(R,G,B,255)};function loadScript(url,onSuccess,onError){if(window["NATIVE_EDITOR_ENJINE"]===
true||window["Native"]!==undefined){onSuccess();return}if(window["AscDesktopEditor"]&&window["local_load_add"]){var _context={"completeLoad":function(){return onSuccess()}};window["local_load_add"](_context,"sdk-all-from-min",url);var _ret_param=window["AscDesktopEditor"]["LoadJS"](url);if(2!=_ret_param)window["local_load_remove"](url);if(_ret_param==1){setTimeout(onSuccess,1);return}else if(_ret_param==2)return}var backoff=new AscCommon.Backoff(AscCommon.g_oBackoffDefaults);loadScriptWithBackoff(backoff,
url,onSuccess,onError)}function loadScriptWithBackoff(backoff,url,onSuccess,onError){var script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=onSuccess;script.onerror=function(){backoff.attempt(onError,function(){loadScriptWithBackoff(backoff,url,onSuccess,onError)})};document.head.appendChild(script)}function loadSdk(sdkName,onSuccess,onError){if(window["AscNotLoadAllScript"])onSuccess();else{var urlArgs=window.parent&&window.parent.APP&&window.parent.APP.urlArgs||
"";loadScript("./../../../../sdkjs/"+sdkName+"/sdk-all.js?"+urlArgs,onSuccess,onError)}}function getAltGr(e){var ctrlKey=e.metaKey||e.ctrlKey;var altKey=e.altKey;return altKey&&(AscBrowser.isMacOs?!ctrlKey:ctrlKey)}function getColorSchemeByName(sName){for(var i=0;i<AscCommon.g_oUserColorScheme.length;++i){var tmp=AscCommon.g_oUserColorScheme[i];if(tmp&&tmp.name===sName)return getColorSchemeByIdx(i)}return null}function getColorSchemeByIdx(idx){var tmp=AscCommon.g_oUserColorScheme[idx];if(tmp){var scheme=
new AscFormat.ClrScheme,_c;scheme.name=tmp.name;_c=tmp.get_dk1();scheme.colors[8]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt1();scheme.colors[12]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_dk2();scheme.colors[9]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt2();scheme.colors[13]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent1();scheme.colors[0]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent2();scheme.colors[1]=AscFormat.CreateUniColorRGB(_c.r,
_c.g,_c.b);_c=tmp.get_accent3();scheme.colors[2]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent4();scheme.colors[3]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent5();scheme.colors[4]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent6();scheme.colors[5]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_hlink();scheme.colors[11]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_folHlink();scheme.colors[10]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);
return scheme}return null}function getAscColorScheme(_scheme,theme){var elem,_c;var _rgba={R:0,G:0,B:0,A:255};elem=new AscCommon.CAscColorScheme;elem.scheme=_scheme;elem.name=_scheme.name;_scheme.colors[8].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[8].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[12].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[12].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[9].Calculate(theme,null,null,
null,_rgba);_c=_scheme.colors[9].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[13].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[13].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[0].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[0].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[1].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[1].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[2].Calculate(theme,
null,null,null,_rgba);_c=_scheme.colors[2].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[3].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[3].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[4].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[4].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[5].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[5].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));
_scheme.colors[11].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[11].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[10].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[10].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));return elem}function getIndexColorSchemeInArray(result,asc_color_scheme){for(var j=0;j<result.length;++j)if(result[j].isEqual(asc_color_scheme))return j;return-1}function checkAddColorScheme(result,asc_color_scheme,nStartIndex){var nIndex=
if(CPColor)return true===isNumericValue?CPColor.r<<16&16711680|CPColor.g<<8&65280|CPColor.b&255:new CColor(CPColor.r,CPColor.g,CPColor.b,CPColor.a)}catch(e){}if((!userId||""===userId)&&(!userName||""===userName))return new CColor(0,0,0,255);var res;if(g_oUserColorById.hasOwnProperty(userId))res=g_oUserColorById[userId];else if(g_oUserColorById.hasOwnProperty(userName))res=g_oUserColorById[userName];else{var nColor=Asc.c_oAscArrUserColors[g_oUserNextColorIndex%Asc.c_oAscArrUserColors.length];++g_oUserNextColorIndex;
res=g_oUserColorById[userId||userName]=new CUserCacheColor(nColor)}if(!res)return new CColor(0,0,0,255);var oColor=true===isDark?res.Dark:res.Light;return true===isNumericValue?oColor.r<<16&16711680|oColor.g<<8&65280|oColor.b&255:oColor}function isNullOrEmptyString(str){return str==undefined||str==null||str==""}function unleakString(s){return(" "+s).substr(1)}function readValAttr(attr){if(attr()){var val=attr()["val"];return val?val:null}return null}function getNumFromXml(val){return val?val-0:null}
function getColorFromXml(attr){if(attr()){var vals=attr();if(null!=vals["theme"])return AscCommonExcel.g_oColorManager.getThemeColor(getNumFromXml(vals["theme"]),getNumFromXml(vals["tint"]));else if(null!=vals["rgb"])return new AscCommonExcel.RgbColor(16777215&getNumFromXml(vals["rgb"]))}return null}function getBoolFromXml(val){return"0"!==val&&"false"!==val&&"off"!==val}function CUserCacheColor(nColor){this.Light=null;this.Dark=null;this.init(nColor)}CUserCacheColor.prototype.init=function(nColor){var r=
nColor>>16&255;var g=nColor>>8&255;var b=nColor&255;var Y=Math.max(0,Math.min(255,.299*r+.587*g+.114*b));var Cb=Math.max(0,Math.min(255,128-.168736*r-.331264*g+.5*b));var Cr=Math.max(0,Math.min(255,128+.5*r-.418688*g-.081312*b));if(Y>63)Y=63;var R=Math.max(0,Math.min(255,Y+1.402*(Cr-128)))|0;var G=Math.max(0,Math.min(255,Y-.34414*(Cb-128)-.71414*(Cr-128)))|0;var B=Math.max(0,Math.min(255,Y+1.772*(Cb-128)))|0;this.Light=new CColor(r,g,b,255);this.Dark=new CColor(R,G,B,255)};function loadScript(url,
onSuccess,onError){if(window["NATIVE_EDITOR_ENJINE"]===true||window["Native"]!==undefined){onSuccess();return}if(window["AscDesktopEditor"]&&window["local_load_add"]){var _context={"completeLoad":function(){return onSuccess()}};window["local_load_add"](_context,"sdk-all-from-min",url);var _ret_param=window["AscDesktopEditor"]["LoadJS"](url);if(2!=_ret_param)window["local_load_remove"](url);if(_ret_param==1){setTimeout(onSuccess,1);return}else if(_ret_param==2)return}var backoff=new AscCommon.Backoff(AscCommon.g_oBackoffDefaults);
loadScriptWithBackoff(backoff,url,onSuccess,onError)}function loadScriptWithBackoff(backoff,url,onSuccess,onError){var script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=onSuccess;script.onerror=function(){backoff.attempt(onError,function(){loadScriptWithBackoff(backoff,url,onSuccess,onError)})};document.head.appendChild(script)}function loadSdk(sdkName,onSuccess,onError){if(window["AscNotLoadAllScript"])onSuccess();else{var urlArgs=window.parent&&window.parent.APP&&
window.parent.APP.urlArgs||"";loadScript("./../../../../sdkjs/"+sdkName+"/sdk-all.js?"+urlArgs,onSuccess,onError)}}function getAltGr(e){var ctrlKey=e.metaKey||e.ctrlKey;var altKey=e.altKey;return altKey&&(AscBrowser.isMacOs?!ctrlKey:ctrlKey)}function getColorSchemeByName(sName){for(var i=0;i<AscCommon.g_oUserColorScheme.length;++i){var tmp=AscCommon.g_oUserColorScheme[i];if(tmp&&tmp.name===sName)return getColorSchemeByIdx(i)}return null}function getColorSchemeByIdx(idx){var tmp=AscCommon.g_oUserColorScheme[idx];
if(tmp){var scheme=new AscFormat.ClrScheme,_c;scheme.name=tmp.name;_c=tmp.get_dk1();scheme.colors[8]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt1();scheme.colors[12]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_dk2();scheme.colors[9]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt2();scheme.colors[13]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent1();scheme.colors[0]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent2();scheme.colors[1]=
AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent3();scheme.colors[2]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent4();scheme.colors[3]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent5();scheme.colors[4]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent6();scheme.colors[5]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_hlink();scheme.colors[11]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_folHlink();scheme.colors[10]=AscFormat.CreateUniColorRGB(_c.r,
_c.g,_c.b);return scheme}return null}function getAscColorScheme(_scheme,theme){var elem,_c;var _rgba={R:0,G:0,B:0,A:255};elem=new AscCommon.CAscColorScheme;elem.scheme=_scheme;elem.name=_scheme.name;_scheme.colors[8].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[8].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[12].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[12].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[9].Calculate(theme,
null,null,null,_rgba);_c=_scheme.colors[9].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[13].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[13].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[0].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[0].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[1].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[1].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));
_scheme.colors[2].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[2].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[3].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[3].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[4].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[4].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[5].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[5].RGBA;elem.putColor(new AscCommon.CColor(_c.R,
_c.G,_c.B));_scheme.colors[11].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[11].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[10].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[10].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));return elem}function getIndexColorSchemeInArray(result,asc_color_scheme){for(var j=0;j<result.length;++j)if(result[j].isEqual(asc_color_scheme))return j;return-1}function checkAddColorScheme(result,asc_color_scheme,nStartIndex){var nIndex=
getIndexColorSchemeInArray(result,asc_color_scheme);if(nIndex>-1)return nIndex;var nStartIndex_=nStartIndex;if(nStartIndex===null)nStartIndex_=result.length;result.splice(nStartIndex_,0,asc_color_scheme);return nStartIndex_}function isEastAsianScript(value){return 12544<=value&&value<=12591||12704<=value&&value<=12735||19968<=value&&value<=40938||13312<=value&&value<=19893||131072<=value&&value<=173782||173824<=value&&value<=177972||177984<=value&&value<=178205||178208<=value&&value<=183969||183984<=
value&&value<=191456||63744<=value&&value<=64255||194560<=value&&value<=195103||12032<=value&&value<=12255||11904<=value&&value<=12031||12736<=value&&value<=12783||12272<=value&&value<=12287||4352<=value&&value<=4607||43360<=value&&value<=43391||55216<=value&&value<=55295||12592<=value&&value<=12687||65280<=value&&value<=65519||44032<=value&&value<=55215||12352<=value&&value<=12447||110848<=value&&value<=110895||110592<=value&&value<=110847||12688<=value&&value<=12703||12448<=value&&value<=12543||
12784<=value&&value<=12799||42192<=value&&value<=42239||93952<=value&&value<=94111||110960<=value&&value<=111359||94208<=value&&value<=100332||100352<=value&&value<=101119||40960<=value&&value<=42127||42128<=value&&value<=42191}var g_oIdCounter=new CIdCounter;window.Asc.g_signature_drawer=null;function CSignatureDrawer(id,api,w,h){window.Asc.g_signature_drawer=this;this.Api=api;this.CanvasParent=document.getElementById(id);this.Canvas=document.createElement("canvas");this.Canvas.style.position="absolute";

@ -779,19 +779,19 @@ true;if(nTTRemainder<=0){sResult=sGroup+sResult;if(nRemValue<=0)break;continue}v
false}else if(!isPrevZero){sGroup+=arrChinese[0];isPrevZero=true}if(nRemainder<=0){sResult=sGroup+sResult;if(nRemValue<=0)break;continue}nQuotient=nRemainder/10|0;nRemainder=nRemainder-nQuotient*10;if(0!==nQuotient){sGroup+=arrChinese[nQuotient]+arrChinese[10];isPrevZero=false}else if(!isPrevZero){sGroup+=arrChinese[0];isPrevZero=true}if(0!==nRemainder)sGroup+=arrChinese[nRemainder];sResult=sGroup+sResult;if(nRemValue<=0)break}break}}return sResult}var c_oAscSpaces=[];c_oAscSpaces[10]=1;c_oAscSpaces[32]=
1;c_oAscSpaces[8194]=1;c_oAscSpaces[8195]=1;c_oAscSpaces[8197]=1;c_oAscSpaces[12288]=1;function IsSpace(nUnicode){return!!c_oAscSpaces[nUnicode]}function private_IsAbbreviation(sWord){if(sWord.toUpperCase()===sWord){for(var nPos=0,nLen=sWord.length;nPos<nLen;++nPos){var nCharCode=sWord.charCodeAt(nPos);if(44032<=nCharCode&&nCharCode<=55203||4352<=nCharCode&&nCharCode<=4607||12592<=nCharCode&&nCharCode<=12687||43360<=nCharCode&&nCharCode<=43391||55216<=nCharCode&&nCharCode<=55295||19968<=nCharCode&&
nCharCode<=40959||13312<=nCharCode&&nCharCode<=19903||131072<=nCharCode&&nCharCode<=173791||173824<=nCharCode&&nCharCode<=177983||177984<=nCharCode&&nCharCode<=178207||178208<=nCharCode&&nCharCode<=183983||63744<=nCharCode&&nCharCode<=64255||194560<=nCharCode&&nCharCode<=195103)return false}return true}return false}var g_oUserColorById={},g_oUserNextColorIndex=0;function getUserColorById(userId,userName,isDark,isNumericValue){if(window.parent.APP&&window.parent.APP.getUserColor)try{var CPColor=window.parent.APP.getUserColor(userId);
if(CPColor)return true===isNumericValue?CPColor.r<<16&16711680|CPColor.g<<8&65280|CPColor.b&255:CPColor}catch(e){}if((!userId||""===userId)&&(!userName||""===userName))return new CColor(0,0,0,255);var res;if(g_oUserColorById.hasOwnProperty(userId))res=g_oUserColorById[userId];else if(g_oUserColorById.hasOwnProperty(userName))res=g_oUserColorById[userName];else{var nColor=Asc.c_oAscArrUserColors[g_oUserNextColorIndex%Asc.c_oAscArrUserColors.length];++g_oUserNextColorIndex;res=g_oUserColorById[userId||
userName]=new CUserCacheColor(nColor)}if(!res)return new CColor(0,0,0,255);var oColor=true===isDark?res.Dark:res.Light;return true===isNumericValue?oColor.r<<16&16711680|oColor.g<<8&65280|oColor.b&255:oColor}function isNullOrEmptyString(str){return str==undefined||str==null||str==""}function unleakString(s){return(" "+s).substr(1)}function readValAttr(attr){if(attr()){var val=attr()["val"];return val?val:null}return null}function getNumFromXml(val){return val?val-0:null}function getColorFromXml(attr){if(attr()){var vals=
attr();if(null!=vals["theme"])return AscCommonExcel.g_oColorManager.getThemeColor(getNumFromXml(vals["theme"]),getNumFromXml(vals["tint"]));else if(null!=vals["rgb"])return new AscCommonExcel.RgbColor(16777215&getNumFromXml(vals["rgb"]))}return null}function getBoolFromXml(val){return"0"!==val&&"false"!==val&&"off"!==val}function CUserCacheColor(nColor){this.Light=null;this.Dark=null;this.init(nColor)}CUserCacheColor.prototype.init=function(nColor){var r=nColor>>16&255;var g=nColor>>8&255;var b=nColor&
255;var Y=Math.max(0,Math.min(255,.299*r+.587*g+.114*b));var Cb=Math.max(0,Math.min(255,128-.168736*r-.331264*g+.5*b));var Cr=Math.max(0,Math.min(255,128+.5*r-.418688*g-.081312*b));if(Y>63)Y=63;var R=Math.max(0,Math.min(255,Y+1.402*(Cr-128)))|0;var G=Math.max(0,Math.min(255,Y-.34414*(Cb-128)-.71414*(Cr-128)))|0;var B=Math.max(0,Math.min(255,Y+1.772*(Cb-128)))|0;this.Light=new CColor(r,g,b,255);this.Dark=new CColor(R,G,B,255)};function loadScript(url,onSuccess,onError){if(window["NATIVE_EDITOR_ENJINE"]===
true||window["Native"]!==undefined){onSuccess();return}if(window["AscDesktopEditor"]&&window["local_load_add"]){var _context={"completeLoad":function(){return onSuccess()}};window["local_load_add"](_context,"sdk-all-from-min",url);var _ret_param=window["AscDesktopEditor"]["LoadJS"](url);if(2!=_ret_param)window["local_load_remove"](url);if(_ret_param==1){setTimeout(onSuccess,1);return}else if(_ret_param==2)return}var backoff=new AscCommon.Backoff(AscCommon.g_oBackoffDefaults);loadScriptWithBackoff(backoff,
url,onSuccess,onError)}function loadScriptWithBackoff(backoff,url,onSuccess,onError){var script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=onSuccess;script.onerror=function(){backoff.attempt(onError,function(){loadScriptWithBackoff(backoff,url,onSuccess,onError)})};document.head.appendChild(script)}function loadSdk(sdkName,onSuccess,onError){if(window["AscNotLoadAllScript"])onSuccess();else{var urlArgs=window.parent&&window.parent.APP&&window.parent.APP.urlArgs||
"";loadScript("./../../../../sdkjs/"+sdkName+"/sdk-all.js?"+urlArgs,onSuccess,onError)}}function getAltGr(e){var ctrlKey=e.metaKey||e.ctrlKey;var altKey=e.altKey;return altKey&&(AscBrowser.isMacOs?!ctrlKey:ctrlKey)}function getColorSchemeByName(sName){for(var i=0;i<AscCommon.g_oUserColorScheme.length;++i){var tmp=AscCommon.g_oUserColorScheme[i];if(tmp&&tmp.name===sName)return getColorSchemeByIdx(i)}return null}function getColorSchemeByIdx(idx){var tmp=AscCommon.g_oUserColorScheme[idx];if(tmp){var scheme=
new AscFormat.ClrScheme,_c;scheme.name=tmp.name;_c=tmp.get_dk1();scheme.colors[8]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt1();scheme.colors[12]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_dk2();scheme.colors[9]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt2();scheme.colors[13]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent1();scheme.colors[0]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent2();scheme.colors[1]=AscFormat.CreateUniColorRGB(_c.r,
_c.g,_c.b);_c=tmp.get_accent3();scheme.colors[2]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent4();scheme.colors[3]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent5();scheme.colors[4]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent6();scheme.colors[5]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_hlink();scheme.colors[11]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_folHlink();scheme.colors[10]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);
return scheme}return null}function getAscColorScheme(_scheme,theme){var elem,_c;var _rgba={R:0,G:0,B:0,A:255};elem=new AscCommon.CAscColorScheme;elem.scheme=_scheme;elem.name=_scheme.name;_scheme.colors[8].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[8].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[12].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[12].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[9].Calculate(theme,null,null,
null,_rgba);_c=_scheme.colors[9].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[13].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[13].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[0].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[0].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[1].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[1].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[2].Calculate(theme,
null,null,null,_rgba);_c=_scheme.colors[2].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[3].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[3].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[4].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[4].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[5].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[5].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));
_scheme.colors[11].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[11].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[10].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[10].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));return elem}function getIndexColorSchemeInArray(result,asc_color_scheme){for(var j=0;j<result.length;++j)if(result[j].isEqual(asc_color_scheme))return j;return-1}function checkAddColorScheme(result,asc_color_scheme,nStartIndex){var nIndex=
if(CPColor)return true===isNumericValue?CPColor.r<<16&16711680|CPColor.g<<8&65280|CPColor.b&255:new CColor(CPColor.r,CPColor.g,CPColor.b,CPColor.a)}catch(e){}if((!userId||""===userId)&&(!userName||""===userName))return new CColor(0,0,0,255);var res;if(g_oUserColorById.hasOwnProperty(userId))res=g_oUserColorById[userId];else if(g_oUserColorById.hasOwnProperty(userName))res=g_oUserColorById[userName];else{var nColor=Asc.c_oAscArrUserColors[g_oUserNextColorIndex%Asc.c_oAscArrUserColors.length];++g_oUserNextColorIndex;
res=g_oUserColorById[userId||userName]=new CUserCacheColor(nColor)}if(!res)return new CColor(0,0,0,255);var oColor=true===isDark?res.Dark:res.Light;return true===isNumericValue?oColor.r<<16&16711680|oColor.g<<8&65280|oColor.b&255:oColor}function isNullOrEmptyString(str){return str==undefined||str==null||str==""}function unleakString(s){return(" "+s).substr(1)}function readValAttr(attr){if(attr()){var val=attr()["val"];return val?val:null}return null}function getNumFromXml(val){return val?val-0:null}
function getColorFromXml(attr){if(attr()){var vals=attr();if(null!=vals["theme"])return AscCommonExcel.g_oColorManager.getThemeColor(getNumFromXml(vals["theme"]),getNumFromXml(vals["tint"]));else if(null!=vals["rgb"])return new AscCommonExcel.RgbColor(16777215&getNumFromXml(vals["rgb"]))}return null}function getBoolFromXml(val){return"0"!==val&&"false"!==val&&"off"!==val}function CUserCacheColor(nColor){this.Light=null;this.Dark=null;this.init(nColor)}CUserCacheColor.prototype.init=function(nColor){var r=
nColor>>16&255;var g=nColor>>8&255;var b=nColor&255;var Y=Math.max(0,Math.min(255,.299*r+.587*g+.114*b));var Cb=Math.max(0,Math.min(255,128-.168736*r-.331264*g+.5*b));var Cr=Math.max(0,Math.min(255,128+.5*r-.418688*g-.081312*b));if(Y>63)Y=63;var R=Math.max(0,Math.min(255,Y+1.402*(Cr-128)))|0;var G=Math.max(0,Math.min(255,Y-.34414*(Cb-128)-.71414*(Cr-128)))|0;var B=Math.max(0,Math.min(255,Y+1.772*(Cb-128)))|0;this.Light=new CColor(r,g,b,255);this.Dark=new CColor(R,G,B,255)};function loadScript(url,
onSuccess,onError){if(window["NATIVE_EDITOR_ENJINE"]===true||window["Native"]!==undefined){onSuccess();return}if(window["AscDesktopEditor"]&&window["local_load_add"]){var _context={"completeLoad":function(){return onSuccess()}};window["local_load_add"](_context,"sdk-all-from-min",url);var _ret_param=window["AscDesktopEditor"]["LoadJS"](url);if(2!=_ret_param)window["local_load_remove"](url);if(_ret_param==1){setTimeout(onSuccess,1);return}else if(_ret_param==2)return}var backoff=new AscCommon.Backoff(AscCommon.g_oBackoffDefaults);
loadScriptWithBackoff(backoff,url,onSuccess,onError)}function loadScriptWithBackoff(backoff,url,onSuccess,onError){var script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=onSuccess;script.onerror=function(){backoff.attempt(onError,function(){loadScriptWithBackoff(backoff,url,onSuccess,onError)})};document.head.appendChild(script)}function loadSdk(sdkName,onSuccess,onError){if(window["AscNotLoadAllScript"])onSuccess();else{var urlArgs=window.parent&&window.parent.APP&&
window.parent.APP.urlArgs||"";loadScript("./../../../../sdkjs/"+sdkName+"/sdk-all.js?"+urlArgs,onSuccess,onError)}}function getAltGr(e){var ctrlKey=e.metaKey||e.ctrlKey;var altKey=e.altKey;return altKey&&(AscBrowser.isMacOs?!ctrlKey:ctrlKey)}function getColorSchemeByName(sName){for(var i=0;i<AscCommon.g_oUserColorScheme.length;++i){var tmp=AscCommon.g_oUserColorScheme[i];if(tmp&&tmp.name===sName)return getColorSchemeByIdx(i)}return null}function getColorSchemeByIdx(idx){var tmp=AscCommon.g_oUserColorScheme[idx];
if(tmp){var scheme=new AscFormat.ClrScheme,_c;scheme.name=tmp.name;_c=tmp.get_dk1();scheme.colors[8]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt1();scheme.colors[12]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_dk2();scheme.colors[9]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt2();scheme.colors[13]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent1();scheme.colors[0]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent2();scheme.colors[1]=
AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent3();scheme.colors[2]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent4();scheme.colors[3]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent5();scheme.colors[4]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent6();scheme.colors[5]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_hlink();scheme.colors[11]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_folHlink();scheme.colors[10]=AscFormat.CreateUniColorRGB(_c.r,
_c.g,_c.b);return scheme}return null}function getAscColorScheme(_scheme,theme){var elem,_c;var _rgba={R:0,G:0,B:0,A:255};elem=new AscCommon.CAscColorScheme;elem.scheme=_scheme;elem.name=_scheme.name;_scheme.colors[8].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[8].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[12].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[12].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[9].Calculate(theme,
null,null,null,_rgba);_c=_scheme.colors[9].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[13].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[13].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[0].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[0].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[1].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[1].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));
_scheme.colors[2].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[2].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[3].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[3].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[4].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[4].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[5].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[5].RGBA;elem.putColor(new AscCommon.CColor(_c.R,
_c.G,_c.B));_scheme.colors[11].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[11].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[10].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[10].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));return elem}function getIndexColorSchemeInArray(result,asc_color_scheme){for(var j=0;j<result.length;++j)if(result[j].isEqual(asc_color_scheme))return j;return-1}function checkAddColorScheme(result,asc_color_scheme,nStartIndex){var nIndex=
getIndexColorSchemeInArray(result,asc_color_scheme);if(nIndex>-1)return nIndex;var nStartIndex_=nStartIndex;if(nStartIndex===null)nStartIndex_=result.length;result.splice(nStartIndex_,0,asc_color_scheme);return nStartIndex_}function isEastAsianScript(value){return 12544<=value&&value<=12591||12704<=value&&value<=12735||19968<=value&&value<=40938||13312<=value&&value<=19893||131072<=value&&value<=173782||173824<=value&&value<=177972||177984<=value&&value<=178205||178208<=value&&value<=183969||183984<=
value&&value<=191456||63744<=value&&value<=64255||194560<=value&&value<=195103||12032<=value&&value<=12255||11904<=value&&value<=12031||12736<=value&&value<=12783||12272<=value&&value<=12287||4352<=value&&value<=4607||43360<=value&&value<=43391||55216<=value&&value<=55295||12592<=value&&value<=12687||65280<=value&&value<=65519||44032<=value&&value<=55215||12352<=value&&value<=12447||110848<=value&&value<=110895||110592<=value&&value<=110847||12688<=value&&value<=12703||12448<=value&&value<=12543||
12784<=value&&value<=12799||42192<=value&&value<=42239||93952<=value&&value<=94111||110960<=value&&value<=111359||94208<=value&&value<=100332||100352<=value&&value<=101119||40960<=value&&value<=42127||42128<=value&&value<=42191}var g_oIdCounter=new CIdCounter;window.Asc.g_signature_drawer=null;function CSignatureDrawer(id,api,w,h){window.Asc.g_signature_drawer=this;this.Api=api;this.CanvasParent=document.getElementById(id);this.Canvas=document.createElement("canvas");this.Canvas.style.position="absolute";

@ -8409,7 +8409,7 @@ oThis.Api.SendOpenProgress()}if(!oThis.bIsLoadDocumentImagesNoByOrder){oThis.ima
oThis._LoadImages()}else if(oThis.nNoByOrderCounter==oThis.images_loading.length){oThis.images_loading=[];oThis._LoadImages()}};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});oThis.loadImageByUrl(oImage.Image,oImage.src);if(!oThis.bIsLoadDocumentImagesNoByOrder)return}};this.LoadImage=function(src,Type){var _image=this.map_image_index[src];if(undefined!=_image)return _image;this.Api.asyncImageStartLoaded();var oImage=new CImage(src);oImage.Type=Type;oImage.Image=
new Image;oImage.Status=ImageLoadStatus.Loading;oThis.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){oImage.Status=ImageLoadStatus.Complete;oThis.Api.asyncImageEndLoaded(oImage)};oImage.Image.onerror=function(){oImage.Image=null;oImage.Status=ImageLoadStatus.Complete;oThis.Api.asyncImageEndLoaded(oImage)};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,oImage.src);return null};this.LoadImageAsync=function(i,
cb){var _id=oThis.images_loading[i];var oImage=new CImage(_id);oImage.Status=ImageLoadStatus.Loading;oImage.Image=new Image;oThis.map_image_index[oImage.src]=oImage;var oThat=oThis;oImage.Image.onload=function(){oImage.Status=ImageLoadStatus.Complete;oThat.Api.asyncImageEndLoadedBackground(oImage)};oImage.Image.onerror=function(){oImage.Status=ImageLoadStatus.Complete;oImage.Image=null;oThat.Api.asyncImageEndLoadedBackground(oImage)};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,
img.src)});console.log("Loading image "+i);console.log(oImage);window.parent.APP.getImageURL(oImage.src,function(url){if(url=="")oThis.loadImageByUrl(oImage.Image,oImage.src);else{oThis.loadImageByUrl(oImage.Image,url);oThis.map_image_index[url]=oImage}if(typeof cb==="function")cb()})};this.LoadImagesWithCallback=function(arr,loadImageCallBack,loadImageCallBackArgs){var arrAsync=[];var i=0;for(i=0;i<arr.length;i++)if(this.map_image_index[arr[i]]===undefined)arrAsync.push(arr[i]);if(arrAsync.length==
img.src)});console.error("Loading image "+i);console.log(oImage);window.parent.APP.getImageURL(oImage.src,function(url){if(url=="")oThis.loadImageByUrl(oImage.Image,oImage.src);else{oThis.loadImageByUrl(oImage.Image,url);oThis.map_image_index[url]=oImage}if(typeof cb==="function")cb()})};this.LoadImagesWithCallback=function(arr,loadImageCallBack,loadImageCallBackArgs){var arrAsync=[];var i=0;for(i=0;i<arr.length;i++)if(this.map_image_index[arr[i]]===undefined)arrAsync.push(arr[i]);if(arrAsync.length==
0){loadImageCallBack.call(this.Api,loadImageCallBackArgs);return}this.loadImageCallBackCounter=0;this.loadImageCallBackCounterMax=arrAsync.length;this.loadImageCallBack=loadImageCallBack;this.loadImageCallBackArgs=loadImageCallBackArgs;for(i=0;i<arrAsync.length;i++){var oImage=new CImage(arrAsync[i]);oImage.Image=new Image;oImage.Image.parentImage=oImage;oImage.Status=ImageLoadStatus.Loading;this.map_image_index[oImage.src]=oImage;oImage.Image.onload=function(){this.parentImage.Status=ImageLoadStatus.Complete;
oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};oImage.Image.onerror=function(){this.parentImage.Image=null;this.parentImage.Status=ImageLoadStatus.Complete;oThis.loadImageCallBackCounter++;if(oThis.loadImageCallBackCounter==oThis.loadImageCallBackCounterMax)oThis.LoadImagesWithCallbackEnd()};AscCommon.backoffOnErrorImg(oImage.Image,function(img){oThis.loadImageByUrl(img,img.src)});this.loadImageByUrl(oImage.Image,
oImage.src)}};this.LoadImagesWithCallbackEnd=function(){this.loadImageCallBack.call(this.Api,this.loadImageCallBackArgs);this.loadImageCallBack=null;this.loadImageCallBackArgs=null;this.loadImageCallBackCounterMax=0;this.loadImageCallBackCounter=0}}var g_flow_anchor=new Image;g_flow_anchor.asc_complete=false;g_flow_anchor.onload=function(){g_flow_anchor.asc_complete=true};g_flow_anchor.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPBAMAAADNDVhEAAAAIVBMVEUAAAANDQ0NDQ0NDQ0NDQ0NDQ0AAAANDQ0NDQ0NDQ0NDQ1jk7YPAAAACnRSTlMAGkD4mb9c5s9TDghpXQAAAFZJREFUCNdjYGBgW8YABlxcIBLBZ1gAEfZa5QWiGRkWMAIpAaA4iHQE0YwODEtANMsChkIwv4BBWQBICyswMC1iWADEDAzKoUuDFUAGNC9uABvIaQkkABpxD6lFb9lRAAAAAElFTkSuQmCC";

@ -779,19 +779,19 @@ true;if(nTTRemainder<=0){sResult=sGroup+sResult;if(nRemValue<=0)break;continue}v
false}else if(!isPrevZero){sGroup+=arrChinese[0];isPrevZero=true}if(nRemainder<=0){sResult=sGroup+sResult;if(nRemValue<=0)break;continue}nQuotient=nRemainder/10|0;nRemainder=nRemainder-nQuotient*10;if(0!==nQuotient){sGroup+=arrChinese[nQuotient]+arrChinese[10];isPrevZero=false}else if(!isPrevZero){sGroup+=arrChinese[0];isPrevZero=true}if(0!==nRemainder)sGroup+=arrChinese[nRemainder];sResult=sGroup+sResult;if(nRemValue<=0)break}break}}return sResult}var c_oAscSpaces=[];c_oAscSpaces[10]=1;c_oAscSpaces[32]=
1;c_oAscSpaces[8194]=1;c_oAscSpaces[8195]=1;c_oAscSpaces[8197]=1;c_oAscSpaces[12288]=1;function IsSpace(nUnicode){return!!c_oAscSpaces[nUnicode]}function private_IsAbbreviation(sWord){if(sWord.toUpperCase()===sWord){for(var nPos=0,nLen=sWord.length;nPos<nLen;++nPos){var nCharCode=sWord.charCodeAt(nPos);if(44032<=nCharCode&&nCharCode<=55203||4352<=nCharCode&&nCharCode<=4607||12592<=nCharCode&&nCharCode<=12687||43360<=nCharCode&&nCharCode<=43391||55216<=nCharCode&&nCharCode<=55295||19968<=nCharCode&&
nCharCode<=40959||13312<=nCharCode&&nCharCode<=19903||131072<=nCharCode&&nCharCode<=173791||173824<=nCharCode&&nCharCode<=177983||177984<=nCharCode&&nCharCode<=178207||178208<=nCharCode&&nCharCode<=183983||63744<=nCharCode&&nCharCode<=64255||194560<=nCharCode&&nCharCode<=195103)return false}return true}return false}var g_oUserColorById={},g_oUserNextColorIndex=0;function getUserColorById(userId,userName,isDark,isNumericValue){if(window.parent.APP&&window.parent.APP.getUserColor)try{var CPColor=window.parent.APP.getUserColor(userId);
if(CPColor)return true===isNumericValue?CPColor.r<<16&16711680|CPColor.g<<8&65280|CPColor.b&255:CPColor}catch(e){}if((!userId||""===userId)&&(!userName||""===userName))return new CColor(0,0,0,255);var res;if(g_oUserColorById.hasOwnProperty(userId))res=g_oUserColorById[userId];else if(g_oUserColorById.hasOwnProperty(userName))res=g_oUserColorById[userName];else{var nColor=Asc.c_oAscArrUserColors[g_oUserNextColorIndex%Asc.c_oAscArrUserColors.length];++g_oUserNextColorIndex;res=g_oUserColorById[userId||
userName]=new CUserCacheColor(nColor)}if(!res)return new CColor(0,0,0,255);var oColor=true===isDark?res.Dark:res.Light;return true===isNumericValue?oColor.r<<16&16711680|oColor.g<<8&65280|oColor.b&255:oColor}function isNullOrEmptyString(str){return str==undefined||str==null||str==""}function unleakString(s){return(" "+s).substr(1)}function readValAttr(attr){if(attr()){var val=attr()["val"];return val?val:null}return null}function getNumFromXml(val){return val?val-0:null}function getColorFromXml(attr){if(attr()){var vals=
attr();if(null!=vals["theme"])return AscCommonExcel.g_oColorManager.getThemeColor(getNumFromXml(vals["theme"]),getNumFromXml(vals["tint"]));else if(null!=vals["rgb"])return new AscCommonExcel.RgbColor(16777215&getNumFromXml(vals["rgb"]))}return null}function getBoolFromXml(val){return"0"!==val&&"false"!==val&&"off"!==val}function CUserCacheColor(nColor){this.Light=null;this.Dark=null;this.init(nColor)}CUserCacheColor.prototype.init=function(nColor){var r=nColor>>16&255;var g=nColor>>8&255;var b=nColor&
255;var Y=Math.max(0,Math.min(255,.299*r+.587*g+.114*b));var Cb=Math.max(0,Math.min(255,128-.168736*r-.331264*g+.5*b));var Cr=Math.max(0,Math.min(255,128+.5*r-.418688*g-.081312*b));if(Y>63)Y=63;var R=Math.max(0,Math.min(255,Y+1.402*(Cr-128)))|0;var G=Math.max(0,Math.min(255,Y-.34414*(Cb-128)-.71414*(Cr-128)))|0;var B=Math.max(0,Math.min(255,Y+1.772*(Cb-128)))|0;this.Light=new CColor(r,g,b,255);this.Dark=new CColor(R,G,B,255)};function loadScript(url,onSuccess,onError){if(window["NATIVE_EDITOR_ENJINE"]===
true||window["Native"]!==undefined){onSuccess();return}if(window["AscDesktopEditor"]&&window["local_load_add"]){var _context={"completeLoad":function(){return onSuccess()}};window["local_load_add"](_context,"sdk-all-from-min",url);var _ret_param=window["AscDesktopEditor"]["LoadJS"](url);if(2!=_ret_param)window["local_load_remove"](url);if(_ret_param==1){setTimeout(onSuccess,1);return}else if(_ret_param==2)return}var backoff=new AscCommon.Backoff(AscCommon.g_oBackoffDefaults);loadScriptWithBackoff(backoff,
url,onSuccess,onError)}function loadScriptWithBackoff(backoff,url,onSuccess,onError){var script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=onSuccess;script.onerror=function(){backoff.attempt(onError,function(){loadScriptWithBackoff(backoff,url,onSuccess,onError)})};document.head.appendChild(script)}function loadSdk(sdkName,onSuccess,onError){if(window["AscNotLoadAllScript"])onSuccess();else{var urlArgs=window.parent&&window.parent.APP&&window.parent.APP.urlArgs||
"";loadScript("./../../../../sdkjs/"+sdkName+"/sdk-all.js?"+urlArgs,onSuccess,onError)}}function getAltGr(e){var ctrlKey=e.metaKey||e.ctrlKey;var altKey=e.altKey;return altKey&&(AscBrowser.isMacOs?!ctrlKey:ctrlKey)}function getColorSchemeByName(sName){for(var i=0;i<AscCommon.g_oUserColorScheme.length;++i){var tmp=AscCommon.g_oUserColorScheme[i];if(tmp&&tmp.name===sName)return getColorSchemeByIdx(i)}return null}function getColorSchemeByIdx(idx){var tmp=AscCommon.g_oUserColorScheme[idx];if(tmp){var scheme=
new AscFormat.ClrScheme,_c;scheme.name=tmp.name;_c=tmp.get_dk1();scheme.colors[8]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt1();scheme.colors[12]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_dk2();scheme.colors[9]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt2();scheme.colors[13]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent1();scheme.colors[0]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent2();scheme.colors[1]=AscFormat.CreateUniColorRGB(_c.r,
_c.g,_c.b);_c=tmp.get_accent3();scheme.colors[2]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent4();scheme.colors[3]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent5();scheme.colors[4]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent6();scheme.colors[5]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_hlink();scheme.colors[11]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_folHlink();scheme.colors[10]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);
return scheme}return null}function getAscColorScheme(_scheme,theme){var elem,_c;var _rgba={R:0,G:0,B:0,A:255};elem=new AscCommon.CAscColorScheme;elem.scheme=_scheme;elem.name=_scheme.name;_scheme.colors[8].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[8].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[12].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[12].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[9].Calculate(theme,null,null,
null,_rgba);_c=_scheme.colors[9].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[13].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[13].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[0].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[0].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[1].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[1].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[2].Calculate(theme,
null,null,null,_rgba);_c=_scheme.colors[2].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[3].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[3].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[4].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[4].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[5].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[5].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));
_scheme.colors[11].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[11].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[10].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[10].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));return elem}function getIndexColorSchemeInArray(result,asc_color_scheme){for(var j=0;j<result.length;++j)if(result[j].isEqual(asc_color_scheme))return j;return-1}function checkAddColorScheme(result,asc_color_scheme,nStartIndex){var nIndex=
if(CPColor)return true===isNumericValue?CPColor.r<<16&16711680|CPColor.g<<8&65280|CPColor.b&255:new CColor(CPColor.r,CPColor.g,CPColor.b,CPColor.a)}catch(e){}if((!userId||""===userId)&&(!userName||""===userName))return new CColor(0,0,0,255);var res;if(g_oUserColorById.hasOwnProperty(userId))res=g_oUserColorById[userId];else if(g_oUserColorById.hasOwnProperty(userName))res=g_oUserColorById[userName];else{var nColor=Asc.c_oAscArrUserColors[g_oUserNextColorIndex%Asc.c_oAscArrUserColors.length];++g_oUserNextColorIndex;
res=g_oUserColorById[userId||userName]=new CUserCacheColor(nColor)}if(!res)return new CColor(0,0,0,255);var oColor=true===isDark?res.Dark:res.Light;return true===isNumericValue?oColor.r<<16&16711680|oColor.g<<8&65280|oColor.b&255:oColor}function isNullOrEmptyString(str){return str==undefined||str==null||str==""}function unleakString(s){return(" "+s).substr(1)}function readValAttr(attr){if(attr()){var val=attr()["val"];return val?val:null}return null}function getNumFromXml(val){return val?val-0:null}
function getColorFromXml(attr){if(attr()){var vals=attr();if(null!=vals["theme"])return AscCommonExcel.g_oColorManager.getThemeColor(getNumFromXml(vals["theme"]),getNumFromXml(vals["tint"]));else if(null!=vals["rgb"])return new AscCommonExcel.RgbColor(16777215&getNumFromXml(vals["rgb"]))}return null}function getBoolFromXml(val){return"0"!==val&&"false"!==val&&"off"!==val}function CUserCacheColor(nColor){this.Light=null;this.Dark=null;this.init(nColor)}CUserCacheColor.prototype.init=function(nColor){var r=
nColor>>16&255;var g=nColor>>8&255;var b=nColor&255;var Y=Math.max(0,Math.min(255,.299*r+.587*g+.114*b));var Cb=Math.max(0,Math.min(255,128-.168736*r-.331264*g+.5*b));var Cr=Math.max(0,Math.min(255,128+.5*r-.418688*g-.081312*b));if(Y>63)Y=63;var R=Math.max(0,Math.min(255,Y+1.402*(Cr-128)))|0;var G=Math.max(0,Math.min(255,Y-.34414*(Cb-128)-.71414*(Cr-128)))|0;var B=Math.max(0,Math.min(255,Y+1.772*(Cb-128)))|0;this.Light=new CColor(r,g,b,255);this.Dark=new CColor(R,G,B,255)};function loadScript(url,
onSuccess,onError){if(window["NATIVE_EDITOR_ENJINE"]===true||window["Native"]!==undefined){onSuccess();return}if(window["AscDesktopEditor"]&&window["local_load_add"]){var _context={"completeLoad":function(){return onSuccess()}};window["local_load_add"](_context,"sdk-all-from-min",url);var _ret_param=window["AscDesktopEditor"]["LoadJS"](url);if(2!=_ret_param)window["local_load_remove"](url);if(_ret_param==1){setTimeout(onSuccess,1);return}else if(_ret_param==2)return}var backoff=new AscCommon.Backoff(AscCommon.g_oBackoffDefaults);
loadScriptWithBackoff(backoff,url,onSuccess,onError)}function loadScriptWithBackoff(backoff,url,onSuccess,onError){var script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=onSuccess;script.onerror=function(){backoff.attempt(onError,function(){loadScriptWithBackoff(backoff,url,onSuccess,onError)})};document.head.appendChild(script)}function loadSdk(sdkName,onSuccess,onError){if(window["AscNotLoadAllScript"])onSuccess();else{var urlArgs=window.parent&&window.parent.APP&&
window.parent.APP.urlArgs||"";loadScript("./../../../../sdkjs/"+sdkName+"/sdk-all.js?"+urlArgs,onSuccess,onError)}}function getAltGr(e){var ctrlKey=e.metaKey||e.ctrlKey;var altKey=e.altKey;return altKey&&(AscBrowser.isMacOs?!ctrlKey:ctrlKey)}function getColorSchemeByName(sName){for(var i=0;i<AscCommon.g_oUserColorScheme.length;++i){var tmp=AscCommon.g_oUserColorScheme[i];if(tmp&&tmp.name===sName)return getColorSchemeByIdx(i)}return null}function getColorSchemeByIdx(idx){var tmp=AscCommon.g_oUserColorScheme[idx];
if(tmp){var scheme=new AscFormat.ClrScheme,_c;scheme.name=tmp.name;_c=tmp.get_dk1();scheme.colors[8]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt1();scheme.colors[12]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_dk2();scheme.colors[9]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_lt2();scheme.colors[13]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent1();scheme.colors[0]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent2();scheme.colors[1]=
AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent3();scheme.colors[2]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent4();scheme.colors[3]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent5();scheme.colors[4]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_accent6();scheme.colors[5]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_hlink();scheme.colors[11]=AscFormat.CreateUniColorRGB(_c.r,_c.g,_c.b);_c=tmp.get_folHlink();scheme.colors[10]=AscFormat.CreateUniColorRGB(_c.r,
_c.g,_c.b);return scheme}return null}function getAscColorScheme(_scheme,theme){var elem,_c;var _rgba={R:0,G:0,B:0,A:255};elem=new AscCommon.CAscColorScheme;elem.scheme=_scheme;elem.name=_scheme.name;_scheme.colors[8].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[8].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[12].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[12].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[9].Calculate(theme,
null,null,null,_rgba);_c=_scheme.colors[9].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[13].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[13].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[0].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[0].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[1].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[1].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));
_scheme.colors[2].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[2].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[3].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[3].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[4].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[4].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[5].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[5].RGBA;elem.putColor(new AscCommon.CColor(_c.R,
_c.G,_c.B));_scheme.colors[11].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[11].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));_scheme.colors[10].Calculate(theme,null,null,null,_rgba);_c=_scheme.colors[10].RGBA;elem.putColor(new AscCommon.CColor(_c.R,_c.G,_c.B));return elem}function getIndexColorSchemeInArray(result,asc_color_scheme){for(var j=0;j<result.length;++j)if(result[j].isEqual(asc_color_scheme))return j;return-1}function checkAddColorScheme(result,asc_color_scheme,nStartIndex){var nIndex=
getIndexColorSchemeInArray(result,asc_color_scheme);if(nIndex>-1)return nIndex;var nStartIndex_=nStartIndex;if(nStartIndex===null)nStartIndex_=result.length;result.splice(nStartIndex_,0,asc_color_scheme);return nStartIndex_}function isEastAsianScript(value){return 12544<=value&&value<=12591||12704<=value&&value<=12735||19968<=value&&value<=40938||13312<=value&&value<=19893||131072<=value&&value<=173782||173824<=value&&value<=177972||177984<=value&&value<=178205||178208<=value&&value<=183969||183984<=
value&&value<=191456||63744<=value&&value<=64255||194560<=value&&value<=195103||12032<=value&&value<=12255||11904<=value&&value<=12031||12736<=value&&value<=12783||12272<=value&&value<=12287||4352<=value&&value<=4607||43360<=value&&value<=43391||55216<=value&&value<=55295||12592<=value&&value<=12687||65280<=value&&value<=65519||44032<=value&&value<=55215||12352<=value&&value<=12447||110848<=value&&value<=110895||110592<=value&&value<=110847||12688<=value&&value<=12703||12448<=value&&value<=12543||
12784<=value&&value<=12799||42192<=value&&value<=42239||93952<=value&&value<=94111||110960<=value&&value<=111359||94208<=value&&value<=100332||100352<=value&&value<=101119||40960<=value&&value<=42127||42128<=value&&value<=42191}var g_oIdCounter=new CIdCounter;window.Asc.g_signature_drawer=null;function CSignatureDrawer(id,api,w,h){window.Asc.g_signature_drawer=this;this.Api=api;this.CanvasParent=document.getElementById(id);this.Canvas=document.createElement("canvas");this.Canvas.style.position="absolute";

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save