fix v8 to v9 code

This commit is contained in:
AAAMON 2025-12-17 12:41:23 +02:00 committed by Wolfgang Ginolas
parent 67432dffef
commit a53142dcc1

View File

@ -3455,7 +3455,6 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
APP.startNew = isNew;
var version = OOCurrentVersion.currentVersion + '/';
console.log("v." + OOCurrentVersion.currentVersion);
var msg;
// Old version detected: use the old OO and start the migration if we can
if (privateData.ooForceVersion) {
@ -3542,6 +3541,22 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
}
readOnly = true;
}
} else if (content && content.version <= 8) {
version = 'v8/';
APP.migrate = true;
// Registedred ~~users~~ editors can start the migration
if (common.isLoggedIn() && !readOnly) {
content.migration = true;
APP.onLocal();
} else {
msg = h('div.alert.alert-warning.cp-burn-after-reading', Messages.oo_sheetMigration_anonymousEditor);
if (APP.helpMenu) {
$(APP.helpMenu.menu).after(msg);
} else {
$('#cp-app-oo-editor').prepend(msg);
}
readOnly = true;
}
}
// If the sheet is locked by an offline user, remove it