Commit ffc55535 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавил asc_stopSaving и asc_continueSaving для остановки и возобновлении...

Добавил asc_stopSaving и asc_continueSaving для остановки и возобновлении сохранения на время, пока показывается сообщение об уходе со страницы (т.к. при уходе проскакивает таймер автосохранения).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61820 954022d7-b5bf-4e40-9824-e11837661b57
parent a6338271
...@@ -109,7 +109,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -109,7 +109,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.autoSaveGap = 0; // Интервал автосохранения (0 - означает, что автосохранения нет) в милесекундах this.autoSaveGap = 0; // Интервал автосохранения (0 - означает, что автосохранения нет) в милесекундах
this.isAutoSave = false; // Флаг, означает что запущено автосохранение this.isAutoSave = false; // Флаг, означает что запущено автосохранение
this.canSave = true; //Флаг нужен чтобы не происходило сохранение пока не завершится предыдущее сохранение this.canSave = true; // Флаг нужен чтобы не происходило сохранение пока не завершится предыдущее сохранение
this.waitSave = false; // Отложенное сохранение, происходит во время долгих операций
// Режим вставки диаграмм в редакторе документов // Режим вставки диаграмм в редакторе документов
this.isChartEditor = false; this.isChartEditor = false;
...@@ -577,12 +578,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -577,12 +578,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
}; };
spreadsheet_api.prototype.asc_Save = function (isAutoSave) { spreadsheet_api.prototype.asc_Save = function (isAutoSave) {
if (undefined != window['appBridge']) { if (!this.canSave || this.isChartEditor || c_oAscAdvancedOptionsAction.None !== this.advancedOptionsAction
window['appBridge']['dummyCommandSave'] (); // TEST || this.waitSave)
return;
}
if (!this.canSave || this.isChartEditor || c_oAscAdvancedOptionsAction.None !== this.advancedOptionsAction)
return; return;
this.isAutoSave = !!isAutoSave; this.isAutoSave = !!isAutoSave;
...@@ -596,23 +593,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -596,23 +593,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.canSave = false; this.canSave = false;
var t = this; var t = this;
this.CoAuthoringApi.askSaveChanges (function (e) { t.onSaveCallback (e); }); this.CoAuthoringApi.askSaveChanges(function (e) { t.onSaveCallback (e); });
}; };
spreadsheet_api.prototype.asc_Print = function(adjustPrint){ spreadsheet_api.prototype.asc_Print = function (adjustPrint){
if (adjustPrint) this.adjustPrint = adjustPrint ? adjustPrint : new asc_CAdjustPrint();
this.adjustPrint = adjustPrint;
else {
this.adjustPrint = new asc_CAdjustPrint();
}
if (undefined != window['appBridge']) {
this.advancedOptionsAction = c_oAscAdvancedOptionsAction.Save;
window['appBridge']['dummyCommandPrint'] ();
this.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
return;
}
this.asc_DownloadAs(c_oAscFileType.PDF); this.asc_DownloadAs(c_oAscFileType.PDF);
}; };
...@@ -1927,11 +1912,23 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1927,11 +1912,23 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
var t = this; var t = this;
var nState; var nState;
if (false == e["saveLock"]) { if (false == e["saveLock"]) {
if (this.waitSave) {
// Мы не можем в этот момент сохранять, т.к. попали в ситуацию, когда мы залочили сохранение и успели нажать вставку до ответа
// Нужно снять lock с сохранения
this.CoAuthoringApi.onUnSaveLock = function () {
t.canSave = true;
t.isAutoSave = false;
t.lastSaveTime = null;
};
this.CoAuthoringApi.unSaveLock();
return;
}
if (this.isAutoSave) if (this.isAutoSave)
this.asc_StartAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.Save); this.asc_StartAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.Save);
// Принимаем чужие изменения // Принимаем чужие изменения
t.collaborativeEditing.applyChanges(); this.collaborativeEditing.applyChanges();
// Сохраняем файл на сервер // Сохраняем файл на сервер
//this._asc_save(); //this._asc_save();
...@@ -3270,6 +3267,15 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -3270,6 +3267,15 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
} }
}; };
// Other
spreadsheet_api.prototype.asc_stopSaving = function () {
this.waitSave = true;
};
spreadsheet_api.prototype.asc_continueSaving = function () {
this.waitSave = false;
};
// offline mode // offline mode
spreadsheet_api.prototype.offlineModeInit = function() { spreadsheet_api.prototype.offlineModeInit = function() {
...@@ -3898,6 +3904,10 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -3898,6 +3904,10 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
prot["asc_coAuthoringChatGetMessages"] = prot.asc_coAuthoringChatGetMessages; prot["asc_coAuthoringChatGetMessages"] = prot.asc_coAuthoringChatGetMessages;
prot["asc_coAuthoringDisconnect"] = prot.asc_coAuthoringDisconnect; prot["asc_coAuthoringDisconnect"] = prot.asc_coAuthoringDisconnect;
// other
prot["asc_stopSaving"] = prot.asc_stopSaving;
prot["asc_continueSaving"] = prot.asc_continueSaving;
// offline mode // offline mode
prot["asc_openNewDocument"] = prot.asc_openNewDocument; prot["asc_openNewDocument"] = prot.asc_openNewDocument;
......
...@@ -30,6 +30,7 @@ function CErrorData() ...@@ -30,6 +30,7 @@ function CErrorData()
CErrorData.prototype.put_Value = function(v){ this.Value = v; }; CErrorData.prototype.put_Value = function(v){ this.Value = v; };
CErrorData.prototype.get_Value = function() { return this.Value; }; CErrorData.prototype.get_Value = function() { return this.Value; };
/** @constructor */
function asc_docs_api(name) function asc_docs_api(name)
{ {
g_fontApplication.Init(); g_fontApplication.Init();
...@@ -226,7 +227,7 @@ function asc_docs_api(name) ...@@ -226,7 +227,7 @@ function asc_docs_api(name)
asc_docs_api.prototype.asc_GetFontThumbnailsPath = function() asc_docs_api.prototype.asc_GetFontThumbnailsPath = function()
{ {
return "../Common/Images/"; return "../Common/Images/";
} };
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
///////////////////CoAuthoring and Chat api////////////////////////////// ///////////////////CoAuthoring and Chat api//////////////////////////////
...@@ -237,8 +238,8 @@ function CChatMessage(user, message) ...@@ -237,8 +238,8 @@ function CChatMessage(user, message)
this.UserId = (undefined != user_id) ? user_id : null; this.UserId = (undefined != user_id) ? user_id : null;
this.Message = (undefined != message) ? message : null; this.Message = (undefined != message) ? message : null;
} }
CChatMessage.prototype.get_UserId = function() { return this.UserId; } CChatMessage.prototype.get_UserId = function() { return this.UserId; };
CChatMessage.prototype.get_Message = function() { return this.Message; } CChatMessage.prototype.get_Message = function() { return this.Message; };
/* /*
ToDo Register Callback OnCoAuthoringChatReceiveMessage return object CChatMessage (возможно возвращается МАСС�?В CChatMessage со всеми сообщениями) ToDo Register Callback OnCoAuthoringChatReceiveMessage return object CChatMessage (возможно возвращается МАСС�?В CChatMessage со всеми сообщениями)
...@@ -544,12 +545,12 @@ asc_docs_api.prototype.pre_Save = function(_images) ...@@ -544,12 +545,12 @@ asc_docs_api.prototype.pre_Save = function(_images)
this.saveImageMap = _images; this.saveImageMap = _images;
this.WordControl.m_oDrawingDocument.CheckFontNeeds(); this.WordControl.m_oDrawingDocument.CheckFontNeeds();
this.FontLoader.LoadDocumentFonts2(this.WordControl.m_oLogicDocument.Fonts); this.FontLoader.LoadDocumentFonts2(this.WordControl.m_oLogicDocument.Fonts);
} };
asc_docs_api.prototype.sync_CollaborativeChanges = function() asc_docs_api.prototype.sync_CollaborativeChanges = function()
{ {
this.asc_fireCallback("asc_onCollaborativeChanges"); this.asc_fireCallback("asc_onCollaborativeChanges");
} };
// Set CoAuthoring server url // Set CoAuthoring server url
asc_docs_api.prototype._coAuthoringSetServerUrl = function (url) { asc_docs_api.prototype._coAuthoringSetServerUrl = function (url) {
...@@ -607,7 +608,7 @@ asc_docs_api.prototype.syncCollaborativeChanges = function () { ...@@ -607,7 +608,7 @@ asc_docs_api.prototype.syncCollaborativeChanges = function () {
asc_docs_api.prototype.SetCollaborativeMarksShowType = function(Type) asc_docs_api.prototype.SetCollaborativeMarksShowType = function(Type)
{ {
this.CollaborativeMarksShowType = Type; this.CollaborativeMarksShowType = Type;
} };
asc_docs_api.prototype.GetCollaborativeMarksShowType = function(Type) asc_docs_api.prototype.GetCollaborativeMarksShowType = function(Type)
{ {
...@@ -667,11 +668,11 @@ asc_docs_api.prototype.sync_BeginCatchSelectedElements = function() ...@@ -667,11 +668,11 @@ asc_docs_api.prototype.sync_BeginCatchSelectedElements = function()
asc_docs_api.prototype.sync_EndCatchSelectedElements = function() asc_docs_api.prototype.sync_EndCatchSelectedElements = function()
{ {
this.asc_fireCallback("asc_onFocusObject", this.SelectedObjectsStack); this.asc_fireCallback("asc_onFocusObject", this.SelectedObjectsStack);
} };
asc_docs_api.prototype.getSelectedElements = function() asc_docs_api.prototype.getSelectedElements = function()
{ {
return this.SelectedObjectsStack; return this.SelectedObjectsStack;
} };
asc_docs_api.prototype.sync_ChangeLastSelectedElement = function(type, obj) asc_docs_api.prototype.sync_ChangeLastSelectedElement = function(type, obj)
{ {
var oUnkTypeObj = null; var oUnkTypeObj = null;
...@@ -779,10 +780,10 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) ...@@ -779,10 +780,10 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo)
{ {
if(c_DocInfo) if(c_DocInfo)
this.DocInfo = c_DocInfo; this.DocInfo = c_DocInfo;
} };
asc_docs_api.prototype.asc_setLocale = function(val) asc_docs_api.prototype.asc_setLocale = function(val)
{ {
} };
asc_docs_api.prototype.LoadDocument = function(c_DocInfo) asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
{ {
...@@ -858,16 +859,16 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo) ...@@ -858,16 +859,16 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
this.sync_zoomChangeCallback(this.WordControl.m_nZoomValue, this.WordControl.m_nZoomType); this.sync_zoomChangeCallback(this.WordControl.m_nZoomValue, this.WordControl.m_nZoomType);
} }
} };
asc_docs_api.prototype.SetFontsPath = function(path) asc_docs_api.prototype.SetFontsPath = function(path)
{ {
this.FontLoader.fontFilesPath = path; this.FontLoader.fontFilesPath = path;
} };
asc_docs_api.prototype.SetThemesPath = function(path) asc_docs_api.prototype.SetThemesPath = function(path)
{ {
this.ThemeLoader.ThemesUrl = path; this.ThemeLoader.ThemesUrl = path;
} };
asc_docs_api.prototype.CreateCSS = function() asc_docs_api.prototype.CreateCSS = function()
{ {
...@@ -909,7 +910,7 @@ background-position: 0px -48px;\ ...@@ -909,7 +910,7 @@ background-position: 0px -48px;\
background-repeat: no-repeat;\ background-repeat: no-repeat;\
}"; }";
_head.appendChild(style4); _head.appendChild(style4);
} };
asc_docs_api.prototype.CreateComponents = function() asc_docs_api.prototype.CreateComponents = function()
{ {
...@@ -976,24 +977,24 @@ asc_docs_api.prototype.CreateComponents = function() ...@@ -976,24 +977,24 @@ asc_docs_api.prototype.CreateComponents = function()
element.innerHTML = _innerHTML; element.innerHTML = _innerHTML;
} }
} };
asc_docs_api.prototype.InitEditor = function() asc_docs_api.prototype.InitEditor = function()
{ {
this.WordControl.m_oLogicDocument = new CPresentation(this.WordControl.m_oDrawingDocument); this.WordControl.m_oLogicDocument = new CPresentation(this.WordControl.m_oDrawingDocument);
this.WordControl.m_oDrawingDocument.m_oLogicDocument = this.WordControl.m_oLogicDocument; this.WordControl.m_oDrawingDocument.m_oLogicDocument = this.WordControl.m_oLogicDocument;
} };
asc_docs_api.prototype.SetInterfaceDrawImagePlaceShape = function(div_id) asc_docs_api.prototype.SetInterfaceDrawImagePlaceShape = function(div_id)
{ {
this.WordControl.m_oDrawingDocument.InitGuiCanvasShape(div_id); this.WordControl.m_oDrawingDocument.InitGuiCanvasShape(div_id);
} };
asc_docs_api.prototype.SetInterfaceDrawImagePlaceSlide = function(div_id) asc_docs_api.prototype.SetInterfaceDrawImagePlaceSlide = function(div_id)
{ {
this.WordControl.m_oDrawingDocument.InitGuiCanvasSlide(div_id); this.WordControl.m_oDrawingDocument.InitGuiCanvasSlide(div_id);
} };
asc_docs_api.prototype.SetInterfaceDrawImagePlace = function() asc_docs_api.prototype.SetInterfaceDrawImagePlace = function()
{} {};
asc_docs_api.prototype.OpenDocument2 = function(url, gObject) asc_docs_api.prototype.OpenDocument2 = function(url, gObject)
{ {
...@@ -1035,11 +1036,11 @@ asc_docs_api.prototype.OpenDocument2 = function(url, gObject) ...@@ -1035,11 +1036,11 @@ asc_docs_api.prototype.OpenDocument2 = function(url, gObject)
if (window.USER_AGENT_SAFARI_MACOS) if (window.USER_AGENT_SAFARI_MACOS)
setInterval(SafariIntervalFocus, 10); setInterval(SafariIntervalFocus, 10);
} };
asc_docs_api.prototype.get_DocumentName = function() asc_docs_api.prototype.get_DocumentName = function()
{ {
return this.DocumentName; return this.DocumentName;
} };
asc_docs_api.prototype.OfflineAppDocumentStartLoad = function() asc_docs_api.prototype.OfflineAppDocumentStartLoad = function()
{ {
...@@ -1060,7 +1061,7 @@ asc_docs_api.prototype.OfflineAppDocumentStartLoad = function() ...@@ -1060,7 +1061,7 @@ asc_docs_api.prototype.OfflineAppDocumentStartLoad = function()
scriptElem.setAttribute('src',documentUrl + "editor.js"); scriptElem.setAttribute('src',documentUrl + "editor.js");
scriptElem.setAttribute('type','text/javascript'); scriptElem.setAttribute('type','text/javascript');
document.getElementsByTagName('head')[0].appendChild(scriptElem); document.getElementsByTagName('head')[0].appendChild(scriptElem);
} };
asc_docs_api.prototype.OfflineAppDocumentEndLoad = function() asc_docs_api.prototype.OfflineAppDocumentEndLoad = function()
{ {
...@@ -1070,7 +1071,7 @@ asc_docs_api.prototype.OfflineAppDocumentEndLoad = function() ...@@ -1070,7 +1071,7 @@ asc_docs_api.prototype.OfflineAppDocumentEndLoad = function()
editor.OpenDocument2(documentUrl, window["editor_bin"]); editor.OpenDocument2(documentUrl, window["editor_bin"]);
//callback //callback
editor.DocumentOrientation = (null == editor.WordControl.m_oLogicDocument) ? true : !editor.WordControl.m_oLogicDocument.Orientation; editor.DocumentOrientation = (null == editor.WordControl.m_oLogicDocument) ? true : !editor.WordControl.m_oLogicDocument.Orientation;
} };
// Callbacks // Callbacks
/* все имена callback'оф начинаются с On. Пока сделаны: /* все имена callback'оф начинаются с On. Пока сделаны:
OnBold, OnBold,
...@@ -1100,7 +1101,7 @@ asc_docs_api.prototype.asc_registerCallback = function(name, callback) { ...@@ -1100,7 +1101,7 @@ asc_docs_api.prototype.asc_registerCallback = function(name, callback) {
if (!_callbacks.hasOwnProperty(name)) if (!_callbacks.hasOwnProperty(name))
_callbacks[name] = [] _callbacks[name] = []
_callbacks[name].push(callback); _callbacks[name].push(callback);
} };
asc_docs_api.prototype.asc_unregisterCallback = function(name, callback) { asc_docs_api.prototype.asc_unregisterCallback = function(name, callback) {
if (_callbacks.hasOwnProperty(name)) { if (_callbacks.hasOwnProperty(name)) {
...@@ -1111,7 +1112,7 @@ asc_docs_api.prototype.asc_unregisterCallback = function(name, callback) { ...@@ -1111,7 +1112,7 @@ asc_docs_api.prototype.asc_unregisterCallback = function(name, callback) {
} }
_callbacks[name] = [] _callbacks[name] = []
_callbacks[name].push(callback); _callbacks[name].push(callback);
} };
asc_docs_api.prototype.asc_fireCallback = function(name) asc_docs_api.prototype.asc_fireCallback = function(name)
{ {
...@@ -1124,14 +1125,14 @@ asc_docs_api.prototype.asc_fireCallback = function(name) ...@@ -1124,14 +1125,14 @@ asc_docs_api.prototype.asc_fireCallback = function(name)
return true; return true;
} }
return false; return false;
} };
asc_docs_api.prototype.asc_checkNeedCallback = function(name) { asc_docs_api.prototype.asc_checkNeedCallback = function(name) {
if (_callbacks.hasOwnProperty(name)) if (_callbacks.hasOwnProperty(name))
{ {
return true; return true;
} }
return false; return false;
} };
// get functions // get functions
asc_docs_api.prototype.get_TextProps = function() asc_docs_api.prototype.get_TextProps = function()
...@@ -1142,7 +1143,7 @@ asc_docs_api.prototype.get_TextProps = function() ...@@ -1142,7 +1143,7 @@ asc_docs_api.prototype.get_TextProps = function()
// return { ParaPr: ParaPr, TextPr : TextPr }; // return { ParaPr: ParaPr, TextPr : TextPr };
return new CParagraphAndTextProp (ParaPr, TextPr); // uncomment if this method will be used externally. 20/03/2012 uncommented for testers return new CParagraphAndTextProp (ParaPr, TextPr); // uncomment if this method will be used externally. 20/03/2012 uncommented for testers
} };
// ------- // -------
// тут методы, замены евентов // тут методы, замены евентов
...@@ -1150,11 +1151,11 @@ asc_docs_api.prototype.get_PropertyEditorShapes = function() ...@@ -1150,11 +1151,11 @@ asc_docs_api.prototype.get_PropertyEditorShapes = function()
{ {
var ret = [g_oAutoShapesGroups, g_oAutoShapesTypes]; var ret = [g_oAutoShapesGroups, g_oAutoShapesTypes];
return ret; return ret;
} };
asc_docs_api.prototype.get_PropertyEditorFonts = function() asc_docs_api.prototype.get_PropertyEditorFonts = function()
{ {
return this._gui_fonts; return this._gui_fonts;
} };
asc_docs_api.prototype.get_PropertyStandartTextures = function() asc_docs_api.prototype.get_PropertyStandartTextures = function()
{ {
var _count = g_oUserTexturePresets.length; var _count = g_oUserTexturePresets.length;
...@@ -1166,12 +1167,12 @@ asc_docs_api.prototype.get_PropertyStandartTextures = function() ...@@ -1166,12 +1167,12 @@ asc_docs_api.prototype.get_PropertyStandartTextures = function()
arr[i].Image = g_oUserTexturePresets[i]; arr[i].Image = g_oUserTexturePresets[i];
} }
return arr; return arr;
} };
asc_docs_api.prototype.get_PropertyEditorThemes = function() asc_docs_api.prototype.get_PropertyEditorThemes = function()
{ {
var ret = [this._gui_editor_themes, this._gui_document_themes]; var ret = [this._gui_editor_themes, this._gui_document_themes];
return ret; return ret;
} };
// ------- // -------
...@@ -1179,7 +1180,7 @@ asc_docs_api.prototype.get_PropertyEditorThemes = function() ...@@ -1179,7 +1180,7 @@ asc_docs_api.prototype.get_PropertyEditorThemes = function()
asc_docs_api.prototype.get_ContentCount = function() asc_docs_api.prototype.get_ContentCount = function()
{ {
return this.WordControl.m_oLogicDocument.Content.length; return this.WordControl.m_oLogicDocument.Content.length;
} };
asc_docs_api.prototype.select_Element = function(Index) asc_docs_api.prototype.select_Element = function(Index)
{ {
...@@ -1203,7 +1204,7 @@ asc_docs_api.prototype.select_Element = function(Index) ...@@ -1203,7 +1204,7 @@ asc_docs_api.prototype.select_Element = function(Index)
Document.Content[Index].Selection.EndPos = Document.Content[Index].Content.length - 1; Document.Content[Index].Selection.EndPos = Document.Content[Index].Content.length - 1;
Document.Selection_Draw(); Document.Selection_Draw();
} };
asc_docs_api.prototype.UpdateTextPr = function(TextPr) asc_docs_api.prototype.UpdateTextPr = function(TextPr)
{ {
...@@ -1255,37 +1256,37 @@ asc_docs_api.prototype.UpdateTextPr = function(TextPr) ...@@ -1255,37 +1256,37 @@ asc_docs_api.prototype.UpdateTextPr = function(TextPr)
this.sync_TextColor2(TextPr.Unifill); this.sync_TextColor2(TextPr.Unifill);
} }
} }
} };
asc_docs_api.prototype.sync_TextSpacing = function(Spacing) asc_docs_api.prototype.sync_TextSpacing = function(Spacing)
{ {
this.asc_fireCallback("asc_onTextSpacing", Spacing ); this.asc_fireCallback("asc_onTextSpacing", Spacing );
} };
asc_docs_api.prototype.sync_TextDStrikeout = function(Value) asc_docs_api.prototype.sync_TextDStrikeout = function(Value)
{ {
this.asc_fireCallback("asc_onTextDStrikeout", Value ); this.asc_fireCallback("asc_onTextDStrikeout", Value );
} };
asc_docs_api.prototype.sync_TextCaps = function(Value) asc_docs_api.prototype.sync_TextCaps = function(Value)
{ {
this.asc_fireCallback("asc_onTextCaps", Value ); this.asc_fireCallback("asc_onTextCaps", Value );
} };
asc_docs_api.prototype.sync_TextSmallCaps = function(Value) asc_docs_api.prototype.sync_TextSmallCaps = function(Value)
{ {
this.asc_fireCallback("asc_onTextSmallCaps", Value ); this.asc_fireCallback("asc_onTextSmallCaps", Value );
} };
asc_docs_api.prototype.sync_TextPosition = function(Value) asc_docs_api.prototype.sync_TextPosition = function(Value)
{ {
this.asc_fireCallback("asc_onTextPosition", Value ); this.asc_fireCallback("asc_onTextPosition", Value );
} };
asc_docs_api.prototype.sync_TextLangCallBack = function(Lang) asc_docs_api.prototype.sync_TextLangCallBack = function(Lang)
{ {
this.asc_fireCallback("asc_onTextLanguage", Lang.Val ); this.asc_fireCallback("asc_onTextLanguage", Lang.Val );
} };
asc_docs_api.prototype.sync_VerticalTextAlign = function(align) asc_docs_api.prototype.sync_VerticalTextAlign = function(align)
{ {
this.asc_fireCallback("asc_onVerticalTextAlign", align); this.asc_fireCallback("asc_onVerticalTextAlign", align);
} };
asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr, bParaPr){ asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr, bParaPr){
...@@ -1388,7 +1389,7 @@ asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr, bParaPr){ ...@@ -1388,7 +1389,7 @@ asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr, bParaPr){
this.sync_ListType(ParaPr.ListType); this.sync_ListType(ParaPr.ListType);
if(!(bParaPr === true)) if(!(bParaPr === true))
this.sync_PrPropCallback(ParaPr); this.sync_PrPropCallback(ParaPr);
} };
/*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/
/*functions for working with clipboard, document*/ /*functions for working with clipboard, document*/
/*TODO: Print,Undo,Redo,Copy,Cut,Paste,Share,Save,DownloadAs,ReturnToDocuments(вернуться на предыдущую страницу) & callbacks for these functions*/ /*TODO: Print,Undo,Redo,Copy,Cut,Paste,Share,Save,DownloadAs,ReturnToDocuments(вернуться на предыдущую страницу) & callbacks for these functions*/
...@@ -1399,22 +1400,22 @@ asc_docs_api.prototype.asc_Print = function(){ ...@@ -1399,22 +1400,22 @@ asc_docs_api.prototype.asc_Print = function(){
if(null != incomeObject && "save" == incomeObject["type"]) if(null != incomeObject && "save" == incomeObject["type"])
editor.processSavedFile(incomeObject["data"], false); editor.processSavedFile(incomeObject["data"], false);
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Print);}, true); editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Print);}, true);
} };
asc_docs_api.prototype.Undo = function(){ asc_docs_api.prototype.Undo = function(){
this.WordControl.m_oLogicDocument.Document_Undo(); this.WordControl.m_oLogicDocument.Document_Undo();
} };
asc_docs_api.prototype.Redo = function(){ asc_docs_api.prototype.Redo = function(){
this.WordControl.m_oLogicDocument.Document_Redo(); this.WordControl.m_oLogicDocument.Document_Redo();
} };
asc_docs_api.prototype.Copy = function(){ asc_docs_api.prototype.Copy = function(){
return Editor_Copy_Button(this); return Editor_Copy_Button(this);
} };
asc_docs_api.prototype.Update_ParaTab = function(Default_Tab, ParaTabs){ asc_docs_api.prototype.Update_ParaTab = function(Default_Tab, ParaTabs){
this.WordControl.m_oDrawingDocument.Update_ParaTab(Default_Tab, ParaTabs); this.WordControl.m_oDrawingDocument.Update_ParaTab(Default_Tab, ParaTabs);
} };
asc_docs_api.prototype.Cut = function(){ asc_docs_api.prototype.Cut = function(){
return Editor_Copy_Button(this, true) return Editor_Copy_Button(this, true)
} };
asc_docs_api.prototype.Paste = function(){ asc_docs_api.prototype.Paste = function(){
if (false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props)) if (false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props))
{ {
...@@ -1444,6 +1445,15 @@ asc_docs_api.prototype.Share = function(){ ...@@ -1444,6 +1445,15 @@ asc_docs_api.prototype.Share = function(){
function OnSave_Callback(e) { function OnSave_Callback(e) {
if (false == e["saveLock"]) { if (false == e["saveLock"]) {
if (editor.waitSave) {
// Мы не можем в этот момент сохранять, т.к. попали в ситуацию, когда мы залочили сохранение и успели нажать вставку до ответа
// Нужно снять lock с сохранения
editor.CoAuthoringApi.onUnSaveLock = function () {
editor.canSave = true;
};
editor.CoAuthoringApi.unSaveLock();
return;
}
editor.sync_StartAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.Save); editor.sync_StartAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.Save);
if (c_oAscCollaborativeMarksShowType.LastChanges === editor.CollaborativeMarksShowType) if (c_oAscCollaborativeMarksShowType.LastChanges === editor.CollaborativeMarksShowType)
...@@ -1480,7 +1490,7 @@ function OnSave_Callback(e) { ...@@ -1480,7 +1490,7 @@ function OnSave_Callback(e) {
} }
asc_docs_api.prototype.asc_Save = function () { asc_docs_api.prototype.asc_Save = function () {
// waitSave - означает, что сейчас происходит вставка данных и сохранять до окончания нельзя // waitSave - означает, что сейчас происходит вставка данных или какая-то операция и сохранять до окончания нельзя
if (false === this.waitSave && true === this.canSave) if (false === this.waitSave && true === this.canSave)
{ {
this.canSave = false; this.canSave = false;
...@@ -1510,10 +1520,10 @@ asc_docs_api.prototype.Resize = function(){ ...@@ -1510,10 +1520,10 @@ asc_docs_api.prototype.Resize = function(){
}; };
asc_docs_api.prototype.AddURL = function(url){ asc_docs_api.prototype.AddURL = function(url){
} };
asc_docs_api.prototype.Help = function(){ asc_docs_api.prototype.Help = function(){
} };
asc_docs_api.prototype.ClearCache = function(){ asc_docs_api.prototype.ClearCache = function(){
var rData = { var rData = {
"id":documentId, "id":documentId,
...@@ -1523,7 +1533,7 @@ asc_docs_api.prototype.ClearCache = function(){ ...@@ -1523,7 +1533,7 @@ asc_docs_api.prototype.ClearCache = function(){
"c":"cc"}; "c":"cc"};
sendCommand(editor, function(){}, rData); sendCommand(editor, function(){}, rData);
} };
asc_docs_api.prototype.startGetDocInfo = function(){ asc_docs_api.prototype.startGetDocInfo = function(){
/* /*
Возвращаем объект следующего вида: Возвращаем объект следующего вида:
...@@ -1538,31 +1548,31 @@ asc_docs_api.prototype.startGetDocInfo = function(){ ...@@ -1538,31 +1548,31 @@ asc_docs_api.prototype.startGetDocInfo = function(){
this.sync_GetDocInfoStartCallback(); this.sync_GetDocInfoStartCallback();
this.WordControl.m_oLogicDocument.Statistics_Start(); this.WordControl.m_oLogicDocument.Statistics_Start();
} };
asc_docs_api.prototype.stopGetDocInfo = function(){ asc_docs_api.prototype.stopGetDocInfo = function(){
this.sync_GetDocInfoStopCallback(); this.sync_GetDocInfoStopCallback();
this.WordControl.m_oLogicDocument.Statistics_Stop(); this.WordControl.m_oLogicDocument.Statistics_Stop();
} };
asc_docs_api.prototype.sync_DocInfoCallback = function(obj){ asc_docs_api.prototype.sync_DocInfoCallback = function(obj){
this.asc_fireCallback( "asc_onDocInfo", new CDocInfoProp(obj)); this.asc_fireCallback( "asc_onDocInfo", new CDocInfoProp(obj));
} };
asc_docs_api.prototype.sync_GetDocInfoStartCallback = function(){ asc_docs_api.prototype.sync_GetDocInfoStartCallback = function(){
this.asc_fireCallback("asc_onGetDocInfoStart"); this.asc_fireCallback("asc_onGetDocInfoStart");
} };
asc_docs_api.prototype.sync_GetDocInfoStopCallback = function(){ asc_docs_api.prototype.sync_GetDocInfoStopCallback = function(){
this.asc_fireCallback("asc_onGetDocInfoStop"); this.asc_fireCallback("asc_onGetDocInfoStop");
} };
asc_docs_api.prototype.sync_GetDocInfoEndCallback = function(){ asc_docs_api.prototype.sync_GetDocInfoEndCallback = function(){
this.asc_fireCallback("asc_onGetDocInfoEnd"); this.asc_fireCallback("asc_onGetDocInfoEnd");
} };
asc_docs_api.prototype.sync_CanUndoCallback = function(bCanUndo) asc_docs_api.prototype.sync_CanUndoCallback = function(bCanUndo)
{ {
this.asc_fireCallback("asc_onCanUndo", bCanUndo); this.asc_fireCallback("asc_onCanUndo", bCanUndo);
} };
asc_docs_api.prototype.sync_CanRedoCallback = function(bCanRedo) asc_docs_api.prototype.sync_CanRedoCallback = function(bCanRedo)
{ {
this.asc_fireCallback("asc_onCanRedo", bCanRedo); this.asc_fireCallback("asc_onCanRedo", bCanRedo);
} };
/*callbacks*/ /*callbacks*/
...@@ -1571,31 +1581,31 @@ asc_docs_api.prototype.sync_CanRedoCallback = function(bCanRedo) ...@@ -1571,31 +1581,31 @@ asc_docs_api.prototype.sync_CanRedoCallback = function(bCanRedo)
}*/ }*/
asc_docs_api.prototype.sync_PrintCallBack = function(){ asc_docs_api.prototype.sync_PrintCallBack = function(){
this.asc_fireCallback("asc_onPrint"); this.asc_fireCallback("asc_onPrint");
} };
asc_docs_api.prototype.sync_UndoCallBack = function(){ asc_docs_api.prototype.sync_UndoCallBack = function(){
this.asc_fireCallback("asc_onUndo"); this.asc_fireCallback("asc_onUndo");
} };
asc_docs_api.prototype.sync_RedoCallBack = function(){ asc_docs_api.prototype.sync_RedoCallBack = function(){
this.asc_fireCallback("asc_onRedo"); this.asc_fireCallback("asc_onRedo");
} };
asc_docs_api.prototype.sync_CopyCallBack = function(){ asc_docs_api.prototype.sync_CopyCallBack = function(){
this.asc_fireCallback("asc_onCopy"); this.asc_fireCallback("asc_onCopy");
} };
asc_docs_api.prototype.sync_CutCallBack = function(){ asc_docs_api.prototype.sync_CutCallBack = function(){
this.asc_fireCallback("asc_onCut"); this.asc_fireCallback("asc_onCut");
} };
asc_docs_api.prototype.sync_PasteCallBack = function(){ asc_docs_api.prototype.sync_PasteCallBack = function(){
this.asc_fireCallback("asc_onPaste"); this.asc_fireCallback("asc_onPaste");
} };
asc_docs_api.prototype.sync_ShareCallBack = function(){ asc_docs_api.prototype.sync_ShareCallBack = function(){
this.asc_fireCallback("asc_onShare"); this.asc_fireCallback("asc_onShare");
} };
asc_docs_api.prototype.sync_SaveCallBack = function(){ asc_docs_api.prototype.sync_SaveCallBack = function(){
this.asc_fireCallback("asc_onSave"); this.asc_fireCallback("asc_onSave");
} };
asc_docs_api.prototype.sync_DownloadAsCallBack = function(){ asc_docs_api.prototype.sync_DownloadAsCallBack = function(){
this.asc_fireCallback("asc_onDownload"); this.asc_fireCallback("asc_onDownload");
} };
asc_docs_api.prototype.sync_StartAction = function(type, id){ asc_docs_api.prototype.sync_StartAction = function(type, id){
//this.AsyncAction //this.AsyncAction
this.asc_fireCallback("asc_onStartAction", type, id); this.asc_fireCallback("asc_onStartAction", type, id);
...@@ -1603,47 +1613,47 @@ asc_docs_api.prototype.sync_StartAction = function(type, id){ ...@@ -1603,47 +1613,47 @@ asc_docs_api.prototype.sync_StartAction = function(type, id){
// по идее нужен счетчик, но перед выпуском делаем верняк // по идее нужен счетчик, но перед выпуском делаем верняк
if (c_oAscAsyncActionType.BlockInteraction == type) if (c_oAscAsyncActionType.BlockInteraction == type)
this.IsLongIteration = true; this.IsLongIteration = true;
} };
asc_docs_api.prototype.sync_EndAction = function(type, id){ asc_docs_api.prototype.sync_EndAction = function(type, id){
//this.AsyncAction //this.AsyncAction
this.asc_fireCallback("asc_onEndAction", type, id); this.asc_fireCallback("asc_onEndAction", type, id);
if (c_oAscAsyncActionType.BlockInteraction == type) if (c_oAscAsyncActionType.BlockInteraction == type)
this.IsLongIteration = false; this.IsLongIteration = false;
} };
asc_docs_api.prototype.sync_AddURLCallback = function(){ asc_docs_api.prototype.sync_AddURLCallback = function(){
this.asc_fireCallback("asc_onAddURL"); this.asc_fireCallback("asc_onAddURL");
} };
asc_docs_api.prototype.sync_ErrorCallback = function(errorID,errorLevel){ asc_docs_api.prototype.sync_ErrorCallback = function(errorID,errorLevel){
this.asc_fireCallback("asc_onError",errorID,errorLevel); this.asc_fireCallback("asc_onError",errorID,errorLevel);
} };
asc_docs_api.prototype.sync_HelpCallback = function(url){ asc_docs_api.prototype.sync_HelpCallback = function(url){
this.asc_fireCallback("asc_onHelp",url); this.asc_fireCallback("asc_onHelp",url);
} };
asc_docs_api.prototype.sync_UpdateZoom = function(zoom){ asc_docs_api.prototype.sync_UpdateZoom = function(zoom){
this.asc_fireCallback("asc_onZoom", zoom); this.asc_fireCallback("asc_onZoom", zoom);
} };
asc_docs_api.prototype.sync_StatusMessage = function(message){ asc_docs_api.prototype.sync_StatusMessage = function(message){
this.asc_fireCallback("asc_onMessage", message); this.asc_fireCallback("asc_onMessage", message);
} };
asc_docs_api.prototype.ClearPropObjCallback = function(prop){//колбэк предшествующий приходу свойств объекта, prop а всякий случай asc_docs_api.prototype.ClearPropObjCallback = function(prop){//колбэк предшествующий приходу свойств объекта, prop а всякий случай
this.asc_fireCallback("asc_onClearPropObj", prop); this.asc_fireCallback("asc_onClearPropObj", prop);
} };
asc_docs_api.prototype.CollectHeaders = function(){ asc_docs_api.prototype.CollectHeaders = function(){
this.sync_ReturnHeadersCallback(_fakeHeaders); this.sync_ReturnHeadersCallback(_fakeHeaders);
} };
asc_docs_api.prototype.GetActiveHeader = function(){ asc_docs_api.prototype.GetActiveHeader = function(){
} };
asc_docs_api.prototype.gotoHeader = function(page, X, Y){ asc_docs_api.prototype.gotoHeader = function(page, X, Y){
this.goToPage(page); this.goToPage(page);
} };
asc_docs_api.prototype.sync_ChangeActiveHeaderCallback = function (position, header){ asc_docs_api.prototype.sync_ChangeActiveHeaderCallback = function (position, header){
this.asc_fireCallback("asc_onChangeActiveHeader", position, new CHeader (header)); this.asc_fireCallback("asc_onChangeActiveHeader", position, new CHeader (header));
} };
asc_docs_api.prototype.sync_ReturnHeadersCallback = function (headers){ asc_docs_api.prototype.sync_ReturnHeadersCallback = function (headers){
var _headers = []; var _headers = [];
for (var i = 0; i < headers.length; i++) for (var i = 0; i < headers.length; i++)
...@@ -1652,7 +1662,7 @@ asc_docs_api.prototype.sync_ReturnHeadersCallback = function (headers){ ...@@ -1652,7 +1662,7 @@ asc_docs_api.prototype.sync_ReturnHeadersCallback = function (headers){
} }
this.asc_fireCallback("asc_onReturnHeaders", _headers); this.asc_fireCallback("asc_onReturnHeaders", _headers);
} };
/*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/
/*functions for working with search*/ /*functions for working with search*/
/* /*
...@@ -1672,24 +1682,24 @@ asc_docs_api.prototype.startSearchText = function(what){// "what" means word(s) ...@@ -1672,24 +1682,24 @@ asc_docs_api.prototype.startSearchText = function(what){// "what" means word(s)
this.WordControl.m_oLogicDocument.Search_Start(what); this.WordControl.m_oLogicDocument.Search_Start(what);
else else
this.WordControl.m_oDrawingDocument.m_oDocumentRenderer.StartSearch(what); this.WordControl.m_oDrawingDocument.m_oDocumentRenderer.StartSearch(what);
} };
asc_docs_api.prototype.goToNextSearchResult = function() asc_docs_api.prototype.goToNextSearchResult = function()
{ {
this.WordControl.m_oLogicDocument.goToNextSearchResult(); this.WordControl.m_oLogicDocument.goToNextSearchResult();
} };
asc_docs_api.prototype.gotoSearchResultText = function(navigator){//переход к результату. asc_docs_api.prototype.gotoSearchResultText = function(navigator){//переход к результату.
this.WordControl.m_oDrawingDocument.CurrentSearchNavi = navigator; this.WordControl.m_oDrawingDocument.CurrentSearchNavi = navigator;
this.WordControl.ToSearchResult(); this.WordControl.ToSearchResult();
} };
asc_docs_api.prototype.stopSearchText = function(){ asc_docs_api.prototype.stopSearchText = function(){
this.sync_SearchStopCallback(); this.sync_SearchStopCallback();
this.WordControl.m_oLogicDocument.Search_Stop(); this.WordControl.m_oLogicDocument.Search_Stop();
} };
asc_docs_api.prototype.findText = function(text, isNext){ asc_docs_api.prototype.findText = function(text, isNext){
var SearchEngine = editor.WordControl.m_oLogicDocument.Search(text, {MatchCase: false}); var SearchEngine = editor.WordControl.m_oLogicDocument.Search(text, {MatchCase: false});
...@@ -1702,30 +1712,30 @@ asc_docs_api.prototype.findText = function(text, isNext){ ...@@ -1702,30 +1712,30 @@ asc_docs_api.prototype.findText = function(text, isNext){
return SearchEngine.Count; return SearchEngine.Count;
//return this.WordControl.m_oLogicDocument.findText(text, scanForward); //return this.WordControl.m_oLogicDocument.findText(text, scanForward);
} };
asc_docs_api.prototype.asc_searchEnabled = function(bIsEnabled) asc_docs_api.prototype.asc_searchEnabled = function(bIsEnabled)
{ {
// пустой метод // пустой метод
} };
asc_docs_api.prototype.asc_findText = function(text, isNext, isMatchCase) asc_docs_api.prototype.asc_findText = function(text, isNext, isMatchCase)
{ {
return this.WordControl.m_oLogicDocument.findText(text, isNext === true); return this.WordControl.m_oLogicDocument.findText(text, isNext === true);
} };
// returns: CSearchResult // returns: CSearchResult
asc_docs_api.prototype.sync_SearchFoundCallback = function(obj){ asc_docs_api.prototype.sync_SearchFoundCallback = function(obj){
this.asc_fireCallback("asc_onSearchFound", new CSearchResult(obj)); this.asc_fireCallback("asc_onSearchFound", new CSearchResult(obj));
} };
asc_docs_api.prototype.sync_SearchStartCallback = function(){ asc_docs_api.prototype.sync_SearchStartCallback = function(){
this.asc_fireCallback("asc_onSearchStart"); this.asc_fireCallback("asc_onSearchStart");
} };
asc_docs_api.prototype.sync_SearchStopCallback = function(){ asc_docs_api.prototype.sync_SearchStopCallback = function(){
this.asc_fireCallback("asc_onSearchStop"); this.asc_fireCallback("asc_onSearchStop");
} };
asc_docs_api.prototype.sync_SearchEndCallback = function(){ asc_docs_api.prototype.sync_SearchEndCallback = function(){
this.asc_fireCallback("asc_onSearchEnd"); this.asc_fireCallback("asc_onSearchEnd");
} };
/*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/
/*functions for working with font*/ /*functions for working with font*/
/*setters*/ /*setters*/
...@@ -1739,37 +1749,37 @@ asc_docs_api.prototype.put_TextPrFontName = function(name) ...@@ -1739,37 +1749,37 @@ asc_docs_api.prototype.put_TextPrFontName = function(name)
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrFontName); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrFontName);
this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { FontFamily : { Name : fontinfo.Name , Index : -1 } } ) ); this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { FontFamily : { Name : fontinfo.Name , Index : -1 } } ) );
} }
} };
asc_docs_api.prototype.put_TextPrFontSize = function(size) asc_docs_api.prototype.put_TextPrFontSize = function(size)
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrFontSize); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrFontSize);
this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { FontSize : Math.min(size, 100) } ) ); this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { FontSize : Math.min(size, 100) } ) );
} };
asc_docs_api.prototype.put_TextPrBold = function(value) asc_docs_api.prototype.put_TextPrBold = function(value)
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrBold); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrBold);
this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Bold : value } ) ); this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Bold : value } ) );
} };
asc_docs_api.prototype.put_TextPrItalic = function(value) asc_docs_api.prototype.put_TextPrItalic = function(value)
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrItalic); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrItalic);
this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Italic : value } ) ); this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Italic : value } ) );
} };
asc_docs_api.prototype.put_TextPrUnderline = function(value) asc_docs_api.prototype.put_TextPrUnderline = function(value)
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrUnderline); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrUnderline);
this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Underline : value } ) ); this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Underline : value } ) );
} };
asc_docs_api.prototype.put_TextPrStrikeout = function(value) asc_docs_api.prototype.put_TextPrStrikeout = function(value)
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrStrikeout); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrStrikeout);
this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Strikeout : value } ) ); this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Strikeout : value } ) );
} };
asc_docs_api.prototype.put_PrLineSpacing = function(Type, Value) asc_docs_api.prototype.put_PrLineSpacing = function(Type, Value)
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrLineSpacing); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrLineSpacing);
this.WordControl.m_oLogicDocument.Set_ParagraphSpacing( { LineRule : Type, Line : Value } ); this.WordControl.m_oLogicDocument.Set_ParagraphSpacing( { LineRule : Type, Line : Value } );
} };
asc_docs_api.prototype.put_LineSpacingBeforeAfter = function(type,value)//"type == 0" means "Before", "type == 1" means "After" asc_docs_api.prototype.put_LineSpacingBeforeAfter = function(type,value)//"type == 0" means "Before", "type == 1" means "After"
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrSpacingBeforeAfter); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrSpacingBeforeAfter);
...@@ -1780,60 +1790,60 @@ asc_docs_api.prototype.put_LineSpacingBeforeAfter = function(type,value)//"type ...@@ -1780,60 +1790,60 @@ asc_docs_api.prototype.put_LineSpacingBeforeAfter = function(type,value)//"type
case 1: case 1:
this.WordControl.m_oLogicDocument.Set_ParagraphSpacing( {After : value}); break; this.WordControl.m_oLogicDocument.Set_ParagraphSpacing( {After : value}); break;
} }
} };
asc_docs_api.prototype.FontSizeIn = function() asc_docs_api.prototype.FontSizeIn = function()
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrIncreaseFontSize); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrIncreaseFontSize);
this.WordControl.m_oLogicDocument.Paragraph_IncDecFontSize(true); this.WordControl.m_oLogicDocument.Paragraph_IncDecFontSize(true);
} };
asc_docs_api.prototype.FontSizeOut = function() asc_docs_api.prototype.FontSizeOut = function()
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrDecreaseFontSize); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrDecreaseFontSize);
this.WordControl.m_oLogicDocument.Paragraph_IncDecFontSize(false); this.WordControl.m_oLogicDocument.Paragraph_IncDecFontSize(false);
} };
asc_docs_api.prototype.put_AlignBySelect = function(val) asc_docs_api.prototype.put_AlignBySelect = function(val)
{ {
this.bAlignBySelected = val; this.bAlignBySelected = val;
} };
asc_docs_api.prototype.get_AlignBySelect = function() asc_docs_api.prototype.get_AlignBySelect = function()
{ {
return this.bAlignBySelected; return this.bAlignBySelected;
} };
/*callbacks*/ /*callbacks*/
asc_docs_api.prototype.sync_BoldCallBack = function(isBold){ asc_docs_api.prototype.sync_BoldCallBack = function(isBold){
this.asc_fireCallback("asc_onBold",isBold); this.asc_fireCallback("asc_onBold",isBold);
} };
asc_docs_api.prototype.sync_ItalicCallBack = function(isItalic){ asc_docs_api.prototype.sync_ItalicCallBack = function(isItalic){
this.asc_fireCallback("asc_onItalic",isItalic); this.asc_fireCallback("asc_onItalic",isItalic);
} };
asc_docs_api.prototype.sync_UnderlineCallBack = function(isUnderline){ asc_docs_api.prototype.sync_UnderlineCallBack = function(isUnderline){
this.asc_fireCallback("asc_onUnderline",isUnderline); this.asc_fireCallback("asc_onUnderline",isUnderline);
} };
asc_docs_api.prototype.sync_StrikeoutCallBack = function(isStrikeout){ asc_docs_api.prototype.sync_StrikeoutCallBack = function(isStrikeout){
this.asc_fireCallback("asc_onStrikeout",isStrikeout); this.asc_fireCallback("asc_onStrikeout",isStrikeout);
} };
asc_docs_api.prototype.sync_TextPrFontFamilyCallBack = function(FontFamily){ asc_docs_api.prototype.sync_TextPrFontFamilyCallBack = function(FontFamily){
this.asc_fireCallback("asc_onFontFamily", new asc_CTextFontFamily( FontFamily )); this.asc_fireCallback("asc_onFontFamily", new asc_CTextFontFamily( FontFamily ));
} };
asc_docs_api.prototype.sync_TextPrFontSizeCallBack = function(FontSize){ asc_docs_api.prototype.sync_TextPrFontSizeCallBack = function(FontSize){
this.asc_fireCallback("asc_onFontSize", FontSize); this.asc_fireCallback("asc_onFontSize", FontSize);
} };
asc_docs_api.prototype.sync_PrLineSpacingCallBack = function(LineSpacing){ asc_docs_api.prototype.sync_PrLineSpacingCallBack = function(LineSpacing){
this.asc_fireCallback("asc_onLineSpacing", new asc_CParagraphSpacing ( LineSpacing ) ); this.asc_fireCallback("asc_onLineSpacing", new asc_CParagraphSpacing ( LineSpacing ) );
} };
asc_docs_api.prototype.sync_InitEditorFonts = function(gui_fonts){ asc_docs_api.prototype.sync_InitEditorFonts = function(gui_fonts){
this._gui_fonts = gui_fonts; this._gui_fonts = gui_fonts;
} };
asc_docs_api.prototype.sync_InitEditorThemes = function(gui_editor_themes, gui_document_themes){ asc_docs_api.prototype.sync_InitEditorThemes = function(gui_editor_themes, gui_document_themes){
this._gui_editor_themes = gui_editor_themes; this._gui_editor_themes = gui_editor_themes;
this._gui_document_themes = gui_document_themes; this._gui_document_themes = gui_document_themes;
this.asc_fireCallback("asc_onInitEditorStyles", [gui_editor_themes, gui_document_themes]); this.asc_fireCallback("asc_onInitEditorStyles", [gui_editor_themes, gui_document_themes]);
} };
asc_docs_api.prototype.sync_InitEditorTableStyles = function(styles){ asc_docs_api.prototype.sync_InitEditorTableStyles = function(styles){
this.asc_fireCallback("asc_onInitTableTemplates",styles); this.asc_fireCallback("asc_onInitTableTemplates",styles);
}; };
...@@ -1937,19 +1947,19 @@ asc_docs_api.prototype.paraApply = function(Props) ...@@ -1937,19 +1947,19 @@ asc_docs_api.prototype.paraApply = function(Props)
_presentation.Document_UpdateInterfaceState(); _presentation.Document_UpdateInterfaceState();
}, [], false, historydescription_Presentation_ParaApply); }, [], false, historydescription_Presentation_ParaApply);
} }
} };
asc_docs_api.prototype.put_PrAlign = function(value) asc_docs_api.prototype.put_PrAlign = function(value)
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrAlign); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrAlign);
this.WordControl.m_oLogicDocument.Set_ParagraphAlign(value); this.WordControl.m_oLogicDocument.Set_ParagraphAlign(value);
} };
// 0- baseline, 2-subscript, 1-superscript // 0- baseline, 2-subscript, 1-superscript
asc_docs_api.prototype.put_TextPrBaseline = function(value) asc_docs_api.prototype.put_TextPrBaseline = function(value)
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrBaseline); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrBaseline);
this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { VertAlign : value } ) ); this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { VertAlign : value } ) );
} };
/* Маркированный список Type = 0 /* Маркированный список Type = 0
нет - SubType = -1 нет - SubType = -1
черная точка - SubType = 1 черная точка - SubType = 1
...@@ -1988,12 +1998,12 @@ asc_docs_api.prototype.put_ListType = function(type, subtype) ...@@ -1988,12 +1998,12 @@ asc_docs_api.prototype.put_ListType = function(type, subtype)
NumberInfo.SubType = subtype; NumberInfo.SubType = subtype;
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrListType); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextPrListType);
this.WordControl.m_oLogicDocument.Set_ParagraphNumbering( NumberInfo ); this.WordControl.m_oLogicDocument.Set_ParagraphNumbering( NumberInfo );
} };
asc_docs_api.prototype.put_ShowSnapLines = function(isShow) asc_docs_api.prototype.put_ShowSnapLines = function(isShow)
{ {
this.ShowSnapLines = isShow; this.ShowSnapLines = isShow;
} };
asc_docs_api.prototype.get_ShowSnapLines = function() asc_docs_api.prototype.get_ShowSnapLines = function()
{ {
return this.ShowSnapLines; return this.ShowSnapLines;
...@@ -2003,20 +2013,20 @@ asc_docs_api.prototype.put_ShowParaMarks = function(isShow){ ...@@ -2003,20 +2013,20 @@ asc_docs_api.prototype.put_ShowParaMarks = function(isShow){
this.ShowParaMarks = isShow; this.ShowParaMarks = isShow;
this.WordControl.OnRePaintAttack(); this.WordControl.OnRePaintAttack();
return this.ShowParaMarks; return this.ShowParaMarks;
} };
asc_docs_api.prototype.get_ShowParaMarks = function(){ asc_docs_api.prototype.get_ShowParaMarks = function(){
return this.ShowParaMarks; return this.ShowParaMarks;
} };
asc_docs_api.prototype.put_ShowTableEmptyLine = function(isShow) asc_docs_api.prototype.put_ShowTableEmptyLine = function(isShow)
{ {
this.isShowTableEmptyLine = isShow; this.isShowTableEmptyLine = isShow;
this.WordControl.OnRePaintAttack(); this.WordControl.OnRePaintAttack();
return this.isShowTableEmptyLine; return this.isShowTableEmptyLine;
} };
asc_docs_api.prototype.get_ShowTableEmptyLine = function(){ asc_docs_api.prototype.get_ShowTableEmptyLine = function(){
return this.isShowTableEmptyLine; return this.isShowTableEmptyLine;
} };
asc_docs_api.prototype.ShapeApply = function(prop) asc_docs_api.prototype.ShapeApply = function(prop)
{ {
...@@ -2102,7 +2112,7 @@ asc_docs_api.prototype.ShapeApply = function(prop) ...@@ -2102,7 +2112,7 @@ asc_docs_api.prototype.ShapeApply = function(prop)
} }
} }
} }
} };
asc_docs_api.prototype.setStartPointHistory = function(){ asc_docs_api.prototype.setStartPointHistory = function(){
this.noCreatePoint = true; this.noCreatePoint = true;
...@@ -2236,40 +2246,40 @@ asc_docs_api.prototype.SetSlideProps = function(prop) ...@@ -2236,40 +2246,40 @@ asc_docs_api.prototype.SetSlideProps = function(prop)
{ {
this.ApplySlideTiming(_timing); this.ApplySlideTiming(_timing);
} }
} };
asc_docs_api.prototype.put_LineCap = function(_cap) asc_docs_api.prototype.put_LineCap = function(_cap)
{ {
this.WordControl.m_oLogicDocument.putLineCap(_cap); this.WordControl.m_oLogicDocument.putLineCap(_cap);
} };
asc_docs_api.prototype.put_LineJoin = function(_join) asc_docs_api.prototype.put_LineJoin = function(_join)
{ {
this.WordControl.m_oLogicDocument.putLineJoin(_join); this.WordControl.m_oLogicDocument.putLineJoin(_join);
} };
asc_docs_api.prototype.put_LineBeginStyle = function(_style) asc_docs_api.prototype.put_LineBeginStyle = function(_style)
{ {
this.WordControl.m_oLogicDocument.putLineBeginStyle(_style); this.WordControl.m_oLogicDocument.putLineBeginStyle(_style);
} };
asc_docs_api.prototype.put_LineBeginSize = function(_size) asc_docs_api.prototype.put_LineBeginSize = function(_size)
{ {
this.WordControl.m_oLogicDocument.putLineBeginSize(_size); this.WordControl.m_oLogicDocument.putLineBeginSize(_size);
} };
asc_docs_api.prototype.put_LineEndStyle = function(_style) asc_docs_api.prototype.put_LineEndStyle = function(_style)
{ {
this.WordControl.m_oLogicDocument.putLineEndStyle(_style); this.WordControl.m_oLogicDocument.putLineEndStyle(_style);
} };
asc_docs_api.prototype.put_LineEndSize = function(_size) asc_docs_api.prototype.put_LineEndSize = function(_size)
{ {
this.WordControl.m_oLogicDocument.putLineEndSize(_size); this.WordControl.m_oLogicDocument.putLineEndSize(_size);
} };
asc_docs_api.prototype.put_TextColor2 = function(r, g, b) asc_docs_api.prototype.put_TextColor2 = function(r, g, b)
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextColor2); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextColor2);
this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Color : { r : r, g : g, b: b} } ) ); this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Color : { r : r, g : g, b: b} } ) );
} };
asc_docs_api.prototype.put_TextColor = function(color) asc_docs_api.prototype.put_TextColor = function(color)
{ {
var _unifill = new CUniFill(); var _unifill = new CUniFill();
...@@ -2277,45 +2287,45 @@ asc_docs_api.prototype.put_TextColor = function(color) ...@@ -2277,45 +2287,45 @@ asc_docs_api.prototype.put_TextColor = function(color)
_unifill.fill.color = CorrectUniColor(color, _unifill.fill.color, 0); _unifill.fill.color = CorrectUniColor(color, _unifill.fill.color, 0);
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextColor); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutTextColor);
this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Unifill : _unifill } ) ); this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Unifill : _unifill } ) );
} };
asc_docs_api.prototype.put_PrIndent = function(value,levelValue) asc_docs_api.prototype.put_PrIndent = function(value,levelValue)
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutPrIndent); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutPrIndent);
this.WordControl.m_oLogicDocument.Set_ParagraphIndent( { Left : value, ChangeLevel: levelValue } ); this.WordControl.m_oLogicDocument.Set_ParagraphIndent( { Left : value, ChangeLevel: levelValue } );
} };
asc_docs_api.prototype.IncreaseIndent = function() asc_docs_api.prototype.IncreaseIndent = function()
{ {
this.WordControl.m_oLogicDocument.Paragraph_IncDecIndent( true ); this.WordControl.m_oLogicDocument.Paragraph_IncDecIndent( true );
} };
asc_docs_api.prototype.DecreaseIndent = function() asc_docs_api.prototype.DecreaseIndent = function()
{ {
this.WordControl.m_oLogicDocument.Paragraph_IncDecIndent( false ); this.WordControl.m_oLogicDocument.Paragraph_IncDecIndent( false );
} };
asc_docs_api.prototype.put_PrIndentRight = function(value) asc_docs_api.prototype.put_PrIndentRight = function(value)
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutPrIndentRight); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutPrIndentRight);
this.WordControl.m_oLogicDocument.Set_ParagraphIndent( { Right : value } ); this.WordControl.m_oLogicDocument.Set_ParagraphIndent( { Right : value } );
} };
asc_docs_api.prototype.put_PrFirstLineIndent = function(value) asc_docs_api.prototype.put_PrFirstLineIndent = function(value)
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutPrFirstLineIndent); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PutPrFirstLineIndent);
this.WordControl.m_oLogicDocument.Set_ParagraphIndent( { FirstLine : value } ); this.WordControl.m_oLogicDocument.Set_ParagraphIndent( { FirstLine : value } );
} };
asc_docs_api.prototype.getFocusObject = function(){//возвратит тип элемента - параграф c_oAscTypeSelectElement.Paragraph, изображение c_oAscTypeSelectElement.Image, таблица c_oAscTypeSelectElement.Table, колонтитул c_oAscTypeSelectElement.Header. asc_docs_api.prototype.getFocusObject = function(){//возвратит тип элемента - параграф c_oAscTypeSelectElement.Paragraph, изображение c_oAscTypeSelectElement.Image, таблица c_oAscTypeSelectElement.Table, колонтитул c_oAscTypeSelectElement.Header.
} };
/*callbacks*/ /*callbacks*/
asc_docs_api.prototype.sync_VerticalAlign = function(typeBaseline){ asc_docs_api.prototype.sync_VerticalAlign = function(typeBaseline){
this.asc_fireCallback("asc_onVerticalAlign",typeBaseline); this.asc_fireCallback("asc_onVerticalAlign",typeBaseline);
} };
asc_docs_api.prototype.sync_PrAlignCallBack = function(value){ asc_docs_api.prototype.sync_PrAlignCallBack = function(value){
this.asc_fireCallback("asc_onPrAlign",value); this.asc_fireCallback("asc_onPrAlign",value);
} };
asc_docs_api.prototype.sync_ListType = function(NumPr){ asc_docs_api.prototype.sync_ListType = function(NumPr){
this.asc_fireCallback("asc_onListType", new asc_CListType( NumPr ) ); this.asc_fireCallback("asc_onListType", new asc_CListType( NumPr ) );
} };
asc_docs_api.prototype.sync_TextColor = function(Color){ asc_docs_api.prototype.sync_TextColor = function(Color){
this.asc_fireCallback("asc_onTextColor", new CColor( Color.r, Color.g, Color.b )); this.asc_fireCallback("asc_onTextColor", new CColor( Color.r, Color.g, Color.b ));
} }
...@@ -2391,21 +2401,21 @@ asc_docs_api.prototype.SetDrawImagePlaceParagraph = function(element_id, props) ...@@ -2391,21 +2401,21 @@ asc_docs_api.prototype.SetDrawImagePlaceParagraph = function(element_id, props)
{ {
this.WordControl.m_oDrawingDocument.InitGuiCanvasTextProps(element_id); this.WordControl.m_oDrawingDocument.InitGuiCanvasTextProps(element_id);
this.WordControl.m_oDrawingDocument.DrawGuiCanvasTextProps(props); this.WordControl.m_oDrawingDocument.DrawGuiCanvasTextProps(props);
} };
/*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/
asc_docs_api.prototype.get_DocumentOrientation = function() asc_docs_api.prototype.get_DocumentOrientation = function()
{ {
return this.DocumentOrientation; return this.DocumentOrientation;
} };
asc_docs_api.prototype.put_AddPageBreak = function() asc_docs_api.prototype.put_AddPageBreak = function()
{ {
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_AddPageBreak); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_AddPageBreak);
this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaNewLine( break_Page ) ); this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaNewLine( break_Page ) );
} };
asc_docs_api.prototype.Update_ParaInd = function( Ind ){ asc_docs_api.prototype.Update_ParaInd = function( Ind ){
var FirstLine = 0; var FirstLine = 0;
var Left = 0; var Left = 0;
...@@ -2429,46 +2439,46 @@ asc_docs_api.prototype.Update_ParaInd = function( Ind ){ ...@@ -2429,46 +2439,46 @@ asc_docs_api.prototype.Update_ParaInd = function( Ind ){
this.Internal_Update_Ind_Left(Left); this.Internal_Update_Ind_Left(Left);
this.Internal_Update_Ind_FirstLine(FirstLine,Left); this.Internal_Update_Ind_FirstLine(FirstLine,Left);
this.Internal_Update_Ind_Right(Right); this.Internal_Update_Ind_Right(Right);
} };
asc_docs_api.prototype.Internal_Update_Ind_FirstLine = function(FirstLine,Left){ asc_docs_api.prototype.Internal_Update_Ind_FirstLine = function(FirstLine,Left){
if (this.WordControl.m_oHorRuler.m_dIndentLeftFirst != (FirstLine + Left)) if (this.WordControl.m_oHorRuler.m_dIndentLeftFirst != (FirstLine + Left))
{ {
this.WordControl.m_oHorRuler.m_dIndentLeftFirst = (FirstLine + Left); this.WordControl.m_oHorRuler.m_dIndentLeftFirst = (FirstLine + Left);
this.WordControl.UpdateHorRuler(); this.WordControl.UpdateHorRuler();
} }
} };
asc_docs_api.prototype.Internal_Update_Ind_Left = function(Left){ asc_docs_api.prototype.Internal_Update_Ind_Left = function(Left){
if (this.WordControl.m_oHorRuler.m_dIndentLeft != Left) if (this.WordControl.m_oHorRuler.m_dIndentLeft != Left)
{ {
this.WordControl.m_oHorRuler.m_dIndentLeft = Left; this.WordControl.m_oHorRuler.m_dIndentLeft = Left;
this.WordControl.UpdateHorRuler(); this.WordControl.UpdateHorRuler();
} }
} };
asc_docs_api.prototype.Internal_Update_Ind_Right = function(Right){ asc_docs_api.prototype.Internal_Update_Ind_Right = function(Right){
if (this.WordControl.m_oHorRuler.m_dIndentRight != Right) if (this.WordControl.m_oHorRuler.m_dIndentRight != Right)
{ {
this.WordControl.m_oHorRuler.m_dIndentRight = Right; this.WordControl.m_oHorRuler.m_dIndentRight = Right;
this.WordControl.UpdateHorRuler(); this.WordControl.UpdateHorRuler();
} }
} };
asc_docs_api.prototype.sync_DocSizeCallback = function(width,height){ asc_docs_api.prototype.sync_DocSizeCallback = function(width,height){
this.asc_fireCallback("asc_onDocSize",width,height); this.asc_fireCallback("asc_onDocSize",width,height);
} };
asc_docs_api.prototype.sync_PageOrientCallback = function(isPortrait){ asc_docs_api.prototype.sync_PageOrientCallback = function(isPortrait){
this.asc_fireCallback("asc_onPageOrient",isPortrait); this.asc_fireCallback("asc_onPageOrient",isPortrait);
} };
asc_docs_api.prototype.sync_HeadersAndFootersPropCallback = function(hafProp){ asc_docs_api.prototype.sync_HeadersAndFootersPropCallback = function(hafProp){
this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( c_oAscTypeSelectElement.Header, new CHeaderProp( hafProp ) ); this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( c_oAscTypeSelectElement.Header, new CHeaderProp( hafProp ) );
} };
/*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/
/*functions for working with table*/ /*functions for working with table*/
asc_docs_api.prototype.put_Table = function(col,row) asc_docs_api.prototype.put_Table = function(col,row)
{ {
this.WordControl.m_oLogicDocument.Add_FlowTable(col,row); this.WordControl.m_oLogicDocument.Add_FlowTable(col,row);
} };
asc_docs_api.prototype.addRowAbove = function(count) asc_docs_api.prototype.addRowAbove = function(count)
{ {
var doc = this.WordControl.m_oLogicDocument; var doc = this.WordControl.m_oLogicDocument;
...@@ -2477,7 +2487,7 @@ asc_docs_api.prototype.addRowAbove = function(count) ...@@ -2477,7 +2487,7 @@ asc_docs_api.prototype.addRowAbove = function(count)
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_AddRowAbove); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_AddRowAbove);
this.WordControl.m_oLogicDocument.Table_AddRow(true); this.WordControl.m_oLogicDocument.Table_AddRow(true);
} }
} };
asc_docs_api.prototype.addRowBelow = function(count) asc_docs_api.prototype.addRowBelow = function(count)
{ {
var doc = this.WordControl.m_oLogicDocument; var doc = this.WordControl.m_oLogicDocument;
...@@ -2486,7 +2496,7 @@ asc_docs_api.prototype.addRowBelow = function(count) ...@@ -2486,7 +2496,7 @@ asc_docs_api.prototype.addRowBelow = function(count)
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_AddRowBelow); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_AddRowBelow);
this.WordControl.m_oLogicDocument.Table_AddRow(false); this.WordControl.m_oLogicDocument.Table_AddRow(false);
} }
} };
asc_docs_api.prototype.addColumnLeft = function(count) asc_docs_api.prototype.addColumnLeft = function(count)
{ {
var doc = this.WordControl.m_oLogicDocument; var doc = this.WordControl.m_oLogicDocument;
...@@ -2495,7 +2505,7 @@ asc_docs_api.prototype.addColumnLeft = function(count) ...@@ -2495,7 +2505,7 @@ asc_docs_api.prototype.addColumnLeft = function(count)
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_AddColLeft); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_AddColLeft);
this.WordControl.m_oLogicDocument.Table_AddCol(true); this.WordControl.m_oLogicDocument.Table_AddCol(true);
} }
} };
asc_docs_api.prototype.addColumnRight = function(count) asc_docs_api.prototype.addColumnRight = function(count)
{ {
var doc = this.WordControl.m_oLogicDocument; var doc = this.WordControl.m_oLogicDocument;
...@@ -2504,7 +2514,7 @@ asc_docs_api.prototype.addColumnRight = function(count) ...@@ -2504,7 +2514,7 @@ asc_docs_api.prototype.addColumnRight = function(count)
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_AddColRight); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_AddColRight);
this.WordControl.m_oLogicDocument.Table_AddCol(false); this.WordControl.m_oLogicDocument.Table_AddCol(false);
} }
} };
asc_docs_api.prototype.remRow = function() asc_docs_api.prototype.remRow = function()
{ {
var doc = this.WordControl.m_oLogicDocument; var doc = this.WordControl.m_oLogicDocument;
...@@ -2513,7 +2523,7 @@ asc_docs_api.prototype.remRow = function() ...@@ -2513,7 +2523,7 @@ asc_docs_api.prototype.remRow = function()
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_RemoveRow); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_RemoveRow);
this.WordControl.m_oLogicDocument.Table_RemoveRow(); this.WordControl.m_oLogicDocument.Table_RemoveRow();
} }
} };
asc_docs_api.prototype.remColumn = function() asc_docs_api.prototype.remColumn = function()
{ {
var doc = this.WordControl.m_oLogicDocument; var doc = this.WordControl.m_oLogicDocument;
...@@ -2522,7 +2532,7 @@ asc_docs_api.prototype.remColumn = function() ...@@ -2522,7 +2532,7 @@ asc_docs_api.prototype.remColumn = function()
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_RemoveCol); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_RemoveCol);
this.WordControl.m_oLogicDocument.Table_RemoveCol(); this.WordControl.m_oLogicDocument.Table_RemoveCol();
} }
} };
asc_docs_api.prototype.remTable = function() asc_docs_api.prototype.remTable = function()
{ {
var doc = this.WordControl.m_oLogicDocument; var doc = this.WordControl.m_oLogicDocument;
...@@ -2531,23 +2541,23 @@ asc_docs_api.prototype.remTable = function() ...@@ -2531,23 +2541,23 @@ asc_docs_api.prototype.remTable = function()
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_RemoveTable); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_RemoveTable);
this.WordControl.m_oLogicDocument.Table_RemoveTable(); this.WordControl.m_oLogicDocument.Table_RemoveTable();
} }
} };
asc_docs_api.prototype.selectRow = function() asc_docs_api.prototype.selectRow = function()
{ {
this.WordControl.m_oLogicDocument.Table_Select( c_oAscTableSelectionType.Row ); this.WordControl.m_oLogicDocument.Table_Select( c_oAscTableSelectionType.Row );
} };
asc_docs_api.prototype.selectColumn = function() asc_docs_api.prototype.selectColumn = function()
{ {
this.WordControl.m_oLogicDocument.Table_Select( c_oAscTableSelectionType.Column ); this.WordControl.m_oLogicDocument.Table_Select( c_oAscTableSelectionType.Column );
} };
asc_docs_api.prototype.selectCell = function() asc_docs_api.prototype.selectCell = function()
{ {
this.WordControl.m_oLogicDocument.Table_Select( c_oAscTableSelectionType.Cell ); this.WordControl.m_oLogicDocument.Table_Select( c_oAscTableSelectionType.Cell );
} };
asc_docs_api.prototype.selectTable = function() asc_docs_api.prototype.selectTable = function()
{ {
this.WordControl.m_oLogicDocument.Table_Select( c_oAscTableSelectionType.Table ); this.WordControl.m_oLogicDocument.Table_Select( c_oAscTableSelectionType.Table );
} };
asc_docs_api.prototype.setColumnWidth = function(width){ asc_docs_api.prototype.setColumnWidth = function(width){
}; };
...@@ -2823,23 +2833,23 @@ asc_docs_api.prototype.tblApply = function(obj) ...@@ -2823,23 +2833,23 @@ asc_docs_api.prototype.tblApply = function(obj)
} }
this.WordControl.m_oLogicDocument.Set_TableProps(obj); this.WordControl.m_oLogicDocument.Set_TableProps(obj);
} }
} };
/*callbacks*/ /*callbacks*/
asc_docs_api.prototype.sync_AddTableCallback = function(){ asc_docs_api.prototype.sync_AddTableCallback = function(){
this.asc_fireCallback("asc_onAddTable"); this.asc_fireCallback("asc_onAddTable");
} };
asc_docs_api.prototype.sync_AlignCellCallback = function(align){ asc_docs_api.prototype.sync_AlignCellCallback = function(align){
this.asc_fireCallback("asc_onAlignCell",align); this.asc_fireCallback("asc_onAlignCell",align);
} };
asc_docs_api.prototype.sync_TblPropCallback = function(tblProp){ asc_docs_api.prototype.sync_TblPropCallback = function(tblProp){
this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( c_oAscTypeSelectElement.Table, new CTableProp( tblProp )); this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( c_oAscTypeSelectElement.Table, new CTableProp( tblProp ));
} };
asc_docs_api.prototype.sync_TblWrapStyleChangedCallback = function(style){ asc_docs_api.prototype.sync_TblWrapStyleChangedCallback = function(style){
this.asc_fireCallback("asc_onTblWrapStyleChanged",style); this.asc_fireCallback("asc_onTblWrapStyleChanged",style);
} };
asc_docs_api.prototype.sync_TblAlignChangedCallback = function(style){ asc_docs_api.prototype.sync_TblAlignChangedCallback = function(style){
this.asc_fireCallback("asc_onTblAlignChanged",style); this.asc_fireCallback("asc_onTblAlignChanged",style);
} };
/*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/
/*functions for working with images*/ /*functions for working with images*/
...@@ -2847,17 +2857,17 @@ asc_docs_api.prototype.ChangeImageFromFile = function() ...@@ -2847,17 +2857,17 @@ asc_docs_api.prototype.ChangeImageFromFile = function()
{ {
this.isImageChangeUrl = true; this.isImageChangeUrl = true;
this.AddImage(); this.AddImage();
} };
asc_docs_api.prototype.ChangeShapeImageFromFile = function() asc_docs_api.prototype.ChangeShapeImageFromFile = function()
{ {
this.isShapeImageChangeUrl = true; this.isShapeImageChangeUrl = true;
this.AddImage(); this.AddImage();
} };
asc_docs_api.prototype.ChangeSlideImageFromFile = function() asc_docs_api.prototype.ChangeSlideImageFromFile = function()
{ {
this.isSlideImageChangeUrl = true; this.isSlideImageChangeUrl = true;
this.AddImage(); this.AddImage();
} };
asc_docs_api.prototype.AddImage = function(){ asc_docs_api.prototype.AddImage = function(){
var oImageUploader = document.getElementById("apiImageUpload"); var oImageUploader = document.getElementById("apiImageUpload");
...@@ -2902,7 +2912,7 @@ asc_docs_api.prototype.AddImage = function(){ ...@@ -2902,7 +2912,7 @@ asc_docs_api.prototype.AddImage = function(){
setTimeout( function(){fileName.click();}, 0); setTimeout( function(){fileName.click();}, 0);
else else
fileName.click(); fileName.click();
} };
asc_docs_api.prototype.StartAddShape = function(prst, is_apply) asc_docs_api.prototype.StartAddShape = function(prst, is_apply)
{ {
...@@ -2912,18 +2922,18 @@ asc_docs_api.prototype.StartAddShape = function(prst, is_apply) ...@@ -2912,18 +2922,18 @@ asc_docs_api.prototype.StartAddShape = function(prst, is_apply)
{ {
this.WordControl.m_oDrawingDocument.LockCursorType("crosshair"); this.WordControl.m_oDrawingDocument.LockCursorType("crosshair");
} }
} };
asc_docs_api.prototype.canGroup = function() asc_docs_api.prototype.canGroup = function()
{ {
return this.WordControl.m_oLogicDocument.canGroup(); return this.WordControl.m_oLogicDocument.canGroup();
} };
asc_docs_api.prototype.canUnGroup = function() asc_docs_api.prototype.canUnGroup = function()
{ {
return this.WordControl.m_oLogicDocument.canUnGroup(); return this.WordControl.m_oLogicDocument.canUnGroup();
} };
asc_docs_api.prototype.AddImageUrl = function(url){ asc_docs_api.prototype.AddImageUrl = function(url){
if(0 == url.indexOf(this.DocumentUrl)) if(0 == url.indexOf(this.DocumentUrl))
...@@ -3058,7 +3068,7 @@ asc_docs_api.prototype.AddImageUrlAction = function(url){ ...@@ -3058,7 +3068,7 @@ asc_docs_api.prototype.AddImageUrlAction = function(url){
this.asyncImageEndLoaded2 = null; this.asyncImageEndLoaded2 = null;
} }
} }
} };
/* В качестве параметра передается объект класса asc_CImgProperty, он же приходит на OnImgProp /* В качестве параметра передается объект класса asc_CImgProperty, он же приходит на OnImgProp
asc_CImgProperty заменяет пережнюю структуру: asc_CImgProperty заменяет пережнюю структуру:
если параметр не имеет значения то передвать следует null, напримере inline-картинок: в качестве left,top,bottom,right,X,Y,ImageUrl необходимо передавать null. если параметр не имеет значения то передвать следует null, напримере inline-картинок: в качестве left,top,bottom,right,X,Y,ImageUrl необходимо передавать null.
...@@ -3122,7 +3132,7 @@ asc_docs_api.prototype.ImgApply = function(obj){ ...@@ -3122,7 +3132,7 @@ asc_docs_api.prototype.ImgApply = function(obj){
ImagePr.ImageUrl = null; ImagePr.ImageUrl = null;
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr ); this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
} }
} };
asc_docs_api.prototype.asc_setChartTranslate = function(translate) { asc_docs_api.prototype.asc_setChartTranslate = function(translate) {
this.chartTranslate = translate; this.chartTranslate = translate;
...@@ -3142,7 +3152,7 @@ asc_docs_api.prototype.ChartApply = function(obj) ...@@ -3142,7 +3152,7 @@ asc_docs_api.prototype.ChartApply = function(obj)
} }
asc_docs_api.prototype.set_Size = function(width, height){ asc_docs_api.prototype.set_Size = function(width, height){
} };
asc_docs_api.prototype.set_ConstProportions = function(isOn){ asc_docs_api.prototype.set_ConstProportions = function(isOn){
if (isOn){ if (isOn){
...@@ -3150,19 +3160,19 @@ asc_docs_api.prototype.set_ConstProportions = function(isOn){ ...@@ -3150,19 +3160,19 @@ asc_docs_api.prototype.set_ConstProportions = function(isOn){
else{ else{
} }
} };
asc_docs_api.prototype.set_WrapStyle = function(type){ asc_docs_api.prototype.set_WrapStyle = function(type){
} };
asc_docs_api.prototype.deleteImage = function(){ asc_docs_api.prototype.deleteImage = function(){
} };
asc_docs_api.prototype.set_ImgDistanceFromText = function(left,top,right,bottom){ asc_docs_api.prototype.set_ImgDistanceFromText = function(left,top,right,bottom){
} };
asc_docs_api.prototype.set_PositionOnPage = function(X,Y){//расположение от начала страницы asc_docs_api.prototype.set_PositionOnPage = function(X,Y){//расположение от начала страницы
} };
asc_docs_api.prototype.get_OriginalSizeImage = function(){ asc_docs_api.prototype.get_OriginalSizeImage = function(){
if (0 == this.SelectedObjectsStack.length) if (0 == this.SelectedObjectsStack.length)
return null; return null;
...@@ -3171,11 +3181,11 @@ asc_docs_api.prototype.get_OriginalSizeImage = function(){ ...@@ -3171,11 +3181,11 @@ asc_docs_api.prototype.get_OriginalSizeImage = function(){
return null; return null;
if (obj.Type == c_oAscTypeSelectElement.Image) if (obj.Type == c_oAscTypeSelectElement.Image)
return obj.Value.asc_getOriginSize(this); return obj.Value.asc_getOriginSize(this);
} };
/*callbacks*/ /*callbacks*/
asc_docs_api.prototype.sync_AddImageCallback = function(){ asc_docs_api.prototype.sync_AddImageCallback = function(){
this.asc_fireCallback("asc_onAddImage"); this.asc_fireCallback("asc_onAddImage");
} };
asc_docs_api.prototype.sync_ImgPropCallback = function(imgProp){ asc_docs_api.prototype.sync_ImgPropCallback = function(imgProp){
var type = imgProp.chartProps ? c_oAscTypeSelectElement.Chart : c_oAscTypeSelectElement.Image; var type = imgProp.chartProps ? c_oAscTypeSelectElement.Chart : c_oAscTypeSelectElement.Image;
var objects; var objects;
...@@ -3188,7 +3198,7 @@ asc_docs_api.prototype.sync_ImgPropCallback = function(imgProp){ ...@@ -3188,7 +3198,7 @@ asc_docs_api.prototype.sync_ImgPropCallback = function(imgProp){
objects = new asc_CImgProperty(imgProp); objects = new asc_CImgProperty(imgProp);
} }
this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( type, objects); this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( type, objects);
} };
asc_docs_api.prototype.SetDrawingFreeze = function(bIsFreeze) asc_docs_api.prototype.SetDrawingFreeze = function(bIsFreeze)
{ {
...@@ -3215,63 +3225,63 @@ asc_docs_api.prototype.SetDrawingFreeze = function(bIsFreeze) ...@@ -3215,63 +3225,63 @@ asc_docs_api.prototype.SetDrawingFreeze = function(bIsFreeze)
if (!bIsFreeze) if (!bIsFreeze)
this.WordControl.OnScroll(); this.WordControl.OnScroll();
} };
/*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/
/*functions for working with zoom & navigation*/ /*functions for working with zoom & navigation*/
asc_docs_api.prototype.zoomIn = function(){ asc_docs_api.prototype.zoomIn = function(){
this.WordControl.zoom_In(); this.WordControl.zoom_In();
} };
asc_docs_api.prototype.zoomOut = function(){ asc_docs_api.prototype.zoomOut = function(){
this.WordControl.zoom_Out(); this.WordControl.zoom_Out();
} };
asc_docs_api.prototype.zoomFitToPage = function(){ asc_docs_api.prototype.zoomFitToPage = function(){
this.WordControl.zoom_FitToPage(); this.WordControl.zoom_FitToPage();
} };
asc_docs_api.prototype.zoomFitToWidth = function(){ asc_docs_api.prototype.zoomFitToWidth = function(){
this.WordControl.zoom_FitToWidth(); this.WordControl.zoom_FitToWidth();
} };
asc_docs_api.prototype.zoomCustomMode = function(){ asc_docs_api.prototype.zoomCustomMode = function(){
this.WordControl.m_nZoomType = 0; this.WordControl.m_nZoomType = 0;
this.WordControl.zoom_Fire(); this.WordControl.zoom_Fire();
} };
asc_docs_api.prototype.zoom100 = function(){ asc_docs_api.prototype.zoom100 = function(){
this.WordControl.m_nZoomValue = 100; this.WordControl.m_nZoomValue = 100;
this.WordControl.zoom_Fire(); this.WordControl.zoom_Fire();
} };
asc_docs_api.prototype.zoom = function(percent){ asc_docs_api.prototype.zoom = function(percent){
this.WordControl.m_nZoomValue = percent; this.WordControl.m_nZoomValue = percent;
this.WordControl.zoom_Fire(0); this.WordControl.zoom_Fire(0);
} };
asc_docs_api.prototype.goToPage = function(number){ asc_docs_api.prototype.goToPage = function(number){
this.WordControl.GoToPage(number); this.WordControl.GoToPage(number);
} };
asc_docs_api.prototype.getCountPages = function(){ asc_docs_api.prototype.getCountPages = function(){
return this.WordControl.m_oDrawingDocument.SlidesCount; return this.WordControl.m_oDrawingDocument.SlidesCount;
} };
asc_docs_api.prototype.getCurrentPage = function(){ asc_docs_api.prototype.getCurrentPage = function(){
return this.WordControl.m_oDrawingDocument.SlideCurrent; return this.WordControl.m_oDrawingDocument.SlideCurrent;
} };
/*callbacks*/ /*callbacks*/
asc_docs_api.prototype.sync_zoomChangeCallback = function(percent,type){ //c_oAscZoomType.Current, c_oAscZoomType.FitWidth, c_oAscZoomType.FitPage asc_docs_api.prototype.sync_zoomChangeCallback = function(percent,type){ //c_oAscZoomType.Current, c_oAscZoomType.FitWidth, c_oAscZoomType.FitPage
this.asc_fireCallback("asc_onZoomChange",percent,type); this.asc_fireCallback("asc_onZoomChange",percent,type);
} };
asc_docs_api.prototype.sync_countPagesCallback = function(count){ asc_docs_api.prototype.sync_countPagesCallback = function(count){
this.asc_fireCallback("asc_onCountPages",count); this.asc_fireCallback("asc_onCountPages",count);
} };
asc_docs_api.prototype.sync_currentPageCallback = function(number){ asc_docs_api.prototype.sync_currentPageCallback = function(number){
this.asc_fireCallback("asc_onCurrentPage",number); this.asc_fireCallback("asc_onCurrentPage",number);
} };
asc_docs_api.prototype.sync_SendThemeColors = function(colors,standart_colors) asc_docs_api.prototype.sync_SendThemeColors = function(colors,standart_colors)
{ {
this.asc_fireCallback("asc_onSendThemeColors",colors,standart_colors); this.asc_fireCallback("asc_onSendThemeColors",colors,standart_colors);
} };
asc_docs_api.prototype.sync_SendThemeColorSchemes = function(param) asc_docs_api.prototype.sync_SendThemeColorSchemes = function(param)
{ {
this.asc_fireCallback("asc_onSendThemeColorSchemes",param); this.asc_fireCallback("asc_onSendThemeColorSchemes",param);
} };
asc_docs_api.prototype.ChangeColorScheme = function(index_scheme) asc_docs_api.prototype.ChangeColorScheme = function(index_scheme)
{ {
...@@ -3338,7 +3348,7 @@ asc_docs_api.prototype.ChangeColorScheme = function(index_scheme) ...@@ -3338,7 +3348,7 @@ asc_docs_api.prototype.ChangeColorScheme = function(index_scheme)
} }
this.WordControl.m_oDrawingDocument.CheckGuiControlColors(); this.WordControl.m_oDrawingDocument.CheckGuiControlColors();
} };
/*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/
asc_docs_api.prototype.asc_enableKeyEvents = function(value){ asc_docs_api.prototype.asc_enableKeyEvents = function(value){
...@@ -3385,21 +3395,21 @@ function asc_CCommentData( obj ) ...@@ -3385,21 +3395,21 @@ function asc_CCommentData( obj )
} }
} }
asc_CCommentData.prototype.asc_getText = function() { return this.m_sText; } asc_CCommentData.prototype.asc_getText = function() { return this.m_sText; };
asc_CCommentData.prototype.asc_putText = function(v) { this.m_sText = v; } asc_CCommentData.prototype.asc_putText = function(v) { this.m_sText = v; };
asc_CCommentData.prototype.asc_getTime = function() { return this.m_sTime; } asc_CCommentData.prototype.asc_getTime = function() { return this.m_sTime; };
asc_CCommentData.prototype.asc_putTime = function(v) { this.m_sTime = v; } asc_CCommentData.prototype.asc_putTime = function(v) { this.m_sTime = v; };
asc_CCommentData.prototype.asc_getUserId = function() { return this.m_sUserId; } asc_CCommentData.prototype.asc_getUserId = function() { return this.m_sUserId; };
asc_CCommentData.prototype.asc_putUserId = function(v) { this.m_sUserId = v; } asc_CCommentData.prototype.asc_putUserId = function(v) { this.m_sUserId = v; };
asc_CCommentData.prototype.asc_getUserName = function() { return this.m_sUserName; } asc_CCommentData.prototype.asc_getUserName = function() { return this.m_sUserName; };
asc_CCommentData.prototype.asc_putUserName = function(v) { this.m_sUserName = v; } asc_CCommentData.prototype.asc_putUserName = function(v) { this.m_sUserName = v; };
asc_CCommentData.prototype.asc_getQuoteText = function() { return this.m_sQuoteText; }; asc_CCommentData.prototype.asc_getQuoteText = function() { return this.m_sQuoteText; };
asc_CCommentData.prototype.asc_putQuoteText = function(v) { this.m_sQuoteText = v; }; asc_CCommentData.prototype.asc_putQuoteText = function(v) { this.m_sQuoteText = v; };
asc_CCommentData.prototype.asc_getSolved = function() { return this.m_bSolved; }; asc_CCommentData.prototype.asc_getSolved = function() { return this.m_bSolved; };
asc_CCommentData.prototype.asc_putSolved = function(v) { this.m_bSolved = v; }; asc_CCommentData.prototype.asc_putSolved = function(v) { this.m_bSolved = v; };
asc_CCommentData.prototype.asc_getReply = function(i) { return this.m_aReplies[i]; } asc_CCommentData.prototype.asc_getReply = function(i) { return this.m_aReplies[i]; };
asc_CCommentData.prototype.asc_addReply = function(v) { this.m_aReplies.push( v ); } asc_CCommentData.prototype.asc_addReply = function(v) { this.m_aReplies.push( v ); };
asc_CCommentData.prototype.asc_getRepliesCount = function(v) { return this.m_aReplies.length; } asc_CCommentData.prototype.asc_getRepliesCount = function(v) { return this.m_aReplies.length; };
asc_docs_api.prototype.asc_showComments = function() asc_docs_api.prototype.asc_showComments = function()
...@@ -3408,7 +3418,7 @@ asc_docs_api.prototype.asc_showComments = function() ...@@ -3408,7 +3418,7 @@ asc_docs_api.prototype.asc_showComments = function()
return; return;
this.WordControl.m_oLogicDocument.Show_Comments(); this.WordControl.m_oLogicDocument.Show_Comments();
} };
asc_docs_api.prototype.asc_hideComments = function() asc_docs_api.prototype.asc_hideComments = function()
{ {
...@@ -3417,7 +3427,7 @@ asc_docs_api.prototype.asc_hideComments = function() ...@@ -3417,7 +3427,7 @@ asc_docs_api.prototype.asc_hideComments = function()
this.WordControl.m_oLogicDocument.Hide_Comments(); this.WordControl.m_oLogicDocument.Hide_Comments();
editor.sync_HideComment(); editor.sync_HideComment();
} };
asc_docs_api.prototype.asc_addComment = function(AscCommentData) asc_docs_api.prototype.asc_addComment = function(AscCommentData)
{ {
...@@ -3433,18 +3443,18 @@ asc_docs_api.prototype.asc_addComment = function(AscCommentData) ...@@ -3433,18 +3443,18 @@ asc_docs_api.prototype.asc_addComment = function(AscCommentData)
var Comment = this.WordControl.m_oLogicDocument.Add_Comment( CommentData ); var Comment = this.WordControl.m_oLogicDocument.Add_Comment( CommentData );
if (Comment ) if (Comment )
return Comment.Get_Id(); return Comment.Get_Id();
} };
asc_docs_api.prototype.asc_getMasterCommentId = function() asc_docs_api.prototype.asc_getMasterCommentId = function()
{ {
return -1; return -1;
} };
asc_docs_api.prototype.asc_getAnchorPosition = function() asc_docs_api.prototype.asc_getAnchorPosition = function()
{ {
var AnchorPos = this.WordControl.m_oLogicDocument.Get_SelectionAnchorPos(); var AnchorPos = this.WordControl.m_oLogicDocument.Get_SelectionAnchorPos();
return new asc_CRect(AnchorPos.X0, AnchorPos.Y, AnchorPos.X1 - AnchorPos.X0, 0); return new asc_CRect(AnchorPos.X0, AnchorPos.Y, AnchorPos.X1 - AnchorPos.X0, 0);
} };
asc_docs_api.prototype.asc_removeComment = function(Id) asc_docs_api.prototype.asc_removeComment = function(Id)
{ {
...@@ -3456,7 +3466,7 @@ asc_docs_api.prototype.asc_removeComment = function(Id) ...@@ -3456,7 +3466,7 @@ asc_docs_api.prototype.asc_removeComment = function(Id)
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_RemoveComment); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_RemoveComment);
this.WordControl.m_oLogicDocument.Remove_Comment( Id, true ); this.WordControl.m_oLogicDocument.Remove_Comment( Id, true );
} }
} };
asc_docs_api.prototype.asc_changeComment = function(Id, AscCommentData) asc_docs_api.prototype.asc_changeComment = function(Id, AscCommentData)
{ {
...@@ -3471,7 +3481,7 @@ asc_docs_api.prototype.asc_changeComment = function(Id, AscCommentData) ...@@ -3471,7 +3481,7 @@ asc_docs_api.prototype.asc_changeComment = function(Id, AscCommentData)
this.WordControl.m_oLogicDocument.Change_Comment( Id, CommentData ); this.WordControl.m_oLogicDocument.Change_Comment( Id, CommentData );
} }
} };
asc_docs_api.prototype.asc_selectComment = function(Id) asc_docs_api.prototype.asc_selectComment = function(Id)
{ {
...@@ -3479,12 +3489,12 @@ asc_docs_api.prototype.asc_selectComment = function(Id) ...@@ -3479,12 +3489,12 @@ asc_docs_api.prototype.asc_selectComment = function(Id)
return; return;
this.WordControl.m_oLogicDocument.Select_Comment(Id); this.WordControl.m_oLogicDocument.Select_Comment(Id);
} };
asc_docs_api.prototype.asc_showComment = function(Id) asc_docs_api.prototype.asc_showComment = function(Id)
{ {
this.WordControl.m_oLogicDocument.Show_Comment(Id); this.WordControl.m_oLogicDocument.Show_Comment(Id);
} };
asc_docs_api.prototype.can_AddQuotedComment = function() asc_docs_api.prototype.can_AddQuotedComment = function()
{ {
...@@ -3492,12 +3502,12 @@ asc_docs_api.prototype.can_AddQuotedComment = function() ...@@ -3492,12 +3502,12 @@ asc_docs_api.prototype.can_AddQuotedComment = function()
// return false; // return false;
return this.WordControl.m_oLogicDocument.CanAdd_Comment(); return this.WordControl.m_oLogicDocument.CanAdd_Comment();
} };
asc_docs_api.prototype.sync_RemoveComment = function(Id) asc_docs_api.prototype.sync_RemoveComment = function(Id)
{ {
this.asc_fireCallback("asc_onRemoveComment", Id); this.asc_fireCallback("asc_onRemoveComment", Id);
} };
asc_docs_api.prototype.sync_AddComment = function(Id, CommentData) asc_docs_api.prototype.sync_AddComment = function(Id, CommentData)
{ {
...@@ -3507,7 +3517,7 @@ asc_docs_api.prototype.sync_AddComment = function(Id, CommentData) ...@@ -3507,7 +3517,7 @@ asc_docs_api.prototype.sync_AddComment = function(Id, CommentData)
AscCommentData.asc_putQuoteText(""); AscCommentData.asc_putQuoteText("");
this.asc_fireCallback("asc_onAddComment", Id, AscCommentData); this.asc_fireCallback("asc_onAddComment", Id, AscCommentData);
} }
} };
asc_docs_api.prototype.sync_ShowComment = function(Id, X, Y) asc_docs_api.prototype.sync_ShowComment = function(Id, X, Y)
{ {
...@@ -3519,34 +3529,34 @@ asc_docs_api.prototype.sync_ShowComment = function(Id, X, Y) ...@@ -3519,34 +3529,34 @@ asc_docs_api.prototype.sync_ShowComment = function(Id, X, Y)
*/ */
// TODO: Переделать на нормальный массив // TODO: Переделать на нормальный массив
this.asc_fireCallback("asc_onShowComment", [ Id ], X, Y); this.asc_fireCallback("asc_onShowComment", [ Id ], X, Y);
} };
asc_docs_api.prototype.sync_HideComment = function() asc_docs_api.prototype.sync_HideComment = function()
{ {
this.asc_fireCallback("asc_onHideComment"); this.asc_fireCallback("asc_onHideComment");
} };
asc_docs_api.prototype.sync_UpdateCommentPosition = function(Id, X, Y) asc_docs_api.prototype.sync_UpdateCommentPosition = function(Id, X, Y)
{ {
// TODO: Переделать на нормальный массив // TODO: Переделать на нормальный массив
this.asc_fireCallback("asc_onUpdateCommentPosition", [ Id ], X, Y); this.asc_fireCallback("asc_onUpdateCommentPosition", [ Id ], X, Y);
} };
asc_docs_api.prototype.sync_ChangeCommentData = function(Id, CommentData) asc_docs_api.prototype.sync_ChangeCommentData = function(Id, CommentData)
{ {
var AscCommentData = new asc_CCommentData(CommentData); var AscCommentData = new asc_CCommentData(CommentData);
this.asc_fireCallback("asc_onChangeCommentData", Id, AscCommentData); this.asc_fireCallback("asc_onChangeCommentData", Id, AscCommentData);
} };
asc_docs_api.prototype.sync_LockComment = function(Id, UserId) asc_docs_api.prototype.sync_LockComment = function(Id, UserId)
{ {
this.asc_fireCallback("asc_onLockComment", Id, UserId); this.asc_fireCallback("asc_onLockComment", Id, UserId);
} };
asc_docs_api.prototype.sync_UnLockComment = function(Id) asc_docs_api.prototype.sync_UnLockComment = function(Id)
{ {
this.asc_fireCallback("asc_onUnLockComment", Id); this.asc_fireCallback("asc_onUnLockComment", Id);
} };
// работа с шрифтами // работа с шрифтами
asc_docs_api.prototype.asyncFontsDocumentStartLoaded = function() asc_docs_api.prototype.asyncFontsDocumentStartLoaded = function()
...@@ -3576,11 +3586,11 @@ asc_docs_api.prototype.asyncFontsDocumentStartLoaded = function() ...@@ -3576,11 +3586,11 @@ asc_docs_api.prototype.asyncFontsDocumentStartLoaded = function()
_progress.ImagesCount = _count + g_oUserTexturePresets.length; _progress.ImagesCount = _count + g_oUserTexturePresets.length;
_progress.CurrentImage = 0; _progress.CurrentImage = 0;
} }
} };
asc_docs_api.prototype.GenerateStyles = function() asc_docs_api.prototype.GenerateStyles = function()
{ {
return; return;
} };
asc_docs_api.prototype.asyncFontsDocumentEndLoaded = function() asc_docs_api.prototype.asyncFontsDocumentEndLoaded = function()
{ {
// все, шрифты загружены. Теперь нужно подгрузить картинки // все, шрифты загружены. Теперь нужно подгрузить картинки
...@@ -3652,13 +3662,13 @@ asc_docs_api.prototype.asyncFontsDocumentEndLoaded = function() ...@@ -3652,13 +3662,13 @@ asc_docs_api.prototype.asyncFontsDocumentEndLoaded = function()
this.ImageLoader.bIsLoadDocumentFirst = true; this.ImageLoader.bIsLoadDocumentFirst = true;
this.ImageLoader.LoadDocumentImages(_loader_object.ImageMap, true); this.ImageLoader.LoadDocumentImages(_loader_object.ImageMap, true);
} };
asc_docs_api.prototype.asyncImagesDocumentStartLoaded = function() asc_docs_api.prototype.asyncImagesDocumentStartLoaded = function()
{ {
// евент о заморозке не нужен... оно и так заморожено // евент о заморозке не нужен... оно и так заморожено
// просто нужно вывести информацию в статус бар (что началась загрузка картинок) // просто нужно вывести информацию в статус бар (что началась загрузка картинок)
} };
asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function() asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function()
{ {
if (this.EndActionLoadImages == 1) if (this.EndActionLoadImages == 1)
...@@ -3698,7 +3708,7 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function() ...@@ -3698,7 +3708,7 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function()
this.asyncServerIdStartLoaded(); this.asyncServerIdStartLoaded();
} }
} };
asc_docs_api.prototype.asc_getComments = function() asc_docs_api.prototype.asc_getComments = function()
{ {
...@@ -3722,7 +3732,7 @@ asc_docs_api.prototype.asc_getComments = function() ...@@ -3722,7 +3732,7 @@ asc_docs_api.prototype.asc_getComments = function()
} }
} }
return comms; return comms;
} };
asc_docs_api.prototype.OpenDocumentEndCallback = function() asc_docs_api.prototype.OpenDocumentEndCallback = function()
{ {
...@@ -3861,19 +3871,19 @@ asc_docs_api.prototype.asyncFontStartLoaded = function() ...@@ -3861,19 +3871,19 @@ asc_docs_api.prototype.asyncFontStartLoaded = function()
{ {
// здесь прокинуть евент о заморозке меню // здесь прокинуть евент о заморозке меню
this.sync_StartAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadFont); this.sync_StartAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadFont);
} };
asc_docs_api.prototype.asyncFontEndLoaded = function(fontinfo) asc_docs_api.prototype.asyncFontEndLoaded = function(fontinfo)
{ {
this.sync_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadFont); this.sync_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadFont);
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_EndFontLoad); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_EndFontLoad);
this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { FontFamily : { Name : fontinfo.Name , Index : -1 } } ) ); this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { FontFamily : { Name : fontinfo.Name , Index : -1 } } ) );
// отжать заморозку меню // отжать заморозку меню
} };
asc_docs_api.prototype.asyncImageStartLoaded = function() asc_docs_api.prototype.asyncImageStartLoaded = function()
{ {
// здесь прокинуть евент о заморозке меню // здесь прокинуть евент о заморозке меню
} };
asc_docs_api.prototype.asyncImageEndLoaded = function(_image) asc_docs_api.prototype.asyncImageEndLoaded = function(_image)
{ {
// отжать заморозку меню // отжать заморозку меню
...@@ -3883,20 +3893,20 @@ asc_docs_api.prototype.asyncImageEndLoaded = function(_image) ...@@ -3883,20 +3893,20 @@ asc_docs_api.prototype.asyncImageEndLoaded = function(_image)
{ {
this.WordControl.m_oLogicDocument.Add_FlowImage(50, 50, _image.src); this.WordControl.m_oLogicDocument.Add_FlowImage(50, 50, _image.src);
} }
} };
asc_docs_api.prototype.get_PresentationWidth = function() asc_docs_api.prototype.get_PresentationWidth = function()
{ {
if (this.WordControl.m_oLogicDocument == null) if (this.WordControl.m_oLogicDocument == null)
return 0; return 0;
return this.WordControl.m_oLogicDocument.Width; return this.WordControl.m_oLogicDocument.Width;
} };
asc_docs_api.prototype.get_PresentationHeight = function() asc_docs_api.prototype.get_PresentationHeight = function()
{ {
if (this.WordControl.m_oLogicDocument == null) if (this.WordControl.m_oLogicDocument == null)
return 0; return 0;
return this.WordControl.m_oLogicDocument.Height; return this.WordControl.m_oLogicDocument.Height;
} };
asc_docs_api.prototype.SendOpenProgress = function() asc_docs_api.prototype.SendOpenProgress = function()
{ {
...@@ -3910,7 +3920,7 @@ asc_docs_api.prototype.SendOpenProgress = function() ...@@ -3910,7 +3920,7 @@ asc_docs_api.prototype.SendOpenProgress = function()
_percents = Math.min(this._lastConvertProgress + _percents * (100.0 - this._lastConvertProgress) / 100.0, 100.0); _percents = Math.min(this._lastConvertProgress + _percents * (100.0 - this._lastConvertProgress) / 100.0, 100.0);
return this.sync_SendProgress(_percents); return this.sync_SendProgress(_percents);
//console.log("" + this.OpenDocumentProgress.CurrentFont); //console.log("" + this.OpenDocumentProgress.CurrentFont);
} };
asc_docs_api.prototype.sync_SendProgress = function(Percents) asc_docs_api.prototype.sync_SendProgress = function(Percents)
{ {
...@@ -3939,7 +3949,7 @@ asc_docs_api.prototype.pre_Paste = function(_fonts, _images, callback) ...@@ -3939,7 +3949,7 @@ asc_docs_api.prototype.pre_Paste = function(_fonts, _images, callback)
this.isPasteFonts_Images = true; this.isPasteFonts_Images = true;
this.FontLoader.LoadDocumentFonts2(_fonts); this.FontLoader.LoadDocumentFonts2(_fonts);
} };
asc_docs_api.prototype.pre_SaveCallback = function() asc_docs_api.prototype.pre_SaveCallback = function()
{ {
...@@ -3952,32 +3962,32 @@ asc_docs_api.prototype.pre_SaveCallback = function() ...@@ -3952,32 +3962,32 @@ asc_docs_api.prototype.pre_SaveCallback = function()
} }
this.WordControl.SlideDrawer.CheckRecalculateSlide(); this.WordControl.SlideDrawer.CheckRecalculateSlide();
} };
asc_docs_api.prototype.initEvents2MobileAdvances = function() asc_docs_api.prototype.initEvents2MobileAdvances = function()
{ {
this.WordControl.initEvents2MobileAdvances(); this.WordControl.initEvents2MobileAdvances();
} };
asc_docs_api.prototype.ViewScrollToX = function(x) asc_docs_api.prototype.ViewScrollToX = function(x)
{ {
this.WordControl.m_oScrollHorApi.scrollToX(x); this.WordControl.m_oScrollHorApi.scrollToX(x);
} };
asc_docs_api.prototype.ViewScrollToY = function(y) asc_docs_api.prototype.ViewScrollToY = function(y)
{ {
this.WordControl.m_oScrollVerApi.scrollToY(y); this.WordControl.m_oScrollVerApi.scrollToY(y);
} };
asc_docs_api.prototype.GetDocWidthPx = function() asc_docs_api.prototype.GetDocWidthPx = function()
{ {
return this.WordControl.m_dDocumentWidth; return this.WordControl.m_dDocumentWidth;
} };
asc_docs_api.prototype.GetDocHeightPx = function() asc_docs_api.prototype.GetDocHeightPx = function()
{ {
return this.WordControl.m_dDocumentHeight; return this.WordControl.m_dDocumentHeight;
} };
asc_docs_api.prototype.ClearSearch = function() asc_docs_api.prototype.ClearSearch = function()
{ {
return this.WordControl.m_oDrawingDocument.EndSearch(true); return this.WordControl.m_oDrawingDocument.EndSearch(true);
} };
asc_docs_api.prototype.GetCurrentVisiblePage = function() asc_docs_api.prototype.GetCurrentVisiblePage = function()
{ {
return this.WordControl.m_oDrawingDocument.SlideCurrent; return this.WordControl.m_oDrawingDocument.SlideCurrent;
...@@ -3994,7 +4004,7 @@ asc_docs_api.prototype.asc_SetDocumentPlaceChangedEnabled = function(bEnabled) ...@@ -3994,7 +4004,7 @@ asc_docs_api.prototype.asc_SetDocumentPlaceChangedEnabled = function(bEnabled)
{ {
if (this.WordControl) if (this.WordControl)
this.WordControl.m_bDocumentPlaceChangedEnabled = bEnabled; this.WordControl.m_bDocumentPlaceChangedEnabled = bEnabled;
} };
asc_docs_api.prototype.asc_SetViewRulers = function(bRulers) asc_docs_api.prototype.asc_SetViewRulers = function(bRulers)
{ {
...@@ -4048,17 +4058,17 @@ asc_docs_api.prototype.GoToHeader = function(pageNumber) ...@@ -4048,17 +4058,17 @@ asc_docs_api.prototype.GoToHeader = function(pageNumber)
this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState(); this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
global_mouseEvent.ClickCount = oldClickCount; global_mouseEvent.ClickCount = oldClickCount;
} };
asc_docs_api.prototype.changeSlideSize = function(width, height) asc_docs_api.prototype.changeSlideSize = function(width, height)
{ {
this.WordControl.m_oLogicDocument.changeSlideSize(width, height); this.WordControl.m_oLogicDocument.changeSlideSize(width, height);
} };
asc_docs_api.prototype.AddSlide = function(layoutIndex) asc_docs_api.prototype.AddSlide = function(layoutIndex)
{ {
this.WordControl.m_oLogicDocument.addNextSlide(layoutIndex); this.WordControl.m_oLogicDocument.addNextSlide(layoutIndex);
} };
asc_docs_api.prototype.DeleteSlide = function() asc_docs_api.prototype.DeleteSlide = function()
{ {
var _delete_array = this.WordControl.Thumbnails.GetSelectedArray(); var _delete_array = this.WordControl.Thumbnails.GetSelectedArray();
...@@ -4073,11 +4083,11 @@ asc_docs_api.prototype.DeleteSlide = function() ...@@ -4073,11 +4083,11 @@ asc_docs_api.prototype.DeleteSlide = function()
{ {
this.WordControl.m_oLogicDocument.deleteSlides(_delete_array); this.WordControl.m_oLogicDocument.deleteSlides(_delete_array);
} }
} };
asc_docs_api.prototype.DublicateSlide = function() asc_docs_api.prototype.DublicateSlide = function()
{ {
this.WordControl.m_oLogicDocument.DublicateSlide(); this.WordControl.m_oLogicDocument.DublicateSlide();
} };
asc_docs_api.prototype.SelectAllSlides = function(layoutType) asc_docs_api.prototype.SelectAllSlides = function(layoutType)
{ {
...@@ -4089,43 +4099,43 @@ asc_docs_api.prototype.SelectAllSlides = function(layoutType) ...@@ -4089,43 +4099,43 @@ asc_docs_api.prototype.SelectAllSlides = function(layoutType)
this.WordControl.Thumbnails.m_arrPages[i].IsSelected = true; this.WordControl.Thumbnails.m_arrPages[i].IsSelected = true;
} }
this.WordControl.Thumbnails.OnUpdateOverlay(); this.WordControl.Thumbnails.OnUpdateOverlay();
} };
asc_docs_api.prototype.AddShape = function(shapetype) asc_docs_api.prototype.AddShape = function(shapetype)
{ {
} };
asc_docs_api.prototype.ChangeShapeType = function(shapetype) asc_docs_api.prototype.ChangeShapeType = function(shapetype)
{ {
this.WordControl.m_oLogicDocument.changeShapeType(shapetype); this.WordControl.m_oLogicDocument.changeShapeType(shapetype);
} };
asc_docs_api.prototype.AddText = function() asc_docs_api.prototype.AddText = function()
{ {
} };
asc_docs_api.prototype.groupShapes = function() asc_docs_api.prototype.groupShapes = function()
{ {
this.WordControl.m_oLogicDocument.groupShapes(); this.WordControl.m_oLogicDocument.groupShapes();
} };
asc_docs_api.prototype.unGroupShapes = function() asc_docs_api.prototype.unGroupShapes = function()
{ {
this.WordControl.m_oLogicDocument.unGroupShapes(); this.WordControl.m_oLogicDocument.unGroupShapes();
} };
asc_docs_api.prototype.setVerticalAlign = function(align) asc_docs_api.prototype.setVerticalAlign = function(align)
{ {
this.WordControl.m_oLogicDocument.setVerticalAlign(align); this.WordControl.m_oLogicDocument.setVerticalAlign(align);
} };
asc_docs_api.prototype.sync_MouseMoveStartCallback = function() asc_docs_api.prototype.sync_MouseMoveStartCallback = function()
{ {
this.asc_fireCallback("asc_onMouseMoveStart"); this.asc_fireCallback("asc_onMouseMoveStart");
} };
asc_docs_api.prototype.sync_MouseMoveEndCallback = function() asc_docs_api.prototype.sync_MouseMoveEndCallback = function()
{ {
this.asc_fireCallback("asc_onMouseMoveEnd"); this.asc_fireCallback("asc_onMouseMoveEnd");
} };
asc_docs_api.prototype.sync_MouseMoveCallback = function(Data) asc_docs_api.prototype.sync_MouseMoveCallback = function(Data)
{ {
...@@ -4164,7 +4174,7 @@ asc_docs_api.prototype.sync_MouseMoveCallback = function(Data) ...@@ -4164,7 +4174,7 @@ asc_docs_api.prototype.sync_MouseMoveCallback = function(Data)
} }
} }
this.asc_fireCallback("asc_onMouseMove", Data ); this.asc_fireCallback("asc_onMouseMove", Data );
} };
asc_docs_api.prototype.ShowThumbnails = function(bIsShow) asc_docs_api.prototype.ShowThumbnails = function(bIsShow)
{ {
...@@ -4182,7 +4192,7 @@ asc_docs_api.prototype.ShowThumbnails = function(bIsShow) ...@@ -4182,7 +4192,7 @@ asc_docs_api.prototype.ShowThumbnails = function(bIsShow)
this.WordControl.OnResizeSplitter(); this.WordControl.OnResizeSplitter();
this.WordControl.OldSplitter1Pos = old; this.WordControl.OldSplitter1Pos = old;
} }
} };
asc_docs_api.prototype.syncOnThumbnailsShow = function() asc_docs_api.prototype.syncOnThumbnailsShow = function()
{ {
...@@ -4191,7 +4201,7 @@ asc_docs_api.prototype.syncOnThumbnailsShow = function() ...@@ -4191,7 +4201,7 @@ asc_docs_api.prototype.syncOnThumbnailsShow = function()
bIsShow = false; bIsShow = false;
this.asc_fireCallback("asc_onThumbnailsShow", bIsShow); this.asc_fireCallback("asc_onThumbnailsShow", bIsShow);
} };
...@@ -4208,24 +4218,24 @@ asc_docs_api.prototype.can_AddHyperlink = function() ...@@ -4208,24 +4218,24 @@ asc_docs_api.prototype.can_AddHyperlink = function()
return this.WordControl.m_oLogicDocument.Get_SelectedText(true); return this.WordControl.m_oLogicDocument.Get_SelectedText(true);
return false; return false;
} };
// HyperProps - объект CHyperlinkProperty // HyperProps - объект CHyperlinkProperty
asc_docs_api.prototype.add_Hyperlink = function(HyperProps) asc_docs_api.prototype.add_Hyperlink = function(HyperProps)
{ {
this.WordControl.m_oLogicDocument.Hyperlink_Add( HyperProps ); this.WordControl.m_oLogicDocument.Hyperlink_Add( HyperProps );
} };
// HyperProps - объект CHyperlinkProperty // HyperProps - объект CHyperlinkProperty
asc_docs_api.prototype.change_Hyperlink = function(HyperProps) asc_docs_api.prototype.change_Hyperlink = function(HyperProps)
{ {
this.WordControl.m_oLogicDocument.Hyperlink_Modify( HyperProps ); this.WordControl.m_oLogicDocument.Hyperlink_Modify( HyperProps );
} };
asc_docs_api.prototype.remove_Hyperlink = function() asc_docs_api.prototype.remove_Hyperlink = function()
{ {
this.WordControl.m_oLogicDocument.Hyperlink_Remove(); this.WordControl.m_oLogicDocument.Hyperlink_Remove();
} };
function CHyperlinkProperty( obj ) function CHyperlinkProperty( obj )
{ {
...@@ -4243,22 +4253,22 @@ function CHyperlinkProperty( obj ) ...@@ -4243,22 +4253,22 @@ function CHyperlinkProperty( obj )
} }
} }
CHyperlinkProperty.prototype.get_Value = function() { return this.Value; } CHyperlinkProperty.prototype.get_Value = function() { return this.Value; };
CHyperlinkProperty.prototype.put_Value = function(v) { this.Value = v; } CHyperlinkProperty.prototype.put_Value = function(v) { this.Value = v; };
CHyperlinkProperty.prototype.get_ToolTip = function() { return this.ToolTip; } CHyperlinkProperty.prototype.get_ToolTip = function() { return this.ToolTip; };
CHyperlinkProperty.prototype.put_ToolTip = function(v) { this.ToolTip = v; } CHyperlinkProperty.prototype.put_ToolTip = function(v) { this.ToolTip = v; };
CHyperlinkProperty.prototype.get_Text = function() { return this.Text; } CHyperlinkProperty.prototype.get_Text = function() { return this.Text; };
CHyperlinkProperty.prototype.put_Text = function(v) { this.Text = v; } CHyperlinkProperty.prototype.put_Text = function(v) { this.Text = v; };
asc_docs_api.prototype.sync_HyperlinkPropCallback = function(hyperProp) asc_docs_api.prototype.sync_HyperlinkPropCallback = function(hyperProp)
{ {
this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( c_oAscTypeSelectElement.Hyperlink, new CHyperlinkProperty( hyperProp ) ); this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( c_oAscTypeSelectElement.Hyperlink, new CHyperlinkProperty( hyperProp ) );
} };
asc_docs_api.prototype.sync_HyperlinkClickCallback = function(Url) asc_docs_api.prototype.sync_HyperlinkClickCallback = function(Url)
{ {
this.asc_fireCallback("asc_onHyperlinkClick", Url); this.asc_fireCallback("asc_onHyperlinkClick", Url);
} };
asc_docs_api.prototype.sync_CanAddHyperlinkCallback = function(bCanAdd) asc_docs_api.prototype.sync_CanAddHyperlinkCallback = function(bCanAdd)
{ {
...@@ -4266,12 +4276,12 @@ asc_docs_api.prototype.sync_CanAddHyperlinkCallback = function(bCanAdd) ...@@ -4266,12 +4276,12 @@ asc_docs_api.prototype.sync_CanAddHyperlinkCallback = function(bCanAdd)
// this.asc_fireCallback("asc_onCanAddHyperlink", false); // this.asc_fireCallback("asc_onCanAddHyperlink", false);
//else //else
this.asc_fireCallback("asc_onCanAddHyperlink", bCanAdd); this.asc_fireCallback("asc_onCanAddHyperlink", bCanAdd);
} };
asc_docs_api.prototype.sync_DialogAddHyperlink = function() asc_docs_api.prototype.sync_DialogAddHyperlink = function()
{ {
this.asc_fireCallback("asc_onDialogAddHyperlink"); this.asc_fireCallback("asc_onDialogAddHyperlink");
} };
asc_docs_api.prototype.GoToFooter = function(pageNumber) asc_docs_api.prototype.GoToFooter = function(pageNumber)
...@@ -4287,7 +4297,7 @@ asc_docs_api.prototype.GoToFooter = function(pageNumber) ...@@ -4287,7 +4297,7 @@ asc_docs_api.prototype.GoToFooter = function(pageNumber)
this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState(); this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
global_mouseEvent.ClickCount = oldClickCount; global_mouseEvent.ClickCount = oldClickCount;
} };
asc_docs_api.prototype.sync_shapePropCallback = function(pr) asc_docs_api.prototype.sync_shapePropCallback = function(pr)
{ {
var obj = CreateAscShapePropFromProp(pr); var obj = CreateAscShapePropFromProp(pr);
...@@ -4311,7 +4321,7 @@ asc_docs_api.prototype.sync_shapePropCallback = function(pr) ...@@ -4311,7 +4321,7 @@ asc_docs_api.prototype.sync_shapePropCallback = function(pr)
} }
this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( c_oAscTypeSelectElement.Shape, obj ); this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( c_oAscTypeSelectElement.Shape, obj );
} };
asc_docs_api.prototype.sync_slidePropCallback = function(slide) asc_docs_api.prototype.sync_slidePropCallback = function(slide)
{ {
...@@ -4370,7 +4380,7 @@ asc_docs_api.prototype.sync_slidePropCallback = function(slide) ...@@ -4370,7 +4380,7 @@ asc_docs_api.prototype.sync_slidePropCallback = function(slide)
} }
this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( c_oAscTypeSelectElement.Slide, obj ); this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( c_oAscTypeSelectElement.Slide, obj );
} };
asc_docs_api.prototype.ExitHeader_Footer = function(pageNumber) asc_docs_api.prototype.ExitHeader_Footer = function(pageNumber)
{ {
...@@ -4385,28 +4395,28 @@ asc_docs_api.prototype.ExitHeader_Footer = function(pageNumber) ...@@ -4385,28 +4395,28 @@ asc_docs_api.prototype.ExitHeader_Footer = function(pageNumber)
this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState(); this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
global_mouseEvent.ClickCount = oldClickCount; global_mouseEvent.ClickCount = oldClickCount;
} };
asc_docs_api.prototype.GetCurrentPixOffsetY = function() asc_docs_api.prototype.GetCurrentPixOffsetY = function()
{ {
return this.WordControl.m_dScrollY; return this.WordControl.m_dScrollY;
} };
asc_docs_api.prototype.SetPaintFormat = function(value) asc_docs_api.prototype.SetPaintFormat = function(value)
{ {
this.isPaintFormat = value; this.isPaintFormat = value;
this.WordControl.m_oLogicDocument.Document_Format_Copy(); this.WordControl.m_oLogicDocument.Document_Format_Copy();
} };
asc_docs_api.prototype.sync_PaintFormatCallback = function(value) asc_docs_api.prototype.sync_PaintFormatCallback = function(value)
{ {
this.isPaintFormat = value; this.isPaintFormat = value;
return this.asc_fireCallback("asc_onPaintFormatChanged", value); return this.asc_fireCallback("asc_onPaintFormatChanged", value);
} };
asc_docs_api.prototype.ClearFormating = function() asc_docs_api.prototype.ClearFormating = function()
{ {
this.WordControl.m_oLogicDocument.Paragraph_ClearFormatting(); this.WordControl.m_oLogicDocument.Paragraph_ClearFormatting();
} };
asc_docs_api.prototype.SetDeviceInputHelperId = function(idKeyboard) asc_docs_api.prototype.SetDeviceInputHelperId = function(idKeyboard)
{ {
if (window.ID_KEYBOARD_AREA === undefined && this.WordControl.m_oMainView != null) if (window.ID_KEYBOARD_AREA === undefined && this.WordControl.m_oMainView != null)
...@@ -4433,7 +4443,7 @@ asc_docs_api.prototype.SetDeviceInputHelperId = function(idKeyboard) ...@@ -4433,7 +4443,7 @@ asc_docs_api.prototype.SetDeviceInputHelperId = function(idKeyboard)
} }
} }
window.ID_KEYBOARD_AREA.focus(); window.ID_KEYBOARD_AREA.focus();
} };
asc_docs_api.prototype.SetViewMode = function( isViewMode ) asc_docs_api.prototype.SetViewMode = function( isViewMode )
{ {
if (isViewMode) if (isViewMode)
...@@ -4473,19 +4483,19 @@ asc_docs_api.prototype.SetViewMode = function( isViewMode ) ...@@ -4473,19 +4483,19 @@ asc_docs_api.prototype.SetViewMode = function( isViewMode )
if (null != this.WordControl.m_oLogicDocument) if (null != this.WordControl.m_oLogicDocument)
this.WordControl.m_oLogicDocument.viewMode = false; this.WordControl.m_oLogicDocument.viewMode = false;
} }
} };
asc_docs_api.prototype.SetUseEmbeddedCutFonts = function(bUse) asc_docs_api.prototype.SetUseEmbeddedCutFonts = function(bUse)
{ {
this.isUseEmbeddedCutFonts = bUse; this.isUseEmbeddedCutFonts = bUse;
} };
asc_docs_api.prototype.IsNeedDefaultFonts = function() asc_docs_api.prototype.IsNeedDefaultFonts = function()
{ {
if (this.WordControl.m_oLogicDocument != null) if (this.WordControl.m_oLogicDocument != null)
return true; return true;
return false; return false;
} };
asc_docs_api.prototype.can_AddHyperlink = function() asc_docs_api.prototype.can_AddHyperlink = function()
{ {
...@@ -4494,11 +4504,11 @@ asc_docs_api.prototype.can_AddHyperlink = function() ...@@ -4494,11 +4504,11 @@ asc_docs_api.prototype.can_AddHyperlink = function()
return this.WordControl.m_oLogicDocument.Get_SelectedText(true); return this.WordControl.m_oLogicDocument.Get_SelectedText(true);
return false; return false;
} };
asc_docs_api.prototype.add_Hyperlink = function(HyperProps) asc_docs_api.prototype.add_Hyperlink = function(HyperProps)
{ {
this.WordControl.m_oLogicDocument.Hyperlink_Add( HyperProps ); this.WordControl.m_oLogicDocument.Hyperlink_Add( HyperProps );
} };
asc_docs_api.prototype.sync_HyperlinkClickCallback = function(Url) asc_docs_api.prototype.sync_HyperlinkClickCallback = function(Url)
{ {
var indAction = Url.indexOf("ppaction://hlink"); var indAction = Url.indexOf("ppaction://hlink");
...@@ -4535,7 +4545,7 @@ asc_docs_api.prototype.sync_HyperlinkClickCallback = function(Url) ...@@ -4535,7 +4545,7 @@ asc_docs_api.prototype.sync_HyperlinkClickCallback = function(Url)
} }
this.asc_fireCallback("asc_onHyperlinkClick", Url); this.asc_fireCallback("asc_onHyperlinkClick", Url);
} };
asc_docs_api.prototype.UpdateInterfaceState = function() asc_docs_api.prototype.UpdateInterfaceState = function()
{ {
...@@ -4544,7 +4554,7 @@ asc_docs_api.prototype.UpdateInterfaceState = function() ...@@ -4544,7 +4554,7 @@ asc_docs_api.prototype.UpdateInterfaceState = function()
this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState(); this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
this.WordControl.CheckLayouts(true); this.WordControl.CheckLayouts(true);
} }
} };
asc_docs_api.prototype.OnMouseUp = function(x, y) asc_docs_api.prototype.OnMouseUp = function(x, y)
{ {
...@@ -4552,7 +4562,7 @@ asc_docs_api.prototype.OnMouseUp = function(x, y) ...@@ -4552,7 +4562,7 @@ asc_docs_api.prototype.OnMouseUp = function(x, y)
Window_OnMouseUp(_e); Window_OnMouseUp(_e);
//this.WordControl.onMouseUpExternal(x, y); //this.WordControl.onMouseUpExternal(x, y);
} };
asc_docs_api.prototype.OnHandleMessage = function(event) asc_docs_api.prototype.OnHandleMessage = function(event)
{ {
if (null != event && null != event.data) if (null != event && null != event.data)
...@@ -4574,7 +4584,7 @@ asc_docs_api.prototype.OnHandleMessage = function(event) ...@@ -4574,7 +4584,7 @@ asc_docs_api.prototype.OnHandleMessage = function(event)
} }
} }
} }
} };
asc_docs_api.prototype.asyncImageEndLoaded2 = null; asc_docs_api.prototype.asyncImageEndLoaded2 = null;
asc_docs_api.prototype.ChangeTheme = function(indexTheme) asc_docs_api.prototype.ChangeTheme = function(indexTheme)
...@@ -4588,11 +4598,11 @@ asc_docs_api.prototype.ChangeTheme = function(indexTheme) ...@@ -4588,11 +4598,11 @@ asc_docs_api.prototype.ChangeTheme = function(indexTheme)
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_ChangeTheme); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_ChangeTheme);
this.ThemeLoader.StartLoadTheme(indexTheme); this.ThemeLoader.StartLoadTheme(indexTheme);
} }
} };
asc_docs_api.prototype.StartLoadTheme = function() asc_docs_api.prototype.StartLoadTheme = function()
{ {
} };
asc_docs_api.prototype.EndLoadTheme = function(theme_load_info) asc_docs_api.prototype.EndLoadTheme = function(theme_load_info)
{ {
this.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadTheme); this.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadTheme);
...@@ -4605,7 +4615,7 @@ asc_docs_api.prototype.EndLoadTheme = function(theme_load_info) ...@@ -4605,7 +4615,7 @@ asc_docs_api.prototype.EndLoadTheme = function(theme_load_info)
this.WordControl.ThemeGenerateThumbnails(theme_load_info.Master); this.WordControl.ThemeGenerateThumbnails(theme_load_info.Master);
// меняем шаблоны в меню // меняем шаблоны в меню
this.WordControl.CheckLayouts(); this.WordControl.CheckLayouts();
} };
asc_docs_api.prototype.ChangeLayout = function(layout_index) asc_docs_api.prototype.ChangeLayout = function(layout_index)
{ {
...@@ -4613,7 +4623,7 @@ asc_docs_api.prototype.ChangeLayout = function(layout_index) ...@@ -4613,7 +4623,7 @@ asc_docs_api.prototype.ChangeLayout = function(layout_index)
var _master = this.WordControl.MasterLayouts; var _master = this.WordControl.MasterLayouts;
this.WordControl.m_oLogicDocument.changeLayout(_array, this.WordControl.MasterLayouts, layout_index); this.WordControl.m_oLogicDocument.changeLayout(_array, this.WordControl.MasterLayouts, layout_index);
} };
asc_docs_api.prototype.put_ShapesAlign = function(type) asc_docs_api.prototype.put_ShapesAlign = function(type)
{ {
...@@ -4725,42 +4735,42 @@ asc_docs_api.prototype.sync_DemonstrationSlideChanged = function(slideNum) ...@@ -4725,42 +4735,42 @@ asc_docs_api.prototype.sync_DemonstrationSlideChanged = function(slideNum)
asc_docs_api.prototype.StartDemonstration = function(div_id, slidestart_num) asc_docs_api.prototype.StartDemonstration = function(div_id, slidestart_num)
{ {
this.WordControl.DemonstrationManager.Start(div_id, slidestart_num, true); this.WordControl.DemonstrationManager.Start(div_id, slidestart_num, true);
} };
asc_docs_api.prototype.EndDemonstration = function() asc_docs_api.prototype.EndDemonstration = function()
{ {
this.WordControl.DemonstrationManager.End(); this.WordControl.DemonstrationManager.End();
} };
asc_docs_api.prototype.DemonstrationPlay = function() asc_docs_api.prototype.DemonstrationPlay = function()
{ {
this.WordControl.DemonstrationManager.Play(); this.WordControl.DemonstrationManager.Play();
} };
asc_docs_api.prototype.DemonstrationPause = function() asc_docs_api.prototype.DemonstrationPause = function()
{ {
this.WordControl.DemonstrationManager.Pause(); this.WordControl.DemonstrationManager.Pause();
} };
asc_docs_api.prototype.DemonstrationEndShowMessage = function(message) asc_docs_api.prototype.DemonstrationEndShowMessage = function(message)
{ {
this.WordControl.DemonstrationManager.EndShowMessage = message; this.WordControl.DemonstrationManager.EndShowMessage = message;
} };
asc_docs_api.prototype.DemonstrationNextSlide = function() asc_docs_api.prototype.DemonstrationNextSlide = function()
{ {
this.WordControl.DemonstrationManager.NextSlide(); this.WordControl.DemonstrationManager.NextSlide();
} };
asc_docs_api.prototype.DemonstrationPrevSlide = function() asc_docs_api.prototype.DemonstrationPrevSlide = function()
{ {
this.WordControl.DemonstrationManager.PrevSlide(); this.WordControl.DemonstrationManager.PrevSlide();
} };
asc_docs_api.prototype.DemonstrationGoToSlide = function(slideNum) asc_docs_api.prototype.DemonstrationGoToSlide = function(slideNum)
{ {
this.WordControl.DemonstrationManager.GoToSlide(slideNum); this.WordControl.DemonstrationManager.GoToSlide(slideNum);
} };
asc_docs_api.prototype.ApplySlideTiming = function(oTiming) asc_docs_api.prototype.ApplySlideTiming = function(oTiming)
{ {
...@@ -4775,7 +4785,7 @@ asc_docs_api.prototype.ApplySlideTiming = function(oTiming) ...@@ -4775,7 +4785,7 @@ asc_docs_api.prototype.ApplySlideTiming = function(oTiming)
_curSlide.applyTiming(oTiming); _curSlide.applyTiming(oTiming);
} }
this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState(); this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
} };
asc_docs_api.prototype.SlideTimingApplyToAll = function() asc_docs_api.prototype.SlideTimingApplyToAll = function()
{ {
var _count = this.WordControl.m_oDrawingDocument.SlidesCount; var _count = this.WordControl.m_oDrawingDocument.SlidesCount;
...@@ -4795,7 +4805,7 @@ asc_docs_api.prototype.SlideTimingApplyToAll = function() ...@@ -4795,7 +4805,7 @@ asc_docs_api.prototype.SlideTimingApplyToAll = function()
_slides[i].applyTiming(_default); _slides[i].applyTiming(_default);
} }
} };
asc_docs_api.prototype.SlideTransitionPlay = function() asc_docs_api.prototype.SlideTransitionPlay = function()
{ {
var _count = this.WordControl.m_oDrawingDocument.SlidesCount; var _count = this.WordControl.m_oDrawingDocument.SlidesCount;
...@@ -4810,20 +4820,20 @@ asc_docs_api.prototype.SlideTransitionPlay = function() ...@@ -4810,20 +4820,20 @@ asc_docs_api.prototype.SlideTransitionPlay = function()
_tr.Duration = _timing.TransitionDuration; _tr.Duration = _timing.TransitionDuration;
_tr.Start(true); _tr.Start(true);
} };
asc_docs_api.prototype.SetTextBoxInputMode = function(bIsEA) asc_docs_api.prototype.SetTextBoxInputMode = function(bIsEA)
{ {
this.WordControl.SetTextBoxMode(bIsEA); this.WordControl.SetTextBoxMode(bIsEA);
} };
asc_docs_api.prototype.GetTextBoxInputMode = function() asc_docs_api.prototype.GetTextBoxInputMode = function()
{ {
return this.WordControl.TextBoxInputMode; return this.WordControl.TextBoxInputMode;
} };
asc_docs_api.prototype.asc_setCoAuthoringEnable = function (isCoAuthoringEnable) asc_docs_api.prototype.asc_setCoAuthoringEnable = function (isCoAuthoringEnable)
{ {
this.isCoAuthoringEnable = !!isCoAuthoringEnable; this.isCoAuthoringEnable = !!isCoAuthoringEnable;
} };
asc_docs_api.prototype.sync_EndAddShape = function() asc_docs_api.prototype.sync_EndAddShape = function()
{ {
...@@ -4832,14 +4842,14 @@ asc_docs_api.prototype.sync_EndAddShape = function() ...@@ -4832,14 +4842,14 @@ asc_docs_api.prototype.sync_EndAddShape = function()
{ {
this.WordControl.m_oDrawingDocument.UnlockCursorType(); this.WordControl.m_oDrawingDocument.UnlockCursorType();
} }
} };
// Вставка диаграмм // Вставка диаграмм
asc_docs_api.prototype.asc_getChartObject = function(type) asc_docs_api.prototype.asc_getChartObject = function(type)
{ {
this.isChartEditor = true; // Для совместного редактирования this.isChartEditor = true; // Для совместного редактирования
return this.WordControl.m_oLogicDocument.Get_ChartObject(type); return this.WordControl.m_oLogicDocument.Get_ChartObject(type);
} };
asc_docs_api.prototype.asc_addChartDrawingObject = function(chartBinary) asc_docs_api.prototype.asc_addChartDrawingObject = function(chartBinary)
{ {
...@@ -4853,7 +4863,7 @@ asc_docs_api.prototype.asc_addChartDrawingObject = function(chartBinary) ...@@ -4853,7 +4863,7 @@ asc_docs_api.prototype.asc_addChartDrawingObject = function(chartBinary)
this.WordControl.m_oLogicDocument.addChart(chartBinary); this.WordControl.m_oLogicDocument.addChart(chartBinary);
} }
} }
} };
asc_docs_api.prototype.asc_editChartDrawingObject = function(chartBinary) asc_docs_api.prototype.asc_editChartDrawingObject = function(chartBinary)
{ {
...@@ -4864,17 +4874,24 @@ asc_docs_api.prototype.asc_editChartDrawingObject = function(chartBinary) ...@@ -4864,17 +4874,24 @@ asc_docs_api.prototype.asc_editChartDrawingObject = function(chartBinary)
{ {
this.WordControl.m_oLogicDocument.Edit_Chart(chartBinary["binary"]); this.WordControl.m_oLogicDocument.Edit_Chart(chartBinary["binary"]);
} }
} };
asc_docs_api.prototype.asc_getChartPreviews = function(chartType) asc_docs_api.prototype.asc_getChartPreviews = function(chartType)
{ {
return this.chartPreviewManager.getChartPreviews(chartType); return this.chartPreviewManager.getChartPreviews(chartType);
} };
asc_docs_api.prototype.sync_closeChartEditor = function() asc_docs_api.prototype.sync_closeChartEditor = function()
{ {
this.asc_fireCallback("asc_onCloseChartEditor"); this.asc_fireCallback("asc_onCloseChartEditor");
} };
asc_docs_api.prototype.asc_stopSaving = function () {
this.waitSave = true;
};
asc_docs_api.prototype.asc_continueSaving = function () {
this.waitSave = false;
};
//----------------------------------------------------------------- //-----------------------------------------------------------------
// События контекстного меню // События контекстного меню
......
...@@ -292,6 +292,7 @@ var DocumentPageSize = new function() { ...@@ -292,6 +292,7 @@ var DocumentPageSize = new function() {
// var _api = new asc_docs_api(); // var _api = new asc_docs_api();
// _api.init(oWordControl); // _api.init(oWordControl);
/** @constructor */
function asc_docs_api(name) function asc_docs_api(name)
{ {
g_fontApplication.Init(); g_fontApplication.Init();
...@@ -1221,8 +1222,8 @@ function CChatMessage(user, message) ...@@ -1221,8 +1222,8 @@ function CChatMessage(user, message)
this.UserId = (undefined != user_id) ? user_id : null; this.UserId = (undefined != user_id) ? user_id : null;
this.Message = (undefined != message) ? message : null; this.Message = (undefined != message) ? message : null;
} }
CChatMessage.prototype.get_UserId = function() { return this.UserId; } CChatMessage.prototype.get_UserId = function() { return this.UserId; };
CChatMessage.prototype.get_Message = function() { return this.Message; } CChatMessage.prototype.get_Message = function() { return this.Message; };
/* /*
ToDo Register Callback OnCoAuthoringChatReceiveMessage return object CChatMessage (возможно возвращается МАСС�?В CChatMessage со всеми сообщениями) ToDo Register Callback OnCoAuthoringChatReceiveMessage return object CChatMessage (возможно возвращается МАСС�?В CChatMessage со всеми сообщениями)
...@@ -1603,17 +1604,17 @@ asc_docs_api.prototype.put_FramePr = function(Obj) ...@@ -1603,17 +1604,17 @@ asc_docs_api.prototype.put_FramePr = function(Obj)
this.WordControl.m_oLogicDocument.Set_ParagraphFramePr( Obj ); this.WordControl.m_oLogicDocument.Set_ParagraphFramePr( Obj );
} }
} }
} };
asc_docs_api.prototype.asyncFontEndLoaded_MathDraw = function(Obj) asc_docs_api.prototype.asyncFontEndLoaded_MathDraw = function(Obj)
{ {
this.sync_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadFont); this.sync_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadFont);
Obj.Generate2(); Obj.Generate2();
} };
asc_docs_api.prototype.sendMathTypesToMenu = function(_math) asc_docs_api.prototype.sendMathTypesToMenu = function(_math)
{ {
this.asc_fireCallback("asc_onMathTypes", _math); this.asc_fireCallback("asc_onMathTypes", _math);
} };
asc_docs_api.prototype.asyncFontEndLoaded_DropCap = function(Obj) asc_docs_api.prototype.asyncFontEndLoaded_DropCap = function(Obj)
{ {
...@@ -1624,17 +1625,17 @@ asc_docs_api.prototype.asyncFontEndLoaded_DropCap = function(Obj) ...@@ -1624,17 +1625,17 @@ asc_docs_api.prototype.asyncFontEndLoaded_DropCap = function(Obj)
this.WordControl.m_oLogicDocument.Set_ParagraphFramePr( Obj ); this.WordControl.m_oLogicDocument.Set_ParagraphFramePr( Obj );
} }
// отжать заморозку меню // отжать заморозку меню
} };
asc_docs_api.prototype.asc_addDropCap = function(bInText) asc_docs_api.prototype.asc_addDropCap = function(bInText)
{ {
this.WordControl.m_oLogicDocument.Add_DropCap( bInText ); this.WordControl.m_oLogicDocument.Add_DropCap( bInText );
} };
asc_docs_api.prototype.removeDropcap = function(bDropCap) asc_docs_api.prototype.removeDropcap = function(bDropCap)
{ {
this.WordControl.m_oLogicDocument.Remove_DropCap( bDropCap ); this.WordControl.m_oLogicDocument.Remove_DropCap( bDropCap );
} };
function CMathProp(obj) function CMathProp(obj)
{ {
...@@ -1700,43 +1701,43 @@ function CParagraphPropEx (obj) ...@@ -1700,43 +1701,43 @@ function CParagraphPropEx (obj)
CParagraphPropEx.prototype.get_ContextualSpacing = function () CParagraphPropEx.prototype.get_ContextualSpacing = function ()
{ {
return this.ContextualSpacing; return this.ContextualSpacing;
} };
CParagraphPropEx.prototype.get_Ind = function () CParagraphPropEx.prototype.get_Ind = function ()
{ {
return this.Ind; return this.Ind;
} };
CParagraphPropEx.prototype.get_Jc = function () CParagraphPropEx.prototype.get_Jc = function ()
{ {
return this.Jc; return this.Jc;
} };
CParagraphPropEx.prototype.get_KeepLines = function () CParagraphPropEx.prototype.get_KeepLines = function ()
{ {
return this.KeepLines; return this.KeepLines;
} };
CParagraphPropEx.prototype.get_KeepNext = function () CParagraphPropEx.prototype.get_KeepNext = function ()
{ {
return this.KeepNext; return this.KeepNext;
} };
CParagraphPropEx.prototype.get_PageBreakBefore = function () CParagraphPropEx.prototype.get_PageBreakBefore = function ()
{ {
return this.PageBreakBefore; return this.PageBreakBefore;
} };
CParagraphPropEx.prototype.get_Spacing = function () CParagraphPropEx.prototype.get_Spacing = function ()
{ {
return this.Spacing; return this.Spacing;
} };
CParagraphPropEx.prototype.get_Shd = function () CParagraphPropEx.prototype.get_Shd = function ()
{ {
return this.Shd; return this.Shd;
} };
CParagraphPropEx.prototype.get_WidowControl = function () CParagraphPropEx.prototype.get_WidowControl = function ()
{ {
return this.WidowControl; return this.WidowControl;
} };
CParagraphPropEx.prototype.get_Tabs = function () CParagraphPropEx.prototype.get_Tabs = function ()
{ {
return this.Tabs; return this.Tabs;
} };
// Text properties // Text properties
// TextPr : // TextPr :
...@@ -1818,59 +1819,59 @@ function CTextProp (obj) ...@@ -1818,59 +1819,59 @@ function CTextProp (obj)
CTextProp.prototype.get_Bold = function () CTextProp.prototype.get_Bold = function ()
{ {
return this.Bold; return this.Bold;
} };
CTextProp.prototype.get_Italic = function () CTextProp.prototype.get_Italic = function ()
{ {
return this.Italic; return this.Italic;
} };
CTextProp.prototype.get_Underline = function () CTextProp.prototype.get_Underline = function ()
{ {
return this.Underline; return this.Underline;
} };
CTextProp.prototype.get_Strikeout = function () CTextProp.prototype.get_Strikeout = function ()
{ {
return this.Strikeout; return this.Strikeout;
} };
CTextProp.prototype.get_FontFamily = function () CTextProp.prototype.get_FontFamily = function ()
{ {
return this.FontFamily; return this.FontFamily;
} };
CTextProp.prototype.get_FontSize = function () CTextProp.prototype.get_FontSize = function ()
{ {
return this.FontSize; return this.FontSize;
} };
CTextProp.prototype.get_Color = function () CTextProp.prototype.get_Color = function ()
{ {
return this.Color; return this.Color;
} };
CTextProp.prototype.get_VertAlign = function () CTextProp.prototype.get_VertAlign = function ()
{ {
return this.VertAlign; return this.VertAlign;
} };
CTextProp.prototype.get_HighLight = function () CTextProp.prototype.get_HighLight = function ()
{ {
return this.HighLight; return this.HighLight;
} };
CTextProp.prototype.get_Spacing = function () CTextProp.prototype.get_Spacing = function ()
{ {
return this.Spacing; return this.Spacing;
} };
CTextProp.prototype.get_DStrikeout = function () CTextProp.prototype.get_DStrikeout = function ()
{ {
return this.DStrikeout; return this.DStrikeout;
} };
CTextProp.prototype.get_Caps = function () CTextProp.prototype.get_Caps = function ()
{ {
return this.Caps; return this.Caps;
} };
CTextProp.prototype.get_SmallCaps = function () CTextProp.prototype.get_SmallCaps = function ()
{ {
return this.SmallCaps; return this.SmallCaps;
} };
// paragraph and text properties objects container // paragraph and text properties objects container
...@@ -1882,11 +1883,11 @@ function CParagraphAndTextProp (paragraphProp, textProp) ...@@ -1882,11 +1883,11 @@ function CParagraphAndTextProp (paragraphProp, textProp)
CParagraphAndTextProp.prototype.get_ParaPr = function () CParagraphAndTextProp.prototype.get_ParaPr = function ()
{ {
return this.ParaPr; return this.ParaPr;
} };
CParagraphAndTextProp.prototype.get_TextPr = function () CParagraphAndTextProp.prototype.get_TextPr = function ()
{ {
return this.TextPr; return this.TextPr;
} };
// //
asc_docs_api.prototype.get_TextProps = function() asc_docs_api.prototype.get_TextProps = function()
...@@ -1897,18 +1898,18 @@ asc_docs_api.prototype.get_TextProps = function() ...@@ -1897,18 +1898,18 @@ asc_docs_api.prototype.get_TextProps = function()
// return { ParaPr: ParaPr, TextPr : TextPr }; // return { ParaPr: ParaPr, TextPr : TextPr };
return new CParagraphAndTextProp (ParaPr, TextPr); // uncomment if this method will be used externally. 20/03/2012 uncommented for testers return new CParagraphAndTextProp (ParaPr, TextPr); // uncomment if this method will be used externally. 20/03/2012 uncommented for testers
} };
// ------- // -------
asc_docs_api.prototype.GetJSONLogicDocument = function() asc_docs_api.prototype.GetJSONLogicDocument = function()
{ {
return JSON.stringify(this.WordControl.m_oLogicDocument); return JSON.stringify(this.WordControl.m_oLogicDocument);
} };
asc_docs_api.prototype.get_ContentCount = function() asc_docs_api.prototype.get_ContentCount = function()
{ {
return this.WordControl.m_oLogicDocument.Content.length; return this.WordControl.m_oLogicDocument.Content.length;
} };
asc_docs_api.prototype.select_Element = function(Index) asc_docs_api.prototype.select_Element = function(Index)
{ {
...@@ -1932,7 +1933,7 @@ asc_docs_api.prototype.select_Element = function(Index) ...@@ -1932,7 +1933,7 @@ asc_docs_api.prototype.select_Element = function(Index)
Document.Content[Index].Selection.EndPos = Document.Content[Index].Content.length - 1; Document.Content[Index].Selection.EndPos = Document.Content[Index].Content.length - 1;
Document.Selection_Draw(); Document.Selection_Draw();
} };
asc_docs_api.prototype.UpdateTextPr = function(TextPr) asc_docs_api.prototype.UpdateTextPr = function(TextPr)
{ {
...@@ -1970,7 +1971,7 @@ asc_docs_api.prototype.UpdateTextPr = function(TextPr) ...@@ -1970,7 +1971,7 @@ asc_docs_api.prototype.UpdateTextPr = function(TextPr)
this.sync_TextColor(TextPr); this.sync_TextColor(TextPr);
} }
} };
asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr) asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr)
{ {
//if ( true === CollaborativeEditing.Get_GlobalLock() ) //if ( true === CollaborativeEditing.Get_GlobalLock() )
...@@ -2139,7 +2140,7 @@ asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr) ...@@ -2139,7 +2140,7 @@ asc_docs_api.prototype.UpdateParagraphProp = function(ParaPr)
this.sync_ParaStyleName(ParaPr.StyleName); this.sync_ParaStyleName(ParaPr.StyleName);
this.sync_ListType(ParaPr.ListType); this.sync_ListType(ParaPr.ListType);
this.sync_PrPropCallback(ParaPr); this.sync_PrPropCallback(ParaPr);
} };
/*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/
/*functions for working with clipboard, document*/ /*functions for working with clipboard, document*/
...@@ -2186,26 +2187,26 @@ asc_docs_api.prototype.asc_Print = function() ...@@ -2186,26 +2187,26 @@ asc_docs_api.prototype.asc_Print = function()
} }
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Print);}, true); editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Print);}, true);
} }
} };
asc_docs_api.prototype.Undo = function() asc_docs_api.prototype.Undo = function()
{ {
this.WordControl.m_oLogicDocument.Document_Undo(); this.WordControl.m_oLogicDocument.Document_Undo();
} };
asc_docs_api.prototype.Redo = function() asc_docs_api.prototype.Redo = function()
{ {
this.WordControl.m_oLogicDocument.Document_Redo(); this.WordControl.m_oLogicDocument.Document_Redo();
} };
asc_docs_api.prototype.Copy = function() asc_docs_api.prototype.Copy = function()
{ {
return Editor_Copy_Button(this) return Editor_Copy_Button(this)
} };
asc_docs_api.prototype.Update_ParaTab = function(Default_Tab, ParaTabs){ asc_docs_api.prototype.Update_ParaTab = function(Default_Tab, ParaTabs){
this.WordControl.m_oDrawingDocument.Update_ParaTab(Default_Tab, ParaTabs); this.WordControl.m_oDrawingDocument.Update_ParaTab(Default_Tab, ParaTabs);
} };
asc_docs_api.prototype.Cut = function() asc_docs_api.prototype.Cut = function()
{ {
return Editor_Copy_Button(this, true); return Editor_Copy_Button(this, true);
} };
asc_docs_api.prototype.Paste = function() asc_docs_api.prototype.Paste = function()
{ {
if (false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content)) if (false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content))
...@@ -2235,7 +2236,7 @@ asc_docs_api.prototype.Share = function(){ ...@@ -2235,7 +2236,7 @@ asc_docs_api.prototype.Share = function(){
function OnSave_Callback(e) { function OnSave_Callback(e) {
if (false == e["saveLock"]) { if (false == e["saveLock"]) {
if (false !== editor.waitSave) { if (editor.waitSave) {
// Мы не можем в этот момент сохранять, т.к. попали в ситуацию, когда мы залочили сохранение и успели нажать вставку до ответа // Мы не можем в этот момент сохранять, т.к. попали в ситуацию, когда мы залочили сохранение и успели нажать вставку до ответа
// Нужно снять lock с сохранения // Нужно снять lock с сохранения
editor.CoAuthoringApi.onUnSaveLock = function () { editor.CoAuthoringApi.onUnSaveLock = function () {
...@@ -2495,16 +2496,16 @@ function CDocInfoProp(obj) ...@@ -2495,16 +2496,16 @@ function CDocInfoProp(obj)
this.SymbolsWSCount = -1; this.SymbolsWSCount = -1;
} }
} }
CDocInfoProp.prototype.get_PageCount = function(){ return this.PageCount; } CDocInfoProp.prototype.get_PageCount = function(){ return this.PageCount; };
CDocInfoProp.prototype.put_PageCount = function(v){ this.PageCount = v; } CDocInfoProp.prototype.put_PageCount = function(v){ this.PageCount = v; };
CDocInfoProp.prototype.get_WordsCount = function(){ return this.WordsCount; } CDocInfoProp.prototype.get_WordsCount = function(){ return this.WordsCount; };
CDocInfoProp.prototype.put_WordsCount = function(v){ this.WordsCount = v; } CDocInfoProp.prototype.put_WordsCount = function(v){ this.WordsCount = v; };
CDocInfoProp.prototype.get_ParagraphCount = function(){ return this.ParagraphCount; } CDocInfoProp.prototype.get_ParagraphCount = function(){ return this.ParagraphCount; };
CDocInfoProp.prototype.put_ParagraphCount = function(v){ this.ParagraphCount = v; } CDocInfoProp.prototype.put_ParagraphCount = function(v){ this.ParagraphCount = v; };
CDocInfoProp.prototype.get_SymbolsCount = function(){ return this.SymbolsCount; } CDocInfoProp.prototype.get_SymbolsCount = function(){ return this.SymbolsCount; };
CDocInfoProp.prototype.put_SymbolsCount = function(v){ this.SymbolsCount = v; } CDocInfoProp.prototype.put_SymbolsCount = function(v){ this.SymbolsCount = v; };
CDocInfoProp.prototype.get_SymbolsWSCount = function(){ return this.SymbolsWSCount; } CDocInfoProp.prototype.get_SymbolsWSCount = function(){ return this.SymbolsWSCount; };
CDocInfoProp.prototype.put_SymbolsWSCount = function(v){ this.SymbolsWSCount = v; } CDocInfoProp.prototype.put_SymbolsWSCount = function(v){ this.SymbolsWSCount = v; };
/*callbacks*/ /*callbacks*/
/*asc_docs_api.prototype.sync_CursorLockCallBack = function(isLock){ /*asc_docs_api.prototype.sync_CursorLockCallBack = function(isLock){
...@@ -3368,7 +3369,7 @@ asc_docs_api.prototype.put_ShowTableEmptyLine = function(isShow) ...@@ -3368,7 +3369,7 @@ asc_docs_api.prototype.put_ShowTableEmptyLine = function(isShow)
}; };
asc_docs_api.prototype.get_ShowTableEmptyLine = function(){ asc_docs_api.prototype.get_ShowTableEmptyLine = function(){
return this.isShowTableEmptyLine; return this.isShowTableEmptyLine;
} };
asc_docs_api.prototype.put_PageBreak = function(isBreak) asc_docs_api.prototype.put_PageBreak = function(isBreak)
{ {
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Properties) ) if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Properties) )
...@@ -7335,7 +7336,12 @@ asc_docs_api.prototype.asc_setMailMergeData = function(aList) ...@@ -7335,7 +7336,12 @@ asc_docs_api.prototype.asc_setMailMergeData = function(aList)
{ {
this.asc_StartMailMergeByList(aList); this.asc_StartMailMergeByList(aList);
}; };
asc_docs_api.prototype.asc_stopSaving = function () {
this.waitSave = true;
};
asc_docs_api.prototype.asc_continueSaving = function () {
this.waitSave = false;
};
window["asc_docs_api"] = asc_docs_api; window["asc_docs_api"] = asc_docs_api;
window["asc_docs_api"].prototype["asc_nativeOpenFile"] = function(base64File, version) window["asc_docs_api"].prototype["asc_nativeOpenFile"] = function(base64File, version)
......
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