diff --git a/app/scanner/Scanner_zh_CN.qm b/app/scanner/Scanner_zh_CN.qm index d6a60039..f027b2c9 100644 Binary files a/app/scanner/Scanner_zh_CN.qm and b/app/scanner/Scanner_zh_CN.qm differ diff --git a/app/scanner/Scanner_zh_CN.ts b/app/scanner/Scanner_zh_CN.ts index 5e2182ab..502d7d64 100644 --- a/app/scanner/Scanner_zh_CN.ts +++ b/app/scanner/Scanner_zh_CN.ts @@ -293,27 +293,17 @@ - - OCR->PDF - Portable Document Format(*.pdf) - - - - - OCR->OFD - Open Fixed-layout Document(*.ofd) - - - - + Compression option 压缩选项 - + Save as multipages (TIFF/PDF/OFD/GIF) 多页保存(TIFF/PDF/OFD/GIF) - + 用户自定义页数 用户自定义页数 @@ -322,30 +312,30 @@ 多页保存(TIFF/PDF/OFD) - + 所有页 所有页 - - - - + + + + e.g. '%1%2' 例如.“%1%2” - + ok 确定 - + cancel 取消 - + Browse directory 文件夹路径 @@ -1615,24 +1605,20 @@ Please make sure the two passwords are the same. 升级到最新版本 - select version - 选择其他版本 + 选择其他版本 - Detected installable versions: - 检测到可安装版本: + 检测到可安装版本: - install - 安装 + 安装 - cancel - 取消 + 取消 @@ -1648,26 +1634,22 @@ Please make sure the two passwords are the same. 错误描述: - bug description: - 错误描述: + 错误描述: - - upgrade contents: - 升级内容: + 升级内容: - bug description: - + 错误描述: @@ -1687,14 +1669,12 @@ bug description: ,当前版本为: - tip - 提示 + 提示 - Already in current version - 当前版本已安装! + 当前版本已安装! @@ -2157,51 +2137,51 @@ bug description: 导出驱动日志 - + HuaGoScan 华高扫描软件 - + Grid 多列显示 - + Move To... 移动到... - + Insert files 插入文件 - - + + nodevice 没有发现扫描仪 - - - - - - + + + + + + Question 警告 - - + + modified, save it? 图像已被修改。 是否保存修改? - + file lost, remove it? 文件已丢失,是否删除? @@ -2210,7 +2190,7 @@ bug description: 已连接 - + disconnected 已断开连接 @@ -2227,39 +2207,39 @@ bug description: 扫描完成 - + Clear, then start scan 清空并启动扫描 - + Do NOT clear, then start scan 不清空并启动扫描 - + Already exist images in image list. Do you want to clear? 图像列表中已存在图像。 是否清空? - + Information 消息 - + Insufficient disk space 磁盘空间不足,请删除不需要的文件,以保证有足够的空间 - + Open images 打开图片 - + Insert images 插入图片 @@ -2272,202 +2252,217 @@ Do you want to clear? 保存失败 - + binary 黑白 - + gray 256级灰度 - + rgb 24位彩色 - + thumbnailBar enabled 显示缩略图栏 - + thumbnailBar hidden 隐藏缩略图栏 - - - + + + save succeed 保存成功 - - + + find savePath in thumbnail 图片名在列表中已存在 - + Please select at least one picture before export 请至少选中一张图片再进行导出 - + File name 文件名 - + File path 文件路径 - + File size 文件大小 - + Creation date/time 创建时间 - + Modified date/time 修改时间 - + Accessed date/time 访问时间 - + Format 格式 - + Width 宽度 - + Height 高度 - + depth 深度 - + Color model 色彩模式 - + DPI 每英寸像素点 - + Print size 打印尺寸 - + Frame - + None - + Mono 黑白 - + Gray 灰度 - + Color 彩色 - + Warning 警告 - + Device is Running! Please finish scanning first. 设备正在运行! 请先结束扫描。 - + Image processing failed 图像处理失败 - + Ocr init failed OCR初始化错误 - + Ocr failed OCR错误 - + + File does not exist + 文件不存在 + + + + Failed to load dynamic library + 加载动态库失败 + + + + File data error + 文件数据错误 + + + Failed 其他错误 - - - - - - - - - - + + + + + + + + + + already waked up device 已唤醒设备 - + be ready 就绪 - - - - - - + + + + + + folder limit 无法访问“我的文档”, 请前往“扫描至”更换可访问的扫描目录再进行扫描。 - + Insufficient access rights 文件访问权限不足 @@ -2480,47 +2475,47 @@ Please finish scanning first. 图像处理失败 - + Are you sure to close 您确定要关闭 - + ? 吗? - - + + close 关闭 - + tip 提示 - + Other versions not available 未获取到其他版本 - - + + The device does not support this operation 设备不支持该操作 - - + + IO error IO错误 - - - + + + error 错误 @@ -2535,17 +2530,17 @@ Continue to close? 是否继续关闭? - + Sure to sign out administrator account? 是否确定登出管理员账户? - + confirm the operation 确认操作 - + Are you sure to clear the rollor acount? 你确定要清除滚轴计数吗 @@ -2554,34 +2549,34 @@ Continue to close? 请重新进入关于界面以获取最新值 - + <p>%1: <a href='%2'>%3</a> - + <p>%1: %2 - + roller number 滚轴张数 - + open scanner 打开扫描仪 - - + + app name 华高扫描软件 - - + + success 成功 @@ -2598,18 +2593,22 @@ Continue to close? 失败 - - + + failed 失败 - + + + warning 警告 - + + + the disk space in the current path is unsufficient, please select a new path or clear the disk space in time. 当前路径磁盘空间不足, 请重新选择路径或及时清理磁盘空间。 @@ -2619,256 +2618,256 @@ Continue to close? 配置丢失 - + apply setting 应用配置 - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + start failed 启动失败 - + HanvonScan 汉王扫描软件 - + LanxumScan 立思辰扫描软件 - + CumtennScan 沧田扫描软件 - + auto save 自动保存 - + when switching pictures, save the edited pictures directly without reminding 切换图片时,不提醒,直接保存编辑过的图片 - + statusBar displayed 显示状态栏 - + statusBar hidden 隐藏状态栏 - + toolBar displayed 显示工具栏 - + toolBar hidden 隐藏工具栏 - + colorInfo enabled 启用图像信息 - + colorInfo disenabled 关闭图像信息 - + enabling automatic saving 启用自动保存 - + cancel auto save 取消自动保存 - + Automatically save the edited the edited iamge when switching pictures. To cancel, uncheck the menu item: image-> automatically save 切换图片时,自动保存编辑过的图像。若想取消,请取消勾选菜单项:图像->自动保存 - - - - - - - - - - - + + + + + + + + + + + yes 确定 - + save, do not remind again 保存,不再提醒 - - - - - - - - - + + + + + + + + + no 取消 - + found device 发现设备 - + reconnected 重新连接 - + already connected, but open faild 已经连接,但打开失败 - - + + save image failed: 存图失败: - - - - + + + + create savepath failed: 创建文件夹失败: - - + + %1%2%3.%4 %1%2%3.%4 - - + + create image doc failed: 创建图片文件失败: - - - - - - - - - - - - - + + + + + + + + + + + + + save image doc failed: 保存图片文件失败: - + start failed! 启动安装程序失败! - + There are pictures that have not been saved. Are you sure to close? 有图像未保存,确定关闭? - - - - - - - - - - + + + + + + + + + + tips 提示 - + Are you sure to close? 确定关闭? - + confirm operation 确认操作 - + are you sure to clear the roller count? 您确定要清除滚轴计数吗 - - - + + + hint 提示 - - + + Roller scanned count has been set to 0. 辊轴计数已置零 - - + + Roller scanned count reset failed. 重置滚轴计数失败 - + Error 错误 - + Document missing! It would be deleted or renamed. 文档丢失!文档可能已被删除或被重命名。 @@ -2901,28 +2900,28 @@ Are you sure to close? <br>导航地址: <a href='https://j.map.baidu.com/7e/1TO'>百度地图访问</a> - + About %1 关于 %1 - + <p>%1</p><p>Version: %2<br>CopyRight: &#169; %3</p><p>%4%5%6%7%8%9</p> <p>%1</p><p>版本: %2<br>版权: &#169; %3</p><p>%4%5%6%7%8%9</p> - + about %1 关于 %1 - + <p>Version: %1</p> <p>版本: %1</p> <p>版本: %1</p> - + <p>CopyRight: &#169; %1</p> <p>版权: &#169; %1</p> <p>版权: &#169; %1</p> diff --git a/app/scanner/dialog_exportimagefile.cpp b/app/scanner/dialog_exportimagefile.cpp index 9c76d211..912204e5 100644 --- a/app/scanner/dialog_exportimagefile.cpp +++ b/app/scanner/dialog_exportimagefile.cpp @@ -7,6 +7,7 @@ #include "HGUIGlobal.h" #include "HGString.h" #include +#include Dialog_ExportImageFile::Dialog_ExportImageFile(const QString &destPath, const QString &destName, const QString &destExt, bool isSaveAsMulti, int jpegQuality, int tiffCompressionBW, int tiffCompression, int tiffQuality, bool isOcr, @@ -71,10 +72,17 @@ void HGAPI Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param) break; } + QFile file(p->m_srcFiles[i]); + if (!file.exists()) + { + ret = HGBASE_ERR_FILENOTEXIST; + break; + } + emit p->updateProgress(i); HGImgFmtReader imgFmtReader = nullptr; - HGImgFmt_OpenImageReader(getStdString(p->m_srcFiles[i]).c_str(), 0, &imgFmtReader); + ret = HGImgFmt_OpenImageReader(getStdString(p->m_srcFiles[i]).c_str(), 0, &imgFmtReader); if (nullptr != imgFmtReader) { HGUInt count = 0; @@ -87,7 +95,7 @@ void HGAPI Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param) } HGImage img = nullptr; - HGImgFmt_LoadImageFromReader(imgFmtReader, j, nullptr, 0, HGBASE_IMGORIGIN_TOP, &img); + ret = HGImgFmt_LoadImageFromReader(imgFmtReader, j, nullptr, 0, HGBASE_IMGORIGIN_TOP, &img); if (nullptr != img) { ret = HGImgProc_AddToImageOCRList(ocrMgr, img); @@ -128,10 +136,17 @@ void HGAPI Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param) break; } + QFile file(p->m_srcFiles[i]); + if (!file.exists()) + { + ret = HGBASE_ERR_FILENOTEXIST; + break; + } + emit p->updateProgress(i); HGImgFmtReader imgFmtReader = nullptr; - HGImgFmt_OpenImageReader(getStdString(p->m_srcFiles[i]).c_str(), 0, &imgFmtReader); + ret = HGImgFmt_OpenImageReader(getStdString(p->m_srcFiles[i]).c_str(), 0, &imgFmtReader); if (nullptr != imgFmtReader) { HGUInt count = 0; @@ -144,7 +159,7 @@ void HGAPI Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param) } HGImage img = nullptr; - HGImgFmt_LoadImageFromReader(imgFmtReader, j, nullptr, 0, HGBASE_IMGORIGIN_TOP, &img); + ret = HGImgFmt_LoadImageFromReader(imgFmtReader, j, nullptr, 0, HGBASE_IMGORIGIN_TOP, &img); if (nullptr != img) { HGImgFmtSaveInfo saveInfo; @@ -201,10 +216,17 @@ void HGAPI Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param) break; } + QFile file(p->m_srcFiles[i]); + if (!file.exists()) + { + ret = HGBASE_ERR_FILENOTEXIST; + break; + } + emit p->updateProgress(i); HGImgFmtReader imgFmtReader = nullptr; - HGImgFmt_OpenImageReader(getStdString(p->m_srcFiles[i]).c_str(), 0, &imgFmtReader); + ret = HGImgFmt_OpenImageReader(getStdString(p->m_srcFiles[i]).c_str(), 0, &imgFmtReader); if (nullptr != imgFmtReader) { HGUInt count = 0; @@ -217,7 +239,7 @@ void HGAPI Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param) } HGImage img = nullptr; - HGImgFmt_LoadImageFromReader(imgFmtReader, j, nullptr, 0, HGBASE_IMGORIGIN_TOP, &img); + ret = HGImgFmt_LoadImageFromReader(imgFmtReader, j, nullptr, 0, HGBASE_IMGORIGIN_TOP, &img); if (nullptr != img) { char fileName[512]; diff --git a/app/scanner/dialog_multirotateimagefile.cpp b/app/scanner/dialog_multirotateimagefile.cpp index 11ccd97c..ddb006f4 100644 --- a/app/scanner/dialog_multirotateimagefile.cpp +++ b/app/scanner/dialog_multirotateimagefile.cpp @@ -4,6 +4,7 @@ #include "HGUIGlobal.h" #include "mainwindow.h" #include +#include Dialog_MultiRotateImageFile::Dialog_MultiRotateImageFile(const QStringList &fileList, int rotateType, QWidget *parent) : QDialog(parent), @@ -49,19 +50,26 @@ void HGAPI Dialog_MultiRotateImageFile::ThreadFunc(HGThread thread, HGPointer pa break; } + QFile file(p->m_fileList[i]); + if (!file.exists()) + { + ret = HGBASE_ERR_FILENOTEXIST; + break; + } + emit p->updateProgress(i); HGImage img = nullptr; HGImgFmtReader imgFmtReader = nullptr; - HGImgFmt_OpenImageReader(getStdString(p->m_fileList[i]).c_str(), 0, &imgFmtReader); + ret = HGImgFmt_OpenImageReader(getStdString(p->m_fileList[i]).c_str(), 0, &imgFmtReader); if (nullptr != imgFmtReader) { HGUInt pageCount = 0; HGImgFmt_GetImagePageCount(imgFmtReader, &pageCount); if (1 == pageCount) { - HGImgFmt_LoadImageFromReader(imgFmtReader, 0, nullptr, 0, HGBASE_IMGORIGIN_TOP, &img); + ret = HGImgFmt_LoadImageFromReader(imgFmtReader, 0, nullptr, 0, HGBASE_IMGORIGIN_TOP, &img); if (nullptr != img) { HGImageInfo imgInfo; diff --git a/app/scanner/mainwindow.cpp b/app/scanner/mainwindow.cpp index 426b1f13..1a2b9c27 100644 --- a/app/scanner/mainwindow.cpp +++ b/app/scanner/mainwindow.cpp @@ -3919,6 +3919,18 @@ QString MainWindow::getLogInfo(HGResult ret) { str = tr("Ocr failed"); } + else if (HGBASE_ERR_FILENOTEXIST == ret) + { + str = tr("File does not exist"); + } + else if (HGBASE_ERR_LOADLIBRARY == ret) + { + str = tr("Failed to load dynamic library"); + } + else if (HGBASE_ERR_FILEERROR == ret) + { + str = tr("File data error"); + } else { str = tr("Failed"); diff --git a/app/scanner/qt_zh_CN.ts b/app/scanner/qt_zh_CN.ts index 143a6173..43bf5108 100644 --- a/app/scanner/qt_zh_CN.ts +++ b/app/scanner/qt_zh_CN.ts @@ -267,14 +267,6 @@ Browse directory - - OCR->PDF - Portable Document Format(*.pdf) - - - - OCR->OFD - Open Fixed-layout Document(*.ofd) - - GIF - Graphics Interchange Format(*.gif) @@ -1240,22 +1232,6 @@ Please make sure the two passwords are the same. upgrade the latest version - - select version - - - - Detected installable versions: - - - - install - - - - cancel - - upgrade online @@ -1272,30 +1248,6 @@ Please make sure the two passwords are the same. ,the current version is : - - tip - - - - Already in current version - - - - bug description: - - - - - upgrade contents: - - - - - -bug description: - - - Dialog_upgradeFirmware @@ -2145,6 +2097,18 @@ Are you sure to close? Please select at least one picture before export + + File does not exist + 文件不存在 + + + Failed to load dynamic library + + + + File data error + + Phonon::