Commit f80aaed7 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

Bug 31098 - Таблица не экспортируется в CSV

Bug 31097 - Документ не экспортируется в TXT

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66843 954022d7-b5bf-4e40-9824-e11837661b57
parent a17cd5ef
......@@ -36,6 +36,8 @@ function baseEditorsApi(name) {
// Тип состояния на данный момент (сохранение, открытие или никакое)
this.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
// Тип скачивания файлы(download или event).нужен для txt, csv. запоминаем на asc_DownloadAs используем asc_setAdvancedOptions
this.downloadType = DownloadType.None;
this.OpenDocumentProgress = new COpenProgress();
this.documentOrigin = ''; // ToDo скорее всего лишняя переменная и можно обойтись и без нее
......
......@@ -588,7 +588,9 @@ var editor;
sendCommand2(this, null, v);
} else if (this.advancedOptionsAction === c_oAscAdvancedOptionsAction.Save) {
this._asc_downloadAs(c_oAscFileType.CSV, c_oAscAsyncAction.DownloadAs, {CSVOptions: option});
var options = {CSVOptions: option, downloadType: this.downloadType};
this.downloadType = DownloadType.None;
this._asc_downloadAs(c_oAscFileType.CSV, c_oAscAsyncAction.DownloadAs, options);
}
break;
}
......@@ -718,6 +720,7 @@ var editor;
this.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, actionType);
}
var cp = {'delimiter': c_oAscCsvDelimiter.Comma, 'codepage': c_oAscCodePageUtf8, 'encodings': getEncodingParams()};
this.downloadType = options.downloadType;
this.handlers.trigger("asc_onAdvancedOptions", new asc.asc_CAdvancedOptions(c_oAscAdvancedOptionsID.CSV, cp), this.advancedOptionsAction);
return;
} else {
......
......@@ -1888,7 +1888,8 @@ asc_docs_api.prototype.asc_setAdvancedOptions = function(idOption, option) {
};
sendCommand2(t, null, rData);
} else if (this.advancedOptionsAction === c_oAscAdvancedOptionsAction.Save) {
var options = {txtOptions: option};
var options = {txtOptions: option, downloadType: this.downloadType};
this.downloadType = DownloadType.None;
_downloadAs(t, "save", c_oAscFileType.TXT, c_oAscAsyncAction.DownloadAs, options, null);
}
break;
......@@ -6268,6 +6269,7 @@ function _downloadAs(editor, command, filetype, actionType, options, fCallbackRe
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, actionType);
}
var cp = {'codepage': c_oAscCodePageUtf8, 'encodings': getEncodingParams()};
editor.downloadType = options.downloadType;
editor.asc_fireCallback("asc_onAdvancedOptions", new asc.asc_CAdvancedOptions(c_oAscAdvancedOptionsID.TXT, cp), editor.advancedOptionsAction);
return;
} else if (c_oAscFileType.HTML === filetype && null == options.oDocumentMailMerge && null == options.oMailMergeSendData) {
......
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