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

common/Shapes/SerializeWriter to function-closure

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