mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-06-26 10:36:26 +08:00
Compare commits
4 Commits
v9.4.0.124
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 3250a848ee | |||
| 55e5f973b0 | |||
| a016fc2868 | |||
| b77b3dc7e2 |
@ -109,7 +109,7 @@ namespace NSNetwork
|
||||
{
|
||||
CURL *curl;
|
||||
int fp;
|
||||
CURLcode res;
|
||||
CURLcode res = CURLE_FAILED_INIT;
|
||||
std::string sUrl = U_TO_UTF8(m_sDownloadFileUrl);
|
||||
std::string sOut;
|
||||
const char *url = sUrl.c_str();
|
||||
|
||||
@ -178,6 +178,33 @@ namespace NSNetwork
|
||||
NSString* stringURL = StringWToNSString(m_sDownloadFileUrl);
|
||||
NSURL* url = SafeURLFromString(stringURL);
|
||||
|
||||
// NSURLSession does not support file:// URLs reliably on macOS/iOS
|
||||
// NSFileManager to copy the file directly instead.
|
||||
if (url && [[url scheme] isEqualToString:@"file"])
|
||||
{
|
||||
NSString* dstPath = StringWToNSString(m_sDownloadFilePath);
|
||||
NSFileManager* fm = [NSFileManager defaultManager];
|
||||
// copyItemAtURL:toURL: fails if destination exists — remove it first
|
||||
// to match the overwrite semantics of writeToFile:atomically:YES
|
||||
[fm removeItemAtPath:dstPath error:nil];
|
||||
NSError* err = nil;
|
||||
BOOL ok = [fm copyItemAtURL:url
|
||||
toURL:[NSURL fileURLWithPath:dstPath]
|
||||
error:&err];
|
||||
if (!ok)
|
||||
NSLog(@"[DownloadFile] file:// copy failed: %@", err);
|
||||
#if !defined(_IOS)
|
||||
#ifndef _ASC_USE_ARC_
|
||||
if (!GetARCEnabled())
|
||||
{
|
||||
[dstPath release];
|
||||
[stringURL release];
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return ok ? 0 : 1;
|
||||
}
|
||||
|
||||
if (!url)
|
||||
{
|
||||
NSLog(@"[DownloadFile] Invalid URL: %@", stringURL);
|
||||
|
||||
2
Common/js/.gitignore
vendored
2
Common/js/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
emsdk
|
||||
__pycache__
|
||||
@ -1,19 +0,0 @@
|
||||
### JSON file structure for wasm/asm module
|
||||
- `name` — name with which the module will be built
|
||||
- `res_folder` — path, relative to the .json file, to the folder where the module will be built
|
||||
- `wasm` — whether to build wasm module (*.js and *.wasm)
|
||||
- `asm` — whether to build asm module (*_ie.js and *.js.mem)
|
||||
- `run_before` — path, relative to the .json file, to .py file that needs to be executed before building the module. Or python in-line code.
|
||||
- `run_after` — path, relative to the .json file, to .py file that needs to be executed after building the module. Or python in-line code.
|
||||
- `base_js_content` — path, relative to the .json file, to .js file containing //module which will be replaced with the built module
|
||||
- `compiler_flags` — array of compilation flags and options
|
||||
- `exported_functions` — array of function names that will be called from the module
|
||||
- `include_path` — array of paths, relative to the .json file, for include directories
|
||||
- `define` — array of defines
|
||||
- `compile_files_array` — array of objects containing:
|
||||
- `name` — unique name, relative to other names in compile_files_array array
|
||||
- `folder` — path, relative to the .json file, to folder with included files
|
||||
- `files` — array of included file names, located in folder (hierarchy ../ and ./*/ allowed)
|
||||
- `include_path` — optional array of paths, relative to the .json file, for include directories
|
||||
- `define` — optional array of defines
|
||||
- `sources` — optional array of paths, relative to the .json file, to files that don't require precompilation. For example, .a or .o files.
|
||||
@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
sys.path.append("./../../../build_tools/scripts")
|
||||
import base
|
||||
import os
|
||||
|
||||
def apply_patch(file, patch):
|
||||
patch_content = base.readFile(patch)
|
||||
index1 = patch_content.find("<<<<<<<")
|
||||
index2 = patch_content.find("=======")
|
||||
index3 = patch_content.find(">>>>>>>")
|
||||
file_content_old = patch_content[index1 + 7:index2].strip()
|
||||
file_content_new = patch_content[index2 + 7:index3].strip()
|
||||
#file_content_new = "\n#if 0" + file_content_old + "#else" + file_content_new + "#endif\n"
|
||||
base.replaceInFile(file, file_content_old, file_content_new)
|
||||
return
|
||||
|
||||
def clear_dir(dir):
|
||||
if base.is_dir(dir):
|
||||
base.delete_dir(dir)
|
||||
base.create_dir(dir)
|
||||
return
|
||||
@ -1,49 +0,0 @@
|
||||
// correct fetch for desktop application
|
||||
|
||||
var printErr = undefined;
|
||||
var print = undefined;
|
||||
|
||||
var fetch = ("undefined" !== typeof window) ? window.fetch : (("undefined" !== typeof self) ? self.fetch : null);
|
||||
var getBinaryPromise = null;
|
||||
|
||||
function internal_isLocal()
|
||||
{
|
||||
if (window.navigator && window.navigator.userAgent.toLowerCase().indexOf("ascdesktopeditor") < 0)
|
||||
return false;
|
||||
if (window.location && window.location.protocol == "file:")
|
||||
return true;
|
||||
if (window.document && window.document.currentScript && 0 == window.document.currentScript.src.indexOf("file:///"))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (internal_isLocal())
|
||||
{
|
||||
fetch = undefined; // fetch not support file:/// scheme
|
||||
getBinaryPromise = function()
|
||||
{
|
||||
var wasmPath = "ascdesktop://fonts/" + wasmBinaryFile.substr(8);
|
||||
return new Promise(function (resolve, reject)
|
||||
{
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', wasmPath, true);
|
||||
xhr.responseType = 'arraybuffer';
|
||||
|
||||
if (xhr.overrideMimeType)
|
||||
xhr.overrideMimeType('text/plain; charset=x-user-defined');
|
||||
else
|
||||
xhr.setRequestHeader('Accept-Charset', 'x-user-defined');
|
||||
|
||||
xhr.onload = function ()
|
||||
{
|
||||
if (this.status == 200)
|
||||
resolve(new Uint8Array(this.response));
|
||||
};
|
||||
xhr.send(null);
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
getBinaryPromise = function() { return getBinaryPromise2.apply(undefined, arguments); }
|
||||
}
|
||||
@ -1,57 +0,0 @@
|
||||
#ifndef _LOG_FILE_H
|
||||
#define _LOG_FILE_H
|
||||
|
||||
#include <stdio.h>
|
||||
#define LOG_BUFFER_SIZE 1000
|
||||
|
||||
// not intended for use in production. only for testing/debugging purposes
|
||||
namespace Logging
|
||||
{
|
||||
void logBytes(char* name, unsigned char* str, int len)
|
||||
{
|
||||
char buffer[LOG_BUFFER_SIZE];
|
||||
char* name_cur = name;
|
||||
char* buf_cur = buffer;
|
||||
|
||||
while (*name_cur != 0)
|
||||
{
|
||||
*buf_cur++ = *name_cur++;
|
||||
}
|
||||
|
||||
*buf_cur++ = ':';
|
||||
*buf_cur++ = ' ';
|
||||
*buf_cur++ = '[';
|
||||
|
||||
for (int i = 0; i < len; ++i)
|
||||
{
|
||||
unsigned char c = str[i];
|
||||
|
||||
unsigned char n1 = (unsigned char)(c / 100);
|
||||
c -= (n1 * 100);
|
||||
|
||||
unsigned char n2 = (unsigned char)(c / 10);
|
||||
c -= (n2 * 10);
|
||||
|
||||
if (buf_cur - buffer + 4 >= LOG_BUFFER_SIZE)
|
||||
{
|
||||
*buf_cur++ = '\0';
|
||||
printf("%s\n", buffer);
|
||||
|
||||
buf_cur = buffer;
|
||||
}
|
||||
|
||||
*buf_cur++ = (char)('0' + n1);
|
||||
*buf_cur++ = (char)('0' + n2);
|
||||
*buf_cur++ = (char)('0' + c);
|
||||
*buf_cur++ = ',';
|
||||
}
|
||||
|
||||
buf_cur--;
|
||||
*buf_cur++ = ']';
|
||||
*buf_cur++ = '\0';
|
||||
|
||||
printf("%s\n", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LOG_FILE_H
|
||||
@ -1,174 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
sys.path.append("./../../../build_tools/scripts")
|
||||
import base
|
||||
import os
|
||||
import json
|
||||
import common
|
||||
|
||||
base.configure_common_apps()
|
||||
|
||||
# fetch emsdk
|
||||
command_prefix = "" if ("windows" == base.host_platform()) else "./"
|
||||
if not base.is_dir("emsdk"):
|
||||
base.cmd("git", ["clone", "https://github.com/emscripten-core/emsdk.git"])
|
||||
os.chdir("emsdk")
|
||||
base.cmd("git", ["checkout", "f677ef915645c09794f0ae88f21d3cba2886459f"])
|
||||
base.cmd(command_prefix + "emsdk", ["install", "latest"])
|
||||
base.cmd(command_prefix + "emsdk", ["activate", "latest"])
|
||||
os.chdir("../")
|
||||
|
||||
def exec_wasm(data, work, compiler_flags, wasm):
|
||||
cur_dir = os.getcwd()
|
||||
os.chdir(work)
|
||||
|
||||
for include in data["include_path"]:
|
||||
compiler_flags.append("-I" + include)
|
||||
for define in data["define"]:
|
||||
compiler_flags.append("-D" + define)
|
||||
|
||||
if not wasm:
|
||||
compiler_flags.append("-DBUILDING_ASMJS_MODULE")
|
||||
compiler_flags.append("-D_ARM_ALIGN_")
|
||||
|
||||
compiler_flags.append("-Wno-deprecated-non-prototype")
|
||||
compiler_flags.append("-Wno-deprecated-register")
|
||||
compiler_flags.append("-Wno-register")
|
||||
|
||||
compiler_flags.append("-fvisibility=hidden")
|
||||
#compiler_flags.append("-Wl,--no-entry")
|
||||
#compiler_flags.append("-Wl,--strip-all")
|
||||
|
||||
# arguments
|
||||
arguments = ""
|
||||
for item in compiler_flags:
|
||||
arguments += (item + " ")
|
||||
|
||||
# command
|
||||
run_file = []
|
||||
prefix_call = ""
|
||||
if base.host_platform() == "windows":
|
||||
prefix_call = "call "
|
||||
run_file.append("call " + cur_dir + "/emsdk/emsdk_env.bat")
|
||||
else:
|
||||
run_file.append("#!/bin/bash")
|
||||
run_file.append("source " + cur_dir + "/emsdk/emsdk_env.sh")
|
||||
|
||||
libs = ""
|
||||
cur_folder_index = 0
|
||||
for compile_files in data["compile_files_array"]:
|
||||
compile_files_name_folder = str(cur_folder_index)
|
||||
cur_folder_index += 1
|
||||
compile_files_name_folder_all = "all_" + compile_files_name_folder + ".o"
|
||||
base.create_dir("./o/" + compile_files_name_folder)
|
||||
|
||||
temp_arguments = ""
|
||||
if "include_path" in compile_files and compile_files["include_path"]:
|
||||
for include in compile_files["include_path"]:
|
||||
temp_arguments += ("-I" + include + " ")
|
||||
if "define" in compile_files and compile_files["define"]:
|
||||
for define in compile_files["define"]:
|
||||
temp_arguments += ("-D" + define + " ")
|
||||
|
||||
temp_libs = ""
|
||||
for item in compile_files["files"]:
|
||||
file_name = os.path.splitext(os.path.basename(item))[0]
|
||||
if not base.is_file("./o/" + compile_files_name_folder + "/" + file_name + ".o"):
|
||||
run_file.append(prefix_call + "emcc -o o/" + compile_files_name_folder + "/" + file_name + ".o -c " + arguments + temp_arguments + os.path.join(compile_files["folder"], item))
|
||||
temp_libs += ("o/" + compile_files_name_folder + "/" + file_name + ".o ")
|
||||
|
||||
if len(compile_files["files"]) > 10:
|
||||
if not base.is_file("./o/" + compile_files_name_folder + "/" + compile_files_name_folder_all):
|
||||
run_file.append(prefix_call + "emcc -o o/" + compile_files_name_folder + "/" + compile_files_name_folder_all + " -r " + arguments + temp_arguments + temp_libs)
|
||||
libs += ("o/" + compile_files_name_folder + "/" + compile_files_name_folder_all + " ")
|
||||
else:
|
||||
libs += temp_libs
|
||||
|
||||
arguments += "-s EXPORTED_FUNCTIONS=\"["
|
||||
for item in data["exported_functions"]:
|
||||
arguments += ("'" + item + "',")
|
||||
arguments = arguments[:-1]
|
||||
arguments += "]\" "
|
||||
|
||||
if "sources" in data and data["sources"]:
|
||||
for item in data["sources"]:
|
||||
arguments += (item + " ")
|
||||
|
||||
run_file.append(prefix_call + "emcc -o " + data["name"] + ".js " + arguments + libs)
|
||||
base.print_info("run " + ("wasm " if wasm else "asm ") + data["name"])
|
||||
base.run_as_bat(run_file)
|
||||
|
||||
# finalize
|
||||
base.print_info("end " + ("wasm " if wasm else "asm ") + data["name"])
|
||||
module_js_content = base.readFile("./" + data["name"] + ".js")
|
||||
engine_base_js_content = base.readFile(data["base_js_content"])
|
||||
string_utf8_content = base.readFile(cur_dir + "/string_utf8.js")
|
||||
desktop_fetch_content = base.readFile(cur_dir + "/desktop_fetch.js")
|
||||
polyfill_js_content = base.readFile(cur_dir + "/polyfill.js")
|
||||
engine_js_content = engine_base_js_content.replace("//module", module_js_content)
|
||||
engine_js_content = engine_js_content.replace("//string_utf8", string_utf8_content)
|
||||
engine_js_content = engine_js_content.replace("//desktop_fetch", desktop_fetch_content)
|
||||
if not wasm:
|
||||
engine_js_content = engine_js_content.replace("//polyfill", polyfill_js_content)
|
||||
|
||||
if "replaces" in data:
|
||||
for item in data["replaces"]:
|
||||
replace_file_content = base.readFile(data["replaces"][item])
|
||||
engine_js_content = engine_js_content.replace("//" + item, replace_file_content)
|
||||
|
||||
# write new version
|
||||
base.writeFile(data["res_folder"] + "/" + data["name"] + ("" if wasm else "_ie") + ".js", engine_js_content)
|
||||
base.copy_file("./" + data["name"] + (".wasm" if wasm else ".js.mem"), data["res_folder"] + "/" + data["name"] + (".wasm" if wasm else ".js.mem"))
|
||||
|
||||
# clear
|
||||
base.delete_file("./" + data["name"] + ".js")
|
||||
base.delete_file("./" + data["name"] + (".wasm" if wasm else ".js.mem"))
|
||||
|
||||
os.chdir(cur_dir)
|
||||
return
|
||||
|
||||
argv = sys.argv
|
||||
argv.pop(0)
|
||||
for param in argv:
|
||||
base.print_info(param)
|
||||
if not base.is_file(param):
|
||||
continue
|
||||
work_dir = os.path.dirname(param) + "/"
|
||||
json_data = json.loads(base.readFile(param))
|
||||
|
||||
if json_data["run_before"]:
|
||||
base.print_info("before")
|
||||
if base.is_file(work_dir + json_data["run_before"]):
|
||||
base.cmd_in_dir(work_dir, "python", [json_data["run_before"]])
|
||||
else:
|
||||
base.cmd_in_dir(work_dir, "python", ["-c", json_data["run_before"]])
|
||||
|
||||
# remove previous version
|
||||
common.clear_dir(work_dir + "/o")
|
||||
base.create_dir(work_dir + json_data["res_folder"])
|
||||
|
||||
# wasm or asm
|
||||
if json_data["wasm"]:
|
||||
flags = json_data["compiler_flags"][:]
|
||||
flags.append("-s WASM=1")
|
||||
exec_wasm(json_data, work_dir, flags, True)
|
||||
base.delete_dir(work_dir + "/o")
|
||||
if json_data["asm"]:
|
||||
flags = json_data["compiler_flags"][:]
|
||||
flags.append("-s WASM=0")
|
||||
flags.append("--closure 0")
|
||||
flags.append("-s MIN_IE_VERSION=11")
|
||||
# do it in min.py
|
||||
#flags.append("--closure-args=--language_out=ECMASCRIPT5_STRICT")
|
||||
if "embed_mem_file" in json_data and (json_data["embed_mem_file"]):
|
||||
flags.append("--memory-init-file 0")
|
||||
exec_wasm(json_data, work_dir, flags, False)
|
||||
base.delete_dir(work_dir + "/o")
|
||||
if json_data["run_after"]:
|
||||
base.print_info("after")
|
||||
if base.is_file(work_dir + json_data["run_after"]):
|
||||
base.cmd_in_dir(work_dir, "python", [json_data["run_after"]])
|
||||
else:
|
||||
base.cmd_in_dir(work_dir, "python", ["-c", json_data["run_after"]])
|
||||
@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append('../../../build_tools/scripts')
|
||||
import base
|
||||
import os
|
||||
|
||||
params = sys.argv[1:]
|
||||
|
||||
file_path = params[0]
|
||||
file_path_min = file_path + ".min.js"
|
||||
|
||||
compilation_level = "WHITESPACE_ONLY"
|
||||
#compilation_level = "SIMPLE_OPTIMIZATIONS"
|
||||
if (len(params) > 1):
|
||||
compilation_level = params[1]
|
||||
|
||||
base.cmd("java", ["-jar", "../../../sdkjs/build/node_modules/google-closure-compiler-java/compiler.jar",
|
||||
"--compilation_level", compilation_level,
|
||||
"--language_out", "ECMASCRIPT5_STRICT",
|
||||
"--js_output_file", file_path_min,
|
||||
"--js", file_path])
|
||||
|
||||
min_content = base.readFile("../license/header.license") + base.readFile(file_path_min)
|
||||
|
||||
base.delete_file(file_path_min)
|
||||
base.delete_file(file_path)
|
||||
|
||||
base.writeFile(file_path, min_content)
|
||||
@ -1,51 +0,0 @@
|
||||
var ob;function pb(h){var f=0;return function(){return f<h.length?{done:!1,value:h[f++]}:{done:!0}}}function qb(h){var f="undefined"!=typeof Symbol&&Symbol.iterator&&h[Symbol.iterator];return f?f.call(h):{next:pb(h)}}var dd="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,Fd="function"==typeof Object.defineProperties?Object.defineProperty:function(h,f,Ka){h!=Array.prototype&&h!=Object.prototype&&(h[f]=Ka.value)};if(!dd)dd=self;
|
||||
function Gd(h,f){if(f){var Ka=dd;h=h.split(".");for(var Za=0;Za<h.length-1;Za++){var bb=h[Za];bb in Ka||(Ka[bb]={});Ka=Ka[bb]}h=h[h.length-1];Za=Ka[h];f=f(Za);f!=Za&&null!=f&&Fd(Ka,h,{configurable:!0,writable:!0,value:f})}}
|
||||
Gd("Promise",function(h){function f(f){this.MQf=0;this.Cug=void 0;this.Qie=[];var h=this.slg();try{f(h.resolve,h.reject)}catch(Tb){h.reject(Tb)}}function Ka(){this.FAd=null}function Za(h){return h instanceof f?h:new f(function(f){f(h)})}if(h)return h;Ka.prototype.nJg=function(f){if(null==this.FAd){this.FAd=[];var h=this;this.oJg(function(){h.Ihh()})}this.FAd.push(f)};var bb=dd.setTimeout;Ka.prototype.oJg=function(f){bb(f,0)};Ka.prototype.Ihh=function(){for(;this.FAd&&this.FAd.length;){var f=this.FAd;
|
||||
this.FAd=[];for(var h=0;h<f.length;++h){var Ka=f[h];f[h]=null;try{Ka()}catch(jb){this.Heh(jb)}}}this.FAd=null};Ka.prototype.Heh=function(f){this.oJg(function(){throw f;})};f.prototype.slg=function(){function f(f){return function(z){Ka||(Ka=!0,f.call(h,z))}}var h=this,Ka=!1;return{resolve:f(this.Cph),reject:f(this.oug)}};f.prototype.Cph=function(h){if(h===this)this.oug(new TypeError("A Promise cannot resolve to itself"));else if(h instanceof f)this.Aqh(h);else{a:switch(typeof h){case "object":var z=
|
||||
null!=h;break a;case "function":z=!0;break a;default:z=!1}z?this.Bph(h):this.dNg(h)}};f.prototype.Bph=function(f){var h=void 0;try{h=f.then}catch(Tb){this.oug(Tb);return}"function"==typeof h?this.Bqh(h,f):this.dNg(f)};f.prototype.oug=function(f){this.vWg(2,f)};f.prototype.dNg=function(f){this.vWg(1,f)};f.prototype.vWg=function(f,h){if(0!=this.MQf)throw Error("Cannot settle("+f+", "+h+"): Promise already settled in state"+this.MQf);this.MQf=f;this.Cug=h;this.Jhh()};f.prototype.Jhh=function(){if(null!=
|
||||
this.Qie){for(var f=0;f<this.Qie.length;++f)gb.nJg(this.Qie[f]);this.Qie=null}};var gb=new Ka;f.prototype.Aqh=function(f){var h=this.slg();f.cZf(h.resolve,h.reject)};f.prototype.Bqh=function(f,h){var z=this.slg();try{f.call(h,z.resolve,z.reject)}catch(jb){z.reject(jb)}};f.prototype.then=function(h,Ka){function z(f,h){return"function"==typeof f?function(h){try{gb(f(h))}catch(hc){Ma(hc)}}:h}var gb,Ma,bb=new f(function(f,h){gb=f;Ma=h});this.cZf(z(h,gb),z(Ka,Ma));return bb};f.prototype.catch=function(f){return this.then(void 0,
|
||||
f)};f.prototype.cZf=function(f,h){function z(){switch(Ka.MQf){case 1:f(Ka.Cug);break;case 2:h(Ka.Cug);break;default:throw Error("Unexpected state: "+Ka.MQf);}}var Ka=this;null==this.Qie?gb.nJg(z):this.Qie.push(z)};f.resolve=Za;f.reject=function(h){return new f(function(f,z){z(h)})};f.race=function(h){return new f(function(f,z){for(var Ka=qb(h),Ma=Ka.next();!Ma.done;Ma=Ka.next())Za(Ma.value).cZf(f,z)})};f.all=function(h){var z=qb(h),Ka=z.next();return Ka.done?Za([]):new f(function(f,h){function Ma(h){return function(z){Ta[h]=
|
||||
z;gb--;0==gb&&f(Ta)}}var Ta=[],gb=0;do Ta.push(void 0),gb++,Za(Ka.value).cZf(Ma(Ta.length-1),h),Ka=z.next();while(!Ka.done)})};return f});Gd("Array.prototype.fill",function(h){return h?h:function(f,h,Za){var Ka=this.length||0;0>h&&(h=Math.max(0,Ka+h));if(null==Za||Za>Ka)Za=Ka;Za=Number(Za);0>Za&&(Za=Math.max(0,Ka+Za));for(h=Number(h||0);h<Za;h++)this[h]=f;return this}});
|
||||
function Hd(h,f,Ka){if(null==h)throw new TypeError("The 'this' value for String.prototype."+Ka+" must not be null or undefined");if(f instanceof RegExp)throw new TypeError("First argument to String.prototype."+Ka+" must not be a regular expression");return h+""}Gd("String.prototype.repeat",function(h){return h?h:function(f){var h=Hd(this,null,"repeat");if(0>f||1342177279<f)throw new RangeError("Invalid count value");f|=0;for(var Za="";f;)if(f&1&&(Za+=h),f>>>=1)h+=h;return Za}});
|
||||
Gd("Number.isFinite",function(h){return h?h:function(f){return"number"!==typeof f?!1:!isNaN(f)&&Infinity!==f&&-Infinity!==f}});Gd("Number.isInteger",function(h){return h?h:function(f){return Number.isFinite(f)?f===Math.floor(f):!1}});Gd("String.prototype.endsWith",function(h){return h?h:function(f,h){var Ka=Hd(this,f,"endsWith");f+="";void 0===h&&(h=Ka.length);h=Math.max(0,Math.min(h|0,Ka.length));for(var bb=f.length;0<bb&&0<h;)if(Ka[--h]!=f[--bb])return!1;return 0>=bb}});
|
||||
Gd("String.prototype.padStart",function(h){return h?h:function(f,h){var Ka=Hd(this,null,"padStart");f-=Ka.length;h=void 0!==h?String(h):" ";return(0<f&&h?h.repeat(Math.ceil(f/h.length)).substring(0,f):"")+Ka}});function Be(){Be=function(){};dd.Symbol||(dd.Symbol=De)}function Ee(h,f){this.kYg=h;Fd(this,"description",{configurable:!0,writable:!0,value:f})}Ee.prototype.toString=function(){return this.kYg};
|
||||
var De=function(){function h(Ka){if(this instanceof h)throw new TypeError("Symbol is not a constructor");return new Ee("jscomp_symbol_"+(Ka||"")+"_"+f++,Ka)}var f=0;return h}();function Ng(){Be();var h=dd.Symbol.iterator;h||(h=dd.Symbol.iterator=dd.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[h]&&Fd(Array.prototype,h,{configurable:!0,writable:!0,value:function(){return Kh(pb(this))}});Ng=function(){}}
|
||||
function Kh(h){Ng();h={next:h};h[dd.Symbol.iterator]=function(){return this};return h}function qm(h,f){Ng();h instanceof String&&(h+="");var Ka=0,Za={next:function(){if(Ka<h.length){var bb=Ka++;return{value:f(bb,h[bb]),done:!1}}Za.next=function(){return{done:!0,value:void 0}};return Za.next()}};Za[Symbol.iterator]=function(){return Za};return Za}Gd("Array.prototype.values",function(h){return h?h:function(){return qm(this,function(f,h){return h})}});
|
||||
Gd("Math.sign",function(h){return h?h:function(f){f=Number(f);return 0===f||isNaN(f)?f:0<f?1:-1}});Gd("Array.prototype.keys",function(h){return h?h:function(){return qm(this,function(f){return f})}});function Sm(h,f){return Object.prototype.hasOwnProperty.call(h,f)}
|
||||
Gd("WeakMap",function(h){function f(f){this.aCf=(z+=Math.random()+1).toString();if(f){f=qb(f);for(var h;!(h=f.next()).done;)h=h.value,this.set(h[0],h[1])}}function Ka(){}function Za(f){Sm(f,gb)||Fd(f,gb,{value:new Ka})}function bb(f){var h=Object[f];h&&(Object[f]=function(f){if(f instanceof Ka)return f;Za(f);return h(f)})}if(function(){if(!h||!Object.seal)return!1;try{var f=Object.seal({}),z=Object.seal({}),Ka=new h([[f,2],[z,3]]);if(2!=Ka.get(f)||3!=Ka.get(z))return!1;Ka.delete(f);Ka.set(z,4);return!Ka.has(f)&&
|
||||
4==Ka.get(z)}catch(Ma){return!1}}())return h;var gb="$jscomp_hidden_"+Math.random();bb("freeze");bb("preventExtensions");bb("seal");var z=0;f.prototype.set=function(f,h){Za(f);if(!Sm(f,gb))throw Error("WeakMap key fail: "+f);f[gb][this.aCf]=h;return this};f.prototype.get=function(f){return Sm(f,gb)?f[gb][this.aCf]:void 0};f.prototype.has=function(f){return Sm(f,gb)&&Sm(f[gb],this.aCf)};f.prototype.delete=function(f){return Sm(f,gb)&&Sm(f[gb],this.aCf)?delete f[gb][this.aCf]:!1};return f});
|
||||
Gd("Map",function(h){function f(){var f={};return f.previous=f.next=f.head=f}function Ka(f,h){var z=f.b4c;return Kh(function(){if(z){for(;z.head!=f.b4c;)z=z.previous;for(;z.next!=z.head;)return z=z.next,{done:!1,value:h(z)};z=null}return{done:!0,value:void 0}})}function Za(f,h){var Ka=h&&typeof h;"object"==Ka||"function"==Ka?gb.has(h)?Ka=gb.get(h):(Ka=""+ ++z,gb.set(h,Ka)):Ka="p_"+h;var Ma=f.rsf[Ka];if(Ma&&Sm(f.rsf,Ka))for(f=0;f<Ma.length;f++){var bb=Ma[f];if(h!==h&&bb.key!==bb.key||h===bb.key)return{id:Ka,
|
||||
list:Ma,index:f,SNb:bb}}return{id:Ka,list:Ma,index:-1,SNb:void 0}}function bb(h){this.rsf={};this.b4c=f();this.size=0;if(h){h=qb(h);for(var z;!(z=h.next()).done;)z=z.value,this.set(z[0],z[1])}}if(function(){if(!h||"function"!=typeof h||!h.prototype.entries||"function"!=typeof Object.seal)return!1;try{var f=Object.seal({x:4}),z=new h(qb([[f,"s"]]));if("s"!=z.get(f)||1!=z.size||z.get({x:4})||z.set({x:4},"t")!=z||2!=z.size)return!1;var Ka=z.entries(),Ma=Ka.next();if(Ma.done||Ma.value[0]!=f||"s"!=Ma.value[1])return!1;
|
||||
Ma=Ka.next();return Ma.done||4!=Ma.value[0].x||"t"!=Ma.value[1]||!Ka.next().done?!1:!0}catch(Kb){return!1}}())return h;Ng();var gb=new WeakMap;bb.prototype.set=function(f,h){f=0===f?0:f;var z=Za(this,f);z.list||(z.list=this.rsf[z.id]=[]);z.SNb?z.SNb.value=h:(z.SNb={next:this.b4c,previous:this.b4c.previous,head:this.b4c,key:f,value:h},z.list.push(z.SNb),this.b4c.previous.next=z.SNb,this.b4c.previous=z.SNb,this.size++);return this};bb.prototype.delete=function(f){f=Za(this,f);return f.SNb&&f.list?(f.list.splice(f.index,
|
||||
1),f.list.length||delete this.rsf[f.id],f.SNb.previous.next=f.SNb.next,f.SNb.next.previous=f.SNb.previous,f.SNb.head=null,this.size--,!0):!1};bb.prototype.clear=function(){this.rsf={};this.b4c=this.b4c.previous=f();this.size=0};bb.prototype.has=function(f){return!!Za(this,f).SNb};bb.prototype.get=function(f){return(f=Za(this,f).SNb)&&f.value};bb.prototype.entries=function(){return Ka(this,function(f){return[f.key,f.value]})};bb.prototype.keys=function(){return Ka(this,function(f){return f.key})};
|
||||
bb.prototype.values=function(){return Ka(this,function(f){return f.value})};bb.prototype.forEach=function(f,h){for(var z=this.entries(),Ma;!(Ma=z.next()).done;)Ma=Ma.value,f.call(h,Ma[1],Ma[0],this)};bb.prototype[Symbol.iterator]=bb.prototype.entries;var z=0;return bb});function Fw(h,f,Ka){h instanceof String&&(h=String(h));for(var Za=h.length,bb=0;bb<Za;bb++){var gb=h[bb];if(f.call(Ka,gb,bb,h))return{dn:bb,Ju:gb}}return{dn:-1,Ju:void 0}}
|
||||
Gd("Array.prototype.find",function(h){return h?h:function(f,h){return Fw(this,f,h).Ju}});Gd("String.prototype.startsWith",function(h){return h?h:function(f,h){var Ka=Hd(this,f,"startsWith");f+="";var bb=Ka.length,gb=f.length;h=Math.max(0,Math.min(h|0,Ka.length));for(var z=0;z<gb&&h<bb;)if(Ka[h++]!=f[z++])return!1;return z>=gb}});Gd("Object.is",function(h){return h?h:function(f,h){return f===h?0!==f||1/f===1/h:f!==f&&h!==h}});
|
||||
Gd("Array.prototype.includes",function(h){return h?h:function(f,h){var Ka=this;Ka instanceof String&&(Ka=String(Ka));var bb=Ka.length;h=h||0;for(0>h&&(h=Math.max(h+bb,0));h<bb;h++){var gb=Ka[h];if(gb===f||Object.is(gb,f))return!0}return!1}});Gd("String.prototype.includes",function(h){return h?h:function(f,h){return-1!==Hd(this,f,"includes").indexOf(f,h||0)}});
|
||||
Gd("Math.tanh",function(h){return h?h:function(f){f=Number(f);if(0===f)return f;var h=Math.exp(-2*Math.abs(f));h=(1-h)/(1+h);return 0>f?-h:h}});Gd("Math.log1p",function(h){return h?h:function(f){f=Number(f);if(.25>f&&-.25<f){for(var h=f,Za=1,bb=f,gb=0,z=1;gb!=bb;)h*=f,z*=-1,bb=(gb=bb)+z*h/++Za;return bb}return Math.log(1+f)}});Gd("Math.expm1",function(h){return h?h:function(f){f=Number(f);if(.25>f&&-.25<f){for(var h=f,Za=1,bb=f,gb=0;gb!=bb;)h*=f/++Za,bb=(gb=bb)+h;return bb}return Math.exp(f)-1}});
|
||||
Gd("Math.trunc",function(h){return h?h:function(f){f=Number(f);if(isNaN(f)||Infinity===f||-Infinity===f||0===f)return f;var h=Math.floor(Math.abs(f));return 0>f?-h:h}});Gd("Math.log10",function(h){return h?h:function(f){return Math.log(f)/Math.LN10}});Gd("Math.cosh",function(h){if(h)return h;var f=Math.exp;return function(h){h=Number(h);return(f(h)+f(-h))/2}});Gd("Math.sinh",function(h){if(h)return h;var f=Math.exp;return function(h){h=Number(h);return 0===h?h:(f(h)-f(-h))/2}});
|
||||
Gd("Math.acosh",function(h){return h?h:function(f){f=Number(f);return Math.log(f+Math.sqrt(f*f-1))}});Gd("Math.atanh",function(h){if(h)return h;var f=Math.log1p;return function(h){h=Number(h);return(f(h)-f(-h))/2}});Gd("Math.asinh",function(h){return h?h:function(f){f=Number(f);if(0===f)return f;var h=Math.log(Math.abs(f)+Math.sqrt(f*f+1));return 0>f?-h:h}});Gd("Array.prototype.findIndex",function(h){return h?h:function(f,h){return Fw(this,f,h).dn}});
|
||||
|
||||
Math.imul = Math.imul || function(a, b) {
|
||||
var ah = (a >>> 16) & 0xffff;
|
||||
var al = a & 0xffff;
|
||||
var bh = (b >>> 16) & 0xffff;
|
||||
var bl = b & 0xffff;
|
||||
// shift by 0 bits fixes the sign in the high part of the number
|
||||
// final |0 converts the unsigned value back to a signed value
|
||||
return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0);
|
||||
};
|
||||
|
||||
Math.fround = Math.fround || function(x) {
|
||||
return new Float32Array([x])[0];
|
||||
};
|
||||
|
||||
Math.clz32 = Math.clz32 || function(value) {
|
||||
value = Number(value) >>> 0;
|
||||
return value !== 0 ? 31 - Math.floor(Math.log(value + 0.5) / Math.log(2)) : 32;
|
||||
};
|
||||
|
||||
Uint8Array.prototype.copyWithin = Uint8Array.prototype.copyWithin || function(target, start, end) {
|
||||
var tmpArray = this.subarray(start, end);
|
||||
this.set(tmpArray, target);
|
||||
return this;
|
||||
};
|
||||
@ -1,144 +0,0 @@
|
||||
(function(){
|
||||
|
||||
if (undefined !== String.prototype.fromUtf8 &&
|
||||
undefined !== String.prototype.toUtf8)
|
||||
return;
|
||||
|
||||
var STRING_UTF8_BUFFER_LENGTH = 1024;
|
||||
var STRING_UTF8_BUFFER = new ArrayBuffer(STRING_UTF8_BUFFER_LENGTH);
|
||||
|
||||
/**
|
||||
* Read string from utf8
|
||||
* @param {Uint8Array} buffer
|
||||
* @param {number} [start=0]
|
||||
* @param {number} [len]
|
||||
* @returns {string}
|
||||
*/
|
||||
String.prototype.fromUtf8 = function(buffer, start, len) {
|
||||
if (undefined === start)
|
||||
start = 0;
|
||||
if (undefined === len)
|
||||
len = buffer.length - start;
|
||||
|
||||
var result = "";
|
||||
var index = start;
|
||||
var end = start + len;
|
||||
while (index < end)
|
||||
{
|
||||
var u0 = buffer[index++];
|
||||
if (!(u0 & 128))
|
||||
{
|
||||
result += String.fromCharCode(u0);
|
||||
continue;
|
||||
}
|
||||
var u1 = buffer[index++] & 63;
|
||||
if ((u0 & 224) == 192)
|
||||
{
|
||||
result += String.fromCharCode((u0 & 31) << 6 | u1);
|
||||
continue;
|
||||
}
|
||||
var u2 = buffer[index++] & 63;
|
||||
if ((u0 & 240) == 224)
|
||||
u0 = (u0 & 15) << 12 | u1 << 6 | u2;
|
||||
else
|
||||
u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | buffer[index++] & 63;
|
||||
if (u0 < 65536)
|
||||
result += String.fromCharCode(u0);
|
||||
else
|
||||
{
|
||||
var ch = u0 - 65536;
|
||||
result += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert string to utf8 array
|
||||
* @returns {Uint8Array}
|
||||
*/
|
||||
String.prototype.toUtf8 = function(isNoEndNull, isUseBuffer) {
|
||||
var inputLen = this.length;
|
||||
var testLen = 6 * inputLen + 1;
|
||||
var tmpStrings = (isUseBuffer && testLen < STRING_UTF8_BUFFER_LENGTH) ? STRING_UTF8_BUFFER : new ArrayBuffer(testLen);
|
||||
|
||||
var code = 0;
|
||||
var index = 0;
|
||||
|
||||
var outputIndex = 0;
|
||||
var outputDataTmp = new Uint8Array(tmpStrings);
|
||||
var outputData = outputDataTmp;
|
||||
|
||||
while (index < inputLen)
|
||||
{
|
||||
code = this.charCodeAt(index++);
|
||||
if (code >= 0xD800 && code <= 0xDFFF && index < inputLen)
|
||||
code = 0x10000 + (((code & 0x3FF) << 10) | (0x03FF & this.charCodeAt(index++)));
|
||||
|
||||
if (code < 0x80)
|
||||
outputData[outputIndex++] = code;
|
||||
else if (code < 0x0800)
|
||||
{
|
||||
outputData[outputIndex++] = 0xC0 | (code >> 6);
|
||||
outputData[outputIndex++] = 0x80 | (code & 0x3F);
|
||||
}
|
||||
else if (code < 0x10000)
|
||||
{
|
||||
outputData[outputIndex++] = 0xE0 | (code >> 12);
|
||||
outputData[outputIndex++] = 0x80 | ((code >> 6) & 0x3F);
|
||||
outputData[outputIndex++] = 0x80 | (code & 0x3F);
|
||||
}
|
||||
else if (code < 0x1FFFFF)
|
||||
{
|
||||
outputData[outputIndex++] = 0xF0 | (code >> 18);
|
||||
outputData[outputIndex++] = 0x80 | ((code >> 12) & 0x3F);
|
||||
outputData[outputIndex++] = 0x80 | ((code >> 6) & 0x3F);
|
||||
outputData[outputIndex++] = 0x80 | (code & 0x3F);
|
||||
}
|
||||
else if (code < 0x3FFFFFF)
|
||||
{
|
||||
outputData[outputIndex++] = 0xF8 | (code >> 24);
|
||||
outputData[outputIndex++] = 0x80 | ((code >> 18) & 0x3F);
|
||||
outputData[outputIndex++] = 0x80 | ((code >> 12) & 0x3F);
|
||||
outputData[outputIndex++] = 0x80 | ((code >> 6) & 0x3F);
|
||||
outputData[outputIndex++] = 0x80 | (code & 0x3F);
|
||||
}
|
||||
else if (code < 0x7FFFFFFF)
|
||||
{
|
||||
outputData[outputIndex++] = 0xFC | (code >> 30);
|
||||
outputData[outputIndex++] = 0x80 | ((code >> 24) & 0x3F);
|
||||
outputData[outputIndex++] = 0x80 | ((code >> 18) & 0x3F);
|
||||
outputData[outputIndex++] = 0x80 | ((code >> 12) & 0x3F);
|
||||
outputData[outputIndex++] = 0x80 | ((code >> 6) & 0x3F);
|
||||
outputData[outputIndex++] = 0x80 | (code & 0x3F);
|
||||
}
|
||||
}
|
||||
|
||||
if (isNoEndNull !== true)
|
||||
outputData[outputIndex++] = 0;
|
||||
|
||||
return new Uint8Array(tmpStrings, 0, outputIndex);
|
||||
};
|
||||
|
||||
function StringPointer(pointer, len)
|
||||
{
|
||||
this.ptr = pointer;
|
||||
this.length = len;
|
||||
}
|
||||
StringPointer.prototype.free = function()
|
||||
{
|
||||
if (0 !== this.ptr)
|
||||
Module["_free"](this.ptr);
|
||||
};
|
||||
|
||||
String.prototype.toUtf8Pointer = function(isNoEndNull) {
|
||||
var tmp = this.toUtf8(isNoEndNull, true);
|
||||
var pointer = Module["_malloc"](tmp.length);
|
||||
if (0 == pointer)
|
||||
return null;
|
||||
|
||||
Module["HEAP8"].set(tmp, pointer);
|
||||
return new StringPointer(pointer, tmp.length);
|
||||
};
|
||||
|
||||
})();
|
||||
5
DesktopEditor/graphics/pro/js/.gitignore
vendored
5
DesktopEditor/graphics/pro/js/.gitignore
vendored
@ -1,5 +0,0 @@
|
||||
deploy
|
||||
emsdk
|
||||
freetype-2.10.4
|
||||
o
|
||||
xml
|
||||
@ -1,41 +0,0 @@
|
||||
import sys
|
||||
sys.path.append("../../../../../build_tools/scripts")
|
||||
import base
|
||||
|
||||
base.configure_common_apps()
|
||||
|
||||
base.replaceInFile("../../../../Common/3dParty/icu/icu/source/common/udata.cpp", "\n{\n#ifdef BUILDING_WASM_MODULE\nreturn NULL;\n#endif\n UDataMemory tData;", "\n{\n UDataMemory tData;")
|
||||
base.replaceInFile("../../../../DesktopEditor/cximage/png/pnglibconf.h", "//#define PNG_CONSOLE_IO_SUPPORTED", "#define PNG_CONSOLE_IO_SUPPORTED")
|
||||
|
||||
base.replaceInFile("../../../../Common/3dParty/openssl/openssl/crypto/sha/sha512.c", "const SHA_LONG64 *W = (const SHA_LONG64*)in;", "const SHA_LONG64 *W = in;")
|
||||
|
||||
# finalize
|
||||
base.replaceInFile("./deploy/drawingfile.js", "function getBinaryPromise(", "function getBinaryPromise2(")
|
||||
base.replaceInFile("./deploy/drawingfile.js", "__ATPOSTRUN__=[];", "__ATPOSTRUN__=[function(){window[\"AscViewer\"] && window[\"AscViewer\"][\"onLoadModule\"] && window[\"AscViewer\"][\"onLoadModule\"]();}];")
|
||||
base.replaceInFile("./deploy/drawingfile.js", "__ATPOSTRUN__ = [];", "__ATPOSTRUN__=[function(){window[\"AscViewer\"] && window[\"AscViewer\"][\"onLoadModule\"] && window[\"AscViewer\"][\"onLoadModule\"]();}];")
|
||||
base.replaceInFile("./deploy/drawingfile.js", "\"drawingfile.js.mem\"", "getMemoryPathIE(\"drawingfile.js.mem\")")
|
||||
|
||||
base.replaceInFile("./deploy/drawingfile_ie.js", "function getBinaryPromise(", "function getBinaryPromise2(")
|
||||
base.replaceInFile("./deploy/drawingfile_ie.js", "__ATPOSTRUN__=[];", "__ATPOSTRUN__=[function(){window[\"AscViewer\"] && window[\"AscViewer\"][\"onLoadModule\"] && window[\"AscViewer\"][\"onLoadModule\"]();}];")
|
||||
base.replaceInFile("./deploy/drawingfile_ie.js", "__ATPOSTRUN__ = [];", "__ATPOSTRUN__=[function(){window[\"AscViewer\"] && window[\"AscViewer\"][\"onLoadModule\"] && window[\"AscViewer\"][\"onLoadModule\"]();}];")
|
||||
base.replaceInFile("./deploy/drawingfile_ie.js", "\"drawingfile.js.mem\"", "getMemoryPathIE(\"drawingfile.js.mem\")")
|
||||
|
||||
base.cmd_in_dir("../../../../Common/js", "python", ["./min.py", "./../../DesktopEditor/graphics/pro/js/deploy/drawingfile.js", "WHITESPACE_ONLY"])
|
||||
base.cmd_in_dir("../../../../Common/js", "python", ["./min.py", "./../../DesktopEditor/graphics/pro/js/deploy/drawingfile_ie.js", "WHITESPACE_ONLY"])
|
||||
|
||||
content_native_files = [
|
||||
"./wasm/js/stream.js",
|
||||
"./wasm/js/drawingfile.js"
|
||||
]
|
||||
|
||||
content_native = "(function(window, undefined) {\n"
|
||||
for item in content_native_files:
|
||||
content_native += base.readFile(item)
|
||||
content_native += "\n})(window, undefined);"
|
||||
content_native = content_native.replace("//file_internal", base.readFile("./wasm/js/drawingfile_native.js"))
|
||||
content_native = content_native.replace("//string_utf8", base.readFile("./../../../../Common/js/string_utf8.js"))
|
||||
base.writeFile("./deploy/drawingfile_native.js", content_native)
|
||||
base.cmd_in_dir("../../../../Common/js", "python", ["./min.py", "./../../DesktopEditor/graphics/pro/js/deploy/drawingfile_native.js", "WHITESPACE_ONLY"])
|
||||
|
||||
# base.delete_dir("./xml")
|
||||
# base.delete_dir("./freetype-2.10.4")
|
||||
@ -1,41 +0,0 @@
|
||||
import sys
|
||||
sys.path.append("../../../../../build_tools/scripts")
|
||||
sys.path.append("../../../../Common/js")
|
||||
import base
|
||||
import common
|
||||
|
||||
base.configure_common_apps()
|
||||
|
||||
if not base.is_dir("xml"):
|
||||
base.copy_dir("../../../xml", "./xml")
|
||||
base.replaceInFile("./xml/libxml2/libxml.h", "xmlNop(void)", "xmlNop(void* context, char* buffer, int len)")
|
||||
base.replaceInFile("./xml/libxml2/xmlIO.c", "xmlNop(void)", "xmlNop(void* context, char* buffer, int len)")
|
||||
base.replaceInFile("./xml/src/xmllight_private.h", "#include \"../../common/", "#include \"../../../../../common/")
|
||||
base.replaceInFile("./xml/src/xmllight_private.h", "#include \"../../../UnicodeConverter/", "#include \"../../../../../../UnicodeConverter/")
|
||||
base.replaceInFile("./xml/include/xmlutils.h", "#include \"../../common/", "#include \"../../../../../common/")
|
||||
base.replaceInFile("./xml/libxml2/globals.c", "int xmlGetWarningsDefaultValue = 1;", "int xmlGetWarningsDefaultValue = 0;")
|
||||
base.replaceInFile("./xml/libxml2/globals.c", "static int xmlGetWarningsDefaultValueThrDef = 1;", "static int xmlGetWarningsDefaultValueThrDef = 0;")
|
||||
|
||||
if not base.is_dir("freetype-2.10.4"):
|
||||
base.copy_dir("../../../freetype-2.10.4", "./freetype-2.10.4")
|
||||
# smooth
|
||||
base.copy_file("./freetype-2.10.4/src/smooth/ftgrays.c", "./freetype-2.10.4/src/smooth/ftgrays.cpp")
|
||||
common.apply_patch("./freetype-2.10.4/src/smooth/ftgrays.cpp", "./wasm/patches/ftgrays1.patch")
|
||||
common.apply_patch("./freetype-2.10.4/src/smooth/ftgrays.cpp", "./wasm/patches/ftgrays2.patch")
|
||||
common.apply_patch("./freetype-2.10.4/src/smooth/ftgrays.cpp", "./wasm/patches/ftgrays3.patch")
|
||||
base.copy_file("./freetype-2.10.4/src/smooth/smooth.c", "./freetype-2.10.4/src/smooth/smooth.cpp")
|
||||
common.apply_patch("./freetype-2.10.4/src/smooth/smooth.cpp", "./wasm/patches/smooth.patch")
|
||||
# ftobjs
|
||||
common.apply_patch("./freetype-2.10.4/src/base/ftobjs.c", "./wasm/patches/ftobjs1.patch")
|
||||
common.apply_patch("./freetype-2.10.4/src/base/ftobjs.c", "./wasm/patches/ftobjs2.patch")
|
||||
# ttcmap
|
||||
base.copy_file("./freetype-2.10.4/src/sfnt/ttcmap.c", "./freetype-2.10.4/src/sfnt/ttcmap.cpp")
|
||||
common.apply_patch("./freetype-2.10.4/src/sfnt/ttcmap.cpp", "./wasm/patches/ttcmap.patch")
|
||||
base.copy_file("./freetype-2.10.4/src/sfnt/sfnt.c", "./freetype-2.10.4/src/sfnt/sfnt.cpp")
|
||||
common.apply_patch("./freetype-2.10.4/src/sfnt/sfnt.cpp", "./wasm/patches/sfnt.patch")
|
||||
common.apply_patch("./freetype-2.10.4/builds/unix/ftsystem.c", "./wasm/patches/ftsystem.patch")
|
||||
|
||||
base.replaceInFile("../../../../Common/3dParty/icu/icu/source/common/udata.cpp", "\n{\n UDataMemory tData;", "\n{\n#ifdef BUILDING_WASM_MODULE\nreturn NULL;\n#endif\n UDataMemory tData;")
|
||||
base.replaceInFile("../../../../DesktopEditor/cximage/png/pnglibconf.h", "#define PNG_CONSOLE_IO_SUPPORTED", "//#define PNG_CONSOLE_IO_SUPPORTED")
|
||||
|
||||
base.replaceInFile("../../../../Common/3dParty/openssl/openssl/crypto/sha/sha512.c", "const SHA_LONG64 *W = in;", "const SHA_LONG64 *W = (const SHA_LONG64*)in;")
|
||||
@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append("../../../../../build_tools/scripts")
|
||||
import base
|
||||
import os
|
||||
|
||||
base.configure_common_apps()
|
||||
|
||||
base.cmd_in_dir("./../../../../../core/Common/js", sys.executable, ["make.py", "./../../DesktopEditor/graphics/pro/js/drawingfile.json"])
|
||||
|
||||
src_dir = "./deploy/"
|
||||
dst_dir = "./../../../../../sdkjs/pdf/src/engine/"
|
||||
|
||||
base.delete_file(dst_dir + "drawingfile.js")
|
||||
base.delete_file(dst_dir + "drawingfile.wasm")
|
||||
base.delete_file(dst_dir + "drawingfile_ie.js")
|
||||
|
||||
base.copy_file(src_dir + "drawingfile.js", dst_dir + "drawingfile.js")
|
||||
base.copy_file(src_dir + "drawingfile.wasm", dst_dir + "drawingfile.wasm")
|
||||
base.copy_file(src_dir + "drawingfile_ie.js", dst_dir + "drawingfile_ie.js")
|
||||
base.copy_file(src_dir + "drawingfile_native.js", dst_dir + "drawingfile_native.js")
|
||||
@ -1,263 +0,0 @@
|
||||
{
|
||||
"name": "drawingfile",
|
||||
"res_folder": "./deploy",
|
||||
"wasm": true,
|
||||
"asm": true,
|
||||
"embed_mem_file": true,
|
||||
"run_before": "before.py",
|
||||
"run_after": "after.py",
|
||||
"base_js_content": "./wasm/js/drawingfile_base.js",
|
||||
"replaces" : {
|
||||
"stream" : "./wasm/js/stream.js",
|
||||
"file" : "./wasm/js/drawingfile.js",
|
||||
"file_internal" : "./wasm/js/drawingfile_wasm.js"
|
||||
},
|
||||
|
||||
"compiler_flags": [
|
||||
"-O3",
|
||||
"-fexceptions",
|
||||
"-Wno-unused-command-line-argument",
|
||||
"-Wno-register",
|
||||
"-s ALLOW_MEMORY_GROWTH=1",
|
||||
"-s FILESYSTEM=0",
|
||||
"-s ENVIRONMENT='web'",
|
||||
"-s LLD_REPORT_UNDEFINED"
|
||||
],
|
||||
"exported_functions": [
|
||||
"_malloc",
|
||||
"_free",
|
||||
"_GetType",
|
||||
"_Open",
|
||||
"_Close",
|
||||
"_GetErrorCode",
|
||||
"_GetInfo",
|
||||
"_GetPixmap",
|
||||
"_GetGlyphs",
|
||||
"_GetLinks",
|
||||
"_GetStructure",
|
||||
"_GetInteractiveFormsInfo",
|
||||
"_GetInteractiveFormsFonts",
|
||||
"_GetInteractiveFormsAP",
|
||||
"_GetButtonIcons",
|
||||
"_GetAnnotationsInfo",
|
||||
"_GetAnnotationsAP",
|
||||
"_InitializeFontsBin",
|
||||
"_InitializeFontsBase64",
|
||||
"_InitializeFontsRanges",
|
||||
"_SetFontBinary",
|
||||
"_GetFontBinary",
|
||||
"_GetGIDByUnicode",
|
||||
"_IsFontBinaryExist",
|
||||
"_DestroyTextInfo",
|
||||
"_IsNeedCMap",
|
||||
"_SetCMapData",
|
||||
"_SetScanPageFonts",
|
||||
"_ScanPage",
|
||||
"_SplitPages",
|
||||
"_MergePages",
|
||||
"_UnmergePages",
|
||||
"_RedactPage",
|
||||
"_UndoRedact",
|
||||
"_CheckOwnerPassword",
|
||||
"_CheckPerm",
|
||||
"_GetImageBase64",
|
||||
"_GetImageBase64Len",
|
||||
"_GetImageBase64Ptr",
|
||||
"_GetImageBase64Free"
|
||||
],
|
||||
"include_path": [
|
||||
"wasm/src/lib",
|
||||
"../../../agg-2.4/include",
|
||||
"../../../cximage/jasper/include", "../../../cximage/jpeg", "../../../cximage/png",
|
||||
"freetype-2.10.4/include", "freetype-2.10.4/include/freetype",
|
||||
"../../../../OfficeUtils/src/zlib-1.2.11", "../../../../OfficeUtils/src/zlib-1.2.11/contrib/minizip", "../../../../OfficeUtils/src",
|
||||
"../../../../Common/3dParty/icu/icu/source/common",
|
||||
"../../../xml/libxml2/include", "../../../xml/build/qt",
|
||||
"../../../../PdfFile/lib/goo", "../../../../PdfFile/lib/fofi", "../../../../PdfFile/lib/splash", "../../../../PdfFile/lib",
|
||||
"../../../raster/Jp2/openjpeg", "../../../raster/Jp2/openjpeg/openjpeg-2.4.0/src/lib/openjp2",
|
||||
"../../../../Common/3dParty/openssl/openssl/include",
|
||||
"../../../../Common/3dParty/openssl/build/linux_64/include",
|
||||
"../../../../DocxRenderer"
|
||||
],
|
||||
"define": [
|
||||
"__linux__", "_LINUX", "UNIX",
|
||||
"FT2_BUILD_LIBRARY", "HAVE_FCNTL_H",
|
||||
"FT_CONFIG_OPTION_SYSTEM_ZLIB",
|
||||
"BUILDING_WASM_MODULE",
|
||||
"U_COMMON_IMPLEMENTATION",
|
||||
"errno=0", "THREADMODEL=0", "DEBUGLVL=0",
|
||||
"HAVE_MBSTATE_T", "HAVE_STDINCLUDES", "HAS_WCHAR", "HAVE_VA_COPY",
|
||||
"LIBXML_READER_ENABLED", "LIBXML_PUSH_ENABLED", "LIBXML_HTML_ENABLED",
|
||||
"LIBXML_XPATH_ENABLED", "LIBXML_OUTPUT_ENABLED", "LIBXML_C14N_ENABLED",
|
||||
"LIBXML_SAX1_ENABLED", "LIBXML_TREE_ENABLED", "LIBXML_XPTR_ENABLED",
|
||||
"XML_ERROR_DISABLE_MODE", "IN_LIBXML", "LIBXML_STATIC", "BUILD_ZLIB_AS_SOURCES",
|
||||
"_ARM_ALIGN_",
|
||||
"_tcsnicmp=strncmp", "_lseek=lseek", "_getcwd=getcwd",
|
||||
"NO_CONSOLE_IO", "USE_EXTERNAL_JPEG2000", "USE_JPIP", "OPJ_STATIC", "FONT_ENGINE_DISABLE_FILESYSTEM",
|
||||
"IMAGE_CHECKER_DISABLE_XML",
|
||||
"USE_OPENSSL_HASH",
|
||||
"DISABLE_FULL_DOCUMENT_CREATION", "DISABLE_FILESYSTEM", "CRYPTOPP_DISABLE_ASM", "DISABLE_TYPE_MISMATCH"
|
||||
],
|
||||
"compile_files_array": [
|
||||
{
|
||||
"folder": "../../../raster/",
|
||||
"files": ["BgraFrame.cpp", "ImageFileFormatChecker.cpp", "PICT/PICFile.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../cximage/CxImage/",
|
||||
"files": ["ximaenc.cpp", "ximaexif.cpp", "ximage.cpp", "ximainfo.cpp", "ximajpg.cpp", "ximalpha.cpp", "ximapal.cpp", "ximasel.cpp", "xmemfile.cpp", "ximapng.cpp", "ximabmp.cpp", "ximatran.cpp", "ximatif.cpp", "tif_xfile.cpp", "ximajas.cpp", "ximagif.cpp", "ximaico.cpp", "ximatga.cpp", "ximapcx.cpp", "ximawbmp.cpp", "ximamng.cpp", "ximapsd.cpp", "ximaska.cpp", "ximaraw.cpp", "ximaint.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../cximage/jpeg/",
|
||||
"files": ["jerror.c", "jdmarker.c", "jdapimin.c", "jdmaster.c", "jdapistd.c", "jcomapi.c", "jutils.c", "jdinput.c", "jdmainct.c", "jmemmgr.c", "jquant1.c", "jquant2.c", "jdmerge.c", "jdcolor.c", "jdsample.c", "jdpostct.c", "jddctmgr.c", "jdarith.c", "jdhuff.c", "jdcoefct.c", "jmemnobs.c", "jidctint.c", "jidctfst.c", "jidctflt.c", "jaricom.c", "jcapimin.c", "jcparam.c", "jcapistd.c", "jcinit.c", "jcmaster.c", "jccolor.c", "jcmarker.c", "jcsample.c", "jcprepct.c", "jcdctmgr.c", "jcarith.c", "jchuff.c", "jccoefct.c", "jcmainct.c", "jfdctint.c", "jfdctfst.c", "jfdctflt.c"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../cximage/png/",
|
||||
"files": ["pngread.c", "pngmem.c", "pngerror.c", "png.c", "pngrio.c", "pngtrans.c", "pngget.c", "pngrutil.c", "pngrtran.c", "pngset.c", "pngwrite.c", "pngwio.c", "pngwutil.c", "pngwtran.c"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../cximage/tiff/",
|
||||
"files": ["tif_close.c", "tif_dir.c", "tif_aux.c", "tif_getimage.c", "tif_strip.c", "tif_open.c", "tif_tile.c", "tif_error.c", "tif_read.c", "tif_flush.c", "tif_dirinfo.c", "tif_compress.c", "tif_warning.c", "tif_swab.c", "tif_color.c", "tif_dirread.c", "tif_write.c", "tif_codec.c", "tif_luv.c", "tif_dirwrite.c", "tif_dumpmode.c", "tif_fax3.c", "tif_ojpeg.c", "tif_jpeg.c", "tif_next.c", "tif_thunder.c", "tif_packbits.c", "tif_lzw.c", "tif_zip.c", "tif_fax3sm.c", "tif_predict.c"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../cximage/jasper/",
|
||||
"files": ["base/jas_init.c", "base/jas_stream.c", "base/jas_malloc.c", "base/jas_image.c", "base/jas_cm.c", "base/jas_seq.c", "base/jas_string.c", "base/jas_icc.c", "base/jas_debug.c", "base/jas_iccdata.c", "base/jas_tvp.c", "base/jas_version.c", "mif/mif_cod.c", "pnm/pnm_dec.c", "pnm/pnm_enc.c", "pnm/pnm_cod.c", "bmp/bmp_dec.c", "bmp/bmp_enc.c", "bmp/bmp_cod.c", "ras/ras_dec.c", "ras/ras_enc.c", "jp2/jp2_dec.c", "jp2/jp2_enc.c", "jp2/jp2_cod.c", "jpc/jpc_cs.c", "jpc/jpc_enc.c", "jpc/jpc_dec.c", "jpc/jpc_t1cod.c", "jpc/jpc_math.c", "jpc/jpc_util.c", "jpc/jpc_tsfb.c", "jpc/jpc_mct.c", "jpc/jpc_t1enc.c", "jpc/jpc_t1dec.c", "jpc/jpc_bs.c", "jpc/jpc_t2cod.c", "jpc/jpc_t2enc.c", "jpc/jpc_t2dec.c", "jpc/jpc_tagtree.c", "jpc/jpc_mqenc.c", "jpc/jpc_mqdec.c", "jpc/jpc_mqcod.c", "jpc/jpc_qmfb.c", "jpg/jpg_val.c", "jpg/jpg_dummy.c", "pgx/pgx_dec.c", "pgx/pgx_enc.c"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../raster/Jp2/",
|
||||
"files": ["J2kFile.cpp", "Reader.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../cximage/mng/",
|
||||
"files": ["libmng_hlapi.c", "libmng_callback_xs.c", "libmng_prop_xs.c", "libmng_object_prc.c", "libmng_zlib.c", "libmng_jpeg.c", "libmng_pixels.c", "libmng_read.c", "libmng_error.c", "libmng_display.c", "libmng_write.c", "libmng_chunk_io.c", "libmng_cms.c", "libmng_filter.c", "libmng_chunk_prc.c", "libmng_chunk_xs.c"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../cximage/libpsd/",
|
||||
"files": ["psd.c", "file_header.c", "color_mode.c", "image_resource.c", "blend.c", "layer_mask.c", "image_data.c", "stream.c", "psd_system.c", "color.c", "pattern_fill.c", "color_balance.c", "channel_image.c", "gradient_fill.c", "invert.c", "posterize.c", "brightness_contrast.c", "solid_color.c", "threshold.c", "effects.c", "selective_color.c", "channel_mixer.c", "photo_filter.c", "type_tool.c", "gradient_map.c", "hue_saturation.c", "levels.c", "curves.c", "pattern.c", "psd_zip.c", "descriptor.c", "drop_shadow.c", "inner_shadow.c", "color_overlay.c", "outer_glow.c", "inner_glow.c", "bevel_emboss.c", "satin.c", "gradient_overlay.c", "stroke.c", "pattern_overlay.c"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../cximage/raw/",
|
||||
"files": ["libdcr.c"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../raster/JBig2/source/",
|
||||
"files": ["JBig2File.cpp", "Encoder/jbig2enc.cpp", "Encoder/jbig2arith.cpp", "Encoder/jbig2sym.cpp", "LeptonLib/pixconv.cpp", "LeptonLib/writefile.cpp", "LeptonLib/scale.cpp", "LeptonLib/pix1.cpp", "LeptonLib/pix2.cpp", "LeptonLib/pix3.cpp", "LeptonLib/pix4.cpp", "LeptonLib/pix5.cpp", "LeptonLib/grayquant.cpp", "LeptonLib/grayquantlow.cpp", "LeptonLib/seedfill.cpp", "LeptonLib/jbclass.cpp", "LeptonLib/pixabasic.cpp", "LeptonLib/numabasic.cpp", "LeptonLib/morphseq.cpp", "LeptonLib/binexpandlow.cpp", "LeptonLib/ptabasic.cpp", "LeptonLib/rop.cpp", "LeptonLib/colormap.cpp", "LeptonLib/pngiostub.cpp", "LeptonLib/lepton_utils.cpp", "LeptonLib/scalelow.cpp", "LeptonLib/enhance.cpp", "LeptonLib/jpegio.cpp", "LeptonLib/jpegiostub.cpp", "LeptonLib/spixio.cpp", "LeptonLib/webpio.cpp", "LeptonLib/webpiostub.cpp", "LeptonLib/psio2.cpp", "LeptonLib/gifio.cpp", "LeptonLib/gifiostub.cpp", "LeptonLib/pnmio.cpp", "LeptonLib/tiffio.cpp", "LeptonLib/tiffiostub.cpp", "LeptonLib/bmpio.cpp", "LeptonLib/binexpand.cpp", "LeptonLib/compare.cpp", "LeptonLib/boxbasic.cpp", "LeptonLib/conncomp.cpp", "LeptonLib/pixafunc1.cpp", "LeptonLib/boxfunc1.cpp", "LeptonLib/ptafunc1.cpp", "LeptonLib/binreduce.cpp", "LeptonLib/seedfilllow.cpp", "LeptonLib/sel1.cpp", "LeptonLib/morphapp.cpp", "LeptonLib/correlscore.cpp", "LeptonLib/sarray.cpp", "LeptonLib/morph.cpp", "LeptonLib/roplow.cpp", "LeptonLib/fpix1.cpp", "LeptonLib/stack.cpp", "LeptonLib/pixacc.cpp", "LeptonLib/pixarith.cpp", "LeptonLib/convolve.cpp", "LeptonLib/binreducelow.cpp", "LeptonLib/convolvelow.cpp", "LeptonLib/arithlow.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "./wasm/src/",
|
||||
"files": ["lib/wasm_jmp.cpp", "drawingfile.cpp", "metafile.cpp", "HTMLRendererText.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "freetype-2.10.4/src/",
|
||||
"files": ["base/ftdebug.c","autofit/autofit.c","bdf/bdf.c","cff/cff.c","base/ftbase.c","base/ftbitmap.c","base/ftfstype.c","base/ftgasp.c","cache/ftcache.c","base/ftglyph.c","gzip/ftgzip.c","base/ftinit.c","lzw/ftlzw.c","base/ftstroke.c","base/ftsystem.c","smooth/smooth.cpp","base/ftbbox.c","base/ftbdf.c","base/ftcid.c","base/ftmm.c","base/ftpfr.c","base/ftsynth.c","base/fttype1.c","base/ftwinfnt.c","base/ftgxval.c","base/ftotval.c","base/ftpatent.c","pcf/pcf.c","pfr/pfr.c","psaux/psaux.c","pshinter/pshinter.c","psnames/psmodule.c","raster/raster.c","sfnt/sfnt.cpp","truetype/truetype.c","type1/type1.c","cid/type1cid.c","type42/type42.c","winfonts/winfnt.c"]
|
||||
},
|
||||
{
|
||||
"folder": "../../",
|
||||
"files": ["GraphicsRenderer.cpp", "pro/pro_Graphics.cpp", "pro/pro_Fonts.cpp", "pro/pro_Image.cpp", "Graphics.cpp", "Brush.cpp", "BaseThread.cpp", "GraphicsPath.cpp", "BooleanOperations.cpp", "Image.cpp", "Matrix.cpp", "Clip.cpp", "TemporaryCS.cpp", "AlphaMask.cpp", "GraphicsLayer.cpp", "commands/DocInfo.cpp", "commands/AnnotField.cpp", "commands/FormField.cpp", "MetafileToRenderer.cpp", "MetafileToRendererReader.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../fontengine/",
|
||||
"files": ["GlyphString.cpp", "FontManager.cpp", "FontFile.cpp", "FontPath.cpp", "ApplicationFonts.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../agg-2.4/src/",
|
||||
"files": ["agg_arc.cpp", "agg_vcgen_stroke.cpp", "agg_vcgen_dash.cpp", "agg_trans_affine.cpp", "agg_curves.cpp", "agg_image_filters.cpp", "agg_bezier_arc.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../common/",
|
||||
"files": ["File.cpp", "Directory.cpp", "ByteBuilder.cpp", "Base64.cpp", "StringExt.cpp", "Path.cpp", "SystemUtils.cpp", "StringUTF32.cpp", "StringBuilder.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../Common/3dParty/icu/icu/source/common/",
|
||||
"files": ["ustr_wcs.cpp", "ustrtrns.cpp", "udata.cpp", "ucnv_io.cpp", "ustring.cpp", "umutex.cpp", "putil.cpp", "ustr_cnv.cpp", "ucnvmbcs.cpp", "ucln_cmn.cpp", "ucnv2022.cpp", "ucnvbocu.cpp", "stringpiece.cpp", "charstr.cpp", "ucnv_ext.cpp", "uobject.cpp", "usprep.cpp", "unistr.cpp", "uniset_props.cpp", "loadednormalizer2impl.cpp", "filterednormalizer2.cpp", "utrie2.cpp", "normalizer2.cpp", "normalizer2impl.cpp", "utrie.cpp", "ucase.cpp", "uniset.cpp", "ruleiter.cpp", "parsepos.cpp", "util.cpp", "uprops.cpp", "uvector.cpp", "unames.cpp", "propname.cpp", "utrie2_builder.cpp", "unifunct.cpp", "bmpset.cpp", "unisetspan.cpp", "unifilt.cpp", "patternprops.cpp", "ustrcase.cpp", "bytestrie.cpp", "utf_impl.cpp", "cmemory.cpp", "uhash.cpp", "udatamem.cpp", "umapfile.cpp", "uinvchar.cpp", "uchar.cpp", "ubidi_props.cpp", "characterproperties.cpp", "ucptrie.cpp", "edits.cpp", "umutablecptrie.cpp", "bytesinkutil.cpp", "emojiprops.cpp", "cstring.cpp", "ucmndata.cpp", "ucnv.cpp", "ucnv_u7.cpp", "ucnv_u8.cpp", "ucnv_u16.cpp", "ucnv_u32.cpp", "ucnv_err.cpp", "ucnv_cnv.cpp", "ucnv_lmb.cpp", "ucnv_cb.cpp", "ucnv_ct.cpp", "ucharstrieiterator.cpp", "ucnvlat1.cpp", "uvectr32.cpp", "ucnvhz.cpp", "ucnvscsu.cpp", "ucnv_bld.cpp", "ucnvisci.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../Common/3dParty/cryptopp/",
|
||||
"files": ["cryptlib.cpp", "cpu.cpp", "integer.cpp", "3way.cpp", "adler32.cpp", "algebra.cpp", "algparam.cpp", "allocate.cpp", "arc4.cpp", "aria.cpp", "aria_simd.cpp", "ariatab.cpp", "asn.cpp", "authenc.cpp", "base32.cpp", "base64.cpp", "basecode.cpp", "bfinit.cpp", "blake2.cpp", "blake2s_simd.cpp", "blake2b_simd.cpp", "blowfish.cpp", "blumshub.cpp", "camellia.cpp", "cast.cpp", "casts.cpp", "cbcmac.cpp", "ccm.cpp", "chacha.cpp", "chacha_simd.cpp", "chacha_avx.cpp", "chachapoly.cpp", "cham.cpp", "cham_simd.cpp", "channels.cpp", "cmac.cpp", "crc.cpp", "crc_simd.cpp", "darn.cpp", "default.cpp", "des.cpp", "dessp.cpp", "dh.cpp", "dh2.cpp", "dll.cpp", "donna_32.cpp", "donna_64.cpp", "donna_sse.cpp", "dsa.cpp", "eax.cpp", "ec2n.cpp", "ecp.cpp", "eccrypto.cpp", "eprecomp.cpp", "elgamal.cpp", "emsa2.cpp", "eprecomp.cpp", "esign.cpp", "files.cpp", "filters.cpp", "fips140.cpp", "gcm.cpp", "gcm_simd.cpp", "gf256.cpp", "gf2_32.cpp", "gf2n.cpp", "gf2n_simd.cpp", "gfpcrypt.cpp", "gost.cpp", "gzip.cpp", "hc128.cpp", "hc256.cpp", "hex.cpp", "hight.cpp", "hmac.cpp", "hrtimer.cpp", "ida.cpp", "idea.cpp", "iterhash.cpp", "kalyna.cpp", "md5.cpp", "randpool.cpp", "osrng.cpp", "rijndael.cpp", "modes.cpp", "misc.cpp", "rdtables.cpp", "sha.cpp", "mqueue.cpp", "queue.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../OfficeUtils/src/",
|
||||
"files": ["OfficeUtils.cpp", "ZipBuffer.cpp", "ZipUtilsCP.cpp", "zlib_addon.c"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../OfficeUtils/src/zlib-1.2.11/contrib/minizip/",
|
||||
"files": ["ioapi.c", "miniunz.c", "minizip.c", "mztools.c", "unzip.c", "zip.c", "ioapibuf.c"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../OfficeUtils/src/zlib-1.2.11/",
|
||||
"files": ["adler32.c", "crc32.c", "deflate.c", "infback.c", "inffast.c", "inflate.c", "inftrees.c", "trees.c", "zutil.c", "compress.c"]
|
||||
},
|
||||
{
|
||||
"folder": "./",
|
||||
"files": ["xml/src/xmllight.cpp", "xml/src/xmldom.cpp", "xml/build/qt/libxml2_all.c", "xml/build/qt/libxml2_all2.c"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../PdfFile/",
|
||||
"files": ["PdfFile.cpp", "PdfReader.cpp", "PdfWriter.cpp", "PdfEditor.cpp", "OnlineOfficeBinToPdf.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../PdfFile/SrcReader/",
|
||||
"files": ["Adaptors.cpp", "GfxClip.cpp", "RendererOutputDev.cpp", "JPXStream2.cpp", "PdfAnnot.cpp", "PdfFont.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../PdfFile/SrcWriter/",
|
||||
"files": ["AcroForm.cpp", "Annotation.cpp", "Catalog.cpp", "Destination.cpp", "Document.cpp", "Encrypt.cpp", "EncryptDictionary.cpp", "Field.cpp", "Font.cpp", "Font14.cpp", "FontCidTT.cpp", "FontOTWriter.cpp", "FontTT.cpp", "FontTTWriter.cpp", "GState.cpp", "Image.cpp", "Info.cpp", "Metadata.cpp", "Objects.cpp", "Outline.cpp", "Pages.cpp", "Pattern.cpp", "ResourcesDictionary.cpp", "Shading.cpp", "States.cpp", "Streams.cpp", "Utils.cpp", "RedactOutputDev.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../PdfFile/Resources/",
|
||||
"files": ["BaseFonts.cpp", "CMapMemory/cmap_memory.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../PdfFile/lib/",
|
||||
"files": ["fofi/FoFiBase.cc", "fofi/FoFiEncodings.cc", "fofi/FoFiIdentifier.cc", "fofi/FoFiTrueType.cc", "fofi/FoFiType1.cc", "fofi/FoFiType1C.cc", "goo/FixedPoint.cc", "goo/gfile.cc", "goo/GHash.cc", "goo/GList.cc", "goo/gmem.cc", "goo/gmempp.cc", "goo/GString.cc", "goo/parseargs.c", "goo/Trace.cc", "splash/Splash.cc", "splash/SplashBitmap.cc", "splash/SplashClip.cc", "splash/SplashFont.cc", "splash/SplashFontEngine.cc", "splash/SplashFontFile.cc", "splash/SplashFontFileID.cc", "splash/SplashFTFont.cc", "splash/SplashFTFontEngine.cc", "splash/SplashFTFontFile.cc", "splash/SplashPath.cc", "splash/SplashPattern.cc", "splash/SplashScreen.cc", "splash/SplashState.cc", "splash/SplashXPath.cc", "splash/SplashXPathScanner.cc", "xpdf/AcroForm.cc", "xpdf/Annot.cc", "xpdf/Array.cc", "xpdf/BuiltinFont.cc", "xpdf/BuiltinFontTables.cc", "xpdf/Catalog.cc", "xpdf/CharCodeToUnicode.cc", "xpdf/CMap.cc", "xpdf/Decrypt.cc", "xpdf/Dict.cc", "xpdf/DisplayState.cc", "xpdf/Error.cc", "xpdf/FontEncodingTables.cc", "xpdf/Function.cc", "xpdf/Gfx.cc", "xpdf/GfxFont.cc", "xpdf/GfxState.cc", "xpdf/GlobalParams.cc", "xpdf/ImageOutputDev.cc", "xpdf/JArithmeticDecoder.cc", "xpdf/JBIG2Stream.cc", "xpdf/JPXStream.cc", "xpdf/Lexer.cc", "xpdf/Link.cc", "xpdf/NameToCharCode.cc", "xpdf/Object.cc", "xpdf/OptionalContent.cc", "xpdf/Outline.cc", "xpdf/OutputDev.cc", "xpdf/Page.cc", "xpdf/Parser.cc", "xpdf/PDF417Barcode.cc", "xpdf/PDFCore.cc", "xpdf/PDFDoc.cc", "xpdf/PDFDocEncoding.cc", "xpdf/PreScanOutputDev.cc", "xpdf/PSOutputDev.cc", "xpdf/PSTokenizer.cc", "xpdf/SecurityHandler.cc", "xpdf/ShadingImage.cc", "xpdf/SplashOutputDev.cc", "xpdf/Stream.cc", "xpdf/TextOutputDev.cc", "xpdf/TextString.cc", "xpdf/TileCache.cc", "xpdf/TileCompositor.cc", "xpdf/TileMap.cc", "xpdf/UnicodeMap.cc", "xpdf/UnicodeRemapping.cc", "xpdf/UnicodeTypeTable.cc", "xpdf/UTF8.cc", "xpdf/WebFont.cc", "xpdf/XFAScanner.cc", "xpdf/XRef.cc", "xpdf/Zoox.cc"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../raster/Jp2/openjpeg/openjpeg-2.4.0/src/lib/openjp2/",
|
||||
"files": ["bio.c", "cidx_manager.c", "cio.c", "dwt.c", "event.c", "function_list.c", "image.c", "invert.c", "j2k.c", "jp2.c", "mct.c", "mqc.c", "openjpeg.c", "opj_clock.c", "opj_malloc.c", "phix_manager.c", "pi.c", "ppix_manager.c", "sparse_array.c", "t1.c", "t2.c", "tcd.c", "tgt.c", "thix_manager.c", "thread.c", "tpix_manager.c", "../../../../opj_bgraframe.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../XpsFile/",
|
||||
"files": ["XpsFile.cpp", "XpsLib/Document.cpp", "XpsLib/XpsPage.cpp", "XpsLib/StaticResources.cpp", "XpsLib/Utils.cpp", "XpsLib/WString.cpp", "XpsLib/ContextState.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../DjVuFile/libdjvu/",
|
||||
"files": ["../DjVu.cpp", "../DjVuFileImplementation.cpp", "Arrays.cpp", "BSByteStream.cpp", "BSEncodeByteStream.cpp", "ByteStream.cpp", "DataPool.cpp", "debug.cpp", "DjVmDir.cpp", "DjVmDir0.cpp", "DjVmDoc.cpp", "DjVmNav.cpp", "DjVuAnno.cpp", "DjVuDocEditor.cpp", "DjVuDocument.cpp", "DjVuDumpHelper.cpp", "DjVuErrorList.cpp", "DjVuFile.cpp", "DjVuFileCache.cpp", "DjVuGlobal.cpp", "DjVuGlobalMemory.cpp", "DjVuImage.cpp", "DjVuInfo.cpp", "DjVuMessageLite.cpp", "DjVuNavDir.cpp", "DjVuPalette.cpp", "DjVuPort.cpp", "DjVuText.cpp", "DjVuToPS.cpp", "GBitmap.cpp", "GContainer.cpp", "GException.cpp", "GIFFManager.cpp", "GMapAreas.cpp", "GPixmap.cpp", "GRect.cpp", "GScaler.cpp", "GSmartPointer.cpp", "GString.cpp", "GThreads.cpp", "GUnicode.cpp", "IFFByteStream.cpp", "IW44EncodeCodec.cpp", "IW44Image.cpp", "JB2EncodeCodec.cpp", "JB2Image.cpp", "JPEGDecoder.cpp", "MMRDecoder.cpp", "MMX.cpp", "UnicodeByteStream.cpp", "XMLParser.cpp", "XMLTags.cpp", "ZPCodec.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../DjVuFile/wasm/libdjvu/",
|
||||
"files": ["atomic.cpp", "DjVuMessage.cpp", "GOS.cpp", "GURL.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../",
|
||||
"files": ["officedrawingfile.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../UnicodeConverter/",
|
||||
"files": ["UnicodeConverter.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../DocxRenderer/",
|
||||
"files": ["DocxRenderer.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../DocxRenderer/src/resources",
|
||||
"files": ["VectorGraphics.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../DocxRenderer/src/logic",
|
||||
"files": ["styles/FontStyle.cpp", "styles/ParagraphStyle.cpp", "Page.cpp", "Document.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../DocxRenderer/src/logic/managers",
|
||||
"files": ["FontManager.cpp", "FontStyleManager.cpp", "ImageManager.cpp", "ParagraphStyleManager.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../DocxRenderer/src/logic/elements",
|
||||
"files": ["BaseItem.cpp", "ContText.cpp", "Paragraph.cpp", "Shape.cpp", "TextLine.cpp", "Table.cpp"]
|
||||
},
|
||||
{
|
||||
"folder": "../../../../OdfFile/Common",
|
||||
"files": ["logging.cpp"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,276 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
sys.path.append("../../../../../build_tools/scripts")
|
||||
import base
|
||||
import os
|
||||
import json
|
||||
|
||||
def apply_patch(file, patch):
|
||||
file_content = base.readFile(file)
|
||||
patch_content = base.readFile(patch)
|
||||
index1 = patch_content.find("<<<<<<<")
|
||||
index2 = patch_content.find("=======")
|
||||
index3 = patch_content.find(">>>>>>>")
|
||||
file_content_old = patch_content[index1 + 7:index2]
|
||||
file_content_new = "\n#if 0" + file_content_old + "#else" + patch_content[index2 + 7:index3] + "#endif\n"
|
||||
base.replaceInFile(file, file_content_old, file_content_new)
|
||||
return
|
||||
|
||||
if not base.is_file("./raster.o"):
|
||||
base.cmd("python", ["raster_make.py"])
|
||||
if not base.is_file("./raster.o"):
|
||||
print("raster_make.py error")
|
||||
exit(0)
|
||||
|
||||
base.configure_common_apps()
|
||||
|
||||
# remove previous version
|
||||
if base.is_dir("./deploy"):
|
||||
base.delete_dir("./deploy")
|
||||
base.create_dir("./deploy")
|
||||
if base.is_dir("./o"):
|
||||
base.delete_dir("./o")
|
||||
base.create_dir("./o")
|
||||
|
||||
# fetch emsdk
|
||||
command_prefix = "" if ("windows" == base.host_platform()) else "./"
|
||||
if not base.is_dir("emsdk"):
|
||||
base.cmd("git", ["clone", "https://github.com/emscripten-core/emsdk.git"])
|
||||
os.chdir("emsdk")
|
||||
base.cmd(command_prefix + "emsdk", ["install", "latest"])
|
||||
base.cmd(command_prefix + "emsdk", ["activate", "latest"])
|
||||
os.chdir("../")
|
||||
|
||||
if not base.is_dir("xml"):
|
||||
base.copy_dir("../../../xml", "./xml")
|
||||
base.replaceInFile("./xml/libxml2/libxml.h", "xmlNop(void)", "xmlNop(void* context, char* buffer, int len)")
|
||||
base.replaceInFile("./xml/libxml2/xmlIO.c", "xmlNop(void)", "xmlNop(void* context, char* buffer, int len)")
|
||||
base.replaceInFile("./xml/src/xmllight_private.h", "#include \"../../common/", "#include \"../../../../../common/")
|
||||
base.replaceInFile("./xml/include/xmlutils.h", "#include \"../../common/", "#include \"../../../../../common/")
|
||||
|
||||
if not base.is_dir("freetype-2.10.4"):
|
||||
base.copy_dir("../../../freetype-2.10.4", "./freetype-2.10.4")
|
||||
# smooth
|
||||
base.copy_file("./freetype-2.10.4/src/smooth/ftgrays.c", "./freetype-2.10.4/src/smooth/ftgrays.cpp");
|
||||
apply_patch("./freetype-2.10.4/src/smooth/ftgrays.cpp", "./wasm/patches/ftgrays1.patch")
|
||||
apply_patch("./freetype-2.10.4/src/smooth/ftgrays.cpp", "./wasm/patches/ftgrays2.patch")
|
||||
apply_patch("./freetype-2.10.4/src/smooth/ftgrays.cpp", "./wasm/patches/ftgrays3.patch")
|
||||
base.copy_file("./freetype-2.10.4/src/smooth/smooth.c", "./freetype-2.10.4/src/smooth/smooth.cpp");
|
||||
apply_patch("./freetype-2.10.4/src/smooth/smooth.cpp", "./wasm/patches/smooth.patch")
|
||||
# ftobjs
|
||||
apply_patch("./freetype-2.10.4/src/base/ftobjs.c", "./wasm/patches/ftobjs1.patch")
|
||||
apply_patch("./freetype-2.10.4/src/base/ftobjs.c", "./wasm/patches/ftobjs2.patch")
|
||||
# ttcmap
|
||||
base.copy_file("./freetype-2.10.4/src/sfnt/ttcmap.c", "./freetype-2.10.4/src/sfnt/ttcmap.cpp");
|
||||
apply_patch("./freetype-2.10.4/src/sfnt/ttcmap.cpp", "./wasm/patches/ttcmap.patch")
|
||||
base.copy_file("./freetype-2.10.4/src/sfnt/sfnt.c", "./freetype-2.10.4/src/sfnt/sfnt.cpp");
|
||||
apply_patch("./freetype-2.10.4/src/sfnt/sfnt.cpp", "./wasm/patches/sfnt.patch")
|
||||
|
||||
# compile
|
||||
compiler_flags = ["-O3",
|
||||
# "-fno-rtti", cryptopp uses typeid
|
||||
"-fexceptions",
|
||||
"-Wno-unused-command-line-argument",
|
||||
"-s WASM=1",
|
||||
"-s ALLOW_MEMORY_GROWTH=1",
|
||||
"-s FILESYSTEM=0",
|
||||
"-s ENVIRONMENT='web'",
|
||||
"-s LLD_REPORT_UNDEFINED"]
|
||||
|
||||
exported_functions = ["_malloc",
|
||||
"_free",
|
||||
"_GetType",
|
||||
"_Open",
|
||||
"_Close",
|
||||
"_GetErrorCode",
|
||||
"_GetInfo",
|
||||
"_GetPixmap",
|
||||
"_GetGlyphs",
|
||||
"_GetLinks",
|
||||
"_GetStructure",
|
||||
"_InitializeFontsBin",
|
||||
"_InitializeFontsBase64",
|
||||
"_SetFontBinary",
|
||||
"_IsFontBinaryExist"]
|
||||
|
||||
compile_files_array = []
|
||||
|
||||
compile_files_array.append("lib")
|
||||
compile_files_array.append("./")
|
||||
compile_files_array.append(["wasm/src/lib/wasm_jmp.cpp"])
|
||||
|
||||
compile_files_array.append("f")
|
||||
compile_files_array.append("freetype-2.10.4/src/")
|
||||
compile_files_array.append(["base/ftdebug.c","autofit/autofit.c","bdf/bdf.c","cff/cff.c","base/ftbase.c","base/ftbitmap.c","base/ftfstype.c","base/ftgasp.c","cache/ftcache.c","base/ftglyph.c","gzip/ftgzip.c","base/ftinit.c","lzw/ftlzw.c","base/ftstroke.c","base/ftsystem.c","smooth/smooth.cpp","base/ftbbox.c","base/ftbdf.c","base/ftcid.c","base/ftmm.c","base/ftpfr.c","base/ftsynth.c","base/fttype1.c","base/ftwinfnt.c","base/ftgxval.c","base/ftotval.c","base/ftpatent.c","pcf/pcf.c","pfr/pfr.c","psaux/psaux.c","pshinter/pshinter.c","psnames/psmodule.c","raster/raster.c","sfnt/sfnt.cpp","truetype/truetype.c","type1/type1.c","cid/type1cid.c","type42/type42.c","winfonts/winfnt.c"])
|
||||
|
||||
compile_files_array.append("g")
|
||||
compile_files_array.append("../../")
|
||||
compile_files_array.append(["GraphicsRenderer.cpp", "pro/pro_Graphics.cpp", "pro/pro_Fonts.cpp", "pro/pro_Image.cpp", "Graphics.cpp", "Brush.cpp", "BaseThread.cpp", "GraphicsPath.cpp", "Image.cpp", "Matrix.cpp", "Clip.cpp", "TemporaryCS.cpp"])
|
||||
|
||||
compile_files_array.append("fe")
|
||||
compile_files_array.append("../../../fontengine/")
|
||||
compile_files_array.append(["GlyphString.cpp", "FontManager.cpp", "FontFile.cpp", "FontPath.cpp", "ApplicationFonts.cpp"])
|
||||
|
||||
compile_files_array.append("a")
|
||||
compile_files_array.append("../../../agg-2.4/src/")
|
||||
compile_files_array.append(["agg_arc.cpp", "agg_vcgen_stroke.cpp", "agg_vcgen_dash.cpp", "agg_trans_affine.cpp", "agg_curves.cpp"])
|
||||
|
||||
compile_files_array.append("c")
|
||||
compile_files_array.append("../../../common/")
|
||||
compile_files_array.append(["File.cpp", "Directory.cpp", "ByteBuilder.cpp", "Base64.cpp", "StringExt.cpp"])
|
||||
|
||||
compile_files_array.append("i")
|
||||
compile_files_array.append("../../../../Common/3dParty/icu/icu/source/common/")
|
||||
compile_files_array.append(["ucnv.c", "ustr_wcs.cpp", "ucnv_err.c", "ucnv_bld.cpp", "ustrtrns.cpp", "ucnv_cb.c", "udata.cpp", "ucnv_io.cpp", "uhash.c", "udatamem.c", "cmemory.c", "ustring.cpp", "umutex.cpp", "putil.cpp", "ustr_cnv.cpp", "ucnvmbcs.cpp", "ucnvlat1.c", "ucnv_u16.c", "ucnv_u8.c", "ucnv_u32.c", "ucnv_u7.c", "ucln_cmn.cpp", "ucnv2022.cpp", "ucnv_lmb.c", "ucnvhz.c", "ucnvscsu.c", "ucnvisci.c", "ucnvbocu.cpp", "ucnv_ct.c", "ucnv_cnv.c", "stringpiece.cpp", "charstr.cpp", "umapfile.c", "ucmndata.c", "ucnv_ext.cpp", "uobject.cpp", "umath.c", "ubidi_props.c", "uchar.c", "uinvchar.c", "usprep.cpp", "unistr.cpp", "uniset_props.cpp", "loadednormalizer2impl.cpp", "filterednormalizer2.cpp", "utrie2.cpp", "normalizer2.cpp", "normalizer2impl.cpp", "utrie.cpp", "ucase.cpp", "uniset.cpp", "ruleiter.cpp", "parsepos.cpp", "util.cpp", "uprops.cpp", "uvector.cpp", "unames.cpp", "propname.cpp", "utrie2_builder.cpp", "unifunct.cpp", "bmpset.cpp", "unisetspan.cpp", "unifilt.cpp", "patternprops.cpp", "utf_impl.c", "ustrcase.cpp", "cstring.c", "bytestrie.cpp"])
|
||||
|
||||
compile_files_array.append("o")
|
||||
compile_files_array.append("../../../../OfficeUtils/src/")
|
||||
compile_files_array.append(["OfficeUtils.cpp", "ZipBuffer.cpp", "ZipUtilsCP.cpp"])
|
||||
|
||||
compile_files_array.append("m")
|
||||
compile_files_array.append("../../../../OfficeUtils/src/zlib-1.2.11/contrib/minizip/")
|
||||
compile_files_array.append(["ioapi.c", "miniunz.c", "minizip.c", "mztools.c", "unzip.c", "zip.c", "ioapibuf.c"])
|
||||
|
||||
compile_files_array.append("z")
|
||||
compile_files_array.append("../../../../OfficeUtils/src/zlib-1.2.11/")
|
||||
compile_files_array.append(["adler32.c", "crc32.c", "deflate.c", "infback.c", "inffast.c", "inflate.c", "inftrees.c", "trees.c", "zutil.c", "compress.c"])
|
||||
|
||||
compile_files_array.append("x")
|
||||
compile_files_array.append("./")
|
||||
compile_files_array.append(["xml/src/xmllight.cpp", "xml/src/xmldom.cpp", "xml/build/qt/libxml2_all.c", "xml/build/qt/libxml2_all2.c"])
|
||||
|
||||
compile_files_array.append("p")
|
||||
compile_files_array.append("../../../../PdfReader/")
|
||||
compile_files_array.append(["PdfReader.cpp", "Src/Adaptors.cpp", "Src/GfxClip.cpp", "Src/RendererOutputDev.cpp", "lib/fofi/FofiBase.cc", "lib/fofi/FofiEncodings.cc", "lib/fofi/FofiIdentifier.cc", "lib/fofi/FofiTrueType.cc", "lib/fofi/FofiType1.cc", "lib/fofi/FofiType1C.cc", "lib/goo/FixedPoint.cc", "lib/goo/gfile.cc", "lib/goo/GHash.cc", "lib/goo/GList.cc", "lib/goo/gmem.cc", "lib/goo/gmempp.cc", "lib/goo/GString.cc", "lib/goo/parseargs.c", "lib/goo/Trace.cc", "lib/splash/Splash.cc", "lib/splash/SplashBitmap.cc", "lib/splash/SplashClip.cc", "lib/splash/SplashFont.cc", "lib/splash/SplashFontEngine.cc", "lib/splash/SplashFontFile.cc", "lib/splash/SplashFontFileID.cc", "lib/splash/SplashFTFont.cc", "lib/splash/SplashFTFontEngine.cc", "lib/splash/SplashFTFontFile.cc", "lib/splash/SplashPath.cc", "lib/splash/SplashPattern.cc", "lib/splash/SplashScreen.cc", "lib/splash/SplashState.cc", "lib/splash/SplashXPath.cc", "lib/splash/SplashXPathScanner.cc", "lib/xpdf/AcroForm.cc", "lib/xpdf/Annot.cc", "lib/xpdf/Array.cc", "lib/xpdf/BuiltinFont.cc", "lib/xpdf/BuiltinFontTables.cc", "lib/xpdf/Catalog.cc", "lib/xpdf/CharCodeToUnicode.cc", "lib/xpdf/CMap.cc", "lib/xpdf/Decrypt.cc", "lib/xpdf/Dict.cc", "lib/xpdf/DisplayState.cc", "lib/xpdf/Error.cc", "lib/xpdf/FontEncodingTables.cc", "lib/xpdf/Function.cc", "lib/xpdf/Gfx.cc", "lib/xpdf/GfxFont.cc", "lib/xpdf/GfxState.cc", "lib/xpdf/GlobalParams.cc", "lib/xpdf/ImageOutputDev.cc", "lib/xpdf/JArithmeticDecoder.cc", "lib/xpdf/JBIG2Stream.cc", "lib/xpdf/JPXStream.cc", "lib/xpdf/Lexer.cc", "lib/xpdf/Link.cc", "lib/xpdf/NameToCharCode.cc", "lib/xpdf/Object.cc", "lib/xpdf/OptionalContent.cc", "lib/xpdf/Outline.cc", "lib/xpdf/OutputDev.cc", "lib/xpdf/Page.cc", "lib/xpdf/Parser.cc", "lib/xpdf/PDF417Barcode.cc", "lib/xpdf/PDFCore.cc", "lib/xpdf/PDFDoc.cc", "lib/xpdf/PDFDocEncoding.cc", "lib/xpdf/PreScanOutputDev.cc", "lib/xpdf/PSOutputDev.cc", "lib/xpdf/PSTokenizer.cc", "lib/xpdf/SecurityHandler.cc", "lib/xpdf/ShadingImage.cc", "lib/xpdf/SplashOutputDev.cc", "lib/xpdf/Stream.cc", "lib/xpdf/TextOutputDev.cc", "lib/xpdf/TextString.cc", "lib/xpdf/TileCache.cc", "lib/xpdf/TileCompositor.cc", "lib/xpdf/TileMap.cc", "lib/xpdf/UnicodeMap.cc", "lib/xpdf/UnicodeRemapping.cc", "lib/xpdf/UnicodeTypeTable.cc", "lib/xpdf/UTF8.cc", "lib/xpdf/WebFont.cc", "lib/xpdf/XFAScanner.cc", "lib/xpdf/XRef.cc", "lib/xpdf/Zoox.cc"])
|
||||
|
||||
compile_files_array.append("x")
|
||||
compile_files_array.append("../../../../XpsFile/")
|
||||
compile_files_array.append(["XpsFile.cpp", "XpsLib/Document.cpp", "XpsLib/XpsPage.cpp", "XpsLib/StaticResources.cpp", "XpsLib/Utils.cpp", "XpsLib/WString.cpp", "XpsLib/ContextState.cpp"])
|
||||
|
||||
compile_files_array.append("d")
|
||||
compile_files_array.append("../../../../DjVuFile/libdjvu/")
|
||||
compile_files_array.append(["../DjVu.cpp", "../DjVuFileImplementation.cpp", "Arrays.cpp", "BSByteStream.cpp", "BSEncodeByteStream.cpp", "ByteStream.cpp", "DataPool.cpp", "debug.cpp", "DjVmDir.cpp", "DjVmDir0.cpp", "DjVmDoc.cpp", "DjVmNav.cpp", "DjVuAnno.cpp", "DjVuDocEditor.cpp", "DjVuDocument.cpp", "DjVuDumpHelper.cpp", "DjVuErrorList.cpp", "DjVuFile.cpp", "DjVuFileCache.cpp", "DjVuGlobal.cpp", "DjVuGlobalMemory.cpp", "DjVuImage.cpp", "DjVuInfo.cpp", "DjVuMessageLite.cpp", "DjVuNavDir.cpp", "DjVuPalette.cpp", "DjVuPort.cpp", "DjVuText.cpp", "DjVuToPS.cpp", "GBitmap.cpp", "GContainer.cpp", "GException.cpp", "GIFFManager.cpp", "GMapAreas.cpp", "GPixmap.cpp", "GRect.cpp", "GScaler.cpp", "GSmartPointer.cpp", "DjVuGString.cpp", "GThreads.cpp", "GUnicode.cpp", "IFFByteStream.cpp", "IW44EncodeCodec.cpp", "IW44Image.cpp", "JB2EncodeCodec.cpp", "JB2Image.cpp", "JPEGDecoder.cpp", "MMRDecoder.cpp", "MMX.cpp", "UnicodeByteStream.cpp", "XMLParser.cpp", "XMLTags.cpp", "ZPCodec.cpp"])
|
||||
|
||||
compile_files_array.append("d")
|
||||
compile_files_array.append("../../../../DjVuFile/wasm/libdjvu/")
|
||||
compile_files_array.append(["atomic.cpp", "DjVuMessage.cpp", "GOS.cpp", "GURL.cpp"])
|
||||
|
||||
compile_files_array.append("u")
|
||||
compile_files_array.append("../../../../UnicodeConverter/")
|
||||
compile_files_array.append(["UnicodeConverter.cpp"])
|
||||
|
||||
compiler_flags.append("-Iwasm/src/lib -I../../../agg-2.4/include -I../../../cximage/jasper/include -I../../../cximage/jpeg -I../../../cximage/png -Ifreetype-2.10.4/include -Ifreetype-2.10.4/include/freetype -I../../../../OfficeUtils/src/zlib-1.2.11 -I../../../../Common/3dParty/icu/icu/source/common -I../../../xml/libxml2/include -I../../../xml/build/qt -I../../../../OfficeUtils/src/zlib-1.2.11/contrib/minizip -I../../../../PdfReader/lib/goo -I../../../../PdfReader/lib/fofi -I../../../../PdfReader/lib/splash -I../../../../PdfReader/lib")
|
||||
compiler_flags.append("-D__linux__ -D_LINUX -DUNIX -DFT2_BUILD_LIBRARY -DHAVE_FCNTL_H -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DBUILDING_WASM_MODULE -DU_COMMON_IMPLEMENTATION")
|
||||
compiler_flags.append("-Derrno=0 -DTHREADMODEL=0 -DDEBUGLVL=0 -DHAVE_MBSTATE_T -DHAVE_STDINCLUDES -DHAS_WCHAR")
|
||||
compiler_flags.append("-DHAVE_VA_COPY -DLIBXML_READER_ENABLED -DLIBXML_PUSH_ENABLED -DLIBXML_HTML_ENABLED -DLIBXML_XPATH_ENABLED -DLIBXML_OUTPUT_ENABLED -DLIBXML_C14N_ENABLED -DLIBXML_SAX1_ENABLED -DLIBXML_TREE_ENABLED -DLIBXML_XPTR_ENABLED -DIN_LIBXML -DLIBXML_STATIC -DBUILD_ZLIB_AS_SOURCES -DDISABLE_PDF_CONVERTATION -D_ARM_ALIGN_")
|
||||
|
||||
# arguments
|
||||
arguments = ""
|
||||
for item in compiler_flags:
|
||||
arguments += (item + " ")
|
||||
|
||||
# sources
|
||||
sources = ["raster.o", "wasm/src/drawingfile.cpp", "wasm/src/metafile.cpp"]
|
||||
|
||||
# command
|
||||
compile_files_array_len = len(compile_files_array)
|
||||
external_file = []
|
||||
|
||||
prefix_call = ""
|
||||
if base.host_platform() == "windows":
|
||||
prefix_call = "call "
|
||||
external_file.append("call emsdk/emsdk_env.bat")
|
||||
else:
|
||||
external_file.append("#!/bin/bash")
|
||||
external_file.append("source ./emsdk/emsdk_env.sh")
|
||||
|
||||
file_index = 0
|
||||
libs = ""
|
||||
while file_index < compile_files_array_len:
|
||||
objects_dir = compile_files_array[file_index]
|
||||
base_dir = compile_files_array[file_index + 1]
|
||||
files = compile_files_array[file_index + 2]
|
||||
file_index += 3
|
||||
base.create_dir("./o/" + objects_dir)
|
||||
for item in files:
|
||||
file_name = os.path.splitext(os.path.basename(item))[0]
|
||||
external_file.append(prefix_call + "emcc -o o/" + objects_dir + "/" + file_name + ".o -c " + arguments + base_dir + item)
|
||||
libs += ("o/" + objects_dir + "/" + file_name + ".o ")
|
||||
|
||||
arguments += "-s EXPORTED_FUNCTIONS=\"["
|
||||
for item in exported_functions:
|
||||
arguments += ("'" + item + "',")
|
||||
arguments = arguments[:-1]
|
||||
arguments += "]\" "
|
||||
|
||||
for item in sources:
|
||||
arguments += (item + " ")
|
||||
|
||||
external_file.append(prefix_call + "emcc -o drawingfile.js " + arguments + libs)
|
||||
|
||||
base.replaceInFile("../../../../Common/3dParty/icu/icu/source/common/udata.cpp", "\n{\n UDataMemory tData;", "\n{\n#ifdef BUILDING_WASM_MODULE\nreturn NULL;\n#endif\n UDataMemory tData;")
|
||||
base.run_as_bat(external_file)
|
||||
base.replaceInFile("../../../../Common/3dParty/icu/icu/source/common/udata.cpp", "\n{\n#ifdef BUILDING_WASM_MODULE\nreturn NULL;\n#endif\n UDataMemory tData;", "\n{\n UDataMemory tData;")
|
||||
|
||||
# finalize
|
||||
base.replaceInFile("./drawingfile.js", "function getBinaryPromise()", "function getBinaryPromise2()")
|
||||
base.replaceInFile("./drawingfile.js", "__ATPOSTRUN__=[];", "__ATPOSTRUN__=[function(){window[\"AscViewer\"] && window[\"AscViewer\"][\"onLoadModule\"] && window[\"AscViewer\"][\"onLoadModule\"]();}];")
|
||||
base.replaceInFile("./drawingfile.js", "__ATPOSTRUN__ = [];", "__ATPOSTRUN__=[function(){window[\"AscViewer\"] && window[\"AscViewer\"][\"onLoadModule\"] && window[\"AscViewer\"][\"onLoadModule\"]();}];")
|
||||
base.replaceInFile("./drawingfile.js", "\"drawingfile.js.mem\"", "getMemoryPathIE(\"drawingfile.js.mem\")")
|
||||
|
||||
module_js_content = base.readFile("./drawingfile.js")
|
||||
engine_base_js_content = base.readFile("./wasm/js/drawingfile_base.js")
|
||||
string_utf8_content = base.readFile("./../../../../Common/js/string_utf8.js")
|
||||
engine_js_content = engine_base_js_content.replace("//module", module_js_content)
|
||||
engine_js_content = engine_js_content.replace("//string_utf8", string_utf8_content)
|
||||
|
||||
# write new version
|
||||
base.writeFile("./deploy/drawingfile.js", engine_js_content)
|
||||
base.copy_file("./drawingfile.wasm", "./deploy/drawingfile.wasm")
|
||||
|
||||
# clear
|
||||
base.delete_file("drawingfile.js")
|
||||
base.delete_file("drawingfile.wasm")
|
||||
|
||||
# ie asm version
|
||||
arguments = arguments.replace("WASM=1", "WASM=0")
|
||||
|
||||
# command
|
||||
external_file = []
|
||||
|
||||
if base.host_platform() == "windows":
|
||||
external_file.append("call emsdk/emsdk_env.bat")
|
||||
else:
|
||||
external_file.append("#!/bin/bash")
|
||||
external_file.append("source ./emsdk/emsdk_env.sh")
|
||||
|
||||
external_file.append(prefix_call + "emcc -o drawingfile.js " + arguments + libs)
|
||||
base.run_as_bat(external_file)
|
||||
|
||||
# finalize
|
||||
base.replaceInFile("./drawingfile.js", "function getBinaryPromise()", "function getBinaryPromise2()")
|
||||
base.replaceInFile("./drawingfile.js", "__ATPOSTRUN__=[];", "__ATPOSTRUN__=[function(){window[\"AscViewer\"] && window[\"AscViewer\"][\"onLoadModule\"] && window[\"AscViewer\"][\"onLoadModule\"]();}];")
|
||||
base.replaceInFile("./drawingfile.js", "__ATPOSTRUN__ = [];", "__ATPOSTRUN__=[function(){window[\"AscViewer\"] && window[\"AscViewer\"][\"onLoadModule\"] && window[\"AscViewer\"][\"onLoadModule\"]();}];")
|
||||
base.replaceInFile("./drawingfile.js", "\"drawingfile.js.mem\"", "getMemoryPathIE(\"drawingfile.js.mem\")")
|
||||
|
||||
module_js_content = base.readFile("./drawingfile.js")
|
||||
engine_base_js_content = base.readFile("./wasm/js/drawingfile_base.js")
|
||||
string_utf8_content = base.readFile("./../../../../Common/js/string_utf8.js")
|
||||
polyfill_js_content = base.readFile("./../../../../Common/js/polyfill.js")
|
||||
engine_js_content = engine_base_js_content.replace("//module", module_js_content)
|
||||
engine_js_content = engine_js_content.replace("//string_utf8", string_utf8_content)
|
||||
engine_js_content = engine_js_content.replace("//polyfill", polyfill_js_content)
|
||||
|
||||
# write new version
|
||||
base.writeFile("./deploy/drawingfile_ie.js", engine_js_content)
|
||||
base.copy_file("./drawingfile.js.mem", "./deploy/drawingfile.js.mem")
|
||||
|
||||
# clear
|
||||
base.delete_file("drawingfile.js")
|
||||
base.delete_file("drawingfile.js.mem")
|
||||
# base.delete_dir("./o")
|
||||
# base.delete_dir("./xml")
|
||||
# base.delete_dir("./freetype-2.10.4")
|
||||
# base.delete_file("./raster.o")
|
||||
@ -1,844 +0,0 @@
|
||||
# Copyright (C) Ascensio System SIA, 2009-2026
|
||||
#
|
||||
# This program is a free software product. You can redistribute it and/or
|
||||
# modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
# version 3 as published by the Free Software Foundation, together with the
|
||||
# additional terms provided in the LICENSE file.
|
||||
#
|
||||
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
# details, see the GNU AGPL at: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
#
|
||||
# You can contact Ascensio System SIA by email at info@onlyoffice.com
|
||||
# or by postal mail at 20A-6 Ernesta Birznieka-Upisha Street, Riga,
|
||||
# LV-1050, Latvia, European Union.
|
||||
#
|
||||
# The interactive user interfaces in modified versions of the Program
|
||||
# are required to display Appropriate Legal Notices in accordance with
|
||||
# Section 5 of the GNU AGPL version 3.
|
||||
#
|
||||
# No trademark rights are granted under this License.
|
||||
#
|
||||
# All non-code elements of the Product, including illustrations,
|
||||
# icon sets, and technical writing content, are licensed under the
|
||||
# Creative Commons Attribution-ShareAlike 4.0 International License:
|
||||
# https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
#
|
||||
# This license applies only to such non-code elements and does not
|
||||
# modify or replace the licensing terms applicable to the Program's
|
||||
# source code, which remains licensed under the GNU Affero General
|
||||
# Public License v3.
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
QT -= core
|
||||
QT -= gui
|
||||
|
||||
TARGET = wasmgraphics
|
||||
TEMPLATE = app
|
||||
|
||||
CONFIG += console
|
||||
CONFIG += object_parallel_to_source
|
||||
CONFIG -= app_bundle
|
||||
|
||||
DEFINES += TEST_CPP_BINARY \
|
||||
GRAPHICS_NO_USE_DYNAMIC_LIBRARY \
|
||||
BUILDING_WASM_MODULE \
|
||||
_QT
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../../../../..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include($$CORE_ROOT_DIR/Common/base.pri)
|
||||
include($$CORE_ROOT_DIR/Common/3dParty/icu/icu.pri)
|
||||
include(../../freetype.pri)
|
||||
|
||||
ADD_DEPENDENCY(UnicodeConverter, kernel)
|
||||
|
||||
INCLUDEPATH += \
|
||||
$$CORE_ROOT_DIR/DesktopEditor/agg-2.4/include \
|
||||
$$CORE_ROOT_DIR/DesktopEditor/cximage/jasper/include \
|
||||
$$CORE_ROOT_DIR/DesktopEditor/cximage/jpeg \
|
||||
$$CORE_ROOT_DIR/DesktopEditor/cximage/png \
|
||||
$$CORE_ROOT_DIR/DesktopEditor/freetype-2.10.4/include \
|
||||
$$CORE_ROOT_DIR/DesktopEditor/freetype-2.10.4/include/freetype \
|
||||
$$CORE_ROOT_DIR/Common/3dParty/openssl/openssl/include
|
||||
|
||||
win32 {
|
||||
DEFINES += \
|
||||
JAS_WIN_MSVC_BUILD \
|
||||
NOMINMAX
|
||||
|
||||
DEFINES -= UNICODE
|
||||
DEFINES -= _UNICODE
|
||||
|
||||
LIBS += -lgdi32 \
|
||||
-ladvapi32 \
|
||||
-luser32 \
|
||||
-lshell32 \
|
||||
-lOle32
|
||||
}
|
||||
|
||||
# graphics
|
||||
|
||||
HEADERS += \
|
||||
../../../config.h \
|
||||
\
|
||||
../../../Matrix.h \
|
||||
../../../Matrix_private.h \
|
||||
../../../GraphicsPath.h \
|
||||
../../../BooleanOperations.h \
|
||||
../../../boolean_operations_math.h \
|
||||
../../../GraphicsPath_private.h \
|
||||
../../../AlphaMask.h \
|
||||
\
|
||||
../../../../raster/BgraFrame.h \
|
||||
../../../../raster/ImageFileFormatChecker.h \
|
||||
../../../../raster/Metafile/Metafile.h \
|
||||
../../../../raster/Metafile/Common/MetaFile.h \
|
||||
../../../../raster/Metafile/Common/IOutputDevice.h \
|
||||
../../../../raster/Metafile/Common/MetaFileTypes.h \
|
||||
../../../../raster/Metafile/Common/MetaFileClip.h \
|
||||
../../../../raster/Metafile/Common/MetaFileObjects.h \
|
||||
../../../../raster/Metafile/Common/MetaFileRenderer.h \
|
||||
../../../../raster/Metafile/Common/MetaFileUtils.h \
|
||||
../../../../raster/PICT/PICTFile.h \
|
||||
\
|
||||
../../../ArrowHead.h \
|
||||
../../../Brush.h \
|
||||
../../../Clip.h \
|
||||
../../../Color.h \
|
||||
../../../Defines.h \
|
||||
../../../Graphics.h \
|
||||
../../../Image.h \
|
||||
../../../ImageFilesCache.h \
|
||||
../../../structures.h \
|
||||
../../../shading_info.h \
|
||||
../../../GraphicsRenderer.h \
|
||||
../../../GraphicsLayer.h \
|
||||
\
|
||||
../../../../fontengine/ApplicationFonts.h \
|
||||
../../../../fontengine/FontFile.h \
|
||||
../../../../fontengine/FontPath.h \
|
||||
../../../../fontengine/GlyphString.h \
|
||||
../../../../fontengine/FontManager.h \
|
||||
../../../../fontengine/FontConverter.h \
|
||||
\
|
||||
../../Fonts.h \
|
||||
../../Graphics.h \
|
||||
../../Image.h \
|
||||
../../../../raster/Metafile/svg/SVGFramework.h \
|
||||
../../../../raster/Metafile/svg/SVGTransformer.h \
|
||||
\
|
||||
../../../MetafileToRenderer.h \
|
||||
../../../MetafileToRendererCheck.h \
|
||||
../../../MetafileToRendererReader.h \
|
||||
../../../MetafileToGraphicsRenderer.h \
|
||||
../../../commands/FormField.h \
|
||||
../../../commands/AnnotField.h \
|
||||
../../../commands/DocInfo.h
|
||||
|
||||
SOURCES += \
|
||||
../../../Matrix.cpp \
|
||||
../../../GraphicsPath.cpp \
|
||||
../../../BooleanOperations.cpp \
|
||||
../../../AlphaMask.cpp \
|
||||
../../../../raster/BgraFrame.cpp \
|
||||
../../../../raster/ImageFileFormatChecker.cpp \
|
||||
../../../../raster/Metafile/MetaFile.cpp \
|
||||
../../../../raster/PICT/PICFile.cpp \
|
||||
\
|
||||
../../../ArrowHead.cpp \
|
||||
../../../Brush.cpp \
|
||||
../../../Clip.cpp \
|
||||
../../../Graphics.cpp \
|
||||
../../../GraphicsRenderer.cpp \
|
||||
../../../Image.cpp \
|
||||
../../../GraphicsLayer.cpp \
|
||||
\
|
||||
../../../../fontengine/ApplicationFonts.cpp \
|
||||
../../../../fontengine/FontFile.cpp \
|
||||
../../../../fontengine/FontManager.cpp \
|
||||
../../../../fontengine/FontPath.cpp \
|
||||
../../../../fontengine/GlyphString.cpp \
|
||||
\
|
||||
../../pro_Fonts.cpp \
|
||||
../../pro_Image.cpp \
|
||||
../../pro_Graphics.cpp \
|
||||
../../../../raster/Metafile/svg/SVGFramework.cpp \
|
||||
../../../../raster/Metafile/svg/SVGTransformer.cpp \
|
||||
\
|
||||
../../../MetafileToRenderer.cpp \
|
||||
../../../MetafileToRendererReader.cpp \
|
||||
../../../MetafileToGraphicsRenderer.cpp \
|
||||
../../../commands/FormField.cpp \
|
||||
../../../commands/AnnotField.cpp \
|
||||
../../../commands/DocInfo.cpp
|
||||
|
||||
SOURCES += \
|
||||
../../../../agg-2.4/src/agg_arc.cpp \
|
||||
../../../../agg-2.4/src/agg_bezier_arc.cpp \
|
||||
../../../../agg-2.4/src/agg_arrowhead.cpp \
|
||||
../../../../agg-2.4/src/ctrl/agg_cbox_ctrl.cpp \
|
||||
../../../../agg-2.4/src/agg_curves.cpp \
|
||||
../../../../agg-2.4/src/agg_gsv_text.cpp \
|
||||
../../../../agg-2.4/src/agg_image_filters.cpp \
|
||||
../../../../agg-2.4/src/agg_line_aa_basics.cpp \
|
||||
../../../../agg-2.4/src/agg_line_profile_aa.cpp \
|
||||
../../../../agg-2.4/src/agg_rounded_rect.cpp \
|
||||
../../../../agg-2.4/src/agg_sqrt_tables.cpp \
|
||||
../../../../agg-2.4/src/agg_trans_affine.cpp \
|
||||
../../../../agg-2.4/src/agg_bspline.cpp \
|
||||
../../../../agg-2.4/src/agg_vcgen_bspline.cpp \
|
||||
../../../../agg-2.4/src/agg_vcgen_contour.cpp \
|
||||
../../../../agg-2.4/src/agg_vcgen_dash.cpp \
|
||||
../../../../agg-2.4/src/agg_vcgen_markers_term.cpp \
|
||||
../../../../agg-2.4/src/agg_vcgen_smooth_poly1.cpp \
|
||||
../../../../agg-2.4/src/agg_vcgen_stroke.cpp \
|
||||
\
|
||||
../../../../raster/Jp2/J2kFile.cpp \
|
||||
../../../../raster/Jp2/Reader.cpp \
|
||||
\
|
||||
../../../../raster/Metafile/Common/MetaFileTypes.cpp \
|
||||
../../../../raster/Metafile/Common/MetaFileUtils.cpp \
|
||||
\
|
||||
../../../../raster/JBig2/source/JBig2File.cpp \
|
||||
\
|
||||
../../../../raster/Metafile/StarView/SvmFile.cpp \
|
||||
../../../../raster/Metafile/StarView/SvmObjects.cpp \
|
||||
../../../../raster/Metafile/StarView/SvmPlayer.cpp
|
||||
|
||||
LIB_GRAPHICS_PRI_PATH = $$PWD/../../../..
|
||||
SOURCES += \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_cm.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_debug.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_getopt.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_icc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_iccdata.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_image.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_init.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_malloc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_stream.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_seq.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_string.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_tvp.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/base/jas_version.c \
|
||||
\
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/bmp/bmp_cod.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/bmp/bmp_dec.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/bmp/bmp_enc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jp2/jp2_cod.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jp2/jp2_dec.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jp2/jp2_enc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_bs.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_cs.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_dec.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_enc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_math.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_mct.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_mqcod.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_mqdec.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_mqenc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_qmfb.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_t1cod.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_t1dec.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_t1enc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_t2cod.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_t2dec.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_t2enc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_tagtree.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_tsfb.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpc/jpc_util.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpg/jpg_dummy.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/jpg/jpg_val.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/mif/mif_cod.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/pgx/pgx_cod.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/pgx/pgx_dec.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/pgx/pgx_enc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/pnm/pnm_cod.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/pnm/pnm_dec.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/pnm/pnm_enc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/ras/ras_cod.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/ras/ras_dec.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/ras/ras_enc.c \
|
||||
\
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jbig/jbig.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jbig/jbig_tab.c \
|
||||
\
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/wrtarga.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/wrrle.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/wrppm.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/wrjpgcom.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/wrgif.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/wrbmp.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/transupp.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/rdtarga.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/rdswitch.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/rdrle.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/rdppm.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/rdjpgcom.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/rdgif.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/rdcolmap.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/rdbmp.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jutils.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jpegtran.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jquant1.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jquant2.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdpostct.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdsample.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdtrans.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jerror.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jfdctflt.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jfdctfst.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jfdctint.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jidctflt.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jidctfst.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jidctint.c \
|
||||
#$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jmemansi.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jmemmgr.c \
|
||||
#$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jmemname.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jmemnobs.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jaricom.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jcapimin.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jcapistd.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jcarith.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jccoefct.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jccolor.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jcdctmgr.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jchuff.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jcinit.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jcmainct.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jcmarker.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jcmaster.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jcomapi.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jcparam.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jcprepct.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jcsample.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jctrans.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdapimin.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdapistd.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdarith.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdatadst.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdatasrc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdcoefct.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdcolor.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jddctmgr.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdhuff.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdinput.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdmainct.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdmarker.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdmaster.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/jdmerge.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/cdjpeg.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/cjpeg.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/ckconfig.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg/djpeg.c
|
||||
|
||||
SOURCES += ../../libpsd_pri.c
|
||||
SOURCES += ../../libpsd_pri2.c
|
||||
SOURCES += ../../libpsd_pri3.c
|
||||
|
||||
SOURCES += \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_callback_xs.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_chunk_descr.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_chunk_io.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_chunk_prc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_chunk_xs.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_cms.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_display.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_dither.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_error.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_filter.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_hlapi.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_jpeg.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_object_prc.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_pixels.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_prop_xs.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_read.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_trace.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_write.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/mng/libmng_zlib.c \
|
||||
\
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/png.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngerror.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngget.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngmem.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngpread.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngread.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngrio.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngrtran.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngrutil.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngset.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngtrans.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngwio.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngwrite.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngwtran.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png/pngwutil.c \
|
||||
\
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/raw/libdcr.c \
|
||||
\
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_stream.cxx \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_aux.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_close.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_codec.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_color.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_compress.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_dir.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_dirinfo.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_dirread.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_dirwrite.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_dumpmode.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_error.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_extension.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_fax3.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_fax3sm.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_flush.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_getimage.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_jbig.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_jpeg.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_luv.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_lzw.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_next.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_ojpeg.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_open.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_packbits.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_pixarlog.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_predict.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_print.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_read.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_strip.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_swab.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_thunder.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_tile.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_unix.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_version.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_warning.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_write.c \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/tiff/tif_zip.c \
|
||||
\
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/tif_xfile.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximabmp.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximadsp.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximaenc.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximaexif.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximage.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximagif.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximahist.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximaico.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximainfo.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximaint.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximajas.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximajbg.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximajpg.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximalpha.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximalyr.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximamng.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximapal.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximapcx.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximapng.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximapsd.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximaraw.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximasel.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximaska.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximatga.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximath.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximatif.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximatran.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximawbmp.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximawmf.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/ximawnd.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/CxImage/xmemfile.cpp
|
||||
|
||||
SOURCES += \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/Encoder/jbig2arith.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/Encoder/jbig2enc.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/Encoder/jbig2sym.cpp
|
||||
|
||||
SOURCES += ../../lepton_lib_all.cpp
|
||||
|
||||
SOURCES += \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/boxbasic.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/ccbord.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/dwacomb.2.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/dwacomblow.2.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/fhmtgen.1.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/fliphmtgen.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/fmorphauto.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/fmorphgen.1.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/numabasic.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/pix5.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/pixabasic.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/pixafunc1.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/pixcomp.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/ptabasic.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/ptra.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/ropiplow.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/roplow.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/rotateam.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/rotateshear.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/sarray.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/sel1.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/sel2.cpp \
|
||||
$$LIB_GRAPHICS_PRI_PATH/raster/JBig2/source/LeptonLib/skew.cpp
|
||||
|
||||
HEADERS += \
|
||||
../../../../fontengine/ApplicationFontsWorker.h \
|
||||
../../../../fontengine/FontsAssistant.h \
|
||||
../../officedrawingfile.h
|
||||
|
||||
|
||||
SOURCES += \
|
||||
../../../../fontengine/ApplicationFontsWorker.cpp \
|
||||
../../../../fontengine/FontsAssistant.cpp \
|
||||
../../officedrawingfile.cpp
|
||||
|
||||
# XpsFile
|
||||
|
||||
XPS_ROOT_DIR = $$CORE_ROOT_DIR/XpsFile
|
||||
|
||||
HEADERS += \
|
||||
$$XPS_ROOT_DIR/XpsFile.h \
|
||||
$$XPS_ROOT_DIR/XpsLib/ContextState.h \
|
||||
$$XPS_ROOT_DIR/XpsLib/Document.h \
|
||||
$$XPS_ROOT_DIR/XpsLib/FontList.h \
|
||||
$$XPS_ROOT_DIR/XpsLib/XpsPage.h \
|
||||
$$XPS_ROOT_DIR/XpsLib/StaticResources.h \
|
||||
$$XPS_ROOT_DIR/XpsLib/Utils.h \
|
||||
$$XPS_ROOT_DIR/XpsLib/WString.h
|
||||
|
||||
SOURCES += \
|
||||
$$XPS_ROOT_DIR/XpsFile.cpp \
|
||||
$$XPS_ROOT_DIR/XpsLib/ContextState.cpp \
|
||||
$$XPS_ROOT_DIR/XpsLib/Document.cpp \
|
||||
$$XPS_ROOT_DIR/XpsLib/XpsPage.cpp \
|
||||
$$XPS_ROOT_DIR/XpsLib/StaticResources.cpp \
|
||||
$$XPS_ROOT_DIR/XpsLib/Utils.cpp \
|
||||
$$XPS_ROOT_DIR/XpsLib/WString.cpp
|
||||
|
||||
# DjVuFile
|
||||
|
||||
DEFINES += \
|
||||
THREADMODEL=0 \
|
||||
DEBUGLVL=0
|
||||
|
||||
DJVU_ROOT_DIR = $$CORE_ROOT_DIR/DjVuFile
|
||||
DJVU_WRAPPER = $$CORE_ROOT_DIR/DjVuFile/wasm/libdjvu
|
||||
|
||||
HEADERS += \
|
||||
$$DJVU_ROOT_DIR/DjVu.h \
|
||||
$$DJVU_ROOT_DIR/DjVuFileImplementation.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/Arrays.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/atomic.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/BSByteStream.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/ByteStream.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DataPool.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/debug.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVmDir.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVmDir0.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVmDoc.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVmNav.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuAnno.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuDocEditor.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuDocument.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuDumpHelper.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuErrorList.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuFile.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuFileCache.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuGlobal.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuImage.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuInfo.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuMessage.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuMessageLite.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuNavDir.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuPalette.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuPort.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuText.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuToPS.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GBitmap.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GContainer.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GException.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GIFFManager.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GMapAreas.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GOS.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GPixmap.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GRect.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GScaler.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GSmartPointer.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GString.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GThreads.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GURL.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/IFFByteStream.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/IW44Image.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/JB2Image.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/JPEGDecoder.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/MMRDecoder.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/MMX.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/UnicodeByteStream.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/XMLParser.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/XMLTags.h \
|
||||
$$DJVU_ROOT_DIR/libdjvu/ZPCodec.h
|
||||
|
||||
SOURCES += \
|
||||
$$DJVU_ROOT_DIR/DjVu.cpp \
|
||||
$$DJVU_ROOT_DIR/DjVuFileImplementation.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/Arrays.cpp \
|
||||
#$$DJVU_ROOT_DIR/libdjvu/atomic.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/BSByteStream.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/BSEncodeByteStream.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/ByteStream.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DataPool.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/debug.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVmDir.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVmDir0.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVmDoc.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVmNav.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuAnno.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuDocEditor.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuDocument.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuDumpHelper.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuErrorList.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuFile.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuFileCache.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuGlobal.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuGlobalMemory.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuImage.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuInfo.cpp \
|
||||
#$$DJVU_ROOT_DIR/libdjvu/DjVuMessage.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuMessageLite.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuNavDir.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuPalette.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuPort.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuText.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/DjVuToPS.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GBitmap.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GContainer.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GException.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GIFFManager.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GMapAreas.cpp \
|
||||
#$$DJVU_ROOT_DIR/libdjvu/GOS.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GPixmap.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GRect.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GScaler.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GSmartPointer.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GString.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GThreads.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/GUnicode.cpp \
|
||||
#$$DJVU_ROOT_DIR/libdjvu/GURL.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/IFFByteStream.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/IW44EncodeCodec.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/IW44Image.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/JB2EncodeCodec.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/JB2Image.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/JPEGDecoder.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/MMRDecoder.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/MMX.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/UnicodeByteStream.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/XMLParser.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/XMLTags.cpp \
|
||||
$$DJVU_ROOT_DIR/libdjvu/ZPCodec.cpp
|
||||
|
||||
SOURCES += \
|
||||
$$DJVU_WRAPPER/atomic.cpp \
|
||||
$$DJVU_WRAPPER/DjVuMessage.cpp \
|
||||
$$DJVU_WRAPPER/GOS.cpp \
|
||||
$$DJVU_WRAPPER/GURL.cpp
|
||||
|
||||
# PdfReader
|
||||
PDF_ROOT_DIR = $$CORE_ROOT_DIR/PdfFile
|
||||
|
||||
INCLUDEPATH += \
|
||||
$$PDF_ROOT_DIR/lib/goo \
|
||||
$$PDF_ROOT_DIR/lib/fofi \
|
||||
$$PDF_ROOT_DIR/lib/splash \
|
||||
$$PDF_ROOT_DIR/lib
|
||||
|
||||
HEADERS += $$files($$PDF_ROOT_DIR/lib/*.h, true)
|
||||
SOURCES += $$files($$PDF_ROOT_DIR/lib/*.c, true)
|
||||
SOURCES += $$files($$PDF_ROOT_DIR/lib/*.cc, true)
|
||||
|
||||
SOURCES -= \
|
||||
$$PDF_ROOT_DIR/lib/xpdf/HTMLGen.cc \
|
||||
$$PDF_ROOT_DIR/lib/xpdf/pdftohtml.cc \
|
||||
$$PDF_ROOT_DIR/lib/xpdf/pdftopng.cc \
|
||||
$$PDF_ROOT_DIR/lib/xpdf/pdftoppm.cc \
|
||||
$$PDF_ROOT_DIR/lib/xpdf/pdftops.cc \
|
||||
$$PDF_ROOT_DIR/lib/xpdf/pdftotext.cc \
|
||||
$$PDF_ROOT_DIR/lib/xpdf/pdfdetach.cc \
|
||||
$$PDF_ROOT_DIR/lib/xpdf/pdffonts.cc \
|
||||
$$PDF_ROOT_DIR/lib/xpdf/pdfimages.cc \
|
||||
$$PDF_ROOT_DIR/lib/xpdf/pdfinfo.cc
|
||||
|
||||
SOURCES += \
|
||||
$$PDF_ROOT_DIR/SrcReader/RendererOutputDev.cpp \
|
||||
$$PDF_ROOT_DIR/SrcReader/Adaptors.cpp \
|
||||
$$PDF_ROOT_DIR/SrcReader/GfxClip.cpp \
|
||||
$$PDF_ROOT_DIR/SrcReader/PdfAnnot.cpp \
|
||||
$$PDF_ROOT_DIR/SrcReader/PdfFont.cpp \
|
||||
$$PDF_ROOT_DIR/Resources/BaseFonts.cpp \
|
||||
$$PDF_ROOT_DIR/Resources/CMapMemory/cmap_memory.cpp
|
||||
|
||||
HEADERS +=\
|
||||
$$PDF_ROOT_DIR/Resources/Fontd050000l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fontn019003l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fontn019004l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fontn019023l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fontn019024l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fontn021003l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fontn021004l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fontn021023l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fontn021024l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fontn022003l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fontn022004l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fontn022023l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fontn022024l.h \
|
||||
$$PDF_ROOT_DIR/Resources/Fonts050000l.h \
|
||||
$$PDF_ROOT_DIR/Resources/BaseFonts.h \
|
||||
$$PDF_ROOT_DIR/Resources/CMapMemory/cmap_memory.h \
|
||||
$$PDF_ROOT_DIR/SrcReader/RendererOutputDev.h \
|
||||
$$PDF_ROOT_DIR/SrcReader/Adaptors.h \
|
||||
$$PDF_ROOT_DIR/SrcReader/MemoryUtils.h \
|
||||
$$PDF_ROOT_DIR/SrcReader/GfxClip.h \
|
||||
$$PDF_ROOT_DIR/SrcReader/FontsWasm.h \
|
||||
$$PDF_ROOT_DIR/SrcReader/PdfFont.h \
|
||||
$$PDF_ROOT_DIR/SrcReader/PdfAnnot.h
|
||||
|
||||
DEFINES += CRYPTOPP_DISABLE_ASM
|
||||
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lCryptoPPLib
|
||||
|
||||
# PdfWriter
|
||||
HEADERS += \
|
||||
$$PDF_ROOT_DIR/SrcWriter/AcroForm.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Annotation.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Catalog.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Consts.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Destination.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Document.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Encodings.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Encrypt.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/EncryptDictionary.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Field.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Font.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Font14.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/FontCidTT.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/FontTT.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/FontTTWriter.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/GState.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Image.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Info.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Objects.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Outline.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Pages.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Pattern.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/ResourcesDictionary.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Shading.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Streams.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Types.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Utils.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Metadata.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/ICCProfile.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/States.h \
|
||||
$$PDF_ROOT_DIR/SrcWriter/RedactOutputDev.h
|
||||
|
||||
SOURCES += \
|
||||
$$PDF_ROOT_DIR/SrcWriter/AcroForm.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Annotation.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Catalog.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Destination.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Document.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Encrypt.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/EncryptDictionary.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Field.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Font.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Font14.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/FontCidTT.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/FontTT.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/FontTTWriter.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/FontOTWriter.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/GState.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Image.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Info.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Objects.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Outline.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Pages.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Pattern.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/ResourcesDictionary.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Shading.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Streams.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Utils.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/Metadata.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/States.cpp \
|
||||
$$PDF_ROOT_DIR/SrcWriter/RedactOutputDev.cpp
|
||||
|
||||
# PdfFile
|
||||
|
||||
HEADERS += \
|
||||
$$PDF_ROOT_DIR/PdfFile.h \
|
||||
$$PDF_ROOT_DIR/PdfWriter.h \
|
||||
$$PDF_ROOT_DIR/PdfReader.h \
|
||||
$$PDF_ROOT_DIR/PdfEditor.h \
|
||||
$$PDF_ROOT_DIR/OnlineOfficeBinToPdf.h
|
||||
|
||||
SOURCES += \
|
||||
$$PDF_ROOT_DIR/PdfFile.cpp \
|
||||
$$PDF_ROOT_DIR/PdfWriter.cpp \
|
||||
$$PDF_ROOT_DIR/PdfReader.cpp \
|
||||
$$PDF_ROOT_DIR/PdfEditor.cpp \
|
||||
$$PDF_ROOT_DIR/OnlineOfficeBinToPdf.cpp
|
||||
|
||||
# DocxRenderer
|
||||
DOCX_RENDERER_ROOT_DIR = $$CORE_ROOT_DIR/DocxRenderer
|
||||
HEADERS += \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/BaseItem.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/ContText.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/DropCap.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/Paragraph.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/Shape.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/Table.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/TextLine.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/managers/ExternalImageStorage.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/managers/FontStyleManager.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/managers/ImageManager.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/managers/FontManager.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/managers/ParagraphStyleManager.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/styles/FontStyle.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/styles/ParagraphStyle.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/resources/ColorTable.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/resources/Constants.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/resources/ImageInfo.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/resources/LinesTable.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/resources/VectorGraphics.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/resources/resources.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/resources/utils.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/Page.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/Document.h \
|
||||
$$DOCX_RENDERER_ROOT_DIR/DocxRenderer.h
|
||||
|
||||
SOURCES += \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/BaseItem.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/ContText.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/Paragraph.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/Shape.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/Table.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/elements/TextLine.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/managers/FontManager.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/managers/FontStyleManager.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/managers/ImageManager.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/managers/ParagraphStyleManager.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/styles/FontStyle.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/Page.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/Document.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/logic/styles/ParagraphStyle.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/resources/VectorGraphics.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/DocxRenderer.cpp \
|
||||
$$DOCX_RENDERER_ROOT_DIR/src/resources/resources.cpp
|
||||
|
||||
HEADERS += $$CORE_ROOT_DIR/DesktopEditor/doctrenderer/drawingfile.h
|
||||
|
||||
HEADERS += \
|
||||
../wasm/src/serialize.h \
|
||||
../wasm/src/HTMLRendererText.h \
|
||||
../wasm/src/Text.h
|
||||
|
||||
SOURCES += \
|
||||
../wasm/src/HTMLRendererText.cpp \
|
||||
../wasm/src/drawingfile.cpp \
|
||||
../wasm/src/drawingfile_test.cpp
|
||||
@ -1,53 +0,0 @@
|
||||
#include "raster.h"
|
||||
#include "../../../../../raster/BgraFrame.h"
|
||||
#include "../../../../../raster/ImageFileFormatChecker.h"
|
||||
#include "../../../../../raster/Metafile/MetaFile.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
if (false)
|
||||
{
|
||||
std::wstring sFilePath = L"D:/1.jpg";
|
||||
CBgraFrame oFrame;
|
||||
if (oFrame.OpenFile(sFilePath))
|
||||
{
|
||||
oFrame.SaveFile(L"D:/1.png", 4);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (false)
|
||||
{
|
||||
std::wstring sFilePath = L"D:/1.emf";
|
||||
MetaFile::CMetaFile oFrame(NULL);
|
||||
if (oFrame.LoadFromFile(sFilePath.c_str()))
|
||||
{
|
||||
std::wstring sContentSvg = oFrame.ConvertToSvg();
|
||||
NSFile::CFileBinary::SaveToFile(L"D:/1.svg", sContentSvg, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (true)
|
||||
{
|
||||
BYTE* pFileBuffer = NULL;
|
||||
DWORD nFileSize = 0;
|
||||
NSFile::CFileBinary::ReadAllBytes(L"D:/image1.wmf", &pFileBuffer, nFileSize);
|
||||
|
||||
void* pEncodedData = Raster_Encode(pFileBuffer, (int)nFileSize, 24);
|
||||
int nEncodedSize = Raster_GetEncodedSize(pEncodedData);
|
||||
BYTE* pEncodedBuffer = (BYTE*)Raster_GetEncodedBuffer(pEncodedData);
|
||||
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(L"D:/123.svg");
|
||||
oFile.WriteFile(pEncodedBuffer, nEncodedSize);
|
||||
oFile.CloseFile();
|
||||
|
||||
Raster_DestroyEncodedData(pEncodedData);
|
||||
|
||||
RELEASEARRAYOBJECTS(pFileBuffer);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -1,90 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation, together with the
|
||||
* additional terms provided in the LICENSE file.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at info@onlyoffice.com
|
||||
* or by postal mail at 20A-6 Ernesta Birznieka-Upisha Street, Riga,
|
||||
* LV-1050, Latvia, European Union.
|
||||
*
|
||||
* The interactive user interfaces in modified versions of the Program
|
||||
* are required to display Appropriate Legal Notices in accordance with
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* No trademark rights are granted under this License.
|
||||
*
|
||||
* All non-code elements of the Product, including illustrations,
|
||||
* icon sets, and technical writing content, are licensed under the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International License:
|
||||
* https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
* This license applies only to such non-code elements and does not
|
||||
* modify or replace the licensing terms applicable to the Program's
|
||||
* source code, which remains licensed under the GNU Affero General
|
||||
* Public License v3.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
#include "../../../Fonts.h"
|
||||
#include "../../../pro_base.cpp"
|
||||
|
||||
namespace NSFonts
|
||||
{
|
||||
namespace NSFontPath
|
||||
{
|
||||
IFontPath* Create() { return NULL; }
|
||||
}
|
||||
}
|
||||
|
||||
namespace NSFonts
|
||||
{
|
||||
namespace NSStream
|
||||
{
|
||||
IFontStream* Create() { return NULL; }
|
||||
}
|
||||
|
||||
namespace NSApplicationFontStream
|
||||
{
|
||||
IApplicationFontStreams* Create() { return NULL; }
|
||||
}
|
||||
}
|
||||
|
||||
namespace NSFonts
|
||||
{
|
||||
namespace NSFontFile
|
||||
{
|
||||
IFontFile* Create() { return NULL; }
|
||||
}
|
||||
}
|
||||
|
||||
namespace NSFonts
|
||||
{
|
||||
namespace NSFontCache
|
||||
{
|
||||
IFontsCache* Create() { return NULL; }
|
||||
}
|
||||
}
|
||||
|
||||
namespace NSFonts
|
||||
{
|
||||
namespace NSFontManager
|
||||
{
|
||||
IFontManager* Create() { return NULL; }
|
||||
}
|
||||
}
|
||||
|
||||
namespace NSFonts
|
||||
{
|
||||
namespace NSApplication
|
||||
{
|
||||
IApplicationFonts* Create() { return NULL; }
|
||||
}
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation, together with the
|
||||
* additional terms provided in the LICENSE file.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at info@onlyoffice.com
|
||||
* or by postal mail at 20A-6 Ernesta Birznieka-Upisha Street, Riga,
|
||||
* LV-1050, Latvia, European Union.
|
||||
*
|
||||
* The interactive user interfaces in modified versions of the Program
|
||||
* are required to display Appropriate Legal Notices in accordance with
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* No trademark rights are granted under this License.
|
||||
*
|
||||
* All non-code elements of the Product, including illustrations,
|
||||
* icon sets, and technical writing content, are licensed under the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International License:
|
||||
* https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
* This license applies only to such non-code elements and does not
|
||||
* modify or replace the licensing terms applicable to the Program's
|
||||
* source code, which remains licensed under the GNU Affero General
|
||||
* Public License v3.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
#include "../../../Graphics.h"
|
||||
|
||||
namespace NSGraphics
|
||||
{
|
||||
IGraphicsRenderer* Create() { return NULL; }
|
||||
}
|
||||
@ -1,144 +0,0 @@
|
||||
#include "raster.h"
|
||||
#include "../../../../../raster/BgraFrame.h"
|
||||
#include "../../../../../raster/ImageFileFormatChecker.h"
|
||||
#include "../../../../../raster/Metafile/MetaFile.h"
|
||||
|
||||
void* Raster_DecodeFile(unsigned char* buffer, int size, bool isRgba)
|
||||
{
|
||||
CBgraFrame* pFrame = new CBgraFrame();
|
||||
pFrame->put_IsRGBA(isRgba);
|
||||
pFrame->Decode(buffer, size);
|
||||
return pFrame;
|
||||
}
|
||||
void* Raster_GetDecodedBuffer(void* frame)
|
||||
{
|
||||
return ((CBgraFrame*)frame)->get_Data();
|
||||
}
|
||||
int Raster_GetWidth (void* frame)
|
||||
{
|
||||
return ((CBgraFrame*)frame)->get_Width();
|
||||
}
|
||||
int Raster_GetHeight(void* frame)
|
||||
{
|
||||
return ((CBgraFrame*)frame)->get_Height();
|
||||
}
|
||||
int Raster_GetStride(void* frame)
|
||||
{
|
||||
return ((CBgraFrame*)frame)->get_Stride();
|
||||
}
|
||||
void Raster_Destroy(void* frame)
|
||||
{
|
||||
delete ((CBgraFrame*)frame);
|
||||
}
|
||||
|
||||
class CEncodedData
|
||||
{
|
||||
public:
|
||||
BYTE* Data;
|
||||
int Size;
|
||||
|
||||
bool IsDeleteDeleter;
|
||||
|
||||
public:
|
||||
CEncodedData()
|
||||
{
|
||||
Data = 0;
|
||||
Size = 0;
|
||||
IsDeleteDeleter = false;
|
||||
}
|
||||
~CEncodedData()
|
||||
{
|
||||
if (Data)
|
||||
{
|
||||
if (!IsDeleteDeleter)
|
||||
CBgraFrame::FreeEncodedMemory(Data);
|
||||
else
|
||||
delete [] Data;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void* Raster_EncodeImageData(unsigned char* buffer, int w, int h, int stride, int format, bool isRgba)
|
||||
{
|
||||
CBgraFrame oFrame;
|
||||
oFrame.put_Data(buffer);
|
||||
oFrame.put_Width(w);
|
||||
oFrame.put_Height(h);
|
||||
oFrame.put_Stride(stride);
|
||||
oFrame.put_IsRGBA(isRgba);
|
||||
CEncodedData* pEncodedData = new CEncodedData();
|
||||
oFrame.Encode(pEncodedData->Data, pEncodedData->Size, format);
|
||||
oFrame.put_Data(NULL);
|
||||
return pEncodedData;
|
||||
}
|
||||
void* Raster_Encode(unsigned char* buffer, int size, int format)
|
||||
{
|
||||
CImageFileFormatChecker oChecker;
|
||||
bool bIsImageFile = oChecker.isImageFile(buffer, (DWORD)size);
|
||||
|
||||
if (bIsImageFile)
|
||||
{
|
||||
switch (oChecker.eFileType)
|
||||
{
|
||||
case _CXIMAGE_FORMAT_WMF:
|
||||
case _CXIMAGE_FORMAT_EMF:
|
||||
{
|
||||
if (_CXIMAGE_FORMAT_SVG == format)
|
||||
{
|
||||
#ifndef GRAPHICS_DISABLE_METAFILE
|
||||
MetaFile::IMetaFile* pMetaFile = MetaFile::Create(NULL);
|
||||
pMetaFile->LoadFromBuffer(buffer, (DWORD)size);
|
||||
std::wstring wsSvg = pMetaFile->ConvertToSvg();
|
||||
std::string sSvg = U_TO_UTF8(wsSvg);
|
||||
pMetaFile->Release();
|
||||
|
||||
CEncodedData* pEncodedData = new CEncodedData();
|
||||
pEncodedData->IsDeleteDeleter = true;
|
||||
pEncodedData->Data = new BYTE[sSvg.length()];
|
||||
pEncodedData->Size = (int)sSvg.length();
|
||||
|
||||
memcpy(pEncodedData->Data, sSvg.c_str(), sSvg.length());
|
||||
return pEncodedData;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
CBgraFrame oFrame;
|
||||
oFrame.Decode(buffer, size, format);
|
||||
|
||||
BYTE* pBuffer = NULL;
|
||||
int nEncodedSize = 0;
|
||||
|
||||
if (oFrame.Encode(pBuffer, nEncodedSize, format))
|
||||
{
|
||||
CEncodedData* pEncodedData = new CEncodedData();
|
||||
pEncodedData->Data = pBuffer;
|
||||
pEncodedData->Size = nEncodedSize;
|
||||
return pEncodedData;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
int Raster_GetEncodedSize(void* encodedData)
|
||||
{
|
||||
return ((CEncodedData*)encodedData)->Size;
|
||||
}
|
||||
void* Raster_GetEncodedBuffer(void* encodedData)
|
||||
{
|
||||
return ((CEncodedData*)encodedData)->Data;
|
||||
}
|
||||
void Raster_DestroyEncodedData(void* encodedData)
|
||||
{
|
||||
delete ((CEncodedData*)encodedData);
|
||||
}
|
||||
|
||||
int Image_GetFormat(unsigned char* buffer, int size)
|
||||
{
|
||||
CImageFileFormatChecker oChecker;
|
||||
if (oChecker.isImageFile(buffer, (DWORD)size))
|
||||
return oChecker.eFileType;
|
||||
return 0;
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
#ifndef _RASTER_H
|
||||
#define _RASTER_H
|
||||
|
||||
#ifndef RASTER_USE_DYNAMIC_LIBRARY
|
||||
#define RASTER_DECL_EXPORT
|
||||
#else
|
||||
#include "../../../../../common/base_export.h"
|
||||
#define RASTER_DECL_EXPORT Q_DECL_EXPORT
|
||||
#endif
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
RASTER_DECL_EXPORT void* Raster_DecodeFile(unsigned char* buffer, int size, bool isRgba = false);
|
||||
RASTER_DECL_EXPORT void* Raster_GetDecodedBuffer(void* frame);
|
||||
RASTER_DECL_EXPORT int Raster_GetHeight(void* frame);
|
||||
RASTER_DECL_EXPORT int Raster_GetWidth(void* frame);
|
||||
RASTER_DECL_EXPORT int Raster_GetStride(void* frame);
|
||||
RASTER_DECL_EXPORT void Raster_Destroy(void* frame);
|
||||
|
||||
RASTER_DECL_EXPORT void* Raster_EncodeImageData(unsigned char* buffer, int w, int h, int stride, int format, bool isRgba = false);
|
||||
RASTER_DECL_EXPORT void* Raster_Encode(unsigned char* buffer, int size, int format);
|
||||
RASTER_DECL_EXPORT void* Raster_GetEncodedBuffer(void* encodedData);
|
||||
RASTER_DECL_EXPORT int Raster_GetEncodedSize(void* encodedData);
|
||||
RASTER_DECL_EXPORT void Raster_DestroyEncodedData(void* encodedData);
|
||||
|
||||
RASTER_DECL_EXPORT int Image_GetFormat(unsigned char* buffer, int size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _RASTER_H
|
||||
@ -1,136 +0,0 @@
|
||||
# Copyright (C) Ascensio System SIA, 2009-2026
|
||||
#
|
||||
# This program is a free software product. You can redistribute it and/or
|
||||
# modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
# version 3 as published by the Free Software Foundation, together with the
|
||||
# additional terms provided in the LICENSE file.
|
||||
#
|
||||
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
# details, see the GNU AGPL at: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
#
|
||||
# You can contact Ascensio System SIA by email at info@onlyoffice.com
|
||||
# or by postal mail at 20A-6 Ernesta Birznieka-Upisha Street, Riga,
|
||||
# LV-1050, Latvia, European Union.
|
||||
#
|
||||
# The interactive user interfaces in modified versions of the Program
|
||||
# are required to display Appropriate Legal Notices in accordance with
|
||||
# Section 5 of the GNU AGPL version 3.
|
||||
#
|
||||
# No trademark rights are granted under this License.
|
||||
#
|
||||
# All non-code elements of the Product, including illustrations,
|
||||
# icon sets, and technical writing content, are licensed under the
|
||||
# Creative Commons Attribution-ShareAlike 4.0 International License:
|
||||
# https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
#
|
||||
# This license applies only to such non-code elements and does not
|
||||
# modify or replace the licensing terms applicable to the Program's
|
||||
# source code, which remains licensed under the GNU Affero General
|
||||
# Public License v3.
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
QT -= core
|
||||
QT -= gui
|
||||
|
||||
VERSION = 0.0.0.1
|
||||
TARGET = test
|
||||
|
||||
TEMPLATE = app
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../../../../../..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include($$CORE_ROOT_DIR/Common/base.pri)
|
||||
|
||||
DEFINES += GRAPHICS_NO_USE_DYNAMIC_LIBRARY
|
||||
DEFINES += KERNEL_NO_USE_DYNAMIC_LIBRARY
|
||||
DEFINES -= UNICODE _UNICODE
|
||||
|
||||
#DEFINES += BUILDING_WASM_MODULE
|
||||
|
||||
CONFIG += disable_cximage_mng
|
||||
CONFIG += disable_cximage_all
|
||||
include(../../../raster.pri)
|
||||
|
||||
#CONFIG += graphics_disable_metafile
|
||||
graphics_disable_metafile {
|
||||
DEFINES += GRAPHICS_DISABLE_METAFILE
|
||||
} else {
|
||||
CONFIG += metafile_disable_svg
|
||||
CONFIG += metafile_disable_svm
|
||||
CONFIG += metafile_disable_wmf_emf_xml
|
||||
include(../../../metafile.pri)
|
||||
|
||||
!metafile_disable_svg {
|
||||
CONFIG += enable_libxml
|
||||
}
|
||||
!metafile_disable_svm {
|
||||
CONFIG += enable_libxml
|
||||
SOURCES += $$CORE_ROOT_DIR/UnicodeConverter/UnicodeConverter_internal_empty.cpp
|
||||
}
|
||||
|
||||
enable_libxml:include($$CORE_ROOT_DIR/DesktopEditor/xml/build/qt/libxml2.pri)
|
||||
|
||||
!metafile_disable_wmf_emf {
|
||||
SOURCES += $$CORE_ROOT_DIR/DesktopEditor/xml/src/xmlwriter.cpp
|
||||
}
|
||||
}
|
||||
|
||||
CONFIG += graphics_disable_fonts
|
||||
graphics_disable_fonts {
|
||||
SOURCES += $$PWD/pro_Fonts_empty.cpp
|
||||
} else {
|
||||
include(../../../fontengine.pri)
|
||||
}
|
||||
|
||||
GRAPHICS_PATH = $$CORE_ROOT_DIR/DesktopEditor/graphics
|
||||
GRAPHICS_AGG_PATH = $$CORE_ROOT_DIR/DesktopEditor/agg-2.4
|
||||
GRAPHICS_COMMON = $$CORE_ROOT_DIR/DesktopEditor/common
|
||||
# matrix
|
||||
HEADERS += \
|
||||
$$GRAPHICS_PATH/Matrix_private.h \
|
||||
$$GRAPHICS_PATH/Matrix.h
|
||||
|
||||
SOURCES += \
|
||||
$$GRAPHICS_PATH/Matrix.cpp
|
||||
|
||||
SOURCES += \
|
||||
$$GRAPHICS_AGG_PATH/src/agg_trans_affine.cpp
|
||||
|
||||
graphics_enable_path {
|
||||
# paths
|
||||
HEADERS += \
|
||||
$$GRAPHICS_PATH/GraphicsPath_private.h \
|
||||
$$GRAPHICS_PATH/GraphicsPath.h
|
||||
|
||||
SOURCES += \
|
||||
$$GRAPHICS_PATH/GraphicsPath.cpp
|
||||
|
||||
SOURCES += \
|
||||
$$GRAPHICS_AGG_PATH/src/agg_arc.cpp \
|
||||
$$GRAPHICS_AGG_PATH/src/agg_bezier_arc.cpp \
|
||||
$$GRAPHICS_AGG_PATH/src/agg_curves.cpp \
|
||||
$$GRAPHICS_AGG_PATH/src/agg_bspline.cpp \
|
||||
$$GRAPHICS_AGG_PATH/src/agg_vcgen_bspline.cpp \
|
||||
$$GRAPHICS_AGG_PATH/src/agg_vcgen_stroke.cpp \
|
||||
$$GRAPHICS_AGG_PATH/src/agg_vcgen_contour.cpp
|
||||
}
|
||||
|
||||
INCLUDEPATH += \
|
||||
$$GRAPHICS_AGG_PATH/include
|
||||
|
||||
SOURCES += \
|
||||
$$GRAPHICS_COMMON/File.cpp \
|
||||
$$GRAPHICS_COMMON/Base64.cpp \
|
||||
$$GRAPHICS_COMMON/StringBuilder.cpp \
|
||||
$$GRAPHICS_COMMON/StringExt.cpp
|
||||
|
||||
SOURCES += $$PWD/pro_Graphics_empty.cpp
|
||||
|
||||
SOURCES += ./raster.cpp
|
||||
HEADERS += ./raster.h
|
||||
|
||||
SOURCES += ./main.cpp
|
||||
@ -1,116 +0,0 @@
|
||||
import sys
|
||||
sys.path.append("../../../../../build_tools/scripts")
|
||||
import base
|
||||
import os
|
||||
import json
|
||||
|
||||
base.configure_common_apps()
|
||||
|
||||
# remove previous version
|
||||
if base.is_dir("./o"):
|
||||
base.delete_dir("./o")
|
||||
base.create_dir("./o")
|
||||
|
||||
# fetch emsdk
|
||||
command_prefix = "" if ("windows" == base.host_platform()) else "./"
|
||||
if not base.is_dir("emsdk"):
|
||||
base.cmd("git", ["clone", "https://github.com/emscripten-core/emsdk.git"])
|
||||
os.chdir("emsdk")
|
||||
base.cmd(command_prefix + "emsdk", ["install", "latest"])
|
||||
base.cmd(command_prefix + "emsdk", ["activate", "latest"])
|
||||
os.chdir("../")
|
||||
|
||||
# compile
|
||||
compiler_flags = ["-O3",
|
||||
# "-fno-rtti",
|
||||
"-Wno-unused-command-line-argument",
|
||||
"-s WASM=1",
|
||||
"-s ALLOW_MEMORY_GROWTH=1",
|
||||
"-s FILESYSTEM=0",
|
||||
"-s ENVIRONMENT='web'",
|
||||
"-s LLD_REPORT_UNDEFINED"]
|
||||
|
||||
compile_files_array = []
|
||||
|
||||
compile_files_array.append("r")
|
||||
compile_files_array.append("../../../raster/")
|
||||
compile_files_array.append(["BgraFrame.cpp", "ImageFileFormatChecker.cpp"])
|
||||
|
||||
compile_files_array.append("ci")
|
||||
compile_files_array.append("../../../cximage/CxImage/")
|
||||
compile_files_array.append(["ximaenc.cpp", "ximaexif.cpp", "ximage.cpp", "ximainfo.cpp", "ximajpg.cpp", "ximalpha.cpp", "ximapal.cpp", "ximasel.cpp", "xmemfile.cpp", "ximapng.cpp", "ximabmp.cpp", "ximatran.cpp", "ximatif.cpp", "tif_xfile.cpp", "ximajas.cpp", "ximagif.cpp", "ximaico.cpp", "ximatga.cpp", "ximapcx.cpp", "ximawbmp.cpp", "ximamng.cpp", "ximapsd.cpp", "ximaska.cpp", "ximaraw.cpp"])
|
||||
|
||||
compile_files_array.append("j")
|
||||
compile_files_array.append("../../../cximage/jpeg/")
|
||||
compile_files_array.append(["jerror.c", "jdmarker.c", "jdapimin.c", "jdmaster.c", "jdapistd.c", "jcomapi.c", "jutils.c", "jdinput.c", "jdmainct.c", "jmemmgr.c", "jquant1.c", "jquant2.c", "jdmerge.c", "jdcolor.c", "jdsample.c", "jdpostct.c", "jddctmgr.c", "jdarith.c", "jdhuff.c", "jdcoefct.c", "jmemnobs.c", "jidctint.c", "jidctfst.c", "jidctflt.c", "jaricom.c", "jcapimin.c", "jcparam.c", "jcapistd.c", "jcinit.c", "jcmaster.c", "jccolor.c", "jcmarker.c", "jcsample.c", "jcprepct.c", "jcdctmgr.c", "jcarith.c", "jchuff.c", "jccoefct.c", "jcmainct.c", "jfdctint.c", "jfdctfst.c", "jfdctflt.c"])
|
||||
|
||||
compile_files_array.append("p")
|
||||
compile_files_array.append("../../../cximage/png/")
|
||||
compile_files_array.append(["pngread.c", "pngmem.c", "pngerror.c", "png.c", "pngrio.c", "pngtrans.c", "pngget.c", "pngrutil.c", "pngrtran.c", "pngset.c", "pngwrite.c", "pngwio.c", "pngwutil.c", "pngwtran.c"])
|
||||
|
||||
compile_files_array.append("t")
|
||||
compile_files_array.append("../../../cximage/tiff/")
|
||||
compile_files_array.append(["tif_close.c", "tif_dir.c", "tif_aux.c", "tif_getimage.c", "tif_strip.c", "tif_open.c", "tif_tile.c", "tif_error.c", "tif_read.c", "tif_flush.c", "tif_dirinfo.c", "tif_compress.c", "tif_warning.c", "tif_swab.c", "tif_color.c", "tif_dirread.c", "tif_write.c", "tif_codec.c", "tif_luv.c", "tif_dirwrite.c", "tif_dumpmode.c", "tif_fax3.c", "tif_ojpeg.c", "tif_jpeg.c", "tif_next.c", "tif_thunder.c", "tif_packbits.c", "tif_lzw.c", "tif_zip.c", "tif_fax3sm.c", "tif_predict.c"])
|
||||
|
||||
compile_files_array.append("ja")
|
||||
compile_files_array.append("../../../cximage/jasper/")
|
||||
compile_files_array.append(["base/jas_init.c", "base/jas_stream.c", "base/jas_malloc.c", "base/jas_image.c", "base/jas_cm.c", "base/jas_seq.c", "base/jas_string.c", "base/jas_icc.c", "base/jas_debug.c", "base/jas_iccdata.c", "base/jas_tvp.c", "base/jas_version.c", "mif/mif_cod.c", "pnm/pnm_dec.c", "pnm/pnm_enc.c", "pnm/pnm_cod.c", "bmp/bmp_dec.c", "bmp/bmp_enc.c", "bmp/bmp_cod.c", "ras/ras_dec.c", "ras/ras_enc.c", "jp2/jp2_dec.c", "jp2/jp2_enc.c", "jp2/jp2_cod.c", "jpc/jpc_cs.c", "jpc/jpc_enc.c", "jpc/jpc_dec.c", "jpc/jpc_t1cod.c", "jpc/jpc_math.c", "jpc/jpc_util.c", "jpc/jpc_tsfb.c", "jpc/jpc_mct.c", "jpc/jpc_t1enc.c", "jpc/jpc_t1dec.c", "jpc/jpc_bs.c", "jpc/jpc_t2cod.c", "jpc/jpc_t2enc.c", "jpc/jpc_t2dec.c", "jpc/jpc_tagtree.c", "jpc/jpc_mqenc.c", "jpc/jpc_mqdec.c", "jpc/jpc_mqcod.c", "jpc/jpc_qmfb.c", "jpg/jpg_val.c", "jpg/jpg_dummy.c", "pgx/pgx_dec.c", "pgx/pgx_enc.c"])
|
||||
|
||||
compile_files_array.append("jp")
|
||||
compile_files_array.append("../../../raster/Jp2/")
|
||||
compile_files_array.append(["J2kFile.cpp", "Reader.cpp"])
|
||||
|
||||
compile_files_array.append("m")
|
||||
compile_files_array.append("../../../cximage/mng/")
|
||||
compile_files_array.append(["libmng_hlapi.c", "libmng_callback_xs.c", "libmng_prop_xs.c", "libmng_object_prc.c", "libmng_zlib.c", "libmng_jpeg.c", "libmng_pixels.c", "libmng_read.c", "libmng_error.c", "libmng_display.c", "libmng_write.c", "libmng_chunk_io.c", "libmng_cms.c", "libmng_filter.c", "libmng_chunk_prc.c", "libmng_chunk_xs.c"])
|
||||
|
||||
compile_files_array.append("lp")
|
||||
compile_files_array.append("../../../cximage/libpsd/")
|
||||
compile_files_array.append(["psd.c", "file_header.c", "color_mode.c", "image_resource.c", "blend.c", "layer_mask.c", "image_data.c", "stream.c", "psd_system.c", "color.c", "pattern_fill.c", "color_balance.c", "channel_image.c", "gradient_fill.c", "invert.c", "posterize.c", "brightness_contrast.c", "solid_color.c", "threshold.c", "effects.c", "selective_color.c", "channel_mixer.c", "photo_filter.c", "type_tool.c", "gradient_map.c", "hue_saturation.c", "levels.c", "curves.c", "pattern.c", "psd_zip.c", "descriptor.c", "drop_shadow.c", "inner_shadow.c", "color_overlay.c", "outer_glow.c", "inner_glow.c", "bevel_emboss.c", "satin.c", "gradient_overlay.c", "stroke.c", "pattern_overlay.c"])
|
||||
|
||||
compile_files_array.append("ra")
|
||||
compile_files_array.append("../../../cximage/raw/")
|
||||
compile_files_array.append(["libdcr.c"])
|
||||
|
||||
compile_files_array.append("jb")
|
||||
compile_files_array.append("../../../raster/JBig2/source/")
|
||||
compile_files_array.append(["JBig2File.cpp", "Encoder/jbig2enc.cpp", "Encoder/jbig2arith.cpp", "Encoder/jbig2sym.cpp", "LeptonLib/pixconv.cpp", "LeptonLib/writefile.cpp", "LeptonLib/scale.cpp", "LeptonLib/pix1.cpp", "LeptonLib/pix2.cpp", "LeptonLib/pix3.cpp", "LeptonLib/pix4.cpp", "LeptonLib/pix5.cpp", "LeptonLib/grayquant.cpp", "LeptonLib/grayquantlow.cpp", "LeptonLib/seedfill.cpp", "LeptonLib/jbclass.cpp", "LeptonLib/pixabasic.cpp", "LeptonLib/numabasic.cpp", "LeptonLib/morphseq.cpp", "LeptonLib/binexpandlow.cpp", "LeptonLib/ptabasic.cpp", "LeptonLib/rop.cpp", "LeptonLib/colormap.cpp", "LeptonLib/pngiostub.cpp", "LeptonLib/lepton_utils.cpp", "LeptonLib/scalelow.cpp", "LeptonLib/enhance.cpp", "LeptonLib/jpegio.cpp", "LeptonLib/jpegiostub.cpp", "LeptonLib/spixio.cpp", "LeptonLib/webpio.cpp", "LeptonLib/webpiostub.cpp", "LeptonLib/psio2.cpp", "LeptonLib/gifio.cpp", "LeptonLib/gifiostub.cpp", "LeptonLib/pnmio.cpp", "LeptonLib/tiffio.cpp", "LeptonLib/tiffiostub.cpp", "LeptonLib/bmpio.cpp", "LeptonLib/binexpand.cpp", "LeptonLib/compare.cpp", "LeptonLib/boxbasic.cpp", "LeptonLib/conncomp.cpp", "LeptonLib/pixafunc1.cpp", "LeptonLib/boxfunc1.cpp", "LeptonLib/ptafunc1.cpp", "LeptonLib/binreduce.cpp", "LeptonLib/seedfilllow.cpp", "LeptonLib/sel1.cpp", "LeptonLib/morphapp.cpp", "LeptonLib/correlscore.cpp", "LeptonLib/sarray.cpp", "LeptonLib/morph.cpp", "LeptonLib/roplow.cpp", "LeptonLib/fpix1.cpp", "LeptonLib/stack.cpp", "LeptonLib/pixacc.cpp", "LeptonLib/pixarith.cpp", "LeptonLib/convolve.cpp", "LeptonLib/binreducelow.cpp", "LeptonLib/convolvelow.cpp", "LeptonLib/arithlow.cpp"])
|
||||
|
||||
compiler_flags.append("-I../../../../OfficeUtils/src/zlib-1.2.11 -I../../../cximage/jasper/include")
|
||||
compiler_flags.append("-D__linux__ -DBUILDING_WASM_MODULE -D_tcsnicmp=strncmp -D_lseek=lseek -D_getcwd=getcwd -DNO_CONSOLE_IO")
|
||||
|
||||
# arguments
|
||||
arguments = ""
|
||||
for item in compiler_flags:
|
||||
arguments += (item + " ")
|
||||
|
||||
# command
|
||||
compile_files_array_len = len(compile_files_array)
|
||||
external_file = []
|
||||
|
||||
prefix_call = ""
|
||||
if base.host_platform() == "windows":
|
||||
prefix_call = "call "
|
||||
external_file.append("call emsdk/emsdk_env.bat")
|
||||
else:
|
||||
external_file.append("#!/bin/bash")
|
||||
external_file.append("source ./emsdk/emsdk_env.sh")
|
||||
|
||||
file_index = 0
|
||||
libs = ""
|
||||
while file_index < compile_files_array_len:
|
||||
objects_dir = compile_files_array[file_index]
|
||||
base_dir = compile_files_array[file_index + 1]
|
||||
files = compile_files_array[file_index + 2]
|
||||
file_index += 3
|
||||
base.create_dir("./o/" + objects_dir)
|
||||
for item in files:
|
||||
file_name = os.path.splitext(os.path.basename(item))[0]
|
||||
external_file.append(prefix_call + "emcc -o o/" + objects_dir + "/" + file_name + ".o -c " + arguments + base_dir + item)
|
||||
libs += ("o/" + objects_dir + "/" + file_name + ".o ")
|
||||
|
||||
external_file.append(prefix_call + "emcc -r -o raster.o " + arguments + "wasm/src/raster.cpp " + libs)
|
||||
base.run_as_bat(external_file)
|
||||
|
||||
# clear
|
||||
base.delete_dir("./o")
|
||||
@ -1,60 +0,0 @@
|
||||
window.loadedImage = null;
|
||||
window.onload = function()
|
||||
{
|
||||
var holder = document.body;
|
||||
holder.ondragover = function(e)
|
||||
{
|
||||
var isFile = false;
|
||||
if (e.dataTransfer.types)
|
||||
{
|
||||
for (var i = 0, length = e.dataTransfer.types.length; i < length; ++i)
|
||||
{
|
||||
var type = e.dataTransfer.types[i].toLowerCase();
|
||||
if (type == "files" && e.dataTransfer.items && e.dataTransfer.items.length == 1)
|
||||
{
|
||||
var item = e.dataTransfer.items[0];
|
||||
if (item.kind && "file" == item.kind.toLowerCase())
|
||||
{
|
||||
isFile = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
e.dataTransfer.dropEffect = isFile ? "copy" : "none";
|
||||
e.preventDefault();
|
||||
return false;
|
||||
};
|
||||
holder.ondrop = function(e)
|
||||
{
|
||||
var file = e.dataTransfer.files ? e.dataTransfer.files[0] : null;
|
||||
if (!file)
|
||||
{
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
window.loadedImage = window.nativeRasterEngine.openImage(e.target.result);
|
||||
if (!window.loadedImage)
|
||||
return;
|
||||
|
||||
window.onresize();
|
||||
};
|
||||
reader.readAsArrayBuffer(file);
|
||||
|
||||
return false;
|
||||
};
|
||||
};
|
||||
|
||||
window.onresize = function()
|
||||
{
|
||||
var dst = document.getElementById("main");
|
||||
if (!window.loadedImage)
|
||||
return;
|
||||
dst.height = window.loadedImage.height > 1000 ? 1000 : window.loadedImage.height;
|
||||
dst.width = dst.height == 1000 ? 1000 * window.loadedImage.width / window.loadedImage.height : window.loadedImage.width;
|
||||
dst.getContext("2d").transform(1, 0, 0, -1, 0, dst.height);
|
||||
dst.getContext("2d").drawImage(window.loadedImage, 0, 0, dst.width, dst.height);
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation, together with the
|
||||
* additional terms provided in the LICENSE file.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at info@onlyoffice.com
|
||||
* or by postal mail at 20A-6 Ernesta Birznieka-Upisha Street, Riga,
|
||||
* LV-1050, Latvia, European Union.
|
||||
*
|
||||
* The interactive user interfaces in modified versions of the Program
|
||||
* are required to display Appropriate Legal Notices in accordance with
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* No trademark rights are granted under this License.
|
||||
*
|
||||
* All non-code elements of the Product, including illustrations,
|
||||
* icon sets, and technical writing content, are licensed under the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International License:
|
||||
* https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
* This license applies only to such non-code elements and does not
|
||||
* modify or replace the licensing terms applicable to the Program's
|
||||
* source code, which remains licensed under the GNU Affero General
|
||||
* Public License v3.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
(function(window, undefined) {
|
||||
|
||||
function getMemoryPathIE(name)
|
||||
{
|
||||
if (self["AscViewer"] && self["AscViewer"]["baseUrl"])
|
||||
return self["AscViewer"]["baseUrl"] + name;
|
||||
return name;
|
||||
}
|
||||
|
||||
var baseFontsPath = "../../../../fonts/";
|
||||
|
||||
var FS = undefined;
|
||||
|
||||
//desktop_fetch
|
||||
|
||||
//polyfill
|
||||
|
||||
//string_utf8
|
||||
|
||||
//module
|
||||
|
||||
//stream
|
||||
|
||||
//file
|
||||
})(window, undefined);
|
||||
@ -1,303 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation, together with the
|
||||
* additional terms provided in the LICENSE file.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at info@onlyoffice.com
|
||||
* or by postal mail at 20A-6 Ernesta Birznieka-Upisha Street, Riga,
|
||||
* LV-1050, Latvia, European Union.
|
||||
*
|
||||
* The interactive user interfaces in modified versions of the Program
|
||||
* are required to display Appropriate Legal Notices in accordance with
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* No trademark rights are granted under this License.
|
||||
*
|
||||
* All non-code elements of the Product, including illustrations,
|
||||
* icon sets, and technical writing content, are licensed under the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International License:
|
||||
* https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
* This license applies only to such non-code elements and does not
|
||||
* modify or replace the licensing terms applicable to the Program's
|
||||
* source code, which remains licensed under the GNU Affero General
|
||||
* Public License v3.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
//string_utf8
|
||||
|
||||
function CNativePointer()
|
||||
{
|
||||
this.ptr = null;
|
||||
}
|
||||
CNativePointer.prototype.free = function()
|
||||
{
|
||||
if (this.ptr)
|
||||
g_native_drawing_file["FreeWasmData"](this.ptr);
|
||||
this.ptr = null;
|
||||
};
|
||||
CNativePointer.prototype.getMemory = function(isCopy)
|
||||
{
|
||||
if (!this.ptr)
|
||||
return null;
|
||||
|
||||
if (!isCopy)
|
||||
return this.ptr;
|
||||
|
||||
let copyArray = new Uint8Array(this.ptr.length);
|
||||
copyArray.set(this.ptr);
|
||||
|
||||
return copyArray;
|
||||
};
|
||||
CNativePointer.prototype.getReader = function()
|
||||
{
|
||||
if (!this.ptr)
|
||||
return null;
|
||||
|
||||
return new CBinaryReader(this.ptr, 0, this.ptr.length);
|
||||
};
|
||||
|
||||
var g_module_pointer = new CNativePointer();
|
||||
|
||||
// js interface
|
||||
CFile.prototype._free = function(ptr)
|
||||
{
|
||||
// TODO:
|
||||
};
|
||||
CFile.prototype._getUint8Array = function(ptr, len)
|
||||
{
|
||||
// TODO:
|
||||
};
|
||||
CFile.prototype._getUint8ClampedArray = function(ptr, len)
|
||||
{
|
||||
// TODO:
|
||||
};
|
||||
|
||||
// FILE
|
||||
CFile.prototype._openFile = function(buffer, password)
|
||||
{
|
||||
let res = false;
|
||||
if (!buffer)
|
||||
res = -1 !== g_native_drawing_file["GetType"]();
|
||||
|
||||
if (res)
|
||||
this.nativeFile = 1;
|
||||
return res;
|
||||
};
|
||||
|
||||
CFile.prototype._closeFile = function()
|
||||
{
|
||||
g_native_drawing_file["CloseFile"]();
|
||||
this.nativeFile = 0;
|
||||
};
|
||||
|
||||
CFile.prototype._getType = function()
|
||||
{
|
||||
return g_native_drawing_file["GetType"]();
|
||||
};
|
||||
|
||||
CFile.prototype._getError = function()
|
||||
{
|
||||
return g_native_drawing_file["GetErrorCode"]();
|
||||
};
|
||||
|
||||
CFile.prototype._SplitPages = function(pages, changes)
|
||||
{
|
||||
let dataChanges = null;
|
||||
if (changes)
|
||||
dataChanges = (undefined !== changes.byteLength) ? new Uint8Array(changes) : changes;
|
||||
g_module_pointer.ptr = g_native_drawing_file["SplitPages"](pages, dataChanges);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._MergePages = function(buffer, maxID, prefixForm)
|
||||
{
|
||||
if (!buffer)
|
||||
return false;
|
||||
|
||||
if (!maxID)
|
||||
maxID = 0;
|
||||
if (!prefixForm)
|
||||
prefixForm = "";
|
||||
|
||||
let data = (undefined !== buffer.byteLength) ? new Uint8Array(buffer) : buffer;
|
||||
return g_native_drawing_file["MergePages"](data, maxID, prefixForm);
|
||||
};
|
||||
|
||||
CFile.prototype._UndoMergePages = function()
|
||||
{
|
||||
return g_native_drawing_file["UnmergePages"]();
|
||||
};
|
||||
|
||||
CFile.prototype._RedactPage = function(pageIndex, box, filler)
|
||||
{
|
||||
let dataFiller = (undefined !== filler.byteLength) ? new Uint8Array(filler) : filler;
|
||||
return g_native_drawing_file["RedactPage"](pageIndex, box, dataFiller);
|
||||
};
|
||||
|
||||
CFile.prototype._UndoRedact = function()
|
||||
{
|
||||
return g_native_drawing_file["UndoRedact"]();
|
||||
};
|
||||
|
||||
CFile.prototype._CheckOwnerPassword = function(password)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
CFile.prototype._CheckPerm = function(perm)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// FONTS
|
||||
CFile.prototype._isNeedCMap = function()
|
||||
{
|
||||
return g_native_drawing_file["IsNeedCMap"]();
|
||||
};
|
||||
|
||||
CFile.prototype._setCMap = function(memoryBuffer)
|
||||
{
|
||||
// none
|
||||
};
|
||||
|
||||
CFile.prototype._getFontByID = function(ID)
|
||||
{
|
||||
return g_native_drawing_file["GetFontBinary"](ID);
|
||||
};
|
||||
|
||||
CFile.prototype._getGIDByUnicode = function(ID)
|
||||
{
|
||||
g_module_pointer.ptr = g_native_drawing_file["GetGIDByUnicode"](ID);
|
||||
return g_module_pointer;
|
||||
}
|
||||
|
||||
CFile.prototype._getInteractiveFormsFonts = function(type)
|
||||
{
|
||||
g_module_pointer.ptr = g_native_drawing_file["GetInteractiveFormsFonts"](type);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
// INFO DOCUMENT
|
||||
CFile.prototype._getInfo = function()
|
||||
{
|
||||
g_module_pointer.ptr = g_native_drawing_file["GetInfo"]();
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getStructure = function()
|
||||
{
|
||||
g_module_pointer.ptr = g_native_drawing_file["GetStructure"]();
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getLinks = function(pageIndex)
|
||||
{
|
||||
g_module_pointer.ptr = g_native_drawing_file["GetLinks"](pageIndex);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
// WIDGETS & ANNOTATIONS
|
||||
CFile.prototype._getInteractiveFormsInfo = function()
|
||||
{
|
||||
g_module_pointer.ptr = g_native_drawing_file["GetInteractiveFormsInfo"]();
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getAnnotationsInfo = function(pageIndex)
|
||||
{
|
||||
g_module_pointer.ptr = g_native_drawing_file["GetAnnotationsInfo"](pageIndex === undefined ? -1 : pageIndex);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getButtonIcons = function(backgroundColor, pageIndex, isBase64, nWidget, nView)
|
||||
{
|
||||
g_module_pointer.ptr = g_native_drawing_file["GetButtonIcons"](
|
||||
backgroundColor === undefined ? 0xFFFFFF : backgroundColor,
|
||||
pageIndex,
|
||||
isBase64 ? 1 : 0,
|
||||
nWidget === undefined ? -1 : nWidget,
|
||||
nView);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getAnnotationsAP = function(width, height, backgroundColor, pageIndex, nAnnot, nView)
|
||||
{
|
||||
g_module_pointer.ptr = g_native_drawing_file["GetAnnotationsAP"](
|
||||
width,
|
||||
height,
|
||||
backgroundColor === undefined ? 0xFFFFFF : backgroundColor,
|
||||
pageIndex,
|
||||
nAnnot === undefined ? -1 : nAnnot,
|
||||
nView);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getInteractiveFormsAP = function(width, height, backgroundColor, pageIndex, nWidget, nView, nButtonView)
|
||||
{
|
||||
g_module_pointer.ptr = g_native_drawing_file["GetInteractiveFormsAP"](
|
||||
width,
|
||||
height,
|
||||
backgroundColor === undefined ? 0xFFFFFF : backgroundColor,
|
||||
pageIndex,
|
||||
nWidget === undefined ? -1 : nWidget,
|
||||
nView, nButtonView);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
// SCAN PAGES
|
||||
CFile.prototype._setScanPageFonts = function(page)
|
||||
{
|
||||
g_native_drawing_file["SetScanPageFonts"](page);
|
||||
};
|
||||
|
||||
CFile.prototype._scanPage = function(page, mode)
|
||||
{
|
||||
g_module_pointer.ptr = g_native_drawing_file["ScanPage"](page, (mode === undefined) ? 0 : mode);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getImageBase64 = function(rId)
|
||||
{
|
||||
return g_native_drawing_file["GetImageBase64"](rId);
|
||||
};
|
||||
|
||||
// TEXT
|
||||
CFile.prototype._getGlyphs = function(pageIndex)
|
||||
{
|
||||
let res = {};
|
||||
res.info = [0, 0, 0, 0];
|
||||
res.result = [];
|
||||
return res;
|
||||
};
|
||||
|
||||
CFile.prototype._destroyTextInfo = function()
|
||||
{
|
||||
g_native_drawing_file["DestroyTextInfo"](rId);
|
||||
};
|
||||
|
||||
// RASTER
|
||||
CFile.prototype._getPixmap = function(pageIndex, width, height, backgroundColor)
|
||||
{
|
||||
return null;
|
||||
};
|
||||
|
||||
// STATIC FUNCTIONS
|
||||
CFile.prototype._InitializeFonts = function(basePath)
|
||||
{
|
||||
// none
|
||||
};
|
||||
|
||||
CFile.prototype._CheckStreamId = function(data, status)
|
||||
{
|
||||
// none
|
||||
};
|
||||
@ -1,580 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation, together with the
|
||||
* additional terms provided in the LICENSE file.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at info@onlyoffice.com
|
||||
* or by postal mail at 20A-6 Ernesta Birznieka-Upisha Street, Riga,
|
||||
* LV-1050, Latvia, European Union.
|
||||
*
|
||||
* The interactive user interfaces in modified versions of the Program
|
||||
* are required to display Appropriate Legal Notices in accordance with
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* No trademark rights are granted under this License.
|
||||
*
|
||||
* All non-code elements of the Product, including illustrations,
|
||||
* icon sets, and technical writing content, are licensed under the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International License:
|
||||
* https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
* This license applies only to such non-code elements and does not
|
||||
* modify or replace the licensing terms applicable to the Program's
|
||||
* source code, which remains licensed under the GNU Affero General
|
||||
* Public License v3.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
function CWasmPointer()
|
||||
{
|
||||
this.ptr = 0;
|
||||
}
|
||||
CWasmPointer.prototype.free = function()
|
||||
{
|
||||
Module["_free"](this.ptr);
|
||||
this.ptr = 0;
|
||||
};
|
||||
CWasmPointer.prototype.getMemory = function(isCopy)
|
||||
{
|
||||
if (!this.ptr)
|
||||
return null;
|
||||
|
||||
let lenArr = new Int32Array(Module["HEAP8"].buffer, this.ptr, 1);
|
||||
if (!lenArr)
|
||||
{
|
||||
this.free();
|
||||
return null;
|
||||
}
|
||||
|
||||
let len = lenArr[0];
|
||||
if (len <= 4)
|
||||
{
|
||||
this.free();
|
||||
return null;
|
||||
}
|
||||
|
||||
len -= 4;
|
||||
|
||||
let noCopyArray = new Uint8Array(Module["HEAP8"].buffer, this.ptr + 4, len);
|
||||
if (!isCopy)
|
||||
return noCopyArray;
|
||||
|
||||
let copyArray = new Uint8Array(len);
|
||||
copyArray.set(noCopyArray);
|
||||
|
||||
return copyArray;
|
||||
};
|
||||
CWasmPointer.prototype.getReader = function()
|
||||
{
|
||||
let noCopyArray = this.getMemory(false);
|
||||
if (!noCopyArray)
|
||||
return null;
|
||||
|
||||
return new CBinaryReader(noCopyArray, 0, noCopyArray.length);
|
||||
};
|
||||
|
||||
var g_module_pointer = new CWasmPointer();
|
||||
|
||||
// js interface
|
||||
CFile.prototype._free = function(ptr)
|
||||
{
|
||||
Module["_free"](ptr);
|
||||
};
|
||||
CFile.prototype._getUint8Array = function(ptr, len)
|
||||
{
|
||||
return new Uint8Array(Module["HEAP8"].buffer, ptr, len);
|
||||
};
|
||||
CFile.prototype._getUint8ClampedArray = function(ptr, len)
|
||||
{
|
||||
return new Uint8ClampedArray(Module["HEAP8"].buffer, ptr, len);
|
||||
};
|
||||
|
||||
// FILE
|
||||
CFile.prototype._openFile = function(buffer, password)
|
||||
{
|
||||
if (buffer)
|
||||
{
|
||||
let data = new Uint8Array(buffer);
|
||||
this.stream_size = data.length;
|
||||
this.stream = Module["_malloc"](this.stream_size);
|
||||
Module["HEAP8"].set(data, this.stream);
|
||||
}
|
||||
|
||||
let passwordPtr = 0;
|
||||
if (password !== undefined)
|
||||
{
|
||||
let passwordBuf = password.toUtf8();
|
||||
passwordPtr = Module["_malloc"](passwordBuf.length);
|
||||
Module["HEAP8"].set(passwordBuf, passwordPtr);
|
||||
}
|
||||
|
||||
this.nativeFile = Module["_Open"](this.stream, this.stream_size, passwordPtr);
|
||||
|
||||
if (passwordPtr)
|
||||
Module["_free"](passwordPtr);
|
||||
return this.nativeFile > 0 ? true : false;
|
||||
};
|
||||
|
||||
CFile.prototype._closeFile = function()
|
||||
{
|
||||
Module["_Close"](this.nativeFile);
|
||||
};
|
||||
|
||||
CFile.prototype._getType = function()
|
||||
{
|
||||
return Module["_GetType"](this.nativeFile);
|
||||
};
|
||||
|
||||
CFile.prototype._getError = function()
|
||||
{
|
||||
return Module["_GetErrorCode"](this.nativeFile);
|
||||
};
|
||||
|
||||
CFile.prototype._SplitPages = function(memoryBuffer, arrayBufferChanges)
|
||||
{
|
||||
let changesPtr = 0;
|
||||
let changesLen = 0;
|
||||
if (arrayBufferChanges)
|
||||
{
|
||||
let changes = new Uint8Array(arrayBufferChanges);
|
||||
changesLen = changes.length;
|
||||
changesPtr = Module["_malloc"](changesLen);
|
||||
Module["HEAP8"].set(changes, changesPtr);
|
||||
}
|
||||
|
||||
let pointer = Module["_malloc"](memoryBuffer.length * 4);
|
||||
Module["HEAP32"].set(memoryBuffer, pointer >> 2);
|
||||
let ptr = Module["_SplitPages"](this.nativeFile, pointer, memoryBuffer.length, changesPtr, changesLen);
|
||||
Module["_free"](pointer);
|
||||
if (changesPtr)
|
||||
Module["_free"](changesPtr);
|
||||
|
||||
g_module_pointer.ptr = ptr;
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._MergePages = function(buffer, maxID, prefixForm)
|
||||
{
|
||||
if (!buffer)
|
||||
return false;
|
||||
|
||||
let data = (undefined !== buffer.byteLength) ? new Uint8Array(buffer) : buffer;
|
||||
let stream2 = Module["_malloc"](data.length);
|
||||
Module["HEAP8"].set(data, stream2);
|
||||
|
||||
if (!maxID)
|
||||
maxID = 0;
|
||||
|
||||
let prefixPtr = 0;
|
||||
if (prefixForm)
|
||||
{
|
||||
let prefixBuf = prefixForm.toUtf8();
|
||||
prefixPtr = Module["_malloc"](prefixBuf.length);
|
||||
Module["HEAP8"].set(prefixBuf, prefixPtr);
|
||||
}
|
||||
|
||||
let bRes = Module["_MergePages"](this.nativeFile, stream2, data.length, maxID, prefixPtr);
|
||||
stream2 = 0; // Success or not, stream2 is either taken or freed
|
||||
|
||||
if (prefixPtr)
|
||||
Module["_free"](prefixPtr);
|
||||
|
||||
return bRes == 1;
|
||||
};
|
||||
|
||||
CFile.prototype._UndoMergePages = function()
|
||||
{
|
||||
return Module["_UnmergePages"](this.nativeFile) == 1;
|
||||
};
|
||||
|
||||
CFile.prototype._RedactPage = function(pageIndex, arrRedactBox, arrayBufferFiller)
|
||||
{
|
||||
let changesPtr = 0;
|
||||
let changesLen = 0;
|
||||
if (arrayBufferFiller)
|
||||
{
|
||||
let changes = new Uint8Array(arrayBufferFiller);
|
||||
changesLen = changes.length;
|
||||
changesPtr = Module["_malloc"](changesLen);
|
||||
Module["HEAP8"].set(changes, changesPtr);
|
||||
}
|
||||
|
||||
let memoryBuffer = new Int32Array(arrRedactBox.length);
|
||||
for (let i = 0; i < arrRedactBox.length; i++)
|
||||
memoryBuffer[i] = Math.round(arrRedactBox[i] * 10000);
|
||||
|
||||
let pointer = Module["_malloc"](memoryBuffer.length * 4);
|
||||
Module["HEAP32"].set(memoryBuffer, pointer >> 2);
|
||||
|
||||
let bRes = Module["_RedactPage"](this.nativeFile, pageIndex, pointer, memoryBuffer.length / 8, changesPtr, changesLen);
|
||||
changesPtr = 0; // Success or not, changesPtr is either taken or freed
|
||||
|
||||
Module["_free"](pointer);
|
||||
|
||||
return bRes == 1;
|
||||
};
|
||||
|
||||
CFile.prototype._UndoRedact = function()
|
||||
{
|
||||
return Module["_UndoRedact"](this.nativeFile) == 1;
|
||||
};
|
||||
|
||||
CFile.prototype._CheckOwnerPassword = function(password)
|
||||
{
|
||||
let passwordPtr = 0;
|
||||
if (password !== undefined)
|
||||
{
|
||||
let passwordBuf = password.toUtf8();
|
||||
passwordPtr = Module["_malloc"](passwordBuf.length);
|
||||
Module["HEAP8"].set(passwordBuf, passwordPtr);
|
||||
}
|
||||
|
||||
let bRes = Module["_CheckOwnerPassword"](this.nativeFile, passwordPtr);
|
||||
|
||||
if (passwordPtr)
|
||||
Module["_free"](passwordPtr);
|
||||
|
||||
return bRes == 1;
|
||||
}
|
||||
|
||||
CFile.prototype._CheckPerm = function(perm)
|
||||
{
|
||||
return Module["_CheckPerm"](this.nativeFile, perm) == 1;
|
||||
}
|
||||
|
||||
// FONTS
|
||||
CFile.prototype._isNeedCMap = function()
|
||||
{
|
||||
let isNeed = Module["_IsNeedCMap"](this.nativeFile);
|
||||
return (isNeed === 1) ? true : false;
|
||||
};
|
||||
|
||||
CFile.prototype._setCMap = function(memoryBuffer)
|
||||
{
|
||||
let pointer = Module["_malloc"](memoryBuffer.length);
|
||||
Module.HEAP8.set(memoryBuffer, pointer);
|
||||
Module["_SetCMapData"](this.nativeFile, pointer, memoryBuffer.length);
|
||||
};
|
||||
|
||||
CFile.prototype._getFontByID = function(ID)
|
||||
{
|
||||
if (ID === undefined)
|
||||
return null;
|
||||
|
||||
let idBuffer = ID.toUtf8();
|
||||
let idPointer = Module["_malloc"](idBuffer.length);
|
||||
Module["HEAP8"].set(idBuffer, idPointer);
|
||||
g_module_pointer.ptr = Module["_GetFontBinary"](this.nativeFile, idPointer);
|
||||
Module["_free"](idPointer);
|
||||
|
||||
let reader = g_module_pointer.getReader();
|
||||
if (!reader)
|
||||
return null;
|
||||
|
||||
let nFontLength = reader.readInt();
|
||||
let np1 = reader.readInt();
|
||||
let np2 = reader.readInt();
|
||||
let pFontPointer = np2 << 32 | np1;
|
||||
|
||||
let res = new Uint8Array(Module["HEAP8"].buffer, pFontPointer, nFontLength);
|
||||
g_module_pointer.free();
|
||||
return res;
|
||||
};
|
||||
|
||||
CFile.prototype._getGIDByUnicode = function(ID)
|
||||
{
|
||||
if (ID === undefined)
|
||||
return null;
|
||||
|
||||
let idBuffer = ID.toUtf8();
|
||||
let idPointer = Module["_malloc"](idBuffer.length);
|
||||
Module["HEAP8"].set(idBuffer, idPointer);
|
||||
g_module_pointer.ptr = Module["_GetGIDByUnicode"](this.nativeFile, idPointer);
|
||||
Module["_free"](idPointer);
|
||||
return g_module_pointer;
|
||||
}
|
||||
|
||||
CFile.prototype._getInteractiveFormsFonts = function(type)
|
||||
{
|
||||
g_module_pointer.ptr = Module["_GetInteractiveFormsFonts"](this.nativeFile, type);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
// INFO DOCUMENT
|
||||
CFile.prototype._getInfo = function()
|
||||
{
|
||||
g_module_pointer.ptr = Module["_GetInfo"](this.nativeFile);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getStructure = function()
|
||||
{
|
||||
g_module_pointer.ptr = Module["_GetStructure"](this.nativeFile);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getLinks = function(pageIndex)
|
||||
{
|
||||
g_module_pointer.ptr = Module["_GetLinks"](this.nativeFile, pageIndex);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
// WIDGETS & ANNOTATIONS
|
||||
CFile.prototype._getInteractiveFormsInfo = function()
|
||||
{
|
||||
g_module_pointer.ptr = Module["_GetInteractiveFormsInfo"](this.nativeFile);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getAnnotationsInfo = function(pageIndex)
|
||||
{
|
||||
g_module_pointer.ptr = Module["_GetAnnotationsInfo"](this.nativeFile, pageIndex === undefined ? -1 : pageIndex);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getButtonIcons = function(backgroundColor, pageIndex, isBase64, nWidget, nView)
|
||||
{
|
||||
g_module_pointer.ptr = Module["_GetButtonIcons"](this.nativeFile,
|
||||
backgroundColor === undefined ? 0xFFFFFF : backgroundColor,
|
||||
pageIndex,
|
||||
isBase64 ? 1 : 0,
|
||||
nWidget === undefined ? -1 : nWidget,
|
||||
nView);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getAnnotationsAP = function(width, height, backgroundColor, pageIndex, nAnnot, nView)
|
||||
{
|
||||
g_module_pointer.ptr = Module["_GetAnnotationsAP"](this.nativeFile,
|
||||
width,
|
||||
height,
|
||||
backgroundColor === undefined ? 0xFFFFFF : backgroundColor,
|
||||
pageIndex,
|
||||
nAnnot === undefined ? -1 : nAnnot,
|
||||
nView);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getInteractiveFormsAP = function(width, height, backgroundColor, pageIndex, nWidget, nView, nButtonView)
|
||||
{
|
||||
g_module_pointer.ptr = Module["_GetInteractiveFormsAP"](this.nativeFile,
|
||||
width,
|
||||
height,
|
||||
backgroundColor === undefined ? 0xFFFFFF : backgroundColor,
|
||||
pageIndex,
|
||||
nWidget === undefined ? -1 : nWidget,
|
||||
nView, nButtonView);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
// SCAN PAGES
|
||||
CFile.prototype._setScanPageFonts = function(page)
|
||||
{
|
||||
Module["_SetScanPageFonts"](this.nativeFile, page);
|
||||
};
|
||||
|
||||
CFile.prototype._scanPage = function(page, mode)
|
||||
{
|
||||
g_module_pointer.ptr = Module["_ScanPage"](this.nativeFile, page, (mode === undefined) ? 0 : mode);
|
||||
return g_module_pointer;
|
||||
};
|
||||
|
||||
CFile.prototype._getImageBase64 = function(rId)
|
||||
{
|
||||
let strPtr = Module["_GetImageBase64"](this.nativeFile, rId);
|
||||
if (0 == strPtr)
|
||||
return "error";
|
||||
let len = Module["_GetImageBase64Len"](strPtr);
|
||||
let ptr = Module["_GetImageBase64Ptr"](strPtr);
|
||||
|
||||
var buffer = new Uint8Array(Module["HEAP8"].buffer, ptr, len);
|
||||
let result = String.prototype.fromUtf8(buffer, 0, len);
|
||||
Module["_GetImageBase64Free"](strPtr);
|
||||
return result;
|
||||
};
|
||||
|
||||
// TEXT
|
||||
CFile.prototype._getGlyphs = function(pageIndex)
|
||||
{
|
||||
let ptr = Module["_GetGlyphs"](this.nativeFile, pageIndex);
|
||||
if (!ptr)
|
||||
return null;
|
||||
|
||||
let ptrArray = new Int32Array(Module["HEAP8"].buffer, ptr, 5);
|
||||
let len = ptrArray[0];
|
||||
len -= 20;
|
||||
|
||||
let res = {};
|
||||
res.info = [ptrArray[1], ptrArray[2], ptrArray[3], ptrArray[4]];
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
let textCommandsSrc = new Uint8Array(Module["HEAP8"].buffer, ptr + 20, len);
|
||||
res.result = new Uint8Array(len);
|
||||
res.result.set(textCommandsSrc);
|
||||
}
|
||||
else
|
||||
res.result = [];
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
CFile.prototype._destroyTextInfo = function()
|
||||
{
|
||||
Module["_DestroyTextInfo"]();
|
||||
};
|
||||
|
||||
// RASTER
|
||||
CFile.prototype._getPixmap = function(pageIndex, width, height, backgroundColor)
|
||||
{
|
||||
return Module["_GetPixmap"](this.nativeFile, pageIndex, width, height, backgroundColor === undefined ? 0xFFFFFF : backgroundColor);
|
||||
};
|
||||
|
||||
// STATIC FUNCTIONS
|
||||
CFile.prototype._InitializeFonts = function(basePath)
|
||||
{
|
||||
if (undefined !== basePath && "" !== basePath)
|
||||
baseFontsPath = basePath;
|
||||
if (!window["g_fonts_selection_bin"])
|
||||
return;
|
||||
let memoryBuffer = window["g_fonts_selection_bin"].toUtf8();
|
||||
let pointer = Module["_malloc"](memoryBuffer.length);
|
||||
Module.HEAP8.set(memoryBuffer, pointer);
|
||||
Module["_InitializeFontsBase64"](pointer, memoryBuffer.length);
|
||||
Module["_free"](pointer);
|
||||
delete window["g_fonts_selection_bin"];
|
||||
|
||||
// ranges
|
||||
let rangesBuffer = new CBinaryWriter();
|
||||
let ranges = AscFonts.getSymbolRanges();
|
||||
|
||||
let rangesCount = ranges.length;
|
||||
rangesBuffer.writeUint(rangesCount);
|
||||
for (let i = 0; i < rangesCount; i++)
|
||||
{
|
||||
rangesBuffer.writeString(ranges[i].getName());
|
||||
rangesBuffer.writeUint(ranges[i].getStart());
|
||||
rangesBuffer.writeUint(ranges[i].getEnd());
|
||||
}
|
||||
|
||||
let rangesFinalLen = rangesBuffer.dataSize;
|
||||
let rangesFinal = new Uint8Array(rangesBuffer.buffer.buffer, 0, rangesFinalLen);
|
||||
pointer = Module["_malloc"](rangesFinalLen);
|
||||
Module.HEAP8.set(rangesFinal, pointer);
|
||||
Module["_InitializeFontsRanges"](pointer, rangesFinalLen);
|
||||
Module["_free"](pointer);
|
||||
};
|
||||
|
||||
CFile.prototype._CheckStreamId = function(data, status)
|
||||
{
|
||||
let drawingFile = self.drawingFile;
|
||||
if (!drawingFile)
|
||||
return;
|
||||
|
||||
let lenArray = new Int32Array(Module["HEAP8"].buffer, data, 4);
|
||||
let len = lenArray[0];
|
||||
len -= 4;
|
||||
|
||||
let buffer = new Uint8Array(Module["HEAP8"].buffer, data + 4, len);
|
||||
let reader = new CBinaryReader(buffer, 0, len);
|
||||
|
||||
let name = reader.readString();
|
||||
let style = 0;
|
||||
if (reader.readInt() != 0)
|
||||
style |= 1;//AscFonts.FontStyle.FontStyleBold;
|
||||
if (reader.readInt() != 0)
|
||||
style |= 2;//AscFonts.FontStyle.FontStyleItalic;
|
||||
|
||||
let file = AscFonts.pickFont(name, style);
|
||||
let fileId = file.GetID();
|
||||
let fileStatus = file.GetStatus();
|
||||
|
||||
if (fileStatus === 0)
|
||||
{
|
||||
// font was loaded
|
||||
fontToMemory(file, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
drawingFile.fontStreams[fileId] = drawingFile.fontStreams[fileId] || {};
|
||||
drawingFile.fontStreams[fileId].pages = drawingFile.fontStreams[fileId].pages || [];
|
||||
addToArrayAsDictionary(drawingFile.fontStreams[fileId].pages, drawingFile.fontPageIndex);
|
||||
addToArrayAsDictionary(drawingFile.pages[drawingFile.fontPageIndex].fonts, fileId);
|
||||
|
||||
drawingFile.pages[drawingFile.fontPageIndex].fontsUpdateType |= drawingFile.fontPageUpdateType;
|
||||
|
||||
// font can be loading in editor
|
||||
if (undefined === file.externalCallback)
|
||||
{
|
||||
let _t = file;
|
||||
file.externalCallback = function() {
|
||||
fontToMemory(_t, true);
|
||||
|
||||
let pages = drawingFile.fontStreams[fileId].pages;
|
||||
delete drawingFile.fontStreams[fileId];
|
||||
|
||||
let pagesRepaint_Page = [];
|
||||
let pagesRepaint_Annotation = [];
|
||||
let pagesRepaint_Forms = [];
|
||||
|
||||
for (let i = 0, len = pages.length; i < len; i++)
|
||||
{
|
||||
let pageNum = pages[i];
|
||||
let pageObj = drawingFile.pages[pageNum];
|
||||
let fonts = pageObj.fonts;
|
||||
|
||||
for (let j = 0, len_fonts = fonts.length; j < len_fonts; j++)
|
||||
{
|
||||
if (fonts[j] == fileId)
|
||||
{
|
||||
fonts.splice(j, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (0 == fonts.length)
|
||||
{
|
||||
if (pageObj.fontsUpdateType & UpdateFontsSource.Page)
|
||||
pagesRepaint_Page.push(pageNum);
|
||||
|
||||
if (pageObj.fontsUpdateType & UpdateFontsSource.Annotation)
|
||||
pagesRepaint_Annotation.push(pageNum);
|
||||
|
||||
if (pageObj.fontsUpdateType & UpdateFontsSource.Forms)
|
||||
pagesRepaint_Forms.push(pageNum);
|
||||
|
||||
pageObj.fontsUpdateType = UpdateFontsSource.Undefined;
|
||||
}
|
||||
}
|
||||
|
||||
if (pagesRepaint_Page.length > 0 && drawingFile.onRepaintPages)
|
||||
drawingFile.onRepaintPages(pagesRepaint_Page);
|
||||
|
||||
if (pagesRepaint_Annotation.length > 0 && drawingFile.onRepaintAnnotations)
|
||||
drawingFile.onRepaintAnnotations(pagesRepaint_Annotation);
|
||||
|
||||
if (pagesRepaint_Forms.length > 0 && drawingFile.onRepaintForms)
|
||||
drawingFile.onRepaintForms(pagesRepaint_Forms);
|
||||
|
||||
delete _t.externalCallback;
|
||||
};
|
||||
|
||||
if (2 !== file.LoadFontAsync)
|
||||
file.LoadFontAsync(baseFontsPath, null);
|
||||
}
|
||||
}
|
||||
|
||||
let memoryBuffer = fileId.toUtf8();
|
||||
let pointer = Module["_malloc"](memoryBuffer.length);
|
||||
Module.HEAP8.set(memoryBuffer, pointer);
|
||||
Module["HEAP8"][status] = (fileStatus == 0) ? 1 : 0;
|
||||
return pointer;
|
||||
};
|
||||
@ -1,14 +0,0 @@
|
||||
<!doctype html>
|
||||
<html style="width:100%;height:100%;margin:0;padding:0;">
|
||||
<head>
|
||||
<title>ONLYOFFICE Documents</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=IE8">
|
||||
<script src="./code_raster.js"></script>
|
||||
<script src="./raster.js"></script>
|
||||
</head>
|
||||
<body style="width:100%;height:100%;margin:0;padding:0;overflow-x:scroll;overflow-y:scroll;">
|
||||
<div id="pos" style="position:absolute;margin:0;padding:0;left:0px;top:0px;width:0px;height:0px;"></div>
|
||||
<canvas style="position:fixed;left:0px;top:0px;" id="main"></canvas>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,105 +0,0 @@
|
||||
(function(window, undefined){
|
||||
|
||||
var printErr = undefined;
|
||||
var print = undefined;
|
||||
|
||||
var fetch = self.fetch;
|
||||
var getBinaryPromise = null;
|
||||
if (self.AscDesktopEditor && document.currentScript && 0 == document.currentScript.src.indexOf("file:///"))
|
||||
{
|
||||
fetch = undefined; // fetch not support file:/// scheme
|
||||
getBinaryPromise = function() {
|
||||
var wasmPath = "ascdesktop://raster/" + wasmBinaryFile.substr(8);
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', wasmPath, true);
|
||||
xhr.responseType = 'arraybuffer';
|
||||
|
||||
if (xhr.overrideMimeType)
|
||||
xhr.overrideMimeType('text/plain; charset=x-user-defined');
|
||||
else
|
||||
xhr.setRequestHeader('Accept-Charset', 'x-user-defined');
|
||||
|
||||
xhr.onload = function () {
|
||||
if (this.status == 200) {
|
||||
resolve(new Uint8Array(this.response));
|
||||
}
|
||||
};
|
||||
xhr.send(null);
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
getBinaryPromise = function() { return getBinaryPromise2(); }
|
||||
}
|
||||
|
||||
//module
|
||||
|
||||
function Raster()
|
||||
{
|
||||
this.isInit = false;
|
||||
|
||||
this.openImage = function(dataBuffer)
|
||||
{
|
||||
if (!this.isInit)
|
||||
{
|
||||
// module not loaded yet
|
||||
return null;
|
||||
}
|
||||
|
||||
// copy memory to webasm memory
|
||||
var imageFileRawDataSize = dataBuffer.byteLength;
|
||||
var imageFileRawData = Module["_Raster_Malloc"](imageFileRawDataSize);
|
||||
if (0 === imageFileRawData)
|
||||
return null;
|
||||
|
||||
var uint8DataBuffer = new Uint8Array(dataBuffer);
|
||||
Module["HEAP8"].set(uint8DataBuffer, imageFileRawData);
|
||||
|
||||
// load image
|
||||
var imageFile = Module["_Raster_Load"](imageFileRawData, imageFileRawDataSize);
|
||||
if (0 === imageFile)
|
||||
{
|
||||
Module["_Raster_Free"](imageFileRawData);
|
||||
return null;
|
||||
}
|
||||
|
||||
// get image data
|
||||
var imageW = Module["_Raster_GetWidth"](imageFile);
|
||||
var imageH = Module["_Raster_GetHeight"](imageFile);
|
||||
var imageRGBA = Module["_Raster_GetRGBA"](imageFile);
|
||||
|
||||
if (imageW <= 0 || imageH <= 0 || 0 === imageRGBA)
|
||||
{
|
||||
Module["_Raster_Destroy"](imageFile);
|
||||
Module["_Raster_Free"](imageFileRawData);
|
||||
return null;
|
||||
}
|
||||
|
||||
// quickly copy memory to canvas
|
||||
var canvas = document.createElement("canvas");
|
||||
canvas.width = imageW;
|
||||
canvas.height = imageH;
|
||||
|
||||
var canvasCtx = canvas.getContext("2d");
|
||||
var imageRGBAClampedArray = new Uint8ClampedArray(Module["HEAP8"].buffer, imageRGBA, 4 * imageW * imageH);
|
||||
var canvasData = new ImageData(imageRGBAClampedArray, imageW, imageH);
|
||||
|
||||
canvasCtx.putImageData(canvasData, 0, 0);
|
||||
|
||||
Module["_Raster_Destroy"](imageFile);
|
||||
Module["_Raster_Free"](imageFileRawData);
|
||||
|
||||
return canvas;
|
||||
}
|
||||
}
|
||||
|
||||
window.nativeRasterEngine = new Raster();
|
||||
window.onEngineInit = function()
|
||||
{
|
||||
window.nativeRasterEngine.isInit = true;
|
||||
};
|
||||
|
||||
})(window, undefined);
|
||||
@ -1,139 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation, together with the
|
||||
* additional terms provided in the LICENSE file.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at info@onlyoffice.com
|
||||
* or by postal mail at 20A-6 Ernesta Birznieka-Upisha Street, Riga,
|
||||
* LV-1050, Latvia, European Union.
|
||||
*
|
||||
* The interactive user interfaces in modified versions of the Program
|
||||
* are required to display Appropriate Legal Notices in accordance with
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* No trademark rights are granted under this License.
|
||||
*
|
||||
* All non-code elements of the Product, including illustrations,
|
||||
* icon sets, and technical writing content, are licensed under the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International License:
|
||||
* https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
* This license applies only to such non-code elements and does not
|
||||
* modify or replace the licensing terms applicable to the Program's
|
||||
* source code, which remains licensed under the GNU Affero General
|
||||
* Public License v3.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
function CBinaryReader(data, start, size)
|
||||
{
|
||||
this.data = data;
|
||||
this.pos = start;
|
||||
this.limit = start + size;
|
||||
}
|
||||
CBinaryReader.prototype.readByte = function()
|
||||
{
|
||||
let val = this.data[this.pos];
|
||||
this.pos += 1;
|
||||
return val;
|
||||
};
|
||||
CBinaryReader.prototype.readShort = function()
|
||||
{
|
||||
let val = this.data[this.pos] | this.data[this.pos + 1] << 8;
|
||||
this.pos += 2;
|
||||
return val;
|
||||
};
|
||||
CBinaryReader.prototype.readInt = function()
|
||||
{
|
||||
let val = this.data[this.pos] | this.data[this.pos + 1] << 8 | this.data[this.pos + 2] << 16 | this.data[this.pos + 3] << 24;
|
||||
this.pos += 4;
|
||||
return val;
|
||||
};
|
||||
CBinaryReader.prototype.readDouble = function()
|
||||
{
|
||||
return this.readInt() / 100;
|
||||
};
|
||||
CBinaryReader.prototype.readDouble2 = function()
|
||||
{
|
||||
return this.readInt() / 10000;
|
||||
};
|
||||
CBinaryReader.prototype.readDouble3 = function()
|
||||
{
|
||||
return this.readInt() / 100000;
|
||||
};
|
||||
CBinaryReader.prototype.readString = function()
|
||||
{
|
||||
let len = this.readInt();
|
||||
let val = String.prototype.fromUtf8(this.data, this.pos, len);
|
||||
this.pos += len;
|
||||
return val;
|
||||
};
|
||||
CBinaryReader.prototype.readString2 = function()
|
||||
{
|
||||
let len = this.readShort();
|
||||
let val = "";
|
||||
for (let i = 0; i < len; ++i)
|
||||
{
|
||||
let c = this.readShort();
|
||||
val += String.fromCharCode(c);
|
||||
}
|
||||
return val;
|
||||
};
|
||||
CBinaryReader.prototype.readData = function()
|
||||
{
|
||||
let len = this.readInt() - 4;
|
||||
let val = this.data.slice(this.pos, this.pos + len);
|
||||
this.pos += len;
|
||||
return val;
|
||||
};
|
||||
CBinaryReader.prototype.isValid = function()
|
||||
{
|
||||
return (this.pos < this.limit) ? true : false;
|
||||
};
|
||||
CBinaryReader.prototype.Skip = function(nPos)
|
||||
{
|
||||
this.pos += nPos;
|
||||
};
|
||||
|
||||
function CBinaryWriter()
|
||||
{
|
||||
this.size = 100000;
|
||||
this.dataSize = 0;
|
||||
this.buffer = new Uint8Array(this.size);
|
||||
}
|
||||
CBinaryWriter.prototype.checkAlloc = function(addition)
|
||||
{
|
||||
if ((this.dataSize + addition) <= this.size)
|
||||
return;
|
||||
|
||||
let newSize = Math.max(this.size * 2, this.size + addition);
|
||||
let newBuffer = new Uint8Array(newSize);
|
||||
newBuffer.set(this.buffer, 0);
|
||||
|
||||
this.size = newSize;
|
||||
this.buffer = newBuffer;
|
||||
};
|
||||
CBinaryWriter.prototype.writeUint = function(value)
|
||||
{
|
||||
this.checkAlloc(4);
|
||||
let val = (value>2147483647)?value-4294967296:value;
|
||||
this.buffer[this.dataSize++] = (val) & 0xFF;
|
||||
this.buffer[this.dataSize++] = (val >>> 8) & 0xFF;
|
||||
this.buffer[this.dataSize++] = (val >>> 16) & 0xFF;
|
||||
this.buffer[this.dataSize++] = (val >>> 24) & 0xFF;
|
||||
};
|
||||
CBinaryWriter.prototype.writeString = function(value)
|
||||
{
|
||||
let valueUtf8 = value.toUtf8();
|
||||
this.checkAlloc(valueUtf8.length);
|
||||
this.buffer.set(valueUtf8, this.dataSize);
|
||||
this.dataSize += valueUtf8.length;
|
||||
};
|
||||
@ -1,6 +0,0 @@
|
||||
<<<<<<<
|
||||
#define FT_COMPONENT smooth
|
||||
=======
|
||||
#define FT_COMPONENT smooth
|
||||
#include <wasm_jmp.h>
|
||||
>>>>>>>
|
||||
@ -1,71 +0,0 @@
|
||||
<<<<<<<
|
||||
static int
|
||||
gray_convert_glyph_inner( RAS_ARG,
|
||||
int continued )
|
||||
{
|
||||
int error;
|
||||
|
||||
|
||||
if ( ft_setjmp( ras.jump_buffer ) == 0 )
|
||||
{
|
||||
if ( continued )
|
||||
FT_Trace_Disable();
|
||||
error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras );
|
||||
if ( continued )
|
||||
FT_Trace_Enable();
|
||||
|
||||
if ( !ras.invalid )
|
||||
gray_record_cell( RAS_VAR );
|
||||
|
||||
FT_TRACE7(( "band [%d..%d]: %ld cell%s\n",
|
||||
ras.min_ey,
|
||||
ras.max_ey,
|
||||
ras.num_cells,
|
||||
ras.num_cells == 1 ? "" : "s" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
error = FT_THROW( Memory_Overflow );
|
||||
|
||||
FT_TRACE7(( "band [%d..%d]: to be bisected\n",
|
||||
ras.min_ey, ras.max_ey ));
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
=======
|
||||
static int
|
||||
gray_convert_glyph_inner( RAS_ARG,
|
||||
int continued )
|
||||
{
|
||||
int error;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if ( continued )
|
||||
FT_Trace_Disable();
|
||||
error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras );
|
||||
if ( continued )
|
||||
FT_Trace_Enable();
|
||||
|
||||
if ( !ras.invalid )
|
||||
gray_record_cell( RAS_VAR );
|
||||
|
||||
FT_TRACE7(( "band [%d..%d]: %ld cell%s\n",
|
||||
ras.min_ey,
|
||||
ras.max_ey,
|
||||
ras.num_cells,
|
||||
ras.num_cells == 1 ? "" : "s" ));
|
||||
}
|
||||
catch(int jmp)
|
||||
{
|
||||
error = FT_THROW( Memory_Overflow );
|
||||
|
||||
FT_TRACE7(( "band [%d..%d]: to be bisected\n",
|
||||
ras.min_ey, ras.max_ey ));
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
>>>>>>>
|
||||
@ -1,5 +0,0 @@
|
||||
<<<<<<<
|
||||
ft_longjmp( ras.jump_buffer, 1 );
|
||||
=======
|
||||
ft_longjmp_ex( ras.jump_buffer, 1 );
|
||||
>>>>>>>
|
||||
@ -1,7 +0,0 @@
|
||||
<<<<<<<
|
||||
#include <freetype/ftlist.h>
|
||||
=======
|
||||
#include <wasm_jmp.h>
|
||||
|
||||
#include <freetype/ftlist.h>
|
||||
>>>>>>>
|
||||
@ -1,5 +0,0 @@
|
||||
<<<<<<<
|
||||
ft_longjmp( *(ft_jmp_buf*) jump_buffer, 1 );
|
||||
=======
|
||||
ft_longjmp_ex( *(ft_jmp_buf*) jump_buffer, 1 );
|
||||
>>>>>>>
|
||||
@ -1,8 +0,0 @@
|
||||
<<<<<<<
|
||||
#include <stdio.h>
|
||||
=======
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
>>>>>>>
|
||||
@ -1,5 +0,0 @@
|
||||
<<<<<<<
|
||||
#include "ttcmap.c"
|
||||
=======
|
||||
#include "ttcmap.cpp"
|
||||
>>>>>>>
|
||||
@ -1,5 +0,0 @@
|
||||
<<<<<<<
|
||||
#include "ftgrays.c"
|
||||
=======
|
||||
#include "ftgrays.cpp"
|
||||
>>>>>>>
|
||||
@ -1,16 +0,0 @@
|
||||
<<<<<<<
|
||||
if ( ft_setjmp( FT_VALIDATOR( &valid )->jump_buffer) == 0 )
|
||||
{
|
||||
/* validate this cmap sub-table */
|
||||
error = clazz->validate( cmap, FT_VALIDATOR( &valid ) );
|
||||
}
|
||||
=======
|
||||
try
|
||||
{
|
||||
/* validate this cmap sub-table */
|
||||
error = clazz->validate( cmap, FT_VALIDATOR( &valid ) );
|
||||
}
|
||||
catch (int jmp)
|
||||
{
|
||||
}
|
||||
>>>>>>>
|
||||
@ -1,233 +0,0 @@
|
||||
#include <malloc.h>
|
||||
|
||||
#include "../../../../../common/Base64.h"
|
||||
#include "../../../../../doctrenderer/drawingfile.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WASM_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define WASM_EXPORT __attribute__((visibility("default")))
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
NSFonts::IApplicationFonts* g_applicationFonts = NULL;
|
||||
WASM_EXPORT void InitializeFontsBin(BYTE* data, int size)
|
||||
{
|
||||
if (!g_applicationFonts)
|
||||
{
|
||||
g_applicationFonts = NSFonts::NSApplication::Create();
|
||||
g_applicationFonts->InitializeFromBin(data, (unsigned int)size);
|
||||
}
|
||||
}
|
||||
WASM_EXPORT void InitializeFontsBase64(BYTE* pDataSrc, int nLenSrc)
|
||||
{
|
||||
if (!g_applicationFonts)
|
||||
{
|
||||
g_applicationFonts = NSFonts::NSApplication::Create();
|
||||
|
||||
int nLenDst = NSBase64::Base64DecodeGetRequiredLength(nLenSrc);
|
||||
BYTE* pDataDst = new BYTE[nLenDst];
|
||||
|
||||
if (FALSE == NSBase64::Base64Decode((const char*)pDataSrc, nLenSrc, pDataDst, &nLenDst))
|
||||
{
|
||||
RELEASEARRAYOBJECTS(pDataDst);
|
||||
return;
|
||||
}
|
||||
|
||||
g_applicationFonts->InitializeFromBin(pDataDst, (unsigned int)nLenDst);
|
||||
RELEASEARRAYOBJECTS(pDataDst);
|
||||
}
|
||||
}
|
||||
WASM_EXPORT void InitializeFontsRanges(BYTE* pDataSrc)
|
||||
{
|
||||
if (g_applicationFonts && pDataSrc)
|
||||
g_applicationFonts->InitializeRanges(pDataSrc);
|
||||
}
|
||||
WASM_EXPORT void SetFontBinary(char* path, BYTE* data, int size)
|
||||
{
|
||||
NSFonts::IFontsMemoryStorage* pStorage = CDrawingFile::GetFontsStorage();
|
||||
if (pStorage)
|
||||
{
|
||||
std::string sPathA(path);
|
||||
pStorage->Add(UTF8_TO_U(sPathA), data, size, true);
|
||||
}
|
||||
}
|
||||
WASM_EXPORT int IsFontBinaryExist(char* path)
|
||||
{
|
||||
NSFonts::IFontsMemoryStorage* pStorage = CDrawingFile::GetFontsStorage();
|
||||
if (pStorage)
|
||||
{
|
||||
std::string sPathA(path);
|
||||
NSFonts::IFontStream* pStream = pStorage->Get(UTF8_TO_U(sPathA));
|
||||
if (pStream)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
WASM_EXPORT CDrawingFile* Open(BYTE* data, LONG size, const char* password)
|
||||
{
|
||||
if (!g_applicationFonts)
|
||||
g_applicationFonts = NSFonts::NSApplication::Create();
|
||||
|
||||
// always recreate storage
|
||||
CDrawingFile::InitFontsGlobalStorage();
|
||||
|
||||
CDrawingFile* pFile = new CDrawingFile(g_applicationFonts);
|
||||
std::wstring sPassword = L"";
|
||||
if (NULL != password)
|
||||
sPassword = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)password, strlen(password));
|
||||
pFile->OpenFile(data, size, password ? sPassword.c_str() : NULL);
|
||||
return pFile;
|
||||
}
|
||||
WASM_EXPORT int GetType(CDrawingFile* pFile)
|
||||
{
|
||||
// 0 - PDF
|
||||
// 1 - DJVU
|
||||
// 2 - XPS
|
||||
return pFile->GetType();
|
||||
}
|
||||
WASM_EXPORT int GetErrorCode(CDrawingFile* pFile)
|
||||
{
|
||||
if (!pFile)
|
||||
return -1;
|
||||
return pFile->GetErrorCode();
|
||||
}
|
||||
WASM_EXPORT void Close(CDrawingFile* pFile)
|
||||
{
|
||||
delete pFile;
|
||||
g_applicationFonts->GetStreams()->Clear();
|
||||
NSFonts::NSApplicationFontStream::SetGlobalMemoryStorage(NULL);
|
||||
}
|
||||
WASM_EXPORT BYTE* GetInfo(CDrawingFile* pFile)
|
||||
{
|
||||
return pFile->GetInfo();
|
||||
}
|
||||
WASM_EXPORT BYTE* GetPixmap(CDrawingFile* pFile, int nPageIndex, int nRasterW, int nRasterH, int nBackgroundColor)
|
||||
{
|
||||
return pFile->GetPixmap(nPageIndex, nRasterW, nRasterH, nBackgroundColor);
|
||||
}
|
||||
WASM_EXPORT BYTE* GetGlyphs(CDrawingFile* pFile, int nPageIndex)
|
||||
{
|
||||
return pFile->GetGlyphs(nPageIndex);
|
||||
}
|
||||
WASM_EXPORT BYTE* GetLinks(CDrawingFile* pFile, int nPageIndex)
|
||||
{
|
||||
return pFile->GetLinks(nPageIndex);
|
||||
}
|
||||
WASM_EXPORT BYTE* GetStructure(CDrawingFile* pFile)
|
||||
{
|
||||
return pFile->GetStructure();
|
||||
}
|
||||
WASM_EXPORT BYTE* GetInteractiveFormsInfo(CDrawingFile* pFile)
|
||||
{
|
||||
return pFile->GetInteractiveFormsInfo();
|
||||
}
|
||||
WASM_EXPORT BYTE* GetInteractiveFormsFonts(CDrawingFile* pFile, int nType)
|
||||
{
|
||||
return pFile->GetInteractiveFormsFonts(nType);
|
||||
}
|
||||
WASM_EXPORT BYTE* GetInteractiveFormsAP(CDrawingFile* pFile, int nRasterW, int nRasterH, int nBackgroundColor, int nPageIndex, int nWidget, int nView, int nButtonView)
|
||||
{
|
||||
return pFile->GetInteractiveFormsAP(nRasterW, nRasterH, nBackgroundColor, nPageIndex, nWidget, nView, nButtonView);
|
||||
}
|
||||
WASM_EXPORT BYTE* GetButtonIcons(CDrawingFile* pFile, int nBackgroundColor, int nPageIndex, int bBase64, int nButtonWidget, int nIconView)
|
||||
{
|
||||
return pFile->GetButtonIcons(nBackgroundColor, nPageIndex, bBase64 ? true : false, nButtonWidget, nIconView);
|
||||
}
|
||||
WASM_EXPORT BYTE* GetAnnotationsInfo(CDrawingFile* pFile, int nPageIndex)
|
||||
{
|
||||
return pFile->GetAnnotationsInfo(nPageIndex);
|
||||
}
|
||||
WASM_EXPORT BYTE* GetAnnotationsAP(CDrawingFile* pFile, int nRasterW, int nRasterH, int nBackgroundColor, int nPageIndex, int nAnnot, int nView)
|
||||
{
|
||||
return pFile->GetAnnotationsAP(nRasterW, nRasterH, nBackgroundColor, nPageIndex, nAnnot, nView);
|
||||
}
|
||||
WASM_EXPORT BYTE* GetFontBinary(CDrawingFile* pFile, char* path)
|
||||
{
|
||||
return pFile->GetFontBinary(std::string(path));
|
||||
}
|
||||
WASM_EXPORT BYTE* GetGIDByUnicode(CDrawingFile* pFile, char* path)
|
||||
{
|
||||
return pFile->GetGIDByUnicode(std::string(path));
|
||||
}
|
||||
WASM_EXPORT void DestroyTextInfo(CDrawingFile* pFile)
|
||||
{
|
||||
return pFile->DestroyTextInfo();
|
||||
}
|
||||
WASM_EXPORT int IsNeedCMap(CDrawingFile* pFile)
|
||||
{
|
||||
return pFile->IsNeedCMap() ? 1 : 0;
|
||||
}
|
||||
WASM_EXPORT void SetCMapData(CDrawingFile* pFile, BYTE* data, int size)
|
||||
{
|
||||
pFile->SetCMapData(data, size);
|
||||
}
|
||||
WASM_EXPORT void SetScanPageFonts(CDrawingFile* pFile, int nPageIndex)
|
||||
{
|
||||
return pFile->SetScanPageFonts(nPageIndex);
|
||||
}
|
||||
WASM_EXPORT BYTE* ScanPage(CDrawingFile* pFile, int nPageIndex, int mode)
|
||||
{
|
||||
return pFile->ScanPage(nPageIndex, mode);
|
||||
}
|
||||
WASM_EXPORT BYTE* SplitPages(CDrawingFile* pFile, int* arrPageIndex, int nLength, BYTE* data, LONG size)
|
||||
{
|
||||
return pFile->SplitPages(arrPageIndex, nLength, data, size);
|
||||
}
|
||||
WASM_EXPORT int MergePages(CDrawingFile* pFile, BYTE* data, LONG size, int nMaxID, const char* sPrefixForm)
|
||||
{
|
||||
return pFile->MergePages(data, size, nMaxID, sPrefixForm) ? 1 : 0;
|
||||
}
|
||||
WASM_EXPORT int UnmergePages(CDrawingFile* pFile)
|
||||
{
|
||||
return pFile->UnmergePages() ? 1 : 0;
|
||||
}
|
||||
WASM_EXPORT int RedactPage(CDrawingFile* pFile, int nPageIndex, int* arrRedactBox, int nLengthX8, BYTE* data, int size)
|
||||
{
|
||||
double* arrDRedactBox = new double[nLengthX8 * 8];
|
||||
for (int i = 0; i < nLengthX8 * 8; ++i)
|
||||
arrDRedactBox[i] = arrRedactBox[i] / 10000.0;
|
||||
int nRes = pFile->RedactPage(nPageIndex, arrDRedactBox, nLengthX8, data, size) ? 1 : 0;
|
||||
delete[] arrDRedactBox;
|
||||
return nRes;
|
||||
}
|
||||
WASM_EXPORT int UndoRedact(CDrawingFile* pFile)
|
||||
{
|
||||
return pFile->UndoRedact() ? 1 : 0;
|
||||
}
|
||||
WASM_EXPORT int CheckOwnerPassword(CDrawingFile* pFile, const char* password)
|
||||
{
|
||||
std::wstring sPassword = L"";
|
||||
if (NULL != password)
|
||||
sPassword = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)password, strlen(password));
|
||||
return pFile->CheckOwnerPassword(password ? sPassword.c_str() : NULL) ? 1 : 0;
|
||||
}
|
||||
WASM_EXPORT int CheckPerm(CDrawingFile* pFile, int nPermFlag)
|
||||
{
|
||||
return pFile->CheckPerm(nPermFlag) ? 1 : 0;
|
||||
}
|
||||
|
||||
WASM_EXPORT void* GetImageBase64(CDrawingFile* pFile, int rId)
|
||||
{
|
||||
return pFile->GetImageBase64(rId);
|
||||
}
|
||||
WASM_EXPORT int GetImageBase64Len(std::string* p)
|
||||
{
|
||||
return (int)p->length();
|
||||
}
|
||||
WASM_EXPORT char* GetImageBase64Ptr(std::string* p)
|
||||
{
|
||||
return (char*)p->c_str();
|
||||
}
|
||||
WASM_EXPORT void GetImageBase64Free(std::string* p)
|
||||
{
|
||||
*p = "";
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,6 +0,0 @@
|
||||
#include "./wasm_jmp.h"
|
||||
|
||||
void ft_longjmp_ex(void* env, int val)
|
||||
{
|
||||
throw val;
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
#ifndef WASM_LONG_JMP_H_
|
||||
#define WASM_LONG_JMP_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void ft_longjmp_ex(void* env, int val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* WASM_LONG_JMP_H_ */
|
||||
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation, together with the
|
||||
* additional terms provided in the LICENSE file.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at info@onlyoffice.com
|
||||
* or by postal mail at 20A-6 Ernesta Birznieka-Upisha Street, Riga,
|
||||
* LV-1050, Latvia, European Union.
|
||||
*
|
||||
* The interactive user interfaces in modified versions of the Program
|
||||
* are required to display Appropriate Legal Notices in accordance with
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* No trademark rights are granted under this License.
|
||||
*
|
||||
* All non-code elements of the Product, including illustrations,
|
||||
* icon sets, and technical writing content, are licensed under the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International License:
|
||||
* https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
* This license applies only to such non-code elements and does not
|
||||
* modify or replace the licensing terms applicable to the Program's
|
||||
* source code, which remains licensed under the GNU Affero General
|
||||
* Public License v3.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
#include "../../../Image.h"
|
||||
|
||||
namespace MetaFile
|
||||
{
|
||||
class CMetaFile : public IMetaFile
|
||||
{
|
||||
public:
|
||||
CMetaFile(NSFonts::IApplicationFonts *pAppFonts) : IMetaFile(pAppFonts) {}
|
||||
virtual ~CMetaFile() {}
|
||||
|
||||
virtual void SetImageSize(int nWidth, int nHeight) {}
|
||||
virtual bool LoadFromFile(const wchar_t* wsFilePath) { return false; }
|
||||
virtual bool LoadFromBuffer(BYTE* pBuffer, unsigned int unSize) { return false; }
|
||||
virtual bool LoadFromString(const std::wstring& data) { return false; }
|
||||
virtual bool DrawOnRenderer(IRenderer* pRenderer, double dX, double dY, double dWidth, double dHeight) { return false; }
|
||||
virtual void Close() {}
|
||||
virtual void GetBounds(double* pdX, double* pdY, double* pdW, double* pdH) {}
|
||||
virtual int GetType() { return 0; }
|
||||
virtual void ConvertToRaster(const wchar_t* wsOutFilePath, unsigned int unFileType, int nWidth, int nHeight = -1) {}
|
||||
virtual NSFonts::IFontManager* get_FontManager() { return NULL; }
|
||||
|
||||
virtual std::wstring ConvertToSvg(unsigned int unWidth = 0, unsigned int unHeight = 0) { return L""; }
|
||||
virtual void SetTempDirectory(const std::wstring& dir) {}
|
||||
|
||||
virtual void ConvertToXml(const wchar_t* wsFilePath) {}
|
||||
virtual void ConvertToXmlAndRaster(const wchar_t *wsXmlFilePath, const wchar_t* wsOutFilePath, unsigned int unFileType, int nWidth, int nHeight = -1) {}
|
||||
|
||||
virtual bool LoadFromXmlFile(const wchar_t* wsFilePath) { return false; }
|
||||
virtual void ConvertToEmf(const wchar_t *wsFilePath) {}
|
||||
};
|
||||
|
||||
IMetaFile* Create(NSFonts::IApplicationFonts *pAppFonts)
|
||||
{
|
||||
return new CMetaFile(pAppFonts);
|
||||
}
|
||||
}
|
||||
@ -1,184 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation, together with the
|
||||
* additional terms provided in the LICENSE file.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at info@onlyoffice.com
|
||||
* or by postal mail at 20A-6 Ernesta Birznieka-Upisha Street, Riga,
|
||||
* LV-1050, Latvia, European Union.
|
||||
*
|
||||
* The interactive user interfaces in modified versions of the Program
|
||||
* are required to display Appropriate Legal Notices in accordance with
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* No trademark rights are granted under this License.
|
||||
*
|
||||
* All non-code elements of the Product, including illustrations,
|
||||
* icon sets, and technical writing content, are licensed under the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International License:
|
||||
* https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
* This license applies only to such non-code elements and does not
|
||||
* modify or replace the licensing terms applicable to the Program's
|
||||
* source code, which remains licensed under the GNU Affero General
|
||||
* Public License v3.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
#include "../../../../../../PdfFile/PdfWriter.h"
|
||||
|
||||
#ifdef BUILDING_WASM_MODULE
|
||||
CPdfWriter::CPdfWriter(NSFonts::IApplicationFonts* pAppFonts, bool isPDFA, IRenderer* pRenderer, bool bCreate) : m_oCommandManager(this) {}
|
||||
CPdfWriter::~CPdfWriter() {}
|
||||
int CPdfWriter::SaveToFile(const std::wstring& wsPath) { return 0; }
|
||||
void CPdfWriter::SetPassword(const std::wstring& wsPassword) {}
|
||||
void CPdfWriter::SetDocumentID(const std::wstring& wsDocumentID) {}
|
||||
void CPdfWriter::SetDocumentInfo(const std::wstring& wsTitle, const std::wstring& wsCreator, const std::wstring& wsSubject, const std::wstring& wsKeywords) {}
|
||||
HRESULT CPdfWriter::NewPage() { return 0; }
|
||||
HRESULT CPdfWriter::get_Height(double* dHeight) { return 0; }
|
||||
HRESULT CPdfWriter::put_Height(const double& dHeight) { return 0; }
|
||||
HRESULT CPdfWriter::get_Width(double* dWidth) { return 0; }
|
||||
HRESULT CPdfWriter::put_Width(const double& dWidth) { return 0; }
|
||||
HRESULT CPdfWriter::get_PenColor(LONG* lColor) { return 0; }
|
||||
HRESULT CPdfWriter::put_PenColor(const LONG& lColor) { return 0; }
|
||||
HRESULT CPdfWriter::get_PenAlpha(LONG* lAlpha) { return 0; }
|
||||
HRESULT CPdfWriter::put_PenAlpha(const LONG& lAlpha) { return 0; }
|
||||
HRESULT CPdfWriter::get_PenSize(double* dSize) { return 0; }
|
||||
HRESULT CPdfWriter::put_PenSize(const double& dSize) { return 0; }
|
||||
HRESULT CPdfWriter::get_PenDashStyle(BYTE* nDashStyle) { return 0; }
|
||||
HRESULT CPdfWriter::put_PenDashStyle(const BYTE& nDashStyle) { return 0; }
|
||||
HRESULT CPdfWriter::get_PenLineStartCap(BYTE* nCapStyle) { return 0; }
|
||||
HRESULT CPdfWriter::put_PenLineStartCap(const BYTE& nCapStyle) { return 0; }
|
||||
HRESULT CPdfWriter::get_PenLineEndCap(BYTE* nCapStyle) { return 0; }
|
||||
HRESULT CPdfWriter::put_PenLineEndCap(const BYTE& nCapStyle) { return 0; }
|
||||
HRESULT CPdfWriter::get_PenLineJoin(BYTE* nJoinStyle) { return 0; }
|
||||
HRESULT CPdfWriter::put_PenLineJoin(const BYTE& nJoinStyle) { return 0; }
|
||||
HRESULT CPdfWriter::get_PenDashOffset(double* dOffset) { return 0; }
|
||||
HRESULT CPdfWriter::put_PenDashOffset(const double& dOffset) { return 0; }
|
||||
HRESULT CPdfWriter::get_PenAlign(LONG* lAlign) { return 0; }
|
||||
HRESULT CPdfWriter::put_PenAlign(const LONG& lAlign) { return 0; }
|
||||
HRESULT CPdfWriter::get_PenMiterLimit(double* dMiter) { return 0; }
|
||||
HRESULT CPdfWriter::put_PenMiterLimit(const double& dMiter) { return 0; }
|
||||
HRESULT CPdfWriter::PenDashPattern(double* pPattern, LONG lCount) { return 0; }
|
||||
HRESULT CPdfWriter::get_BrushType(LONG* lType) { return 0; }
|
||||
HRESULT CPdfWriter::put_BrushType(const LONG& lType) { return 0; }
|
||||
HRESULT CPdfWriter::get_BrushColor1(LONG* lColor) { return 0; }
|
||||
HRESULT CPdfWriter::put_BrushColor1(const LONG& lColor) { return 0; }
|
||||
HRESULT CPdfWriter::get_BrushAlpha1(LONG* lAlpha) { return 0; }
|
||||
HRESULT CPdfWriter::put_BrushAlpha1(const LONG& lAlpha) { return 0; }
|
||||
HRESULT CPdfWriter::get_BrushColor2(LONG* lColor) { return 0; }
|
||||
HRESULT CPdfWriter::put_BrushColor2(const LONG& lColor) { return 0; }
|
||||
HRESULT CPdfWriter::get_BrushAlpha2(LONG* lAlpha) { return 0; }
|
||||
HRESULT CPdfWriter::put_BrushAlpha2(const LONG& lAlpha) { return 0; }
|
||||
HRESULT CPdfWriter::get_BrushTexturePath(std::wstring* wsPath) { return 0; }
|
||||
HRESULT CPdfWriter::put_BrushTexturePath(const std::wstring& wsPath) { return 0; }
|
||||
HRESULT CPdfWriter::get_BrushTextureMode(LONG* lMode) { return 0; }
|
||||
HRESULT CPdfWriter::put_BrushTextureMode(const LONG& lMode) { return 0; }
|
||||
HRESULT CPdfWriter::get_BrushTextureAlpha(LONG* lAlpha) { return 0; }
|
||||
HRESULT CPdfWriter::put_BrushTextureAlpha(const LONG& lAlpha) { return 0; }
|
||||
HRESULT CPdfWriter::get_BrushLinearAngle(double* dAngle) { return 0; }
|
||||
HRESULT CPdfWriter::put_BrushLinearAngle(const double& dAngle) { return 0; }
|
||||
HRESULT CPdfWriter::BrushRect(const INT& nVal, const double& dLeft, const double& dTop, const double& dWidth, const double& dHeight) { return 0; }
|
||||
HRESULT CPdfWriter::put_BrushGradientColors(LONG* pColors, double* pPositions, LONG lCount) { return 0; }
|
||||
HRESULT CPdfWriter::get_BrushTextureImage(Aggplus::CImage** pImage) { return 0; }
|
||||
HRESULT CPdfWriter::put_BrushTextureImage(Aggplus::CImage* pImage) { return 0; }
|
||||
HRESULT CPdfWriter::get_BrushTransform(Aggplus::CMatrix& oMatrix) { return 0; }
|
||||
HRESULT CPdfWriter::put_BrushTransform(const Aggplus::CMatrix& oMatrix) { return 0; }
|
||||
HRESULT CPdfWriter::get_FontName(std::wstring* wsName) { return 0; }
|
||||
HRESULT CPdfWriter::put_FontName(const std::wstring& wsName) { return 0; }
|
||||
HRESULT CPdfWriter::get_FontPath(std::wstring* wsPath) { return 0; }
|
||||
HRESULT CPdfWriter::put_FontPath(const std::wstring& wsPath) { return 0; }
|
||||
HRESULT CPdfWriter::get_FontSize(double* dSize) { return 0; }
|
||||
HRESULT CPdfWriter::put_FontSize(const double& dSize) { return 0; }
|
||||
HRESULT CPdfWriter::get_FontStyle(LONG* lStyle) { return 0; }
|
||||
HRESULT CPdfWriter::put_FontStyle(const LONG& lStyle) { return 0; }
|
||||
HRESULT CPdfWriter::get_FontStringGID(INT* bGid) { return 0; }
|
||||
HRESULT CPdfWriter::put_FontStringGID(const INT& bGid) { return 0; }
|
||||
HRESULT CPdfWriter::get_FontCharSpace(double* dSpace) { return 0; }
|
||||
HRESULT CPdfWriter::put_FontCharSpace(const double& dSpace) { return 0; }
|
||||
HRESULT CPdfWriter::get_FontFaceIndex(int* lFaceIndex) { return 0; }
|
||||
HRESULT CPdfWriter::put_FontFaceIndex(const int& lFaceIndex) { return 0; }
|
||||
HRESULT CPdfWriter::CommandDrawTextCHAR (const LONG& lUnicode, const double& dX, const double& dY, const double& dW, const double& dH) { return 0; }
|
||||
HRESULT CPdfWriter::CommandDrawTextExCHAR(const LONG& lUnicode, const LONG& lGid, const double& dX, const double& dY, const double& dW, const double& dH) { return 0; }
|
||||
HRESULT CPdfWriter::CommandDrawText (const std::wstring& wsUnicodeText, const double& dX, const double& dY, const double& dW, const double& dH) { return 0; }
|
||||
HRESULT CPdfWriter::CommandDrawTextEx (const std::wstring& wsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& dX, const double& dY, const double& dW, const double& dH) { return 0; }
|
||||
HRESULT CPdfWriter::CommandDrawTextCHAR2 (unsigned int* unUnicode, const unsigned int& unUnicodeCount, const unsigned int& unGid, const double& dX, const double& dY, const double& dW, const double& dH) { return 0; }
|
||||
HRESULT CPdfWriter::EndCommand(const DWORD& lType) { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandMoveTo(const double& dX, const double& dY) { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandLineTo(const double& dX, const double& dY) { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandLinesTo(double* pPoints, const int& nCount) { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandCurveTo(const double& dX1, const double& dY1, const double& dX2, const double& dY2, const double& dXe, const double& dYe) { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandCurvesTo(double* pPoints, const int& nCount) { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandArcTo(const double& dX, const double& dY, const double& dW, const double& dH, const double& dStartAngle, const double& dSweepAngle) { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandClose() { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandEnd() { return 0; }
|
||||
HRESULT CPdfWriter::DrawPath(NSFonts::IApplicationFonts* pAppFonts, const std::wstring& wsTempDirectory, const LONG& lType) { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandStart() { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandGetCurrentPoint(double* dX, double* dY) { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandTextCHAR (const LONG& lUnicode, const double& dX, const double& dY, const double& dW, const double& dH) { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandTextExCHAR(const LONG& lUnicode, const LONG& lGid, const double& dX, const double& dY, const double& dW, const double& dH) { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandText (const std::wstring& wsUnicodeText, const double& dX, const double& dY, const double& dW, const double& dH) { return 0; }
|
||||
HRESULT CPdfWriter::PathCommandTextEx (const std::wstring& wsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& dX, const double& dY, const double& dW, const double& dH) { return 0; }
|
||||
HRESULT CPdfWriter::DrawImage(IGrObject* pImage, const double& dX, const double& dY, const double& dW, const double& dH) { return 0; }
|
||||
HRESULT CPdfWriter::DrawImageFromFile(NSFonts::IApplicationFonts* pAppFonts, const std::wstring& wsTempDirectory, const std::wstring& wsImagePath, const double& dX, const double& dY, const double& dW, const double& dH, const BYTE& nAlpha) { return 0; }
|
||||
HRESULT CPdfWriter::SetTransform(const double& dM11, const double& dM12, const double& dM21, const double& dM22, const double& dX, const double& dY) { return 0; }
|
||||
HRESULT CPdfWriter::GetTransform(double* dM11, double* dM12, double* dM21, double* dM22, double* dX, double* dY) { return 0; }
|
||||
HRESULT CPdfWriter::ResetTransform() { return 0; }
|
||||
HRESULT CPdfWriter::get_ClipMode(LONG* lMode) { return 0; }
|
||||
HRESULT CPdfWriter::put_ClipMode(const LONG& lMode) { return 0; }
|
||||
HRESULT CPdfWriter::AddHyperlink(const double& dX, const double& dY, const double& dW, const double& dH, const std::wstring& wsUrl, const std::wstring& wsTooltip) { return 0; }
|
||||
HRESULT CPdfWriter::AddLink(const double& dX, const double& dY, const double& dW, const double& dH, const double& dDestX, const double& dDestY, const int& nPage) { return 0; }
|
||||
HRESULT CPdfWriter::AddFormField(NSFonts::IApplicationFonts* pAppFonts, CFormFieldInfo* pInfo, const std::wstring& wsTempDirectory) { return 0; }
|
||||
HRESULT CPdfWriter::AddAnnotField(NSFonts::IApplicationFonts* pAppFonts, CAnnotFieldInfo* pFieldInfo) { return 0; }
|
||||
HRESULT CPdfWriter::AddMetaData(const std::wstring& sMetaName, BYTE* pMetaData, DWORD nMetaLength) { return 0; }
|
||||
HRESULT CPdfWriter::DrawImage1bpp(NSImages::CPixJbig2* pImageBuffer, const unsigned int& unWidth, const unsigned int& unHeight, const double& dX, const double& dY, const double& dW, const double& dH) { return 0; }
|
||||
HRESULT CPdfWriter::EnableBrushRect(const LONG& lEnable) { return 0; }
|
||||
HRESULT CPdfWriter::SetLinearGradient(const double& dX1, const double& dY1, const double& dX2, const double& dY2) { return 0; }
|
||||
HRESULT CPdfWriter::SetRadialGradient(const double& dX1, const double& dY1, const double& dR1, const double& dX2, const double& dY2, const double& dR2) { return 0; }
|
||||
HRESULT CPdfWriter::DrawImageWith1bppMask(IGrObject* pImage, NSImages::CPixJbig2* pMaskBuffer, const unsigned int& unMaskWidth, const unsigned int& unMaskHeight, const double& dX, const double& dY, const double& dW, const double& dH) { return 0; }
|
||||
bool CPdfWriter::EditPage(PdfWriter::CPage* pNewPage) { return false; }
|
||||
bool CPdfWriter::AddPage(int nPageIndex) { return false; }
|
||||
bool CPdfWriter::EditClose() { return false; }
|
||||
void CPdfWriter::PageRotate(int nRotate) {}
|
||||
void CPdfWriter::Sign(const double& dX, const double& dY, const double& dW, const double& dH, const std::wstring& wsPicturePath, ICertificate* pCertificate) {}
|
||||
HRESULT CPdfWriter::EditWidgetParents(NSFonts::IApplicationFonts* pAppFonts, CWidgetsInfo* pFieldInfo, const std::wstring& wsTempDirectory) { return 0; }
|
||||
PdfWriter::CDocument* CPdfWriter::GetDocument() { return NULL; }
|
||||
PdfWriter::CPage* CPdfWriter::GetPage() { return NULL; }
|
||||
void CPdfWriter::AddFont(const std::wstring& wsFontName, const bool& bBold, const bool& bItalic, const std::wstring& wsFontPath, const LONG& lFaceIndex) {}
|
||||
void CPdfWriter::SetHeadings(CHeadings* pCommand) {}
|
||||
PdfWriter::CImageDict* CPdfWriter::LoadImage(Aggplus::CImage* pImage, BYTE nAlpha) { return NULL; }
|
||||
PdfWriter::CImageDict* CPdfWriter::DrawImage(Aggplus::CImage* pImage, const double& dX, const double& dY, const double& dW, const double& dH, const BYTE& nAlpha) { return NULL; }
|
||||
bool CPdfWriter::DrawText(unsigned char* pCodes, const unsigned int& unLen, const double& dX, const double& dY, const std::string& sPUA) { return false; }
|
||||
bool CPdfWriter::DrawTextToRenderer(const unsigned int* unGid, const unsigned int& unLen, const double& dX, const double& dY) { return false; }
|
||||
bool CPdfWriter::PathCommandDrawText(unsigned int* pUnicodes, unsigned int unLen, const double& dX, const double& dY, const unsigned int* pGids) { return false; }
|
||||
bool CPdfWriter::UpdateFont() { return false; }
|
||||
bool CPdfWriter::GetFontPath(const std::wstring& wsFontName, const bool& bBold, const bool& bItalic, std::wstring& wsFontPath, LONG& lFaceIndex) { return false; }
|
||||
PdfWriter::CFontCidTrueType* CPdfWriter::GetFont(const std::wstring& wsFontPath, const LONG& lFontIndex) { return NULL; }
|
||||
PdfWriter::CFontCidTrueType* CPdfWriter::GetFont(const std::wstring& wsFontName, const bool& bBold, const bool& bItalic) { return NULL; }
|
||||
void CPdfWriter::UpdateTransform() {}
|
||||
void CPdfWriter::UpdatePen() {}
|
||||
void CPdfWriter::UpdateBrush(NSFonts::IApplicationFonts* pAppFonts, const std::wstring& wsTempDirectory) {}
|
||||
void CPdfWriter::Reset() {}
|
||||
bool CPdfWriter::IsValid() { return false; }
|
||||
bool CPdfWriter::IsPageValid() { return false; }
|
||||
void CPdfWriter::SetError() {}
|
||||
void CPdfWriter::AddLink(PdfWriter::CPage* pPage, const double& dX, const double& dY, const double& dW, const double& dH, const double& dDestX, const double& dDestY, const unsigned int& unDestPage) {}
|
||||
unsigned char* CPdfWriter::EncodeString(const unsigned int* pUnicodes, const unsigned int& unUnicodesCount, const unsigned int* pGIDs) { return NULL; }
|
||||
unsigned char* CPdfWriter::EncodeGID(const unsigned int& unGID, const unsigned int* pUnicodes, const unsigned int& unUnicodesCount) { return NULL; }
|
||||
std::wstring CPdfWriter::GetDownloadFile(const std::wstring& sUrl, const std::wstring& wsTempDirectory) { return std::wstring(); }
|
||||
|
||||
CCommandManager::CCommandManager(CPdfWriter* pRenderer) {}
|
||||
CCommandManager::~CCommandManager() {}
|
||||
CRendererTextCommand* CCommandManager::AddText(unsigned char* pCodes, unsigned int nLen, const double& dX, const double& dY) { return NULL; }
|
||||
void CCommandManager::Flush() {}
|
||||
void CCommandManager::Add(CRendererCommandBase* pCommand) {}
|
||||
void CCommandManager::Clear() {}
|
||||
void CBrushState::Reset() {}
|
||||
#endif // BUILDING_WASM_MODULE
|
||||
@ -1,70 +0,0 @@
|
||||
#include "raster.h"
|
||||
|
||||
void* Raster_Malloc(unsigned int size)
|
||||
{
|
||||
return ::malloc(size);
|
||||
}
|
||||
void Raster_Free(void* p)
|
||||
{
|
||||
if (p) ::free(p);
|
||||
}
|
||||
CBgraFrame* Raster_Create()
|
||||
{
|
||||
return new CBgraFrame();
|
||||
}
|
||||
CBgraFrame* Raster_Load(unsigned char* buffer, int size)
|
||||
{
|
||||
CBgraFrame* oRes = new CBgraFrame();
|
||||
oRes->put_IsRGBA(true);
|
||||
oRes->Decode(buffer, size);
|
||||
return oRes;
|
||||
}
|
||||
CBgraFrame* Raster_Init(double width_px, double height_px)
|
||||
{
|
||||
int nRasterW = (int)width_px;
|
||||
int nRasterH = (int)height_px;
|
||||
BYTE* pData = new BYTE[4 * nRasterW * nRasterH];
|
||||
|
||||
unsigned int back = 0xffffff;
|
||||
unsigned int* pData32 = (unsigned int*)pData;
|
||||
unsigned int* pData32End = pData32 + nRasterW * nRasterH;
|
||||
while (pData32 < pData32End)
|
||||
*pData32++ = back;
|
||||
|
||||
CBgraFrame* oRes = new CBgraFrame();
|
||||
oRes->put_IsRGBA(true);
|
||||
oRes->put_Data(pData);
|
||||
oRes->put_Width(nRasterW);
|
||||
oRes->put_Height(nRasterH);
|
||||
return oRes;
|
||||
}
|
||||
void Raster_Destroy(CBgraFrame* p)
|
||||
{
|
||||
if (p) delete p;
|
||||
}
|
||||
int Raster_GetHeight(CBgraFrame* p)
|
||||
{
|
||||
if (p) return p->get_Height();
|
||||
return -1;
|
||||
}
|
||||
int Raster_GetWidth (CBgraFrame* p)
|
||||
{
|
||||
if (p) return p->get_Width();
|
||||
return -1;
|
||||
}
|
||||
bool Raster_Decode(CBgraFrame* p, unsigned char* buffer, int size)
|
||||
{
|
||||
if (p)
|
||||
{
|
||||
p->put_IsRGBA(true);
|
||||
bool bRes = p->Decode(buffer, size);
|
||||
return bRes;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
unsigned char* Raster_GetRGBA(CBgraFrame* p)
|
||||
{
|
||||
unsigned char* buffer = NULL;
|
||||
if (p) buffer = p->get_Data();
|
||||
return buffer;
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
#ifndef _RASTER_H
|
||||
#define _RASTER_H
|
||||
|
||||
#ifndef RASTER_USE_DYNAMIC_LIBRARY
|
||||
#define RASTER_DECL_EXPORT
|
||||
#else
|
||||
#include "../../../../../common/base_export.h"
|
||||
#define RASTER_DECL_EXPORT Q_DECL_EXPORT
|
||||
#endif
|
||||
|
||||
#include <malloc.h>
|
||||
#include "../../../../../raster/BgraFrame.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
RASTER_DECL_EXPORT void* Raster_Malloc(unsigned int size);
|
||||
RASTER_DECL_EXPORT void Raster_Free(void* p);
|
||||
|
||||
RASTER_DECL_EXPORT CBgraFrame* Raster_Create();
|
||||
RASTER_DECL_EXPORT CBgraFrame* Raster_Load(unsigned char* buffer, int size);
|
||||
RASTER_DECL_EXPORT CBgraFrame* Raster_Init(double width_px, double height_px);
|
||||
RASTER_DECL_EXPORT void Raster_Destroy(CBgraFrame* p);
|
||||
|
||||
RASTER_DECL_EXPORT int Raster_GetHeight(CBgraFrame* p);
|
||||
RASTER_DECL_EXPORT int Raster_GetWidth (CBgraFrame* p);
|
||||
|
||||
RASTER_DECL_EXPORT bool Raster_Decode(CBgraFrame* p, unsigned char* buffer, int size);
|
||||
RASTER_DECL_EXPORT unsigned char* Raster_GetRGBA(CBgraFrame* p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _RASTER_H
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
namespace AVSOfficeOCRTest
|
||||
namespace AVSOfficeOCRTest
|
||||
{
|
||||
partial class MainForm
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
namespace AVSOfficeOCRTest
|
||||
namespace AVSOfficeOCRTest
|
||||
{
|
||||
partial class OCRView
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3603
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3603
|
||||
|
||||
4
Test/Applications/Base64/Form1.Designer.cs
generated
4
Test/Applications/Base64/Form1.Designer.cs
generated
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
namespace WindowsFormsApplication1
|
||||
namespace WindowsFormsApplication1
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.5456
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.5456
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
namespace FontEngineTester
|
||||
namespace FontEngineTester
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) Ascensio System SIA, 2009-2026
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -32,7 +32,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user