Commit cd8c6e37 authored by Oleg Korshul's avatar Oleg Korshul

develop (part) -> hotfix

parent 211bdd79
......@@ -63,7 +63,7 @@ var c_oAscError = Asc.c_oAscError;
AscCommon.g_oIdCounter.m_sUserId = window["AscDesktopEditor"]["CheckUserId"]();
if (_data == "")
{
this.sendEvent("asc_onError", c_oAscError.ID.ConvertationError, c_oAscError.Level.Critical);
this.sendEvent("asc_onError", c_oAscError.ID.ConvertationOpenError, c_oAscError.Level.Critical);
return;
}
......@@ -262,7 +262,7 @@ window["DesktopOfflineAppDocumentEndSave"] = function(error)
window["Asc"]["editor"].LastUserSavedIndex = undefined;
if (2 == error)
window["Asc"]["editor"].sendEvent("asc_onError", c_oAscError.ID.ConvertationError, c_oAscError.Level.NoCritical);
window["Asc"]["editor"].sendEvent("asc_onError", c_oAscError.ID.ConvertationSaveError, c_oAscError.Level.NoCritical);
};
window["Asc"]['spreadsheet_api'].prototype["asc_addImageDrawingObject"] = window["Asc"]['spreadsheet_api'].prototype.asc_addImageDrawingObject;
......
......@@ -313,7 +313,10 @@ function FD_FontDictionary()
// шрифты в массиве this.FD_Ascii_Font_Like_Names - в порядке важности.
this.FD_Ascii_Font_Like_Names = [
["Cambria Math", "Asana Math", "XITS Math", "Latin Modern"],
["OpenSymbol"]
["OpenSymbol"],
["Arial", "Liberation Sans", "Helvetica", "Nimbus Sans L"],
["Times New Roman", "Liberation Serif"],
["Courier New", "Liberation Mono"]
];
this.FD_Ascii_Font_Like_Main = {
"Cambria Math" : 0,
......@@ -322,7 +325,18 @@ function FD_FontDictionary()
"Latin Modern" : 0,
"Symbol" : 1,
"Wingdings" : 1
"Wingdings" : 1,
"Arial" : 2,
"Liberation Sans" : 2,
"Helvetica" : 2,
"Nimbus Sans L" : 2,
"Times New Roman" : 3,
"Liberation Serif" : 3,
"Courier New" : 4,
"Liberation Mono" : 4
};
this.ChangeGlyphsMap = {
......@@ -1154,7 +1168,7 @@ CFontSelect.prototype =
return 1000;
if (g_fontApplication.g_fontDictionary.CheckLikeFonts(this.m_wsFontName, sReqName))
return 2000;
return 1000;
return this.CheckEqualFonts2(sReqName, this.m_wsFontName);
},
......
......@@ -135,6 +135,9 @@
MaxDataSeriesError : -80,
CannotFillRange : -81,
ConvertationOpenError : -82,
ConvertationSaveError : -83,
UserDrop : -100,
Warning : -101,
......@@ -981,6 +984,8 @@
prot['Unknown'] = prot.Unknown;
prot['ConvertationTimeout'] = prot.ConvertationTimeout;
prot['ConvertationError'] = prot.ConvertationError;
prot['ConvertationOpenError'] = prot.ConvertationOpenError;
prot['ConvertationSaveError'] = prot.ConvertationSaveError;
prot['DownloadError'] = prot.DownloadError;
prot['UnexpectedGuid'] = prot.UnexpectedGuid;
prot['Database'] = prot.Database;
......
......@@ -1881,6 +1881,9 @@ function PasteProcessor(api, bUploadImage, bUploadFonts, bNested, pasteInExcel)
this.dScaleKoef = 1;
this.bUseScaleKoef = false;
this.bIsPlainText = false;
this.defaultImgWidth = 50;
this.defaultImgHeight = 50;
this.MsoStyles = {"mso-style-type": 1, "mso-pagination": 1, "mso-line-height-rule": 1, "mso-style-textfill-fill-color": 1, "mso-tab-count": 1,
"tab-stops": 1, "list-style-type": 1, "mso-special-character": 1, "mso-column-break-before": 1, "mso-break-type": 1, "mso-padding-alt": 1, "mso-border-insidev": 1,
......@@ -6019,6 +6022,16 @@ PasteProcessor.prototype =
nWidth = or_sz.Width / g_dKoef_pix_to_mm;
nHeight = or_sz.Height / g_dKoef_pix_to_mm;
}
if(!nWidth)
{
nWidth = this.defaultImgWidth / g_dKoef_pix_to_mm;
}
if(!nHeight)
{
nHeight = this.defaultImgHeight / g_dKoef_pix_to_mm;
}
if(nWidth && nHeight && sSrc)
{
var sSrc = this.oImages[sSrc];
......
......@@ -52,7 +52,7 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentEndLoad = function(_url, _data)
AscCommon.g_oIdCounter.m_sUserId = window["AscDesktopEditor"]["CheckUserId"]();
if (_data == "")
{
this.sendEvent("asc_onError", c_oAscError.ID.ConvertationError, c_oAscError.Level.Critical);
this.sendEvent("asc_onError", c_oAscError.ID.ConvertationOpenError, c_oAscError.Level.Critical);
return;
}
......@@ -199,7 +199,7 @@ window["DesktopOfflineAppDocumentEndSave"] = function(error)
editor.LastUserSavedIndex = undefined;
if (2 == error)
editor.sendEvent("asc_onError", c_oAscError.ID.ConvertationError, c_oAscError.Level.Critical);
editor.sendEvent("asc_onError", c_oAscError.ID.ConvertationSaveError, c_oAscError.Level.Critical);
};
Asc['asc_docs_api'].prototype.asc_DownloadAs = function(typeFile, bIsDownloadEvent)
{
......
......@@ -54,7 +54,7 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentEndLoad = function(_url, _data)
AscCommon.g_oIdCounter.m_sUserId = window["AscDesktopEditor"]["CheckUserId"]();
if (_data == "")
{
this.sendEvent("asc_onError", c_oAscError.ID.ConvertationError, c_oAscError.Level.Critical);
this.sendEvent("asc_onError", c_oAscError.ID.ConvertationOpenError, c_oAscError.Level.Critical);
return;
}
if (AscCommon.c_oSerFormat.Signature !== _data.substring(0, AscCommon.c_oSerFormat.Signature.length))
......@@ -228,7 +228,7 @@ window["DesktopOfflineAppDocumentEndSave"] = function(error)
editor.LastUserSavedIndex = undefined;
if (2 == error)
editor.sendEvent("asc_onError", c_oAscError.ID.ConvertationError, c_oAscError.Level.NoCritical);
editor.sendEvent("asc_onError", c_oAscError.ID.ConvertationSaveError, c_oAscError.Level.NoCritical);
};
Asc['asc_docs_api'].prototype.asc_DownloadAs = function(typeFile, bIsDownloadEvent)
{
......
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