mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
ruby: Layout/CaseIndentation correct
This commit is contained in:
@ -260,11 +260,11 @@ class DocumentHelper
|
|||||||
# get internal file extension by its type
|
# get internal file extension by its type
|
||||||
def get_internal_extension(file_type)
|
def get_internal_extension(file_type)
|
||||||
case file_type
|
case file_type
|
||||||
when 'word' # .docx for word type
|
when 'word' # .docx for word type
|
||||||
ext = '.docx'
|
ext = '.docx'
|
||||||
when 'cell' # .xlsx for cell type
|
when 'cell' # .xlsx for cell type
|
||||||
ext = '.xlsx'
|
ext = '.xlsx'
|
||||||
when 'slide' # .pptx for slide type
|
when 'slide' # .pptx for slide type
|
||||||
ext = '.pptx'
|
ext = '.pptx'
|
||||||
else
|
else
|
||||||
ext = '.docx' # the default value is .docx
|
ext = '.docx' # the default value is .docx
|
||||||
@ -277,11 +277,11 @@ class DocumentHelper
|
|||||||
def get_template_image_url(file_type)
|
def get_template_image_url(file_type)
|
||||||
path = get_server_url(true) + "/assets/"
|
path = get_server_url(true) + "/assets/"
|
||||||
case file_type
|
case file_type
|
||||||
when 'word' # for word type
|
when 'word' # for word type
|
||||||
full_path = path + 'file_docx.svg'
|
full_path = path + 'file_docx.svg'
|
||||||
when 'cell' # .xlsx for cell type
|
when 'cell' # .xlsx for cell type
|
||||||
full_path = path + 'file_xlsx.svg'
|
full_path = path + 'file_xlsx.svg'
|
||||||
when 'slide' # .pptx for slide type
|
when 'slide' # .pptx for slide type
|
||||||
full_path = path + 'file_pptx.svg'
|
full_path = path + 'file_pptx.svg'
|
||||||
else
|
else
|
||||||
full_path = path + 'file_docx.svg' # the default value is .docx
|
full_path = path + 'file_docx.svg' # the default value is .docx
|
||||||
|
|||||||
@ -107,23 +107,23 @@ class ServiceConverter
|
|||||||
|
|
||||||
# add an error message to the error message template depending on the error code
|
# add an error message to the error message template depending on the error code
|
||||||
case error_code
|
case error_code
|
||||||
when -8
|
when -8
|
||||||
error_message = 'Error occurred in the ConvertService.ashx: Error document VKey'
|
error_message = 'Error occurred in the ConvertService.ashx: Error document VKey'
|
||||||
when -7
|
when -7
|
||||||
error_message = 'Error occurred in the ConvertService.ashx: Error document request'
|
error_message = 'Error occurred in the ConvertService.ashx: Error document request'
|
||||||
when -6
|
when -6
|
||||||
error_message = 'Error occurred in the ConvertService.ashx: Error database'
|
error_message = 'Error occurred in the ConvertService.ashx: Error database'
|
||||||
when -5
|
when -5
|
||||||
error_message = 'Error occurred in the ConvertService.ashx: Incorrect password'
|
error_message = 'Error occurred in the ConvertService.ashx: Incorrect password'
|
||||||
when -4
|
when -4
|
||||||
error_message = 'Error occurred in the ConvertService.ashx: Error download error'
|
error_message = 'Error occurred in the ConvertService.ashx: Error download error'
|
||||||
when -3
|
when -3
|
||||||
error_message = 'Error occurred in the ConvertService.ashx: Error convertation error'
|
error_message = 'Error occurred in the ConvertService.ashx: Error convertation error'
|
||||||
when -2
|
when -2
|
||||||
error_message = 'Error occurred in the ConvertService.ashx: Error convertation timeout'
|
error_message = 'Error occurred in the ConvertService.ashx: Error convertation timeout'
|
||||||
when -1
|
when -1
|
||||||
error_message = 'Error occurred in the ConvertService.ashx: Error convertation unknown'
|
error_message = 'Error occurred in the ConvertService.ashx: Error convertation unknown'
|
||||||
when 0
|
when 0
|
||||||
# public const int c_nErrorNo = 0
|
# public const int c_nErrorNo = 0
|
||||||
else
|
else
|
||||||
error_message = 'ErrorCode = ' + error_code.to_s # default value for the error message
|
error_message = 'ErrorCode = ' + error_code.to_s # default value for the error message
|
||||||
|
|||||||
Reference in New Issue
Block a user