加入ocr-rtf格式

This commit is contained in:
yangjiaxuan 2022-09-02 13:08:51 +08:00
parent 4ac06c7bdf
commit a8bd4fee99
5 changed files with 8 additions and 2 deletions

Binary file not shown.

View File

@ -1681,7 +1681,7 @@ bug description:
<message> <message>
<location filename="HGImgThumb.cpp" line="1214"/> <location filename="HGImgThumb.cpp" line="1214"/>
<source>unsupported file format</source> <source>unsupported file format</source>
<translation>jpgbmppngtif/tiffpdf和ofd格式</translation> <translation type="unfinished">jpgbmppngtif/tiffgifpdf和ofd格式</translation>
</message> </message>
<message> <message>
<location filename="HGImgThumb.cpp" line="1230"/> <location filename="HGImgThumb.cpp" line="1230"/>

View File

@ -8,6 +8,7 @@ CutPaperTool::CutPaperTool(QWidget *parent) :
ui(new Ui::CutPaperTool) ui(new Ui::CutPaperTool)
{ {
ui->setupUi(this); ui->setupUi(this);
setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
connect(ui->widget,SIGNAL(cutRectX(double)),this,SLOT(cutRectXSlot(double))); connect(ui->widget,SIGNAL(cutRectX(double)),this,SLOT(cutRectXSlot(double)));
connect(ui->widget,SIGNAL(cutRectY(double)),this,SLOT(cutRectYSlot(double))); connect(ui->widget,SIGNAL(cutRectY(double)),this,SLOT(cutRectYSlot(double)));
connect(ui->widget,SIGNAL(cutRectWidth(double)),this,SLOT(cutRectWidthSlot(double))); connect(ui->widget,SIGNAL(cutRectWidth(double)),this,SLOT(cutRectWidthSlot(double)));

View File

@ -43,6 +43,7 @@ static struct
, {".gif", "GIF - Graphics Interchange Format", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES} , {".gif", "GIF - Graphics Interchange Format", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES}
, {".pdf", "OCR->PDF - Portable Document Format", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES} , {".pdf", "OCR->PDF - Portable Document Format", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES}
, {".ofd", "OCR->OFD - Open Fixed-layout Document", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES} , {".ofd", "OCR->OFD - Open Fixed-layout Document", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES}
, {".rtf", "OCR->RTF - Rich Text Format", FILE_TYPE_ATTR_THIRD_HANDLER | FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES}
#endif #endif
}; };

View File

@ -86,7 +86,8 @@ Dialog_SaveAs::Dialog_SaveAs(QWidget *parent) :
"OFD - Open Fixed-layout Document(*.ofd);;" "OFD - Open Fixed-layout Document(*.ofd);;"
"GIF - Graphics Interchange Format(*.gif);;" "GIF - Graphics Interchange Format(*.gif);;"
"OCR->PDF - Portable Document Format(*.pdf);;" "OCR->PDF - Portable Document Format(*.pdf);;"
"OCR->OFD - Open Fixed-layout Document(*.ofd)"); "OCR->OFD - Open Fixed-layout Document(*.ofd);;"
"OCR->RTF - Rich Text Format(*.rtf)");
#endif #endif
connect(ui->fileDialog, SIGNAL(accepted()), this, SLOT(on_dialog_accepted())); connect(ui->fileDialog, SIGNAL(accepted()), this, SLOT(on_dialog_accepted()));
@ -177,6 +178,9 @@ void Dialog_SaveAs::on_dialog_accepted()
case 8: case 8:
extName = ".ofd"; extName = ".ofd";
break; break;
case 9:
extName = ".rtf";
break;
} }
assert(!extName.isEmpty()); assert(!extName.isEmpty());