mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Merge remote-tracking branch 'origin/release/v7.2.0' into feature/pdfwriter
# Conflicts: # Common/3dParty/html/css/src/CCompiledStyle.cpp # Common/3dParty/html/css/src/CCssCalculator_Private.cpp # Common/3dParty/html/css/src/ConstValues.h # Common/3dParty/html/css/src/xhtml/CDocumentStyle.cpp # HtmlFile2/test/main.cpp # PdfWriter/PdfRenderer.cpp # PdfWriter/PdfRenderer.h
This commit is contained in:
@ -35,34 +35,35 @@ window.onload = function()
|
||||
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
if (!window.nativeZlibEngine.open(e.target.result)) return;
|
||||
var files = window.nativeZlibEngine.files;
|
||||
var jsZlib = new AscCommon.CZLibEngineJS();
|
||||
if (!jsZlib.open(e.target.result)) return;
|
||||
var files = jsZlib.files;
|
||||
var _files = {};
|
||||
for (var _path in files)
|
||||
{
|
||||
_files[_path] = window.nativeZlibEngine.getFile(_path);
|
||||
_files[_path] = jsZlib.getFile(_path);
|
||||
window.writeFile(_path, _files[_path]);
|
||||
}
|
||||
window.nativeZlibEngine.close();
|
||||
jsZlib.close();
|
||||
|
||||
if (!window.nativeZlibEngine.create()) return;
|
||||
if (!jsZlib.create()) return;
|
||||
for (var _path in files)
|
||||
{
|
||||
window.nativeZlibEngine.addFile(_path, _files[_path]);
|
||||
window.nativeZlibEngine.addFile(_path + "new", _files[_path]);
|
||||
window.nativeZlibEngine.removeFile(_path);
|
||||
jsZlib.addFile(_path, _files[_path]);
|
||||
jsZlib.addFile(_path + "new", _files[_path]);
|
||||
jsZlib.removeFile(_path);
|
||||
}
|
||||
var archive = window.nativeZlibEngine.save();
|
||||
window.nativeZlibEngine.close();
|
||||
var archive = jsZlib.save();
|
||||
jsZlib.close();
|
||||
|
||||
window.nativeZlibEngine.open(archive);
|
||||
var files2 = window.nativeZlibEngine.files;
|
||||
jsZlib.open(archive);
|
||||
var files2 = jsZlib.files;
|
||||
for (var _path in files2)
|
||||
{
|
||||
window.nativeZlibEngine.getFile(_path);
|
||||
jsZlib.getFile(_path);
|
||||
window.writeFile(_path, files2[_path]);
|
||||
}
|
||||
window.nativeZlibEngine.close();
|
||||
jsZlib.close();
|
||||
};
|
||||
reader.readAsArrayBuffer(file);
|
||||
|
||||
|
||||
@ -313,12 +313,13 @@
|
||||
this.engine = 0;
|
||||
};
|
||||
|
||||
window.nativeZlibEngine = new ZLib();
|
||||
window.onZlibEngineInit = function()
|
||||
{
|
||||
window.nativeZlibEngine.isModuleInit = true;
|
||||
window["ZLibModule_onLoad"] && window["ZLibModule_onLoad"]();
|
||||
};
|
||||
window.AscCommon = window.AscCommon || {};
|
||||
window.AscCommon.CZLibEngineJS = ZLib;
|
||||
window.onZlibEngineInit = function()
|
||||
{
|
||||
ZLib.prototype.isModuleInit = true;
|
||||
window["ZLibModule_onLoad"] && window["ZLibModule_onLoad"]();
|
||||
};
|
||||
|
||||
})(window, undefined);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user