取消中晶ocr多语言识别,使用ocr汉王库

This commit is contained in:
yangjiaxuan 2023-03-03 12:00:14 +08:00
parent e51f0f52a2
commit 156b8377ad
4 changed files with 12 additions and 12 deletions

View File

@ -66,10 +66,10 @@ Dialog_Export::Dialog_Export(int total, const std::vector<int> &selectedIndexs,
m_supportType.push_back(SupportType(".pdf", "PDF - Portable Document Format", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
m_supportType.push_back(SupportType(".ofd", "OFD - Open Fixed-layout Document", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
m_supportType.push_back(SupportType(".gif", "GIF - Graphics Interchange Format", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
if (!getOcrPath().empty())
m_supportType.push_back(SupportType(".pdf", "OCR->PDF - Portable Document Format", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
#elif (defined (OEM_HUAGAO) || defined (OEM_HANWANG) || defined (OEM_CANGTIAN) || defined (OEM_LISICHENG)) && !defined(x86_64)
#elif !defined (x86_64) && !defined (loongarch64)
m_supportType.push_back(SupportType(".pdf", "OCR->PDF - Portable Document Format", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
m_supportType.push_back(SupportType(".ofd", "OCR->OFD - Open Fixed-layout Document", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
m_supportType.push_back(SupportType(".rtf", "OCR->RTF - Rich Text Format", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES));
@ -148,7 +148,7 @@ Dialog_Export::Dialog_Export(int total, const std::vector<int> &selectedIndexs,
ui->label_ocrType->setVisible(false);
ui->comboBox_ocrType->setVisible(false);
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
if (!getOcrPath().empty())
{
ui->label_ocrType->setVisible(isOcr());
@ -293,7 +293,7 @@ void Dialog_Export::on_dialog_accepted()
saveCfgValue("export", "exportType", exportType);
saveCfgValue("export", "saveAsMulti", ui->check_saveAsMulti->isChecked());
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
int ocrLanguage = ui->comboBox_ocrType->currentIndex();
saveCfgValue("export", "ocrLanguage", ocrLanguage);
#endif
@ -307,7 +307,7 @@ void Dialog_Export::on_filterSelected(const QString& filterName)
m_suffix = ui->fileDialog->nameFilters().indexOf(filterName);
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
ui->label_ocrType->setVisible(isOcr());
ui->comboBox_ocrType->setVisible(isOcr());
#endif

View File

@ -65,7 +65,7 @@ void HGAPI Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param)
if (p->m_isOcr)
{
#if defined(OEM_ZHONGJING)
#if 0
HGChar tmpFileName[256];
HGBase_GetTmpFileName("tif", tmpFileName, 256);

View File

@ -82,10 +82,10 @@ Dialog_SaveAs::Dialog_SaveAs(QWidget *parent) :
";;PDF - Portable Document Format(*.pdf)"
";;OFD - Open Fixed-layout Document(*.ofd)"
";;GIF - Graphics Interchange Format(*.gif)";
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
if (!getOcrPath().empty())
filter += ";;OCR->PDF - Portable Document Format(*.pdf)";
#elif (defined (OEM_HUAGAO) || defined (OEM_HANWANG) || defined (OEM_CANGTIAN) || defined (OEM_LISICHENG)) && !defined(x86_64)
#elif !defined (x86_64) && !defined (loongarch64)
filter += ";;OCR->PDF - Portable Document Format(*.pdf)";
filter += ";;OCR->OFD - Open Fixed-layout Document(*.ofd)";
filter += ";;OCR->RTF - Rich Text Format(*.rtf)";
@ -111,7 +111,7 @@ Dialog_SaveAs::Dialog_SaveAs(QWidget *parent) :
ui->label_ocrType->setVisible(false);
ui->comboBox_ocrType->setVisible(false);
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
if (!getOcrPath().empty())
{
ui->label_ocrType->setVisible(isOcr());
@ -244,7 +244,7 @@ void Dialog_SaveAs::on_dialog_accepted()
m_savePath = getStdFileName(path + "/" + name + extName);
}
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
int ocrLanguage = ui->comboBox_ocrType->currentIndex();
saveCfgValue("saveAs", "ocrLanguage", ocrLanguage);
#endif
@ -259,7 +259,7 @@ void Dialog_SaveAs::on_filterSelected(const QString& filterName)
m_suffix = ui->fileDialog->nameFilters().indexOf(filterName);
ui->btn_option->setEnabled(0 == m_suffix || 6 == m_suffix);
#if defined(OEM_ZHONGJING) && defined(HG_CMP_MSC)
#if 0
ui->label_ocrType->setVisible(isOcr());
ui->comboBox_ocrType->setVisible(isOcr());
#endif

View File

@ -431,7 +431,7 @@ HGResult MainWindow::saveImage(HGImage image, const HGImgFmtSaveInfo* info, bool
HGResult ret = HGBASE_ERR_FAIL;
#if defined(OEM_ZHONGJING)
#if 0
HGChar tmpFileName[256];
HGBase_GetTmpFileName("bmp", tmpFileName, 256);
ret = HGImgFmt_SaveImage(image, 0, info, tmpFileName);