From abe1870d775c40a5d318c8ef353c4a59c03344f3 Mon Sep 17 00:00:00 2001 From: Sergey Konovalov Date: Wed, 4 Dec 2024 14:22:04 +0300 Subject: [PATCH] [feature] Rename draw->visio --- Common/config/default.json | 6 +++--- DocService/sources/DocsCoServer.js | 6 +++--- DocService/sources/wopiClient.js | 19 +++++++++---------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Common/config/default.json b/Common/config/default.json index 788f1c9d..b48d4416 100644 --- a/Common/config/default.json +++ b/Common/config/default.json @@ -226,7 +226,7 @@ "favIconUrlCell" : "/web-apps/apps/spreadsheeteditor/main/resources/img/favicon.ico", "favIconUrlSlide" : "/web-apps/apps/presentationeditor/main/resources/img/favicon.ico", "favIconUrlPdf" : "/web-apps/apps/pdfeditor/main/resources/img/favicon.ico", - "favIconUrlDraw" : "/web-apps/apps/visioeditor/main/resources/img/favicon.ico", + "favIconUrlVisio" : "/web-apps/apps/visioeditor/main/resources/img/favicon.ico", "fileInfoBlockList" : ["FileUrl"], "pdfView": ["djvu", "xps", "oxps"], "pdfEdit": ["pdf"], @@ -237,8 +237,8 @@ "cellEdit": ["xlsx", "xltx", "xlsm", "ods", "csv"], "slideView": ["ppt", "ppsx", "ppsm", "pps", "potm", "pot", "fodp", "otp", "sxi", "dps", "dpt", "key"], "slideEdit": ["pptx", "potx", "pptm", "odp"], - "drawView": ["vsdx"], - "drawEdit": [], + "visioView": ["vsdx"], + "visioEdit": [], "publicKey": "BgIAAACkAABSU0ExAAgAAAEAAQBpTpiJQ2hD8plpGTfEEmcq4IKyr31HikXpuVSBraMfqyodn2PGXBJ3daNSmdPOc0Nz4HO9Auljn8YYXDPBdpiABptSKvEDPF23Q+Qytg0+vCRyondyBcW91w7KLzXce3fnk8ZfJ8QtbZPL9m11wJIWZueQF+l0HKYx4lty+nccbCanytFTADkGQ3SnmExGEF3rBz6I9+OcrDDK9NKPJgEmCiuyei/d4XbPgKls3EIG0h38X5mVF2VytfWm2Yu850B6z3N4MYhj4b4vsYT62zEC4pMRUeb8dIBy4Jsmr3avtmeO00MUH6DVyPC8nirixj2YIOPKk13CdVqGDSXA3cvl", "modulus": "5cvdwCUNhlp1wl2TyuMgmD3G4iqevPDI1aAfFEPTjme2r3avJpvgcoB0/OZREZPiAjHb+oSxL77hY4gxeHPPekDnvIvZpvW1cmUXlZlf/B3SBkLcbKmAz3bh3S96sisKJgEmj9L0yjCsnOP3iD4H610QRkyYp3RDBjkAU9HKpyZsHHf6clviMaYcdOkXkOdmFpLAdW32y5NtLcQnX8aT53d73DUvyg7XvcUFcneiciS8Pg22MuRDt108A/EqUpsGgJh2wTNcGMafY+kCvXPgc0NzztOZUqN1dxJcxmOfHSqrH6OtgVS56UWKR32vsoLgKmcSxDcZaZnyQ2hDiZhOaQ==", "exponent": 65537, diff --git a/DocService/sources/DocsCoServer.js b/DocService/sources/DocsCoServer.js index 68b02296..333cbb27 100644 --- a/DocService/sources/DocsCoServer.js +++ b/DocService/sources/DocsCoServer.js @@ -158,7 +158,7 @@ const EditorTypes = { document : 0, spreadsheet : 1, presentation : 2, - draw : 3 + visio : 3 }; const defaultHttpPort = 80, defaultHttpsPort = 443; // Default ports (for http and https) @@ -1512,7 +1512,7 @@ function getOpenFormatByEditor(editorType) { case EditorTypes.presentation: res = constants.AVS_OFFICESTUDIO_FILE_CANVAS_PRESENTATION; break; - case EditorTypes.draw: + case EditorTypes.visio: res = constants.AVS_OFFICESTUDIO_FILE_DRAW_VSDX; break; default: @@ -3099,7 +3099,7 @@ exports.install = function(server, callbackFunction) { fCheckLock = _checkLockExcel; break; case EditorTypes.presentation: - case EditorTypes.draw: + case EditorTypes.visio: // PP fCheckLock = _checkLockPresentation; break; diff --git a/DocService/sources/wopiClient.js b/DocService/sources/wopiClient.js index 613a4aa4..d0c7ab83 100644 --- a/DocService/sources/wopiClient.js +++ b/DocService/sources/wopiClient.js @@ -75,14 +75,14 @@ const cfgWopiCellView = config.get('wopi.cellView'); const cfgWopiCellEdit = config.get('wopi.cellEdit'); const cfgWopiSlideView = config.get('wopi.slideView'); const cfgWopiSlideEdit = config.get('wopi.slideEdit'); -const cfgWopiDrawView = config.get('wopi.drawView'); -const cfgWopiDrawEdit = config.get('wopi.drawEdit'); +const cfgWopiVisioView = config.get('wopi.visioView'); +const cfgWopiVisioEdit = config.get('wopi.visioEdit'); const cfgWopiForms = config.get('wopi.forms'); const cfgWopiFavIconUrlWord = config.get('wopi.favIconUrlWord'); const cfgWopiFavIconUrlCell = config.get('wopi.favIconUrlCell'); const cfgWopiFavIconUrlSlide = config.get('wopi.favIconUrlSlide'); const cfgWopiFavIconUrlPdf = config.get('wopi.favIconUrlPdf'); -const cfgWopiFavIconUrlDraw = config.get('wopi.favIconUrlDraw'); +const cfgWopiFavIconUrlVisio = config.get('wopi.favIconUrlVisio'); const cfgWopiPublicKey = config.get('wopi.publicKey'); const cfgWopiModulus = config.get('wopi.modulus'); const cfgWopiExponent = config.get('wopi.exponent'); @@ -157,14 +157,14 @@ function discovery(req, res) { const tenWopiCellEdit = ctx.getCfg('wopi.cellEdit', cfgWopiCellEdit); const tenWopiSlideView = ctx.getCfg('wopi.slideView', cfgWopiSlideView); const tenWopiSlideEdit = ctx.getCfg('wopi.slideEdit', cfgWopiSlideEdit); - const tenWopiDrawView = ctx.getCfg('wopi.slideView', cfgWopiDrawView); - const tenWopiDrawEdit = ctx.getCfg('wopi.slideEdit', cfgWopiDrawEdit); + const tenWopiVisioView = ctx.getCfg('wopi.visioView', cfgWopiVisioView); + const tenWopiVisioEdit = ctx.getCfg('wopi.visioEdit', cfgWopiVisioEdit); const tenWopiForms = ctx.getCfg('wopi.forms', cfgWopiForms); const tenWopiFavIconUrlWord = ctx.getCfg('wopi.favIconUrlWord', cfgWopiFavIconUrlWord); const tenWopiFavIconUrlCell = ctx.getCfg('wopi.favIconUrlCell', cfgWopiFavIconUrlCell); const tenWopiFavIconUrlSlide = ctx.getCfg('wopi.favIconUrlSlide', cfgWopiFavIconUrlSlide); const tenWopiFavIconUrlPdf = ctx.getCfg('wopi.favIconUrlPdf', cfgWopiFavIconUrlPdf); - const tenWopiFavIconUrlDraw = ctx.getCfg('wopi.favIconUrlDraw', cfgWopiFavIconUrlDraw); + const tenWopiFavIconUrlVisio = ctx.getCfg('wopi.favIconUrlVisio', cfgWopiFavIconUrlVisio); const tenWopiPublicKey = ctx.getCfg('wopi.publicKey', cfgWopiPublicKey); const tenWopiModulus = ctx.getCfg('wopi.modulus', cfgWopiModulus); const tenWopiExponent = ctx.getCfg('wopi.exponent', cfgWopiExponent); @@ -185,9 +185,9 @@ function discovery(req, res) { let documentTypes = [`word`, `cell`, `slide`, `pdf`]; if (true) {//todo check packageType names.push('Visio'); - favIconUrls.push(tenWopiFavIconUrlDraw); - exts.push({targetext: null, view: tenWopiDrawView, edit: tenWopiDrawEdit}); - documentTypes.push(`draw`); + favIconUrls.push(tenWopiFavIconUrlVisio); + exts.push({targetext: null, view: tenWopiVisioView, edit: tenWopiVisioEdit}); + documentTypes.push(`visio`); } let templatesFolderExtsCache = yield getTemplatesFolderExts(ctx); @@ -532,7 +532,6 @@ function createDocId(ctx, wopiSrc, mode, fileInfo) { } else { docId = `view.${fileId}.${fileInfo.Version}`; } - return docId; } docId = docId.replace(constants.DOC_ID_REPLACE_REGEX, '_').substring(0, constants.DOC_ID_MAX_LENGTH); return docId;