Merge branch 'staging' into soon

This commit is contained in:
ansuz 2022-01-05 13:56:28 +05:30
commit 0a302573b7
21119 changed files with 432713 additions and 287 deletions

View file

@ -6,6 +6,7 @@ www/common/onlyoffice/x2t
www/common/onlyoffice/v1
www/common/onlyoffice/v2*
www/common/onlyoffice/v4
www/common/onlyoffice/v5
server.js
www/scratch

View file

@ -1,3 +1,59 @@
# 4.13.0
## Goals
For this release we set aside time to update a number of our software dependencies and to investigate a variety of bugs that had been reported in support tickets.
## Update notes
To update from 4.12.0 or 4.12.1 to 4.13.0:
1. Stop your server
2. Get the latest code with git
3. Install the latest dependencies with `bower update` and `npm i`
4. Restart your server
5. Confirm that your instance is passing all the tests included on the `/checkup/` page (on whatever devices you intend to support)
## Features
* This release updates OnlyOffice to v6.4.2, which includes a wide variety of improvements and bug fixes, such as:
* dark mode
* conditional formatting in sheets
* fixes for various font and scaling issues
* numerous other issues mentioned in [OnlyOffice's changelog](https://github.com/ONLYOFFICE/DocumentServer/blob/master/CHANGELOG.md#642)
* We switched from using our fork of Fabricjs back to the latest version of the upstream branch, since the maintainers had resolved the cause of an incompatibility with our strict _Content Security Policy_ settings. Among other things, this brought improved support for a variety of pressure-sensitive drawing tablets when using our whiteboard app.
* Mermaidjs (https://mermaid-js.github.io/mermaid/#/) has been updated to the latest version (8.13.8) which:
* includes fixes a number of possible security flaws which should not have had any effect due to our CSP settings
* introduces support for several new diagram types (entity relationship, requirement diagrams, user journeys)
* adds support for dark mode and more modern styles
* We've begun to experiment with additional iframe sandboxing features to further isolate common platform features (sharing, access controls, media transclusion, upload) from the apps that can trigger their display. These measures should be mostly redundant on CryptPad instances with correctly configured sandboxes, but may help mitigate unexpected risks in other circumstances.
* A number of groups and individuals volunteered to help translate CryptPad into more languages or complete translations of languages that had fallen out of date. We are happy to say that CryptPad is now fully translated in Russian, Brazilian Portuguese, and Czech.
## Bug fixes
* Some code which was intended to prompt guests to log in or register when viewing a shared folder stopped working due to some changes in a past release. We now correctly identify when these guests have edit rights, and instead of simply displaying the text **READ ONLY** we prompt them with instructions on how to make full use of the rights they've been given.
* We fixed some border styles on the horizontal dividers that are sometimes shown in dropdown menus such that consecutive dividers beyond the first are hidden.
* One of our developer dependencies (`json-schema`) has been updated to fix a prototype pollution bug which should not have had any impact on anyone in practice.
* A user reported that including `__proto__` as the language in fenced code blocks in a markdown document triggered an error, so we now guard against this case.
* We've fixed a few issues related to templates:
* after creating a template in a team drive, clicking the store button would store it in your own drive
* the creation of a template from a password-protected sheet did not correctly use the source sheet's password
* Thanks to some user reports we discovered some possible type errors that could occur when migrating some account data to a newer internal version.
* We disabled some unmaintained client-side tests after discovering that they were throwing errors under certain conditions, seemingly due to some browser regressions.
* We updated some code to handle uploading dropped folders in the drive. Unfortunately this type of "drop" event has to be handled differently than when a folder is uploaded through other means, and Opera browser doesn't support the required APIs, so this is only supported in Firefox and Chromium-based browsers.
* When previewing uploaded media we now supply the file object rather than its raw buffer contents which were not supported for all media types.
* We've fixed numerous issues with forms:
* layout issues with buttons displayed in forms' author mode
* the configured options for certain types of questions are reprocessed when you convert between related question types (multi-checkbox, multi-radio) with options being set back to their defaults when configurations are rendered invalid
* editing status is recovered whenever possible if autosave interrupts user activity
* Finally, we've fixed a number of issues specific to our integration of OnlyOffice's editors:
* we now guard against some possible type errors if the metadata required for sharing cursor and selection data is absent or poorly formed
* we do our best to recover your old cursor position if the document needs to be reloaded after a checkpoint
* some special cases of image inclusion are now handled in the presentation editor
* we ensure that images are correctly loaded when exporting, including embedded media and theme backgrounds in presentations
* the chart and table buttons were temporarily disabled in OnlyOffice's toolbar due to some incompatibilities which have since been resolved
* we now avoid creating duplicated network handlers when reconnecting to an office editing session
# 4.12.1
This minor release contains a few bug fixes based on feedback we received and adjustments to prepare for the update to OnlyOffice 6.4.

View file

@ -554,7 +554,7 @@ define([
return;
}
if (testing) { return void proceed(result); }
//if (testing) { return void proceed(result); }
if (!(proxy.curvePrivate && proxy.curvePublic &&
proxy.edPrivate && proxy.edPublic)) {

View file

@ -105,7 +105,7 @@ define([
var imprintUrl = AppConfig.imprint && (typeof(AppConfig.imprint) === "boolean" ?
'/imprint.html' : AppConfig.imprint);
Pages.versionString = "v4.12.1";
Pages.versionString = "v4.13.0";
// used for the about menu

View file

@ -159,6 +159,8 @@
margin: 5px 0px;
height: 1px;
background: @cp_dropdown-bg-active;
border: 0 !important;
border-top: 1px solid rgba(0,0,0,.1) !important;
& + hr {
display: none;
}

View file

@ -132,6 +132,24 @@
g.legend text, text.pieTitleText {
fill: @cp_markdown-block-fg;
}
g.legend rect {
stroke: @cryptpad_text_col !important;
stroke-width: 1px;
}
.pieCircle {
stroke: @cryptpad_text_col;
}
text.slice {
fill: @cryptpad_text_col;
}
}
&[mermaid-source^="erDiagram"] {
rect.er:not(.relationshipLabelBox) {
fill: #ECECFF;
}
g text.er {
fill: #333;
}
}
}
pre.markmap {

16
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "cryptpad",
"version": "4.12.1",
"version": "4.13.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -1549,9 +1549,9 @@
"dev": true
},
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
"integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",
"dev": true,
"optional": true
},
@ -1578,15 +1578,15 @@
}
},
"jsprim": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
"integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
"dev": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.2.3",
"json-schema": "0.4.0",
"verror": "1.10.0"
}
},

View file

@ -1,7 +1,7 @@
{
"name": "cryptpad",
"description": "realtime collaborative visual editor with zero knowlege server",
"version": "4.12.1",
"version": "4.13.0",
"license": "AGPL-3.0+",
"repository": {
"type": "git",

View file

@ -31,6 +31,7 @@ var grep = function (pattern, cb) {
'www/common/onlyoffice/v1/*',
'www/common/onlyoffice/v2b*',
'www/common/onlyoffice/v4*',
'www/common/onlyoffice/v5*',
'www/common/onlyoffice/x2t/*',
//'www/common/onlyoffice/build/*',
'www/lib/*',

View file

@ -3,7 +3,7 @@ define([
'/bower_components/hyperjson/hyperjson.js',
'json.sortify',
'/drive/tests.js',
'/common/test.js',
//'/common/test.js',
'/common/common-hash.js',
'/common/common-util.js',
'/common/common-thumbnail.js',
@ -18,7 +18,7 @@ define([
'/bower_components/tweetnacl/nacl-fast.min.js',
'less!/customize/src/less2/pages/page-assert.less',
], function ($, Hyperjson, Sortify, Drive, Test, Hash, Util, Thumb, Wire, Flat, MediaTag, Block, ApiConfig, Assertions, h, Messages) {
], function ($, Hyperjson, Sortify, Drive, /*Test,*/ Hash, Util, Thumb, Wire, Flat, MediaTag, Block, ApiConfig, Assertions, h, Messages) {
window.Hyperjson = Hyperjson;
window.Sortify = Sortify;
var Nacl = window.nacl;
@ -526,11 +526,12 @@ define([
})),
]));
/*
if (failed) {
Test.failed();
} else {
Test.passed();
}
}*/
});
});

View file

