Commit 32f9ef42 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

setDocumentModified

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59318 954022d7-b5bf-4e40-9824-e11837661b57
parent b41b3d02
......@@ -4473,6 +4473,16 @@ asc_docs_api.prototype.sync_CanRedoCallback = function(bCanRedo)
window["native"]["OnCallMenuEvent"](61, _stream); // ASC_MENU_EVENT_TYPE_CAN_REDO
};
asc_docs_api.prototype.SetDocumentModified = function(bValue)
{
this.isDocumentModify = bValue;
var _stream = global_memory_stream_menu;
_stream["ClearNoAttack"]();
_stream["WriteBool"](this.isDocumentModify);
window["native"]["OnCallMenuEvent"](66, _stream); // ASC_MENU_EVENT_TYPE_DOCUMETN_MODIFITY
};
// find -------------------------------------------------------------------------------------------------
asc_docs_api.prototype.asc_findText = function(text, isNext, isMatchCase)
{
......
......@@ -11779,11 +11779,9 @@ CDocument.prototype =
if ( true === History.Have_Changes() )
{
editor.isDocumentModify = true;
// дублирование евента. когда будет undo-redo - тогда
// эти евенты начнут отличаться
editor.asc_fireCallback("asc_onDocumentModifiedChanged");
editor.SetDocumentModified(true);
editor._onUpdateDocumentCanSave();
}
else
......
......@@ -760,9 +760,14 @@ asc_docs_api.prototype.TranslateStyleName = function(style_name)
asc_docs_api.prototype.SetUnchangedDocument = function()
{
this.isDocumentModify = false;
this.SetDocumentModified(false);
this._onUpdateDocumentCanSave();
};
asc_docs_api.prototype.SetDocumentModified = function(bValue)
{
this.isDocumentModify = bValue;
this.asc_fireCallback("asc_onDocumentModifiedChanged");
this._onUpdateDocumentCanSave();
};
asc_docs_api.prototype.isDocumentModified = function()
......
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