mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[feature] Rename textParams to {documentRenderer: {textAssociation: "plainParagraph"}}
This commit is contained in:
committed by
Sergey Konovalov
parent
b4d72bc7f8
commit
97dda5a991
@ -290,24 +290,23 @@ function convertRequest(req, res, isJson) {
|
||||
cmd.setOutputFormat(constants.AVS_OFFICESTUDIO_FILE_IMAGE);
|
||||
}
|
||||
}
|
||||
var textParams = params.textParams;
|
||||
if (textParams) {
|
||||
if (typeof textParams === 'string') {
|
||||
textParams = JSON.parse(textParams);
|
||||
var documentRenderer = params.documentRenderer;
|
||||
if (documentRenderer) {
|
||||
if (typeof documentRenderer === 'string') {
|
||||
documentRenderer = JSON.parse(documentRenderer);
|
||||
}
|
||||
var textParamsData = new commonDefines.CTextParams(textParams);
|
||||
//todo text
|
||||
switch (textParams.association) {
|
||||
case 'block':
|
||||
var textParamsData = new commonDefines.CTextParams();
|
||||
switch (documentRenderer.textAssociation) {
|
||||
case 'plainParagraph':
|
||||
textParamsData.setAssociation(3);
|
||||
break;
|
||||
case 'noFrames':
|
||||
case 'plainLine':
|
||||
textParamsData.setAssociation(2);
|
||||
break;
|
||||
case 'line':
|
||||
case 'blockLine':
|
||||
textParamsData.setAssociation(1);
|
||||
break;
|
||||
case 'char':
|
||||
case 'blockChar':
|
||||
default:
|
||||
textParamsData.setAssociation(0);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user