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) ...@@ -4473,6 +4473,16 @@ asc_docs_api.prototype.sync_CanRedoCallback = function(bCanRedo)
window["native"]["OnCallMenuEvent"](61, _stream); // ASC_MENU_EVENT_TYPE_CAN_REDO 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 ------------------------------------------------------------------------------------------------- // find -------------------------------------------------------------------------------------------------
asc_docs_api.prototype.asc_findText = function(text, isNext, isMatchCase) asc_docs_api.prototype.asc_findText = function(text, isNext, isMatchCase)
{ {
......
...@@ -11779,11 +11779,9 @@ CDocument.prototype = ...@@ -11779,11 +11779,9 @@ CDocument.prototype =
if ( true === History.Have_Changes() ) if ( true === History.Have_Changes() )
{ {
editor.isDocumentModify = true;
// дублирование евента. когда будет undo-redo - тогда // дублирование евента. когда будет undo-redo - тогда
// эти евенты начнут отличаться // эти евенты начнут отличаться
editor.asc_fireCallback("asc_onDocumentModifiedChanged"); editor.SetDocumentModified(true);
editor._onUpdateDocumentCanSave(); editor._onUpdateDocumentCanSave();
} }
else else
......
...@@ -760,11 +760,16 @@ asc_docs_api.prototype.TranslateStyleName = function(style_name) ...@@ -760,11 +760,16 @@ asc_docs_api.prototype.TranslateStyleName = function(style_name)
asc_docs_api.prototype.SetUnchangedDocument = function() asc_docs_api.prototype.SetUnchangedDocument = function()
{ {
this.isDocumentModify = false; this.SetDocumentModified(false);
this.asc_fireCallback("asc_onDocumentModifiedChanged");
this._onUpdateDocumentCanSave(); this._onUpdateDocumentCanSave();
}; };
asc_docs_api.prototype.SetDocumentModified = function(bValue)
{
this.isDocumentModify = bValue;
this.asc_fireCallback("asc_onDocumentModifiedChanged");
};
asc_docs_api.prototype.isDocumentModified = function() asc_docs_api.prototype.isDocumentModified = function()
{ {
if (!this.canSave) { if (!this.canSave) {
......
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