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

правки для нового сборщика и мейлмерджа

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62619 954022d7-b5bf-4e40-9824-e11837661b57
parent 1803333a
...@@ -369,12 +369,42 @@ function NativeGetFileData() ...@@ -369,12 +369,42 @@ function NativeGetFileData()
{ {
return _api.asc_nativeGetFileData(); return _api.asc_nativeGetFileData();
} }
function NativeGetFileDataHtml()
{
if (_api.asc_nativeGetHtml)
return _api.asc_nativeGetHtml();
return "";
}
function NativeStartMailMergeByList(database)
{
if (_api.asc_StartMailMergeByList)
return _api.asc_StartMailMergeByList(JSON.parse(database));
return undefined;
}
function NativePreviewMailMergeResult(index)
{
if (_api.asc_PreviewMailMergeResult)
return _api.asc_PreviewMailMergeResult(index);
return undefined;
}
function NativeGetMailMergeFiledValue(index, name)
{
if (_api.asc_GetMailMergeFiledValue)
return _api.asc_GetMailMergeFiledValue(index, name);
return "";
}
function GetNativeCountPages() function GetNativeCountPages()
{ {
return _api.asc_nativePrintPagesCount(); return _api.asc_nativePrintPagesCount();
} }
function GetNativeFileDataPDF()
{
return _api.asc_nativeGetPDF();
}
window.memory1 = null; window.memory1 = null;
window.memory2 = null; window.memory2 = null;
......
...@@ -3712,6 +3712,12 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -3712,6 +3712,12 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
{ {
return 1; return 1;
}; };
spreadsheet_api.prototype.asc_nativeGetPDF = function()
{
var _ret = this.asc_nativePrint();
return _ret.data;
};
/* /*
* Export * Export
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
...@@ -3971,5 +3977,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -3971,5 +3977,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
prot["asc_nativeCalculate"] = prot.asc_nativeCalculate; prot["asc_nativeCalculate"] = prot.asc_nativeCalculate;
prot["asc_nativePrint"] = prot.asc_nativePrint; prot["asc_nativePrint"] = prot.asc_nativePrint;
prot["asc_nativePrintPagesCount"] = prot.asc_nativePrintPagesCount; prot["asc_nativePrintPagesCount"] = prot.asc_nativePrintPagesCount;
prot["asc_nativeGetPDF"] = prot.asc_nativeGetPDF;
} }
)(jQuery, window); )(jQuery, window);
...@@ -5525,6 +5525,28 @@ window["asc_docs_api"].prototype["asc_nativePrintPagesCount"] = function() ...@@ -5525,6 +5525,28 @@ window["asc_docs_api"].prototype["asc_nativePrintPagesCount"] = function()
return this.WordControl.m_oDrawingDocument.SlidesCount; return this.WordControl.m_oDrawingDocument.SlidesCount;
} }
window["asc_docs_api"].prototype["asc_nativeGetPDF"] = function()
{
var pagescount = this["asc_nativePrintPagesCount"]();
var _renderer = new CDocumentRenderer();
_renderer.VectorMemoryForPrint = new CMemory();
var _bOldShowMarks = this.ShowParaMarks;
this.ShowParaMarks = false;
_renderer.IsNoDrawingEmptyPlaceholder = true;
for (var i = 0; i < pagescount; i++)
{
this["asc_nativePrint"](_renderer, i);
}
this.ShowParaMarks = _bOldShowMarks;
window["native"]["Save_End"]("", _renderer.Memory.GetCurPosition());
return _renderer.Memory.data;
};
window["AscDesktopEditor_Save"] = function() window["AscDesktopEditor_Save"] = function()
{ {
return editor.asc_Save(); return editor.asc_Save();
......
...@@ -7414,7 +7414,7 @@ asc_docs_api.prototype.asc_sendMailMergeData = function(oData) ...@@ -7414,7 +7414,7 @@ asc_docs_api.prototype.asc_sendMailMergeData = function(oData)
}; };
asc_docs_api.prototype.asc_GetMailMergeFiledValue = function(nIndex, sName) asc_docs_api.prototype.asc_GetMailMergeFiledValue = function(nIndex, sName)
{ {
return editor.WordControl.m_oLogicDocument.Get_MailMergeFileldValue(nIndex, sName); return this.WordControl.m_oLogicDocument.Get_MailMergeFileldValue(nIndex, sName);
}; };
asc_docs_api.prototype.asc_stopSaving = function () { asc_docs_api.prototype.asc_stopSaving = function () {
this.waitSave = true; this.waitSave = true;
...@@ -7653,6 +7653,19 @@ window["asc_docs_api"].prototype["asc_nativeGetFileData"] = function() ...@@ -7653,6 +7653,19 @@ window["asc_docs_api"].prototype["asc_nativeGetFileData"] = function()
return _memory.ImData.data; return _memory.ImData.data;
}; };
window["asc_docs_api"].prototype["asc_nativeGetHtml"] = function()
{
var _old = window.copyPasteUseBinary;
window.copyPasteUseBinary = false;
this.WordControl.m_oLogicDocument.Select_All();
var oCopyProcessor = new CopyProcessor(api);
oCopyProcessor.Start();
var _ret = oCopyProcessor.getInnerHtml();
this.WordControl.m_oLogicDocument.Selection_Remove();
window.copyPasteUseBinary = _old;
return _ret;
};
window["asc_docs_api"].prototype["asc_nativeCheckPdfRenderer"] = function(_memory1, _memory2) window["asc_docs_api"].prototype["asc_nativeCheckPdfRenderer"] = function(_memory1, _memory2)
{ {
if (true) if (true)
...@@ -7735,6 +7748,27 @@ window["asc_docs_api"].prototype["asc_nativePrintPagesCount"] = function() ...@@ -7735,6 +7748,27 @@ window["asc_docs_api"].prototype["asc_nativePrintPagesCount"] = function()
return this.WordControl.m_oDrawingDocument.m_lPagesCount; return this.WordControl.m_oDrawingDocument.m_lPagesCount;
}; };
window["asc_docs_api"].prototype["asc_nativeGetPDF"] = function()
{
var pagescount = this["asc_nativePrintPagesCount"]();
var _renderer = new CDocumentRenderer();
_renderer.VectorMemoryForPrint = new CMemory();
var _bOldShowMarks = this.ShowParaMarks;
this.ShowParaMarks = false;
for (var i = 0; i < pagescount; i++)
{
this["asc_nativePrint"](_renderer, i);
}
this.ShowParaMarks = _bOldShowMarks;
window["native"]["Save_End"]("", _renderer.Memory.GetCurPosition());
return _renderer.Memory.data;
};
// desktop editor spellcheck // desktop editor spellcheck
function CSpellCheckApi_desktop() function CSpellCheckApi_desktop()
{ {
......
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