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 @@
-
-
-
-
-
-
-
-
-
-
-
+
压缩选项
-
+
多页保存(TIFF/PDF/OFD/GIF)
-
+
用户自定义页数
@@ -322,30 +312,30 @@
多页保存(TIFF/PDF/OFD)
-
+
所有页
-
-
-
-
+
+
+
+
例如.“%1%2”
-
+
确定
-
+
取消
-
+
文件夹路径
@@ -1615,24 +1605,20 @@ Please make sure the two passwords are the same.
升级到最新版本
-
- 选择其他版本
+ 选择其他版本
-
- 检测到可安装版本:
+ 检测到可安装版本:
-
- 安装
+ 安装
-
- 取消
+ 取消
@@ -1648,26 +1634,22 @@ Please make sure the two passwords are the same.
错误描述:
-
- 错误描述:
+ 错误描述:
-
-
- 升级内容:
+ 升级内容:
-
-
+
错误描述:
@@ -1687,14 +1669,12 @@ bug description:
,当前版本为:
-
- 提示
+ 提示
-
- 当前版本已安装!
+ 当前版本已安装!
@@ -2157,51 +2137,51 @@ bug description:
导出驱动日志
-
+
华高扫描软件
-
+
多列显示
-
+
移动到...
-
+
插入文件
-
-
+
+
没有发现扫描仪
-
-
-
-
-
-
+
+
+
+
+
+
警告
-
-
+
+
图像已被修改。
是否保存修改?
-
+
文件已丢失,是否删除?
@@ -2210,7 +2190,7 @@ bug description:
已连接
-
+
已断开连接
@@ -2227,39 +2207,39 @@ bug description:
扫描完成
-
+
清空并启动扫描
-
+
不清空并启动扫描
-
+
图像列表中已存在图像。
是否清空?
-
+
消息
-
+
磁盘空间不足,请删除不需要的文件,以保证有足够的空间
-
+
打开图片
-
+
插入图片
@@ -2272,202 +2252,217 @@ Do you want to clear?
保存失败
-
+
黑白
-
+
256级灰度
-
+
24位彩色
-
+
显示缩略图栏
-
+
隐藏缩略图栏
-
-
-
+
+
+
保存成功
-
-
+
+
图片名在列表中已存在
-
+
请至少选中一张图片再进行导出
-
+
文件名
-
+
文件路径
-
+
文件大小
-
+
创建时间
-
+
修改时间
-
+
访问时间
-
+
格式
-
+
宽度
-
+
高度
-
+
深度
-
+
色彩模式
-
+
每英寸像素点
-
+
打印尺寸
-
+
帧
-
+
无
-
+
黑白
-
+
灰度
-
+
彩色
-
+
警告
-
+
设备正在运行!
请先结束扫描。
-
+
图像处理失败
-
+
OCR初始化错误
-
+
OCR错误
-
+
+
+ 文件不存在
+
+
+
+
+ 加载动态库失败
+
+
+
+
+ 文件数据错误
+
+
+
其他错误
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
已唤醒设备
-
+
就绪
-
-
-
-
-
-
+
+
+
+
+
+
无法访问“我的文档”,
请前往“扫描至”更换可访问的扫描目录再进行扫描。
-
+
文件访问权限不足
@@ -2480,47 +2475,47 @@ Please finish scanning first.
图像处理失败
-
+
您确定要关闭
-
+
吗?
-
-
+
+
关闭
-
+
提示
-
+
未获取到其他版本
-
-
+
+
设备不支持该操作
-
-
+
+
IO错误
-
-
-
+
+
+
错误
@@ -2535,17 +2530,17 @@ Continue to close?
是否继续关闭?
-
+
是否确定登出管理员账户?
-
+
确认操作
-
+
你确定要清除滚轴计数吗
@@ -2554,34 +2549,34 @@ Continue to close?
请重新进入关于界面以获取最新值
-
+
-
+
-
+
滚轴张数
-
+
打开扫描仪
-
-
+
+
华高扫描软件
-
-
+
+
成功
@@ -2598,18 +2593,22 @@ Continue to close?
失败
-
-
+
+
失败
-
+
+
+
警告
-
+
+
+
当前路径磁盘空间不足,
请重新选择路径或及时清理磁盘空间。
@@ -2619,256 +2618,256 @@ Continue to close?
配置丢失
-
+
应用配置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
启动失败
-
+
汉王扫描软件
-
+
立思辰扫描软件
-
+
沧田扫描软件
-
+
自动保存
-
+
切换图片时,不提醒,直接保存编辑过的图片
-
+
显示状态栏
-
+
隐藏状态栏
-
+
显示工具栏
-
+
隐藏工具栏
-
+
启用图像信息
-
+
关闭图像信息
-
+
启用自动保存
-
+
取消自动保存
-
+
切换图片时,自动保存编辑过的图像。若想取消,请取消勾选菜单项:图像->自动保存
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
确定
-
+
保存,不再提醒
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
取消
-
+
发现设备
-
+
重新连接
-
+
已经连接,但打开失败
-
-
+
+
存图失败:
-
-
-
-
+
+
+
+
创建文件夹失败:
-
-
+
+
%1%2%3.%4
-
-
+
+
创建图片文件失败:
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
保存图片文件失败:
-
+
启动安装程序失败!
-
+
有图像未保存,确定关闭?
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
提示
-
+
确定关闭?
-
+
确认操作
-
+
您确定要清除滚轴计数吗
-
-
-
+
+
+
提示
-
-
+
+
辊轴计数已置零
-
-
+
+
重置滚轴计数失败
-
+
错误
-
+
文档丢失!文档可能已被删除或被重命名。
@@ -2901,28 +2900,28 @@ Are you sure to close?
<br>导航地址: <a href='https://j.map.baidu.com/7e/1TO'>百度地图访问</a>
-
+
关于 %1
-
+
<p>%1</p><p>版本: %2<br>版权: © %3</p><p>%4%5%6%7%8%9</p>
-
+
关于 %1
-
+
<p>版本: %1</p>
<p>版本: %1</p>
-
+
<p>版权: © %1</p>
<p>版权: © %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 @@
-
-
-
-
-
-
-
-
@@ -1240,22 +1232,6 @@ Please make sure the two passwords are the same.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1272,30 +1248,6 @@ Please make sure the two passwords are the same.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Dialog_upgradeFirmware
@@ -2145,6 +2097,18 @@ Are you sure to close?
+
+
+ 文件不存在
+
+
+
+
+
+
+
+
+
Phonon::