Commit a7edb4ba authored by Sergey.Konovalov's avatar Sergey.Konovalov

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