Skip to content

Commit

Permalink
[feature] Rename draw->visio
Browse files Browse the repository at this point in the history
  • Loading branch information
konovalovsergey committed Dec 4, 2024
1 parent be6d7b1 commit abe1870
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Common/config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions DocService/sources/DocsCoServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down
19 changes: 9 additions & 10 deletions DocService/sources/wopiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit abe1870

Please sign in to comment.