Commit 344d4b03 authored by Alexander.Trofimov's avatar Alexander.Trofimov

IsNeedDefaultFonts в api

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66657 954022d7-b5bf-4e40-9824-e11837661b57
parent a62ddad7
......@@ -170,6 +170,10 @@ baseEditorsApi.prototype.asc_setDocInfo = function(oDocInfo) {
baseEditorsApi.prototype.asc_SetFontsPath = function(path) {
this.FontLoader.fontFilesPath = path;
};
// Просмотр PDF
baseEditorsApi.prototype.isPdfViewer = function() {
return false;
};
// Events
baseEditorsApi.prototype.sendEvent = function() {
};
......@@ -233,6 +237,22 @@ baseEditorsApi.prototype.checkLongActionCallback = function(_callback, _param) {
return true;
}
};
/**
* Функция для загрузчика шрифтов (нужно ли грузить default шрифты). Для Excel всегда возвращаем false
* @returns {boolean}
*/
baseEditorsApi.prototype.IsNeedDefaultFonts = function() {
var res = false;
switch (this.editorId) {
case c_oEditorId.Word:
res = !this.isPdfViewer();
break;
case c_oEditorId.Presentation:
res = true;
break;
}
return res;
};
// Open
baseEditorsApi.prototype.asc_LoadDocument = function(isVersionHistory) {
// Меняем тип состояния (на открытие)
......
......@@ -921,14 +921,6 @@ var editor;
this.sync_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadFont);
};
/**
* Функция для загрузчика шрифтов (нужно ли грузить default шрифты). Для Excel всегда возвращаем false
* @returns {boolean}
*/
spreadsheet_api.prototype.IsNeedDefaultFonts = function() {
return false;
};
spreadsheet_api.prototype._loadFonts = function(fonts, callback) {
if (window["NATIVE_EDITOR_ENJINE"]) {
return callback();
......
......@@ -4238,13 +4238,6 @@ asc_docs_api.prototype.SetUseEmbeddedCutFonts = function(bUse)
this.isUseEmbeddedCutFonts = bUse;
};
asc_docs_api.prototype.IsNeedDefaultFonts = function()
{
if (this.WordControl.m_oLogicDocument != null)
return true;
return false;
};
asc_docs_api.prototype.can_AddHyperlink = function()
{
var bCanAdd = this.WordControl.m_oLogicDocument.Hyperlink_CanAdd();
......
......@@ -342,7 +342,6 @@ asc_docs_api.prototype['ClearFormating'] = asc_docs_api.prototype.ClearFormating
asc_docs_api.prototype['SetDeviceInputHelperId'] = asc_docs_api.prototype.SetDeviceInputHelperId;
asc_docs_api.prototype['asc_setViewMode'] = asc_docs_api.prototype.asc_setViewMode;
asc_docs_api.prototype['SetUseEmbeddedCutFonts'] = asc_docs_api.prototype.SetUseEmbeddedCutFonts;
asc_docs_api.prototype['IsNeedDefaultFonts'] = asc_docs_api.prototype.IsNeedDefaultFonts;
asc_docs_api.prototype['can_AddHyperlink'] = asc_docs_api.prototype.can_AddHyperlink;
asc_docs_api.prototype['add_Hyperlink'] = asc_docs_api.prototype.add_Hyperlink;
asc_docs_api.prototype['sync_HyperlinkClickCallback'] = asc_docs_api.prototype.sync_HyperlinkClickCallback;
......
......@@ -371,7 +371,10 @@ asc.extendClass(asc_docs_api, baseEditorsApi);
asc_docs_api.prototype.sendEvent = function() {
this.asc_fireCallback.apply(this, arguments);
};
// Просмотр PDF
asc_docs_api.prototype.isPdfViewer = function() {
return (null === this.WordControl.m_oLogicDocument);
};
asc_docs_api.prototype.LoadFontsFromServer = function(_fonts)
{
if (undefined === _fonts)
......@@ -6171,13 +6174,6 @@ asc_docs_api.prototype.SetUseEmbeddedCutFonts = function(bUse)
this.isUseEmbeddedCutFonts = bUse;
};
asc_docs_api.prototype.IsNeedDefaultFonts = function()
{
if (this.WordControl.m_oLogicDocument != null)
return true;
return false;
};
asc_docs_api.prototype.OnMouseUp = function(x, y)
{
this.WordControl.onMouseUpExternal(x, y);
......
......@@ -460,7 +460,6 @@ asc_docs_api.prototype['GetSectionInfo'] = asc_docs_api.prototype.GetSectionInfo
asc_docs_api.prototype['add_SectionBreak'] = asc_docs_api.prototype.add_SectionBreak;
asc_docs_api.prototype['asc_setViewMode'] = asc_docs_api.prototype.asc_setViewMode;
asc_docs_api.prototype['SetUseEmbeddedCutFonts'] = asc_docs_api.prototype.SetUseEmbeddedCutFonts;
asc_docs_api.prototype['IsNeedDefaultFonts'] = asc_docs_api.prototype.IsNeedDefaultFonts;
asc_docs_api.prototype['OnMouseUp'] = asc_docs_api.prototype.OnMouseUp;
asc_docs_api.prototype['asyncImageEndLoaded2'] = asc_docs_api.prototype.asyncImageEndLoaded2;
asc_docs_api.prototype['SetDrawImagePlaceParagraph'] = asc_docs_api.prototype.SetDrawImagePlaceParagraph;
......
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