Commit 63363b29 authored by Alexander.Trofimov's avatar Alexander.Trofimov

common/Shapes/SerializeWriter to function-closure

parent 66d472c2
......@@ -23,6 +23,10 @@
"../common/Drawings/Metafile.js",
"../common/FontsFreeType/TextMeasurer.js",
"../common/Shapes/EditorSettings.js",
"../common/Shapes/Serialize.js",
"../common/Shapes/SerializeWriter.js",
"../common/Drawings/Hit.js",
"../common/Drawings/ArcTo.js",
"../common/Drawings/ColorArray.js",
......@@ -58,9 +62,6 @@
"../common/Drawings/Externals.js",
"../common/GlobalLoaders.js",
"../common/Shapes/EditorSettings.js",
"../common/Shapes/Serialize.js",
"../common/scroll.js",
"../cell/view/iscroll.js",
......@@ -106,7 +107,6 @@
"../cell/view/EventsController.js",
"../cell/view/WorkbookView.js",
"../word/Editor/SerializeCommon.js",
"../common/Shapes/SerializeWriter.js",
"../cell/view/DrawingObjectsController.js",
"../cell/model/DrawingObjects/Graphics.js",
"../common/Overlay.js",
......
......@@ -23,6 +23,10 @@
"../common/Drawings/Metafile.js",
"../common/FontsFreeType/TextMeasurer.js",
"../common/Shapes/EditorSettings.js",
"../common/Shapes/Serialize.js",
"../common/Shapes/SerializeWriter.js",
"../common/Drawings/Hit.js",
"../common/Drawings/ArcTo.js",
"../common/Drawings/ColorArray.js",
......@@ -58,9 +62,6 @@
"../common/Drawings/Externals.js",
"../common/GlobalLoaders.js",
"../common/Shapes/EditorSettings.js",
"../common/Shapes/Serialize.js",
"../common/scroll.js",
"../common/wordcopypaste.js",
......@@ -93,7 +94,6 @@
"../slide/Drawing/Transitions.js",
"../slide/Drawing/DrawingDocument.js",
"../slide/Drawing/HtmlPage.js",
"../common/Shapes/SerializeWriter.js",
"../word/Editor/SerializeCommon.js",
"../slide/Editor/Format/Presentation.js",
"../cell/view/DrawingObjectsController.js",
......
......@@ -26,6 +26,10 @@
"../common/Drawings/Metafile.js",
"../common/FontsFreeType/TextMeasurer.js",
"../common/Shapes/EditorSettings.js",
"../common/Shapes/Serialize.js",
"../common/Shapes/SerializeWriter.js",
"../common/Drawings/Hit.js",
"../common/Drawings/ArcTo.js",
"../common/Drawings/ColorArray.js",
......@@ -61,16 +65,12 @@
"../common/Drawings/Externals.js",
"../common/GlobalLoaders.js",
"../common/Shapes/EditorSettings.js",
"../common/Shapes/Serialize.js",
"../common/scroll.js",
"../common/Scrolls/iscroll.js",
"../common/wordcopypaste.js",
"../word/apiDefines.js",
"../common/Shapes/SerializeWriter.js",
"../word/Drawing/translations.js",
"../word/Editor/GraphicObjects/Format/ShapePrototype.js",
"../word/Editor/GraphicObjects/Format/ImagePrototype.js",
......
......@@ -4374,7 +4374,7 @@
this.bOccurEndPar = null;
this.oCurHyperlink = null;
this.oCurHyperlinkElem = null;
this.oPresentationWriter = new CBinaryFileWriter();
this.oPresentationWriter = new AscCommon.CBinaryFileWriter();
}
CopyProcessor.prototype =
{
......
......@@ -104,13 +104,13 @@ function asc_CChartBinary(chart) {
this["binary"] = writer.memory.pos + ";" + writer.memory.GetBase64Memory();
if(chart.theme)
{
pptx_writer = new CBinaryFileWriter();
pptx_writer = new AscCommon.CBinaryFileWriter();
pptx_writer.WriteTheme(chart.theme);
this["themeBinary"] = pptx_writer.pos + ";" + pptx_writer.GetBase64Memory();
}
if(chart.colorMapOverride)
{
pptx_writer = new CBinaryFileWriter();
pptx_writer = new AscCommon.CBinaryFileWriter();
pptx_writer.WriteRecord1(1, chart.colorMapOverride, pptx_writer.WriteClrMap);
this["colorMapBinary"] = pptx_writer.pos + ";" + pptx_writer.GetBase64Memory();
}
......
"use strict";
(function(window, undefined){
// Import
var c_dScalePPTXSizes = AscCommon.c_dScalePPTXSizes;
var g_nodeAttributeStart = AscCommon.g_nodeAttributeStart;
......@@ -4126,4 +4128,10 @@ function CBinaryFileWriter()
oThis.WriteRecord2(1, _border.LineRef, oThis.WriteStyleRef);
}
// --------------------------------------------------------------------------
};
\ No newline at end of file
}
//--------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon'].GUID = GUID;
window['AscCommon'].CBinaryFileWriter = CBinaryFileWriter;
})(window);
......@@ -600,7 +600,7 @@ function CopyProcessor(api, onlyBinaryCopy)
this.onlyBinaryCopy = onlyBinaryCopy;
this.oBinaryFileWriter = new BinaryFileWriter(this.oDocument);
this.oPresentationWriter = new CBinaryFileWriter();
this.oPresentationWriter = new AscCommon.CBinaryFileWriter();
this.oPresentationWriter.Start_UseFullUrl();
if (this.api.ThemeLoader) {
this.oPresentationWriter.Start_UseDocumentOrigin(this.api.ThemeLoader.ThemesUrlAbs);
......@@ -1967,7 +1967,7 @@ CopyProcessor.prototype =
{
if(presentation.TableStylesIdMap.hasOwnProperty(key))
{
this.oPresentationWriter.tableStylesGuides[key] = "{" + GUID() + "}"
this.oPresentationWriter.tableStylesGuides[key] = "{" + AscCommon.GUID() + "}"
}
}
......
......@@ -3635,7 +3635,7 @@ function CEditorPage(api)
this.SaveDocument = function()
{
var writer = new CBinaryFileWriter();
var writer = new AscCommon.CBinaryFileWriter();
this.m_oLogicDocument.CalculateComments();
var str = writer.WriteDocument(this.m_oLogicDocument);
return str;
......
......@@ -4918,14 +4918,14 @@ window["asc_docs_api"].prototype["asc_nativeApplyChanges2"] = function(data, isF
window["asc_docs_api"].prototype["asc_nativeGetFile"] = function()
{
var writer = new CBinaryFileWriter();
var writer = new AscCommon.CBinaryFileWriter();
this.WordControl.m_oLogicDocument.CalculateComments();
return writer.WriteDocument(this.WordControl.m_oLogicDocument);
}
window["asc_docs_api"].prototype["asc_nativeGetFileData"] = function()
{
var writer = new CBinaryFileWriter();
var writer = new AscCommon.CBinaryFileWriter();
this.WordControl.m_oLogicDocument.CalculateComments();
writer.WriteDocument2(this.WordControl.m_oLogicDocument);
......
......@@ -752,7 +752,7 @@ function CPPTXContentLoader()
function CPPTXContentWriter()
{
this.BinaryFileWriter = new CBinaryFileWriter();
this.BinaryFileWriter = new AscCommon.CBinaryFileWriter();
this.BinaryFileWriter.Init();
//this.BinaryFileWriter.IsWordWriter = true;
......
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