@ -363,7 +363,7 @@ define([
});
});
var sheetURL = '/common/onlyoffice/v4/web-apps/apps/spreadsheeteditor/main/index.html';
var sheetURL = '/common/onlyoffice/v5/web-apps/apps/spreadsheeteditor/main/index.html';
assert(function (cb, msg) {
msg.innerText = "Missing HTTP headers required for .xlsx export from sheets. ";
@ -671,7 +671,7 @@ define([
});
assert(function (cb, msg) {
var url = '/common/onlyoffice/v4/web-apps/apps/spreadsheeteditor/main/index.html';
var url = '/common/onlyoffice/v5/web-apps/apps/spreadsheeteditor/main/index.html';
msg.appendChild(CSP_WARNING(url));
deferredPostMessage({
command: 'GET_HEADER',

File diff suppressed because one or more lines are too long

View file

@ -18,14 +18,14 @@ define([
'/lib/tippy/tippy.min.js',
'/common/hyperscript.js',
'/customize/loading.js',
'/common/test.js',
//'/common/test.js',
'/lib/jquery-ui/jquery-ui.min.js', // autocomplete widget
'/bower_components/bootstrap-tokenfield/dist/bootstrap-tokenfield.js',
'css!/lib/tippy/tippy.css',
'css!/lib/jquery-ui/jquery-ui.min.css'
], function ($, Messages, Util, Hash, Notifier, AppConfig,
Alertify, Tippy, h, Loading, Test) {
Alertify, Tippy, h, Loading/*, Test */) {
var UI = {};
/*
@ -994,7 +994,7 @@ define([
// Release the test blocker, hopefully every test has been registered.
// This test is created in sframe-boot2.js
cb = cb || function () {};
if (Test.__ASYNC_BLOCKER__) { Test.__ASYNC_BLOCKER__.pass(); }
//if (Test.__ASYNC_BLOCKER__) { Test.__ASYNC_BLOCKER__.pass(); }
var $loading = $('#' + LOADING);
$loading.addClass("cp-loading-hidden"); // Hide the loading screen

View file

@ -972,7 +972,7 @@ define([
data.teamId = common.initialTeam;
}
data.forceSave = 1;
delete common.initialTeam;
//delete common.initialTeam;
}
if (common.initialPath) {
if (!data.path) {

View file

@ -36,7 +36,6 @@ define([
init: function () {
require([
'mermaid',
'css!/code/mermaid-new.css'
], function (_Mermaid) {
console.debug("loaded mermaid");
if (Mermaid.__stubbed) {
@ -202,7 +201,7 @@ define([
renderer.code = function (code, language) {
if (!code || typeof(code) !== 'string' || !code.trim()) { return defaultCode.apply(renderer, arguments); }
if (language === 'mermaid' && code.match(/^(graph|pie|gantt|sequenceDiagram|classDiagram|gitGraph)/)) {
if (language === 'mermaid' && code.match(/^(flowchart|graph|pie|gantt|sequenceDiagram|classDiagram|gitGraph|stateDiagram|erDiagram|journey|requirementDiagram)/)) {
return '<pre class="mermaid" data-plugin="mermaid">'+Util.fixHTML(code)+'</pre>';
} else if (language === 'markmap') {
return '<pre class="markmap" data-plugin="markmap">'+Util.fixHTML(code)+'</pre>';

View file

@ -1158,10 +1158,12 @@ define([
return void previewMediaTag(data);
}
var obj = { t: APP.team };
var priv = metadataMgr.getPrivateData();
var useUnsafe = Util.find(priv, ['settings', 'security', 'unsafeLinks']);
if (useUnsafe === true || APP.newSharedFolder) {
return void window.open(APP.origin + href);
return void common.openURL(Hash.getNewPadURL(href, obj));
}
// Get hidden hash
@ -1170,7 +1172,7 @@ define([
if (isRo) { opts.view = true; }
var hash = Hash.getHiddenHashFromKeys(parsed.type, secret, opts);
var hiddenHref = Hash.hashToHref(hash, parsed.type);
window.open(APP.origin + hiddenHref);
common.openURL(Hash.getNewPadURL(hiddenHref, obj));
};
var openIn = function (type, path, team, fData) {
var obj = {
@ -1329,7 +1331,7 @@ define([
if (metadata.channel && metadata.channel.length < 48) {
hide.push('preview');
}
if (!metadata.channel || metadata.channel.length > 32 || metadata.rtChannel) {
if (!metadata.channel || metadata.channel.length > 32) {
hide.push('makeacopy'); // Not for blobs
}
} else if ($element.is('.cp-app-drive-element-sharedf')) {
@ -1855,6 +1857,108 @@ define([
APP.FM.onFileDrop(file, ev);
};
var traverseFileTree = function (item, path, w, files) {
path = path || "";
if (item.isFile) {
// Get file
item.file(w(function(file) {
file.fix_path = path + file.name;
files.push(file);
}));
} else if (item.isDirectory) {
// Get folder contents
var dirReader = item.createReader();
// this API is not supported in Opera or IE
// https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem/webkitGetAsEntry
// all other browsers will recurse over subfolders and upload everything
dirReader.readEntries(w(function(entries) {
for (var i=0; i<entries.length; i++) {
traverseFileTree(entries[i], path + item.name + "/", w, files);
}
}));
// FIXME readEntries takes a function (error handler) as an optional second argument
// what kind of errors can be thrown? what will happen?
}
};
// create the folder structure before to upload files from folder
var uploadFolder = function (fileList) {
var currentFolder = currentPath;
// create an array of all the files relative path
var files = Array.prototype.map.call(fileList, function (file) {
return {
file: file,
path: (file.webkitRelativePath || file.fix_path).split("/"),
};
});
// if folder name already exist in drive, rename it
var uploadedFolderName = files[0].path[0];
var availableName = manager.user.userObject.getAvailableName(manager.find(currentFolder), uploadedFolderName);
// ask for folder name and files options, then upload all the files!
APP.FM.showFolderUploadModal(availableName, function (folderUploadOptions) {
if (!folderUploadOptions) { return; }
// verfify folder name is possible, and update files path
availableName = manager.user.userObject.getAvailableName(manager.find(currentFolder), folderUploadOptions.folderName);
if (uploadedFolderName !== availableName) {
files.forEach(function (file) {
file.path[0] = availableName;
});
}
// uploadSteps is an array of objects {folders: [], files: []}, containing all the folders and files to create safely
// at the index i + 1, the files and folders are children of the folders at the index i
var maxSteps = files.reduce(function (max, file) { return Math.max(max, file.path.length); }, 0);
var uploadSteps = [];
for (var i = 0 ; i < maxSteps ; i++) {
uploadSteps[i] = {
folders: [],
files: [],
};
}
files.forEach(function (file) {
// add steps to create subfolders containing file
for (var depth = 0 ; depth < file.path.length - 1 ; depth++) {
var subfolderStr = file.path.slice(0, depth + 1).join("/");
if (uploadSteps[depth].folders.indexOf(subfolderStr) === -1) {
uploadSteps[depth].folders.push(subfolderStr);
}
}
// add step to upload file (one step later than the step of its direct parent folder)
uploadSteps[file.path.length - 1].files.push(file);
});
// add folders, then add files when theirs folders have been created
// wait for the folders to be created to go to the next step (don't wait for the files)
var stepByStep = function (uploadSteps, i) {
if (i >= uploadSteps.length) { return; }
nThen(function (waitFor) {
// add folders
uploadSteps[i].folders.forEach(function (folder) {
var folderPath = folder.split("/");
var parentFolder = currentFolder.concat(folderPath.slice(0, -1));
var folderName = folderPath.slice(-1);
manager.addFolder(parentFolder, folderName, waitFor(refresh));
});
// upload files
uploadSteps[i].files.forEach(function (file) {
var ev = {
target: $content[0],
path: currentFolder.concat(file.path.slice(0, -1)),
};
APP.FM.handleFile(file.file, ev, folderUploadOptions);
});
}).nThen(function () {
stepByStep(uploadSteps, i + 1);
});
};
stepByStep(uploadSteps, 0);
});
};
var onDrop = function (ev) {
ev.preventDefault();
$('.cp-app-drive-element-droppable').removeClass('cp-app-drive-element-droppable');
@ -1867,9 +1971,32 @@ define([
return void UI.warn(Messages.fm_forbidden);
}
// Don't use the normal drop handler for file upload
var fileDrop = ev.dataTransfer.files;
if (fileDrop.length) { return void onFileDrop(fileDrop, ev); }
var fileDrop = ev.dataTransfer.items;
if (fileDrop.length) {
// Filter out all the folders and use the correct function to upload them
fileDrop = Array.prototype.slice.call(fileDrop).map(function (file) {
if (file.kind !== "file") { return; }
var f = file.getAsFile();
if (!f.type && f.size % 4096 === 0) {
// It's a folder!
if (file.webkitGetAsEntry) { // IE and Opera don't support it
f = file.webkitGetAsEntry();
var files = [];
nThen(function (w) {
traverseFileTree(f, "", w, files);
}).nThen(function () {
uploadFolder(files);
});
return;
} else {
// Folder drop not supported by the browser
}
}
return f;
}).filter(Boolean);
// Continue only with the files
return void onFileDrop(fileDrop, ev);
}
var oldPaths = JSON.parse(data).path;
if (!oldPaths) { return; }
@ -2678,82 +2805,6 @@ define([
$input.click();
};
// create the folder structure before to upload files from folder
var uploadFolder = function (fileList) {
var currentFolder = currentPath;
// create an array of all the files relative path
var files = Array.prototype.map.call(fileList, function (file) {
return {
file: file,
path: file.webkitRelativePath.split("/"),
};
});
// if folder name already exist in drive, rename it
var uploadedFolderName = files[0].path[0];
var availableName = manager.user.userObject.getAvailableName(manager.find(currentFolder), uploadedFolderName);
// ask for folder name and files options, then upload all the files!
APP.FM.showFolderUploadModal(availableName, function (folderUploadOptions) {
if (!folderUploadOptions) { return; }
// verfify folder name is possible, and update files path
availableName = manager.user.userObject.getAvailableName(manager.find(currentFolder), folderUploadOptions.folderName);
if (uploadedFolderName !== availableName) {
files.forEach(function (file) {
file.path[0] = availableName;
});
}
// uploadSteps is an array of objects {folders: [], files: []}, containing all the folders and files to create safely
// at the index i + 1, the files and folders are children of the folders at the index i
var maxSteps = files.reduce(function (max, file) { return Math.max(max, file.path.length); }, 0);
var uploadSteps = [];
for (var i = 0 ; i < maxSteps ; i++) {
uploadSteps[i] = {
folders: [],
files: [],
};
}
files.forEach(function (file) {
// add steps to create subfolders containing file
for (var depth = 0 ; depth < file.path.length - 1 ; depth++) {
var subfolderStr = file.path.slice(0, depth + 1).join("/");
if (uploadSteps[depth].folders.indexOf(subfolderStr) === -1) {
uploadSteps[depth].folders.push(subfolderStr);
}
}
// add step to upload file (one step later than the step of its direct parent folder)
uploadSteps[file.path.length - 1].files.push(file);
});
// add folders, then add files when theirs folders have been created
// wait for the folders to be created to go to the next step (don't wait for the files)
var stepByStep = function (uploadSteps, i) {
if (i >= uploadSteps.length) { return; }
nThen(function (waitFor) {
// add folders
uploadSteps[i].folders.forEach(function (folder) {
var folderPath = folder.split("/");
var parentFolder = currentFolder.concat(folderPath.slice(0, -1));
var folderName = folderPath.slice(-1);
manager.addFolder(parentFolder, folderName, waitFor(refresh));
});
// upload files
uploadSteps[i].files.forEach(function (file) {
var ev = {
target: $content[0],
path: currentFolder.concat(file.path.slice(0, -1)),
};
APP.FM.handleFile(file.file, ev, folderUploadOptions);
});
}).nThen(function () {
stepByStep(uploadSteps, i + 1);
});
};
stepByStep(uploadSteps, 0);
});
};
var showUploadFolderModal = function () {
var $input = $('<input>', {
'type': 'file',
@ -3905,7 +3956,25 @@ define([
setEditable(true, false, true);
}
if (APP.readOnly) {
if (APP.readOnly && !APP.loggedIn) {
(function () {
// show 'READ-ONLY' when a guest only has view rights
if (/\/view\//.test(APP.anonSFHref)) {
// !common.getMetadataMgr().getPrivateData().canEdit
// would accomplish the same thing if this breaks
$content.prepend($readOnly.clone());
return;
}
// otherwise prompt them to log in or register to take advantage of their edit rights
var $banner = $(Pages.setHTML(h('div.cp-app-drive-content-info-box'), Messages.fm_info_sharedFolder));
$banner.find('[href="/login/"], [href="/register/"]').click(function (ev) {
ev.preventDefault();
var page = this.getAttribute('href').replace(/\//g, '');
common.setLoginRedirect(page);
});
$content.prepend($banner);
}());
} else if (APP.readOnly) {
// Read-only drive (team?)
$content.prepend($readOnly.clone());
} else if (sfId && folders[sfId] && folders[sfId].readOnly) {

View file

@ -111,7 +111,7 @@ define([
}
}).nThen(function (waitFor) {
var addChannelId = function () {
var data = userObject.drive.filesData;
var data = userObject.drive.filesData || {};
var el, parsed;
var n = nThen(function () {});
var padsLength = Object.keys(data).length;

View file

@ -61,7 +61,7 @@ define([
var CHECKPOINT_INTERVAL = 100;
var FORCE_CHECKPOINT_INTERVAL = 10000;
var DISPLAY_RESTORE_BUTTON = false;
var NEW_VERSION = 4; // version of the .bin, patches and ChainPad formats
var NEW_VERSION = 5; // version of the .bin, patches and ChainPad formats
var PENDING_TIMEOUT = 30000;
var CURRENT_VERSION = X2T.CURRENT_VERSION;
@ -215,7 +215,7 @@ define([
var tabId = metadataMgr.getNetfluxId() + '-' + obj.id;
if (content.ids[tabId]) {
delete content.ids[tabId];
delete content.locks[tabId];
if (content.locks) { delete content.locks[tabId]; }
APP.onLocal();
}
};
@ -506,6 +506,19 @@ define([
}
myUniqueOOId = undefined;
setMyId();
var editor = getEditor();
if (editor) {
var app = common.getMetadataMgr().getPrivateData().ooType;
var d;
if (app === 'doc') {
d = editor.GetDocument().Document;
} else if (app === 'presentation') {
d = editor.GetPresentation().Presentation;
}
if (d) {
APP.oldCursor = d.GetSelectionState();
}
}
if (APP.docEditor) { APP.docEditor.destroyEditor(); } // Kill the old editor
$('iframe[name="frameEditor"]').after(h('div#cp-app-oo-placeholder-a')).remove();
ooLoaded = false;
@ -1359,7 +1372,6 @@ define([
// We only need to release locks for sheets
if (type !== "sheet" && obj.type === "releaseLock") { return; }
if (type === "presentation" && obj.type === "cp_theme") {
// XXX
console.error(obj);
return;
}
@ -1393,15 +1405,17 @@ define([
}
break;
case "cursor":
cursor.updateCursor({
type: "cursor",
messages: [{
cursor: obj.cursor,
time: +new Date(),
user: myUniqueOOId,
useridoriginal: myOOId
}]
});
if (cursor && cursor.updateCursor) {
cursor.updateCursor({
type: "cursor",
messages: [{
cursor: obj.cursor,
time: +new Date(),
user: myUniqueOOId,
useridoriginal: myOOId
}]
});
}
break;
case "getLock":
handleLock(obj, send);
@ -1488,6 +1502,49 @@ define([
APP.onDocumentUnlock = undefined;
}
break;
case 'openDocument':
// When duplicating a slide, OO may ask the URLs of the images
// in that slide
var _obj = obj.message;
if (_obj.c === "imgurls") {
var _mediasSources = getMediasSources();
var images = _obj.data || [];
if (!Array.isArray(images)) { return; }
var urls = [];
nThen(function (waitFor) {
images.forEach(function (name) {
if (/^data\:image/.test(name)) {
Util.fetch(name, waitFor(function (err, u8) {
if (err) { return; }
var b = new Blob([u8]);
urls.push(URL.createObjectURL(b));
}));
return;
}
var data = _mediasSources[name];
if (!data) { return; }
var media = mediasData[data.src];
if (!media) { return; }
urls.push({
path: name,
url: media.blobUrl,
});
});
}).nThen(function () {
send({
type: "documentOpen",
data: {
type: "imgurls",
status: "ok",
data: {
urls: urls,
error: 0
}
}
});
});
}
break;
}
});
});
@ -1502,6 +1559,16 @@ define([
});
var type = common.getMetadataMgr().getPrivateData().ooType;
var images = (e && window.frames[0].AscCommon.g_oDocumentUrls.urls) || {};
// Fix race condition which could drop images sometimes
// ==> make sure each image has a 'media/image_name.ext' entry as well
Object.keys(images).forEach(function (img) {
if (/^media\//.test(img)) { return; }
if (images['media/'+img]) { return; }
images['media/'+img] = images[img];
});
// Add theme images
var theme = e && window.frames[0].AscCommon.g_image_loader.map_image_index;
if (theme) {
Object.keys(theme).forEach(function (url) {
@ -1510,6 +1577,7 @@ define([
}
});
}
sframeChan.query('Q_OO_CONVERT', {
data: data,
type: type,
@ -1713,6 +1781,21 @@ define([
var l = w.Common.util.LanguageInfo.getLocalLanguageCode(lang);
getEditor().asc_setDefaultLanguage(l);
}
if (APP.oldCursor) {
var app = common.getMetadataMgr().getPrivateData().ooType;
var d;
if (app === 'doc') {
d = getEditor().GetDocument().Document;
} else if (app === 'presentation') {
d = getEditor().GetPresentation().Presentation;
}
if (d) {
d.SetSelectionState(APP.oldCursor);
d.UpdateSelection();
}
delete APP.oldCursor;
}
}
delete APP.startNew;
@ -1878,7 +1961,7 @@ define([
};
APP.changeTheme = function (id) {
/*
// XXX disabled:
// disabled:
Uncaught TypeError: Cannot read property 'calculatedType' of null
at CPresentation.changeTheme (sdk-all.js?ver=4.11.0-1633612942653-1633619288217:15927)
*/
@ -2828,8 +2911,8 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
}
readOnly = true;
}
} else if (content && content.version <= 3) { // V2 or V3
version = 'v2b/';
} else if (content && content.version <= 4) { // V2 or V3
version = content.version <= 3 ? 'v2b/' : 'v4/';
APP.migrate = true;
// Registedred ~~users~~ editors can start the migration
if (common.isLoggedIn() && !readOnly) {
@ -2883,7 +2966,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
var useNewDefault = content.version && content.version >= 2;
openRtChannel(function () {
openRtChannel(Util.once(function () {
setMyId();
oldHashes = JSON.parse(JSON.stringify(content.hashes));
initializing = false;
@ -3041,7 +3124,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
}
next();
});
}));
};
config.onError = function (err) {

View file

@ -19304,25 +19304,25 @@ AscDFH.changesRelationMap[AscDFH.historyitem_ParaRun_MathForcedBreak]=[AscDFH.hi
this.Type||oChange.Type===AscDFH.historyitem_ParaRun_TextPr||oChange.Type===AscDFH.historyitem_ParaRun_RFonts)return false;return true}function private_ParaRunChangesOnMergeLangTextPr(oChange){if(oChange.Class!==this.Class)return true;if(oChange.Type===this.Type||oChange.Type===AscDFH.historyitem_ParaRun_TextPr||oChange.Type===AscDFH.historyitem_ParaRun_Lang)return false;return true}function CChangesRunAddItem(Class,Pos,Items,Color){AscDFH.CChangesBaseContentChange.call(this,Class,Pos,Items,true);
this.Color=true===Color?true:false}CChangesRunAddItem.prototype=Object.create(AscDFH.CChangesBaseContentChange.prototype);CChangesRunAddItem.prototype.constructor=CChangesRunAddItem;CChangesRunAddItem.prototype.Type=AscDFH.historyitem_ParaRun_AddItem;CChangesRunAddItem.prototype.Undo=function(){var oRun=this.Class;oRun.Content.splice(this.Pos,this.Items.length);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false)};CChangesRunAddItem.prototype.Redo=
function(){var oRun=this.Class;var Array_start=oRun.Content.slice(0,this.Pos);var Array_end=oRun.Content.slice(this.Pos);oRun.Content=Array_start.concat(this.Items,Array_end);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);for(var nIndex=0,nCount=this.Items.length;nIndex<nCount;++nIndex)if(this.Items[nIndex].SetParent)this.Items[nIndex].SetParent(oRun)};CChangesRunAddItem.prototype.private_WriteItem=function(Writer,Item){Item.Write_ToBinary(Writer)};
CChangesRunAddItem.prototype.private_ReadItem=function(Reader){return ParagraphContent_Read_FromBinary(Reader)};CChangesRunAddItem.prototype.Load=function(Color){var oRun=this.Class;for(var Index=0,Count=this.Items.length;Index<Count;Index++){var Pos=oRun.m_oContentChanges.Check(AscCommon.contentchanges_Add,this.PosArray[Index]);var Element=this.Items[Index];if(null!=Element){if(true===this.Color&&null!==Color){oRun.CollaborativeMarks.Update_OnAdd(Pos);oRun.CollaborativeMarks.Add(Pos,Pos+1,Color);
AscCommon.CollaborativeEditing.Add_ChangedClass(oRun)}oRun.Content.splice(Pos,0,Element);oRun.private_UpdatePositionsOnAdd(Pos);oRun.private_UpdateCompositeInputPositionsOnAdd(Pos);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnAdd(oRun,Pos);if(Element.SetParent)Element.SetParent(oRun)}}oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);oRun.private_UpdateDocumentOutline()};CChangesRunAddItem.prototype.IsRelated=function(oChanges){if(this.Class===
oChanges.Class&&(AscDFH.historyitem_ParaRun_AddItem===oChanges.Type||AscDFH.historyitem_ParaRun_RemoveItem===oChanges.Type))return true;return false};CChangesRunAddItem.prototype.CreateReverseChange=function(){return this.private_CreateReverseChange(CChangesRunRemoveItem)};function CChangesRunRemoveItem(Class,Pos,Items){AscDFH.CChangesBaseContentChange.call(this,Class,Pos,Items,false)}CChangesRunRemoveItem.prototype=Object.create(AscDFH.CChangesBaseContentChange.prototype);CChangesRunRemoveItem.prototype.constructor=
CChangesRunRemoveItem;CChangesRunRemoveItem.prototype.Type=AscDFH.historyitem_ParaRun_RemoveItem;CChangesRunRemoveItem.prototype.Undo=function(){var oRun=this.Class;var Array_start=oRun.Content.slice(0,this.Pos);var Array_end=oRun.Content.slice(this.Pos);oRun.Content=Array_start.concat(this.Items,Array_end);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);for(var nIndex=0,nCount=this.Items.length;nIndex<nCount;++nIndex)if(this.Items[nIndex].SetParent)this.Items[nIndex].SetParent(oRun)};
CChangesRunRemoveItem.prototype.Redo=function(){var oRun=this.Class;oRun.Content.splice(this.Pos,this.Items.length);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false)};CChangesRunRemoveItem.prototype.private_WriteItem=function(Writer,Item){Item.Write_ToBinary(Writer)};CChangesRunRemoveItem.prototype.private_ReadItem=function(Reader){return ParagraphContent_Read_FromBinary(Reader)};CChangesRunRemoveItem.prototype.Load=function(){var oRun=
this.Class;var nLastChangesPos=null;var nChangesCount=0;for(var Index=0,Count=this.PosArray.length;Index<Count;Index++){var nChangesPos=oRun.m_oContentChanges.Check(AscCommon.contentchanges_Remove,this.PosArray[Index]);if(false===nChangesPos)continue;if(null===nLastChangesPos){nLastChangesPos=nChangesPos;nChangesCount=1}else if(nLastChangesPos===nChangesPos)nChangesCount++;else{oRun.CollaborativeMarks.Update_OnRemove(nLastChangesPos,nChangesCount);oRun.Content.splice(nLastChangesPos,nChangesCount);
oRun.private_UpdatePositionsOnRemove(nLastChangesPos,nChangesCount);oRun.private_UpdateCompositeInputPositionsOnRemove(nLastChangesPos,nChangesCount);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnRemove(oRun,nLastChangesPos,nChangesCount);nLastChangesPos=nChangesPos;nChangesCount=1}}if(nChangesCount){oRun.CollaborativeMarks.Update_OnRemove(nLastChangesPos,nChangesCount);oRun.Content.splice(nLastChangesPos,nChangesCount);oRun.private_UpdatePositionsOnRemove(nLastChangesPos,nChangesCount);
oRun.private_UpdateCompositeInputPositionsOnRemove(nLastChangesPos,nChangesCount);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnRemove(oRun,nLastChangesPos,nChangesCount)}oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);oRun.private_UpdateDocumentOutline()};CChangesRunRemoveItem.prototype.IsRelated=function(oChanges){if(this.Class===oChanges.Class&&(AscDFH.historyitem_ParaRun_AddItem===oChanges.Type||AscDFH.historyitem_ParaRun_RemoveItem===
oChanges.Type))return true;return false};CChangesRunRemoveItem.prototype.CreateReverseChange=function(){return this.private_CreateReverseChange(CChangesRunAddItem)};function CChangesRunBold(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunBold.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunBold.prototype.constructor=CChangesRunBold;CChangesRunBold.prototype.Type=AscDFH.historyitem_ParaRun_Bold;CChangesRunBold.prototype.private_SetValue=
function(Value){var oRun=this.Class;oRun.Pr.Bold=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunBold.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunBold.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunItalic(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunItalic.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
CChangesRunItalic.prototype.constructor=CChangesRunItalic;CChangesRunItalic.prototype.Type=AscDFH.historyitem_ParaRun_Italic;CChangesRunItalic.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Italic=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunItalic.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunItalic.prototype.Merge=private_ParaRunChangesOnMergeTextPr;
function CChangesRunStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunStrikeout.prototype.constructor=CChangesRunStrikeout;CChangesRunStrikeout.prototype.Type=AscDFH.historyitem_ParaRun_Strikeout;CChangesRunStrikeout.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Strikeout=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};
CChangesRunStrikeout.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunStrikeout.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunUnderline(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunUnderline.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunUnderline.prototype.constructor=CChangesRunUnderline;CChangesRunUnderline.prototype.Type=
AscDFH.historyitem_ParaRun_Underline;CChangesRunUnderline.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Underline=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunUnderline.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunUnderline.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunFontSize(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,
Class,Old,New,Color)}CChangesRunFontSize.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesRunFontSize.prototype.constructor=CChangesRunFontSize;CChangesRunFontSize.prototype.Type=AscDFH.historyitem_ParaRun_FontSize;CChangesRunFontSize.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.FontSize=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunFontSize.prototype.Load=function(Color){this.Redo();if(this.Color&&
Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunFontSize.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunColor(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesRunColor.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesRunColor.prototype.constructor=CChangesRunColor;CChangesRunColor.prototype.Type=AscDFH.historyitem_ParaRun_Color;CChangesRunColor.prototype.private_CreateObject=function(){return new CDocumentColor(0,
0,0,false)};CChangesRunColor.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Color=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunColor.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunColor.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunVertAlign(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,
Color)}CChangesRunVertAlign.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesRunVertAlign.prototype.constructor=CChangesRunVertAlign;CChangesRunVertAlign.prototype.Type=AscDFH.historyitem_ParaRun_VertAlign;CChangesRunVertAlign.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.VertAlign=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunVertAlign.prototype.Load=function(Color){this.Redo();if(this.Color&&
Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunVertAlign.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunHighLight(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesRunHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesRunHighLight.prototype.constructor=CChangesRunHighLight;CChangesRunHighLight.prototype.Type=AscDFH.historyitem_ParaRun_HighLight;CChangesRunHighLight.prototype.WriteToBinary=
CChangesRunAddItem.prototype.private_ReadItem=function(Reader){return ParagraphContent_Read_FromBinary(Reader)};CChangesRunAddItem.prototype.Load=function(Color){var oRun=this.Class;if(!oRun.m_oContentChanges)return;for(var Index=0,Count=this.Items.length;Index<Count;Index++){var Pos=oRun.m_oContentChanges.Check(AscCommon.contentchanges_Add,this.PosArray[Index]);var Element=this.Items[Index];if(null!=Element){if(true===this.Color&&null!==Color){oRun.CollaborativeMarks.Update_OnAdd(Pos);oRun.CollaborativeMarks.Add(Pos,
Pos+1,Color);AscCommon.CollaborativeEditing.Add_ChangedClass(oRun)}oRun.Content.splice(Pos,0,Element);oRun.private_UpdatePositionsOnAdd(Pos);oRun.private_UpdateCompositeInputPositionsOnAdd(Pos);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnAdd(oRun,Pos);if(Element.SetParent)Element.SetParent(oRun)}}oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);oRun.private_UpdateDocumentOutline()};CChangesRunAddItem.prototype.IsRelated=
function(oChanges){if(this.Class===oChanges.Class&&(AscDFH.historyitem_ParaRun_AddItem===oChanges.Type||AscDFH.historyitem_ParaRun_RemoveItem===oChanges.Type))return true;return false};CChangesRunAddItem.prototype.CreateReverseChange=function(){return this.private_CreateReverseChange(CChangesRunRemoveItem)};function CChangesRunRemoveItem(Class,Pos,Items){AscDFH.CChangesBaseContentChange.call(this,Class,Pos,Items,false)}CChangesRunRemoveItem.prototype=Object.create(AscDFH.CChangesBaseContentChange.prototype);
CChangesRunRemoveItem.prototype.constructor=CChangesRunRemoveItem;CChangesRunRemoveItem.prototype.Type=AscDFH.historyitem_ParaRun_RemoveItem;CChangesRunRemoveItem.prototype.Undo=function(){var oRun=this.Class;var Array_start=oRun.Content.slice(0,this.Pos);var Array_end=oRun.Content.slice(this.Pos);oRun.Content=Array_start.concat(this.Items,Array_end);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);for(var nIndex=0,nCount=this.Items.length;nIndex<
nCount;++nIndex)if(this.Items[nIndex].SetParent)this.Items[nIndex].SetParent(oRun)};CChangesRunRemoveItem.prototype.Redo=function(){var oRun=this.Class;oRun.Content.splice(this.Pos,this.Items.length);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false)};CChangesRunRemoveItem.prototype.private_WriteItem=function(Writer,Item){Item.Write_ToBinary(Writer)};CChangesRunRemoveItem.prototype.private_ReadItem=function(Reader){return ParagraphContent_Read_FromBinary(Reader)};
CChangesRunRemoveItem.prototype.Load=function(){var oRun=this.Class;if(!oRun.m_oContentChanges)return;var nLastChangesPos=null;var nChangesCount=0;for(var Index=0,Count=this.PosArray.length;Index<Count;Index++){var nChangesPos=oRun.m_oContentChanges.Check(AscCommon.contentchanges_Remove,this.PosArray[Index]);if(false===nChangesPos)continue;if(null===nLastChangesPos){nLastChangesPos=nChangesPos;nChangesCount=1}else if(nLastChangesPos===nChangesPos)nChangesCount++;else{oRun.CollaborativeMarks.Update_OnRemove(nLastChangesPos,
nChangesCount);oRun.Content.splice(nLastChangesPos,nChangesCount);oRun.private_UpdatePositionsOnRemove(nLastChangesPos,nChangesCount);oRun.private_UpdateCompositeInputPositionsOnRemove(nLastChangesPos,nChangesCount);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnRemove(oRun,nLastChangesPos,nChangesCount);nLastChangesPos=nChangesPos;nChangesCount=1}}if(nChangesCount){oRun.CollaborativeMarks.Update_OnRemove(nLastChangesPos,nChangesCount);oRun.Content.splice(nLastChangesPos,nChangesCount);
oRun.private_UpdatePositionsOnRemove(nLastChangesPos,nChangesCount);oRun.private_UpdateCompositeInputPositionsOnRemove(nLastChangesPos,nChangesCount);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnRemove(oRun,nLastChangesPos,nChangesCount)}oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);oRun.private_UpdateDocumentOutline()};CChangesRunRemoveItem.prototype.IsRelated=function(oChanges){if(this.Class===oChanges.Class&&(AscDFH.historyitem_ParaRun_AddItem===
oChanges.Type||AscDFH.historyitem_ParaRun_RemoveItem===oChanges.Type))return true;return false};CChangesRunRemoveItem.prototype.CreateReverseChange=function(){return this.private_CreateReverseChange(CChangesRunAddItem)};function CChangesRunBold(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunBold.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunBold.prototype.constructor=CChangesRunBold;CChangesRunBold.prototype.Type=AscDFH.historyitem_ParaRun_Bold;
CChangesRunBold.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Bold=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunBold.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunBold.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunItalic(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunItalic.prototype=
Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunItalic.prototype.constructor=CChangesRunItalic;CChangesRunItalic.prototype.Type=AscDFH.historyitem_ParaRun_Italic;CChangesRunItalic.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Italic=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunItalic.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunItalic.prototype.Merge=
private_ParaRunChangesOnMergeTextPr;function CChangesRunStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunStrikeout.prototype.constructor=CChangesRunStrikeout;CChangesRunStrikeout.prototype.Type=AscDFH.historyitem_ParaRun_Strikeout;CChangesRunStrikeout.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Strikeout=Value;oRun.Recalc_CompiledPr(false);
oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunStrikeout.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunStrikeout.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunUnderline(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunUnderline.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunUnderline.prototype.constructor=
CChangesRunUnderline;CChangesRunUnderline.prototype.Type=AscDFH.historyitem_ParaRun_Underline;CChangesRunUnderline.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Underline=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunUnderline.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunUnderline.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunFontSize(Class,
Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesRunFontSize.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesRunFontSize.prototype.constructor=CChangesRunFontSize;CChangesRunFontSize.prototype.Type=AscDFH.historyitem_ParaRun_FontSize;CChangesRunFontSize.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.FontSize=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunFontSize.prototype.Load=
function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunFontSize.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunColor(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesRunColor.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesRunColor.prototype.constructor=CChangesRunColor;CChangesRunColor.prototype.Type=AscDFH.historyitem_ParaRun_Color;CChangesRunColor.prototype.private_CreateObject=
function(){return new CDocumentColor(0,0,0,false)};CChangesRunColor.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Color=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunColor.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunColor.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunVertAlign(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,
Class,Old,New,Color)}CChangesRunVertAlign.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesRunVertAlign.prototype.constructor=CChangesRunVertAlign;CChangesRunVertAlign.prototype.Type=AscDFH.historyitem_ParaRun_VertAlign;CChangesRunVertAlign.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.VertAlign=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunVertAlign.prototype.Load=function(Color){this.Redo();
if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunVertAlign.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunHighLight(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesRunHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesRunHighLight.prototype.constructor=CChangesRunHighLight;CChangesRunHighLight.prototype.Type=AscDFH.historyitem_ParaRun_HighLight;CChangesRunHighLight.prototype.WriteToBinary=
function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;else if(highlight_None===this.New)nFlags|=4;if(undefined===this.Old)nFlags|=8;else if(highlight_None===this.Old)nFlags|=16;Writer.WriteLong(nFlags);if(undefined!==this.New&&highlight_None!==this.New)this.New.Write_ToBinary(Writer);if(undefined!==this.Old&&highlight_None!==this.Old)this.Old.Write_ToBinary(Writer)};CChangesRunHighLight.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();
if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else if(nFlags&4)this.New=highlight_None;else{this.New=new CDocumentColor(0,0,0);this.New.Read_FromBinary(Reader)}if(nFlags&8)this.Old=undefined;else if(nFlags&16)this.Old=highlight_None;else{this.Old=new CDocumentColor(0,0,0);this.Old.Read_FromBinary(Reader)}};CChangesRunHighLight.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.HighLight=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};
CChangesRunHighLight.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunHighLight.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunRStyle(Class,Old,New,Color){AscDFH.CChangesBaseStringProperty.call(this,Class,Old,New,Color)}CChangesRunRStyle.prototype=Object.create(AscDFH.CChangesBaseStringProperty.prototype);CChangesRunRStyle.prototype.constructor=CChangesRunRStyle;CChangesRunRStyle.prototype.Type=AscDFH.historyitem_ParaRun_RStyle;

View file

@ -17717,25 +17717,25 @@ AscDFH.changesRelationMap[AscDFH.historyitem_ParaRun_MathForcedBreak]=[AscDFH.hi
this.Type||oChange.Type===AscDFH.historyitem_ParaRun_TextPr||oChange.Type===AscDFH.historyitem_ParaRun_RFonts)return false;return true}function private_ParaRunChangesOnMergeLangTextPr(oChange){if(oChange.Class!==this.Class)return true;if(oChange.Type===this.Type||oChange.Type===AscDFH.historyitem_ParaRun_TextPr||oChange.Type===AscDFH.historyitem_ParaRun_Lang)return false;return true}function CChangesRunAddItem(Class,Pos,Items,Color){AscDFH.CChangesBaseContentChange.call(this,Class,Pos,Items,true);
this.Color=true===Color?true:false}CChangesRunAddItem.prototype=Object.create(AscDFH.CChangesBaseContentChange.prototype);CChangesRunAddItem.prototype.constructor=CChangesRunAddItem;CChangesRunAddItem.prototype.Type=AscDFH.historyitem_ParaRun_AddItem;CChangesRunAddItem.prototype.Undo=function(){var oRun=this.Class;oRun.Content.splice(this.Pos,this.Items.length);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false)};CChangesRunAddItem.prototype.Redo=
function(){var oRun=this.Class;var Array_start=oRun.Content.slice(0,this.Pos);var Array_end=oRun.Content.slice(this.Pos);oRun.Content=Array_start.concat(this.Items,Array_end);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);for(var nIndex=0,nCount=this.Items.length;nIndex<nCount;++nIndex)if(this.Items[nIndex].SetParent)this.Items[nIndex].SetParent(oRun)};CChangesRunAddItem.prototype.private_WriteItem=function(Writer,Item){Item.Write_ToBinary(Writer)};
CChangesRunAddItem.prototype.private_ReadItem=function(Reader){return ParagraphContent_Read_FromBinary(Reader)};CChangesRunAddItem.prototype.Load=function(Color){var oRun=this.Class;for(var Index=0,Count=this.Items.length;Index<Count;Index++){var Pos=oRun.m_oContentChanges.Check(AscCommon.contentchanges_Add,this.PosArray[Index]);var Element=this.Items[Index];if(null!=Element){if(true===this.Color&&null!==Color){oRun.CollaborativeMarks.Update_OnAdd(Pos);oRun.CollaborativeMarks.Add(Pos,Pos+1,Color);
AscCommon.CollaborativeEditing.Add_ChangedClass(oRun)}oRun.Content.splice(Pos,0,Element);oRun.private_UpdatePositionsOnAdd(Pos);oRun.private_UpdateCompositeInputPositionsOnAdd(Pos);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnAdd(oRun,Pos);if(Element.SetParent)Element.SetParent(oRun)}}oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);oRun.private_UpdateDocumentOutline()};CChangesRunAddItem.prototype.IsRelated=function(oChanges){if(this.Class===
oChanges.Class&&(AscDFH.historyitem_ParaRun_AddItem===oChanges.Type||AscDFH.historyitem_ParaRun_RemoveItem===oChanges.Type))return true;return false};CChangesRunAddItem.prototype.CreateReverseChange=function(){return this.private_CreateReverseChange(CChangesRunRemoveItem)};function CChangesRunRemoveItem(Class,Pos,Items){AscDFH.CChangesBaseContentChange.call(this,Class,Pos,Items,false)}CChangesRunRemoveItem.prototype=Object.create(AscDFH.CChangesBaseContentChange.prototype);CChangesRunRemoveItem.prototype.constructor=
CChangesRunRemoveItem;CChangesRunRemoveItem.prototype.Type=AscDFH.historyitem_ParaRun_RemoveItem;CChangesRunRemoveItem.prototype.Undo=function(){var oRun=this.Class;var Array_start=oRun.Content.slice(0,this.Pos);var Array_end=oRun.Content.slice(this.Pos);oRun.Content=Array_start.concat(this.Items,Array_end);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);for(var nIndex=0,nCount=this.Items.length;nIndex<nCount;++nIndex)if(this.Items[nIndex].SetParent)this.Items[nIndex].SetParent(oRun)};
CChangesRunRemoveItem.prototype.Redo=function(){var oRun=this.Class;oRun.Content.splice(this.Pos,this.Items.length);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false)};CChangesRunRemoveItem.prototype.private_WriteItem=function(Writer,Item){Item.Write_ToBinary(Writer)};CChangesRunRemoveItem.prototype.private_ReadItem=function(Reader){return ParagraphContent_Read_FromBinary(Reader)};CChangesRunRemoveItem.prototype.Load=function(){var oRun=
this.Class;var nLastChangesPos=null;var nChangesCount=0;for(var Index=0,Count=this.PosArray.length;Index<Count;Index++){var nChangesPos=oRun.m_oContentChanges.Check(AscCommon.contentchanges_Remove,this.PosArray[Index]);if(false===nChangesPos)continue;if(null===nLastChangesPos){nLastChangesPos=nChangesPos;nChangesCount=1}else if(nLastChangesPos===nChangesPos)nChangesCount++;else{oRun.CollaborativeMarks.Update_OnRemove(nLastChangesPos,nChangesCount);oRun.Content.splice(nLastChangesPos,nChangesCount);
oRun.private_UpdatePositionsOnRemove(nLastChangesPos,nChangesCount);oRun.private_UpdateCompositeInputPositionsOnRemove(nLastChangesPos,nChangesCount);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnRemove(oRun,nLastChangesPos,nChangesCount);nLastChangesPos=nChangesPos;nChangesCount=1}}if(nChangesCount){oRun.CollaborativeMarks.Update_OnRemove(nLastChangesPos,nChangesCount);oRun.Content.splice(nLastChangesPos,nChangesCount);oRun.private_UpdatePositionsOnRemove(nLastChangesPos,nChangesCount);
oRun.private_UpdateCompositeInputPositionsOnRemove(nLastChangesPos,nChangesCount);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnRemove(oRun,nLastChangesPos,nChangesCount)}oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);oRun.private_UpdateDocumentOutline()};CChangesRunRemoveItem.prototype.IsRelated=function(oChanges){if(this.Class===oChanges.Class&&(AscDFH.historyitem_ParaRun_AddItem===oChanges.Type||AscDFH.historyitem_ParaRun_RemoveItem===
oChanges.Type))return true;return false};CChangesRunRemoveItem.prototype.CreateReverseChange=function(){return this.private_CreateReverseChange(CChangesRunAddItem)};function CChangesRunBold(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunBold.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunBold.prototype.constructor=CChangesRunBold;CChangesRunBold.prototype.Type=AscDFH.historyitem_ParaRun_Bold;CChangesRunBold.prototype.private_SetValue=
function(Value){var oRun=this.Class;oRun.Pr.Bold=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunBold.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunBold.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunItalic(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunItalic.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
CChangesRunItalic.prototype.constructor=CChangesRunItalic;CChangesRunItalic.prototype.Type=AscDFH.historyitem_ParaRun_Italic;CChangesRunItalic.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Italic=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunItalic.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunItalic.prototype.Merge=private_ParaRunChangesOnMergeTextPr;
function CChangesRunStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunStrikeout.prototype.constructor=CChangesRunStrikeout;CChangesRunStrikeout.prototype.Type=AscDFH.historyitem_ParaRun_Strikeout;CChangesRunStrikeout.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Strikeout=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};
CChangesRunStrikeout.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunStrikeout.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunUnderline(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunUnderline.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunUnderline.prototype.constructor=CChangesRunUnderline;CChangesRunUnderline.prototype.Type=
AscDFH.historyitem_ParaRun_Underline;CChangesRunUnderline.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Underline=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunUnderline.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunUnderline.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunFontSize(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,
Class,Old,New,Color)}CChangesRunFontSize.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesRunFontSize.prototype.constructor=CChangesRunFontSize;CChangesRunFontSize.prototype.Type=AscDFH.historyitem_ParaRun_FontSize;CChangesRunFontSize.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.FontSize=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunFontSize.prototype.Load=function(Color){this.Redo();if(this.Color&&
Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunFontSize.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunColor(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesRunColor.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesRunColor.prototype.constructor=CChangesRunColor;CChangesRunColor.prototype.Type=AscDFH.historyitem_ParaRun_Color;CChangesRunColor.prototype.private_CreateObject=function(){return new CDocumentColor(0,
0,0,false)};CChangesRunColor.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Color=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunColor.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunColor.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunVertAlign(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,
Color)}CChangesRunVertAlign.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesRunVertAlign.prototype.constructor=CChangesRunVertAlign;CChangesRunVertAlign.prototype.Type=AscDFH.historyitem_ParaRun_VertAlign;CChangesRunVertAlign.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.VertAlign=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunVertAlign.prototype.Load=function(Color){this.Redo();if(this.Color&&
Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunVertAlign.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunHighLight(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesRunHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesRunHighLight.prototype.constructor=CChangesRunHighLight;CChangesRunHighLight.prototype.Type=AscDFH.historyitem_ParaRun_HighLight;CChangesRunHighLight.prototype.WriteToBinary=
CChangesRunAddItem.prototype.private_ReadItem=function(Reader){return ParagraphContent_Read_FromBinary(Reader)};CChangesRunAddItem.prototype.Load=function(Color){var oRun=this.Class;if(!oRun.m_oContentChanges)return;for(var Index=0,Count=this.Items.length;Index<Count;Index++){var Pos=oRun.m_oContentChanges.Check(AscCommon.contentchanges_Add,this.PosArray[Index]);var Element=this.Items[Index];if(null!=Element){if(true===this.Color&&null!==Color){oRun.CollaborativeMarks.Update_OnAdd(Pos);oRun.CollaborativeMarks.Add(Pos,
Pos+1,Color);AscCommon.CollaborativeEditing.Add_ChangedClass(oRun)}oRun.Content.splice(Pos,0,Element);oRun.private_UpdatePositionsOnAdd(Pos);oRun.private_UpdateCompositeInputPositionsOnAdd(Pos);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnAdd(oRun,Pos);if(Element.SetParent)Element.SetParent(oRun)}}oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);oRun.private_UpdateDocumentOutline()};CChangesRunAddItem.prototype.IsRelated=
function(oChanges){if(this.Class===oChanges.Class&&(AscDFH.historyitem_ParaRun_AddItem===oChanges.Type||AscDFH.historyitem_ParaRun_RemoveItem===oChanges.Type))return true;return false};CChangesRunAddItem.prototype.CreateReverseChange=function(){return this.private_CreateReverseChange(CChangesRunRemoveItem)};function CChangesRunRemoveItem(Class,Pos,Items){AscDFH.CChangesBaseContentChange.call(this,Class,Pos,Items,false)}CChangesRunRemoveItem.prototype=Object.create(AscDFH.CChangesBaseContentChange.prototype);
CChangesRunRemoveItem.prototype.constructor=CChangesRunRemoveItem;CChangesRunRemoveItem.prototype.Type=AscDFH.historyitem_ParaRun_RemoveItem;CChangesRunRemoveItem.prototype.Undo=function(){var oRun=this.Class;var Array_start=oRun.Content.slice(0,this.Pos);var Array_end=oRun.Content.slice(this.Pos);oRun.Content=Array_start.concat(this.Items,Array_end);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);for(var nIndex=0,nCount=this.Items.length;nIndex<
nCount;++nIndex)if(this.Items[nIndex].SetParent)this.Items[nIndex].SetParent(oRun)};CChangesRunRemoveItem.prototype.Redo=function(){var oRun=this.Class;oRun.Content.splice(this.Pos,this.Items.length);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false)};CChangesRunRemoveItem.prototype.private_WriteItem=function(Writer,Item){Item.Write_ToBinary(Writer)};CChangesRunRemoveItem.prototype.private_ReadItem=function(Reader){return ParagraphContent_Read_FromBinary(Reader)};
CChangesRunRemoveItem.prototype.Load=function(){var oRun=this.Class;if(!oRun.m_oContentChanges)return;var nLastChangesPos=null;var nChangesCount=0;for(var Index=0,Count=this.PosArray.length;Index<Count;Index++){var nChangesPos=oRun.m_oContentChanges.Check(AscCommon.contentchanges_Remove,this.PosArray[Index]);if(false===nChangesPos)continue;if(null===nLastChangesPos){nLastChangesPos=nChangesPos;nChangesCount=1}else if(nLastChangesPos===nChangesPos)nChangesCount++;else{oRun.CollaborativeMarks.Update_OnRemove(nLastChangesPos,
nChangesCount);oRun.Content.splice(nLastChangesPos,nChangesCount);oRun.private_UpdatePositionsOnRemove(nLastChangesPos,nChangesCount);oRun.private_UpdateCompositeInputPositionsOnRemove(nLastChangesPos,nChangesCount);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnRemove(oRun,nLastChangesPos,nChangesCount);nLastChangesPos=nChangesPos;nChangesCount=1}}if(nChangesCount){oRun.CollaborativeMarks.Update_OnRemove(nLastChangesPos,nChangesCount);oRun.Content.splice(nLastChangesPos,nChangesCount);
oRun.private_UpdatePositionsOnRemove(nLastChangesPos,nChangesCount);oRun.private_UpdateCompositeInputPositionsOnRemove(nLastChangesPos,nChangesCount);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnRemove(oRun,nLastChangesPos,nChangesCount)}oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);oRun.private_UpdateDocumentOutline()};CChangesRunRemoveItem.prototype.IsRelated=function(oChanges){if(this.Class===oChanges.Class&&(AscDFH.historyitem_ParaRun_AddItem===
oChanges.Type||AscDFH.historyitem_ParaRun_RemoveItem===oChanges.Type))return true;return false};CChangesRunRemoveItem.prototype.CreateReverseChange=function(){return this.private_CreateReverseChange(CChangesRunAddItem)};function CChangesRunBold(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunBold.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunBold.prototype.constructor=CChangesRunBold;CChangesRunBold.prototype.Type=AscDFH.historyitem_ParaRun_Bold;
CChangesRunBold.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Bold=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunBold.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunBold.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunItalic(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunItalic.prototype=
Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunItalic.prototype.constructor=CChangesRunItalic;CChangesRunItalic.prototype.Type=AscDFH.historyitem_ParaRun_Italic;CChangesRunItalic.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Italic=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunItalic.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunItalic.prototype.Merge=
private_ParaRunChangesOnMergeTextPr;function CChangesRunStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunStrikeout.prototype.constructor=CChangesRunStrikeout;CChangesRunStrikeout.prototype.Type=AscDFH.historyitem_ParaRun_Strikeout;CChangesRunStrikeout.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Strikeout=Value;oRun.Recalc_CompiledPr(false);
oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunStrikeout.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunStrikeout.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunUnderline(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunUnderline.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunUnderline.prototype.constructor=
CChangesRunUnderline;CChangesRunUnderline.prototype.Type=AscDFH.historyitem_ParaRun_Underline;CChangesRunUnderline.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Underline=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunUnderline.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunUnderline.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunFontSize(Class,
Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesRunFontSize.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesRunFontSize.prototype.constructor=CChangesRunFontSize;CChangesRunFontSize.prototype.Type=AscDFH.historyitem_ParaRun_FontSize;CChangesRunFontSize.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.FontSize=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunFontSize.prototype.Load=
function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunFontSize.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunColor(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesRunColor.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesRunColor.prototype.constructor=CChangesRunColor;CChangesRunColor.prototype.Type=AscDFH.historyitem_ParaRun_Color;CChangesRunColor.prototype.private_CreateObject=
function(){return new CDocumentColor(0,0,0,false)};CChangesRunColor.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Color=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunColor.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunColor.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunVertAlign(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,
Class,Old,New,Color)}CChangesRunVertAlign.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesRunVertAlign.prototype.constructor=CChangesRunVertAlign;CChangesRunVertAlign.prototype.Type=AscDFH.historyitem_ParaRun_VertAlign;CChangesRunVertAlign.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.VertAlign=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunVertAlign.prototype.Load=function(Color){this.Redo();
if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunVertAlign.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunHighLight(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesRunHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesRunHighLight.prototype.constructor=CChangesRunHighLight;CChangesRunHighLight.prototype.Type=AscDFH.historyitem_ParaRun_HighLight;CChangesRunHighLight.prototype.WriteToBinary=
function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;else if(highlight_None===this.New)nFlags|=4;if(undefined===this.Old)nFlags|=8;else if(highlight_None===this.Old)nFlags|=16;Writer.WriteLong(nFlags);if(undefined!==this.New&&highlight_None!==this.New)this.New.Write_ToBinary(Writer);if(undefined!==this.Old&&highlight_None!==this.Old)this.Old.Write_ToBinary(Writer)};CChangesRunHighLight.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();
if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else if(nFlags&4)this.New=highlight_None;else{this.New=new CDocumentColor(0,0,0);this.New.Read_FromBinary(Reader)}if(nFlags&8)this.Old=undefined;else if(nFlags&16)this.Old=highlight_None;else{this.Old=new CDocumentColor(0,0,0);this.Old.Read_FromBinary(Reader)}};CChangesRunHighLight.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.HighLight=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};
CChangesRunHighLight.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunHighLight.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunRStyle(Class,Old,New,Color){AscDFH.CChangesBaseStringProperty.call(this,Class,Old,New,Color)}CChangesRunRStyle.prototype=Object.create(AscDFH.CChangesBaseStringProperty.prototype);CChangesRunRStyle.prototype.constructor=CChangesRunRStyle;CChangesRunRStyle.prototype.Type=AscDFH.historyitem_ParaRun_RStyle;

View file

@ -13969,25 +13969,25 @@ AscDFH.changesRelationMap[AscDFH.historyitem_ParaRun_MathForcedBreak]=[AscDFH.hi
this.Type||oChange.Type===AscDFH.historyitem_ParaRun_TextPr||oChange.Type===AscDFH.historyitem_ParaRun_RFonts)return false;return true}function private_ParaRunChangesOnMergeLangTextPr(oChange){if(oChange.Class!==this.Class)return true;if(oChange.Type===this.Type||oChange.Type===AscDFH.historyitem_ParaRun_TextPr||oChange.Type===AscDFH.historyitem_ParaRun_Lang)return false;return true}function CChangesRunAddItem(Class,Pos,Items,Color){AscDFH.CChangesBaseContentChange.call(this,Class,Pos,Items,true);
this.Color=true===Color?true:false}CChangesRunAddItem.prototype=Object.create(AscDFH.CChangesBaseContentChange.prototype);CChangesRunAddItem.prototype.constructor=CChangesRunAddItem;CChangesRunAddItem.prototype.Type=AscDFH.historyitem_ParaRun_AddItem;CChangesRunAddItem.prototype.Undo=function(){var oRun=this.Class;oRun.Content.splice(this.Pos,this.Items.length);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false)};CChangesRunAddItem.prototype.Redo=
function(){var oRun=this.Class;var Array_start=oRun.Content.slice(0,this.Pos);var Array_end=oRun.Content.slice(this.Pos);oRun.Content=Array_start.concat(this.Items,Array_end);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);for(var nIndex=0,nCount=this.Items.length;nIndex<nCount;++nIndex)if(this.Items[nIndex].SetParent)this.Items[nIndex].SetParent(oRun)};CChangesRunAddItem.prototype.private_WriteItem=function(Writer,Item){Item.Write_ToBinary(Writer)};
CChangesRunAddItem.prototype.private_ReadItem=function(Reader){return ParagraphContent_Read_FromBinary(Reader)};CChangesRunAddItem.prototype.Load=function(Color){var oRun=this.Class;for(var Index=0,Count=this.Items.length;Index<Count;Index++){var Pos=oRun.m_oContentChanges.Check(AscCommon.contentchanges_Add,this.PosArray[Index]);var Element=this.Items[Index];if(null!=Element){if(true===this.Color&&null!==Color){oRun.CollaborativeMarks.Update_OnAdd(Pos);oRun.CollaborativeMarks.Add(Pos,Pos+1,Color);
AscCommon.CollaborativeEditing.Add_ChangedClass(oRun)}oRun.Content.splice(Pos,0,Element);oRun.private_UpdatePositionsOnAdd(Pos);oRun.private_UpdateCompositeInputPositionsOnAdd(Pos);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnAdd(oRun,Pos);if(Element.SetParent)Element.SetParent(oRun)}}oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);oRun.private_UpdateDocumentOutline()};CChangesRunAddItem.prototype.IsRelated=function(oChanges){if(this.Class===
oChanges.Class&&(AscDFH.historyitem_ParaRun_AddItem===oChanges.Type||AscDFH.historyitem_ParaRun_RemoveItem===oChanges.Type))return true;return false};CChangesRunAddItem.prototype.CreateReverseChange=function(){return this.private_CreateReverseChange(CChangesRunRemoveItem)};function CChangesRunRemoveItem(Class,Pos,Items){AscDFH.CChangesBaseContentChange.call(this,Class,Pos,Items,false)}CChangesRunRemoveItem.prototype=Object.create(AscDFH.CChangesBaseContentChange.prototype);CChangesRunRemoveItem.prototype.constructor=
CChangesRunRemoveItem;CChangesRunRemoveItem.prototype.Type=AscDFH.historyitem_ParaRun_RemoveItem;CChangesRunRemoveItem.prototype.Undo=function(){var oRun=this.Class;var Array_start=oRun.Content.slice(0,this.Pos);var Array_end=oRun.Content.slice(this.Pos);oRun.Content=Array_start.concat(this.Items,Array_end);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);for(var nIndex=0,nCount=this.Items.length;nIndex<nCount;++nIndex)if(this.Items[nIndex].SetParent)this.Items[nIndex].SetParent(oRun)};
CChangesRunRemoveItem.prototype.Redo=function(){var oRun=this.Class;oRun.Content.splice(this.Pos,this.Items.length);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false)};CChangesRunRemoveItem.prototype.private_WriteItem=function(Writer,Item){Item.Write_ToBinary(Writer)};CChangesRunRemoveItem.prototype.private_ReadItem=function(Reader){return ParagraphContent_Read_FromBinary(Reader)};CChangesRunRemoveItem.prototype.Load=function(){var oRun=
this.Class;var nLastChangesPos=null;var nChangesCount=0;for(var Index=0,Count=this.PosArray.length;Index<Count;Index++){var nChangesPos=oRun.m_oContentChanges.Check(AscCommon.contentchanges_Remove,this.PosArray[Index]);if(false===nChangesPos)continue;if(null===nLastChangesPos){nLastChangesPos=nChangesPos;nChangesCount=1}else if(nLastChangesPos===nChangesPos)nChangesCount++;else{oRun.CollaborativeMarks.Update_OnRemove(nLastChangesPos,nChangesCount);oRun.Content.splice(nLastChangesPos,nChangesCount);
oRun.private_UpdatePositionsOnRemove(nLastChangesPos,nChangesCount);oRun.private_UpdateCompositeInputPositionsOnRemove(nLastChangesPos,nChangesCount);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnRemove(oRun,nLastChangesPos,nChangesCount);nLastChangesPos=nChangesPos;nChangesCount=1}}if(nChangesCount){oRun.CollaborativeMarks.Update_OnRemove(nLastChangesPos,nChangesCount);oRun.Content.splice(nLastChangesPos,nChangesCount);oRun.private_UpdatePositionsOnRemove(nLastChangesPos,nChangesCount);
oRun.private_UpdateCompositeInputPositionsOnRemove(nLastChangesPos,nChangesCount);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnRemove(oRun,nLastChangesPos,nChangesCount)}oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);oRun.private_UpdateDocumentOutline()};CChangesRunRemoveItem.prototype.IsRelated=function(oChanges){if(this.Class===oChanges.Class&&(AscDFH.historyitem_ParaRun_AddItem===oChanges.Type||AscDFH.historyitem_ParaRun_RemoveItem===
oChanges.Type))return true;return false};CChangesRunRemoveItem.prototype.CreateReverseChange=function(){return this.private_CreateReverseChange(CChangesRunAddItem)};function CChangesRunBold(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunBold.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunBold.prototype.constructor=CChangesRunBold;CChangesRunBold.prototype.Type=AscDFH.historyitem_ParaRun_Bold;CChangesRunBold.prototype.private_SetValue=
function(Value){var oRun=this.Class;oRun.Pr.Bold=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunBold.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunBold.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunItalic(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunItalic.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);
CChangesRunItalic.prototype.constructor=CChangesRunItalic;CChangesRunItalic.prototype.Type=AscDFH.historyitem_ParaRun_Italic;CChangesRunItalic.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Italic=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunItalic.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunItalic.prototype.Merge=private_ParaRunChangesOnMergeTextPr;
function CChangesRunStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunStrikeout.prototype.constructor=CChangesRunStrikeout;CChangesRunStrikeout.prototype.Type=AscDFH.historyitem_ParaRun_Strikeout;CChangesRunStrikeout.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Strikeout=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};
CChangesRunStrikeout.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunStrikeout.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunUnderline(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunUnderline.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunUnderline.prototype.constructor=CChangesRunUnderline;CChangesRunUnderline.prototype.Type=
AscDFH.historyitem_ParaRun_Underline;CChangesRunUnderline.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Underline=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunUnderline.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunUnderline.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunFontSize(Class,Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,
Class,Old,New,Color)}CChangesRunFontSize.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesRunFontSize.prototype.constructor=CChangesRunFontSize;CChangesRunFontSize.prototype.Type=AscDFH.historyitem_ParaRun_FontSize;CChangesRunFontSize.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.FontSize=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunFontSize.prototype.Load=function(Color){this.Redo();if(this.Color&&
Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunFontSize.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunColor(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesRunColor.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesRunColor.prototype.constructor=CChangesRunColor;CChangesRunColor.prototype.Type=AscDFH.historyitem_ParaRun_Color;CChangesRunColor.prototype.private_CreateObject=function(){return new CDocumentColor(0,
0,0,false)};CChangesRunColor.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Color=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunColor.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunColor.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunVertAlign(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,Class,Old,New,
Color)}CChangesRunVertAlign.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesRunVertAlign.prototype.constructor=CChangesRunVertAlign;CChangesRunVertAlign.prototype.Type=AscDFH.historyitem_ParaRun_VertAlign;CChangesRunVertAlign.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.VertAlign=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunVertAlign.prototype.Load=function(Color){this.Redo();if(this.Color&&
Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunVertAlign.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunHighLight(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesRunHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesRunHighLight.prototype.constructor=CChangesRunHighLight;CChangesRunHighLight.prototype.Type=AscDFH.historyitem_ParaRun_HighLight;CChangesRunHighLight.prototype.WriteToBinary=
CChangesRunAddItem.prototype.private_ReadItem=function(Reader){return ParagraphContent_Read_FromBinary(Reader)};CChangesRunAddItem.prototype.Load=function(Color){var oRun=this.Class;if(!oRun.m_oContentChanges)return;for(var Index=0,Count=this.Items.length;Index<Count;Index++){var Pos=oRun.m_oContentChanges.Check(AscCommon.contentchanges_Add,this.PosArray[Index]);var Element=this.Items[Index];if(null!=Element){if(true===this.Color&&null!==Color){oRun.CollaborativeMarks.Update_OnAdd(Pos);oRun.CollaborativeMarks.Add(Pos,
Pos+1,Color);AscCommon.CollaborativeEditing.Add_ChangedClass(oRun)}oRun.Content.splice(Pos,0,Element);oRun.private_UpdatePositionsOnAdd(Pos);oRun.private_UpdateCompositeInputPositionsOnAdd(Pos);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnAdd(oRun,Pos);if(Element.SetParent)Element.SetParent(oRun)}}oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);oRun.private_UpdateDocumentOutline()};CChangesRunAddItem.prototype.IsRelated=
function(oChanges){if(this.Class===oChanges.Class&&(AscDFH.historyitem_ParaRun_AddItem===oChanges.Type||AscDFH.historyitem_ParaRun_RemoveItem===oChanges.Type))return true;return false};CChangesRunAddItem.prototype.CreateReverseChange=function(){return this.private_CreateReverseChange(CChangesRunRemoveItem)};function CChangesRunRemoveItem(Class,Pos,Items){AscDFH.CChangesBaseContentChange.call(this,Class,Pos,Items,false)}CChangesRunRemoveItem.prototype=Object.create(AscDFH.CChangesBaseContentChange.prototype);
CChangesRunRemoveItem.prototype.constructor=CChangesRunRemoveItem;CChangesRunRemoveItem.prototype.Type=AscDFH.historyitem_ParaRun_RemoveItem;CChangesRunRemoveItem.prototype.Undo=function(){var oRun=this.Class;var Array_start=oRun.Content.slice(0,this.Pos);var Array_end=oRun.Content.slice(this.Pos);oRun.Content=Array_start.concat(this.Items,Array_end);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);for(var nIndex=0,nCount=this.Items.length;nIndex<
nCount;++nIndex)if(this.Items[nIndex].SetParent)this.Items[nIndex].SetParent(oRun)};CChangesRunRemoveItem.prototype.Redo=function(){var oRun=this.Class;oRun.Content.splice(this.Pos,this.Items.length);oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false)};CChangesRunRemoveItem.prototype.private_WriteItem=function(Writer,Item){Item.Write_ToBinary(Writer)};CChangesRunRemoveItem.prototype.private_ReadItem=function(Reader){return ParagraphContent_Read_FromBinary(Reader)};
CChangesRunRemoveItem.prototype.Load=function(){var oRun=this.Class;if(!oRun.m_oContentChanges)return;var nLastChangesPos=null;var nChangesCount=0;for(var Index=0,Count=this.PosArray.length;Index<Count;Index++){var nChangesPos=oRun.m_oContentChanges.Check(AscCommon.contentchanges_Remove,this.PosArray[Index]);if(false===nChangesPos)continue;if(null===nLastChangesPos){nLastChangesPos=nChangesPos;nChangesCount=1}else if(nLastChangesPos===nChangesPos)nChangesCount++;else{oRun.CollaborativeMarks.Update_OnRemove(nLastChangesPos,
nChangesCount);oRun.Content.splice(nLastChangesPos,nChangesCount);oRun.private_UpdatePositionsOnRemove(nLastChangesPos,nChangesCount);oRun.private_UpdateCompositeInputPositionsOnRemove(nLastChangesPos,nChangesCount);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnRemove(oRun,nLastChangesPos,nChangesCount);nLastChangesPos=nChangesPos;nChangesCount=1}}if(nChangesCount){oRun.CollaborativeMarks.Update_OnRemove(nLastChangesPos,nChangesCount);oRun.Content.splice(nLastChangesPos,nChangesCount);
oRun.private_UpdatePositionsOnRemove(nLastChangesPos,nChangesCount);oRun.private_UpdateCompositeInputPositionsOnRemove(nLastChangesPos,nChangesCount);AscCommon.CollaborativeEditing.Update_DocumentPositionsOnRemove(oRun,nLastChangesPos,nChangesCount)}oRun.RecalcInfo.Measure=true;oRun.private_UpdateSpellChecking();oRun.private_UpdateTrackRevisionOnChangeContent(false);oRun.private_UpdateDocumentOutline()};CChangesRunRemoveItem.prototype.IsRelated=function(oChanges){if(this.Class===oChanges.Class&&(AscDFH.historyitem_ParaRun_AddItem===
oChanges.Type||AscDFH.historyitem_ParaRun_RemoveItem===oChanges.Type))return true;return false};CChangesRunRemoveItem.prototype.CreateReverseChange=function(){return this.private_CreateReverseChange(CChangesRunAddItem)};function CChangesRunBold(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunBold.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunBold.prototype.constructor=CChangesRunBold;CChangesRunBold.prototype.Type=AscDFH.historyitem_ParaRun_Bold;
CChangesRunBold.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Bold=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunBold.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunBold.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunItalic(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunItalic.prototype=
Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunItalic.prototype.constructor=CChangesRunItalic;CChangesRunItalic.prototype.Type=AscDFH.historyitem_ParaRun_Italic;CChangesRunItalic.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Italic=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunItalic.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunItalic.prototype.Merge=
private_ParaRunChangesOnMergeTextPr;function CChangesRunStrikeout(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunStrikeout.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunStrikeout.prototype.constructor=CChangesRunStrikeout;CChangesRunStrikeout.prototype.Type=AscDFH.historyitem_ParaRun_Strikeout;CChangesRunStrikeout.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Strikeout=Value;oRun.Recalc_CompiledPr(false);
oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunStrikeout.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunStrikeout.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunUnderline(Class,Old,New,Color){AscDFH.CChangesBaseBoolProperty.call(this,Class,Old,New,Color)}CChangesRunUnderline.prototype=Object.create(AscDFH.CChangesBaseBoolProperty.prototype);CChangesRunUnderline.prototype.constructor=
CChangesRunUnderline;CChangesRunUnderline.prototype.Type=AscDFH.historyitem_ParaRun_Underline;CChangesRunUnderline.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Underline=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunUnderline.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunUnderline.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunFontSize(Class,
Old,New,Color){AscDFH.CChangesBaseDoubleProperty.call(this,Class,Old,New,Color)}CChangesRunFontSize.prototype=Object.create(AscDFH.CChangesBaseDoubleProperty.prototype);CChangesRunFontSize.prototype.constructor=CChangesRunFontSize;CChangesRunFontSize.prototype.Type=AscDFH.historyitem_ParaRun_FontSize;CChangesRunFontSize.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.FontSize=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunFontSize.prototype.Load=
function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunFontSize.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunColor(Class,Old,New,Color){AscDFH.CChangesBaseObjectProperty.call(this,Class,Old,New,Color)}CChangesRunColor.prototype=Object.create(AscDFH.CChangesBaseObjectProperty.prototype);CChangesRunColor.prototype.constructor=CChangesRunColor;CChangesRunColor.prototype.Type=AscDFH.historyitem_ParaRun_Color;CChangesRunColor.prototype.private_CreateObject=
function(){return new CDocumentColor(0,0,0,false)};CChangesRunColor.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.Color=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunColor.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunColor.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunVertAlign(Class,Old,New,Color){AscDFH.CChangesBaseLongProperty.call(this,
Class,Old,New,Color)}CChangesRunVertAlign.prototype=Object.create(AscDFH.CChangesBaseLongProperty.prototype);CChangesRunVertAlign.prototype.constructor=CChangesRunVertAlign;CChangesRunVertAlign.prototype.Type=AscDFH.historyitem_ParaRun_VertAlign;CChangesRunVertAlign.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.VertAlign=Value;oRun.Recalc_CompiledPr(true);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};CChangesRunVertAlign.prototype.Load=function(Color){this.Redo();
if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunVertAlign.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunHighLight(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesRunHighLight.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesRunHighLight.prototype.constructor=CChangesRunHighLight;CChangesRunHighLight.prototype.Type=AscDFH.historyitem_ParaRun_HighLight;CChangesRunHighLight.prototype.WriteToBinary=
function(Writer){var nFlags=0;if(false!==this.Color)nFlags|=1;if(undefined===this.New)nFlags|=2;else if(highlight_None===this.New)nFlags|=4;if(undefined===this.Old)nFlags|=8;else if(highlight_None===this.Old)nFlags|=16;Writer.WriteLong(nFlags);if(undefined!==this.New&&highlight_None!==this.New)this.New.Write_ToBinary(Writer);if(undefined!==this.Old&&highlight_None!==this.Old)this.Old.Write_ToBinary(Writer)};CChangesRunHighLight.prototype.ReadFromBinary=function(Reader){var nFlags=Reader.GetLong();
if(nFlags&1)this.Color=true;else this.Color=false;if(nFlags&2)this.New=undefined;else if(nFlags&4)this.New=highlight_None;else{this.New=new CDocumentColor(0,0,0);this.New.Read_FromBinary(Reader)}if(nFlags&8)this.Old=undefined;else if(nFlags&16)this.Old=highlight_None;else{this.Old=new CDocumentColor(0,0,0);this.Old.Read_FromBinary(Reader)}};CChangesRunHighLight.prototype.private_SetValue=function(Value){var oRun=this.Class;oRun.Pr.HighLight=Value;oRun.Recalc_CompiledPr(false);oRun.private_UpdateTrackRevisionOnChangeTextPr(false)};
CChangesRunHighLight.prototype.Load=function(Color){this.Redo();if(this.Color&&Color)this.Class.private_AddCollPrChangeOther(Color)};CChangesRunHighLight.prototype.Merge=private_ParaRunChangesOnMergeTextPr;function CChangesRunRStyle(Class,Old,New,Color){AscDFH.CChangesBaseStringProperty.call(this,Class,Old,New,Color)}CChangesRunRStyle.prototype=Object.create(AscDFH.CChangesBaseStringProperty.prototype);CChangesRunRStyle.prototype.constructor=CChangesRunRStyle;CChangesRunRStyle.prototype.Type=AscDFH.historyitem_ParaRun_RStyle;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more