Add format selection for office formats, if auto

This commit is contained in:
Anton Thomasson 2021-03-06 16:42:13 +01:00
parent e0eb980220
commit f36488c1b7

View file

@ -314,6 +314,10 @@ QString targetFormatIfAuto(QString documentFormat, QString mimeType, QJsonArray
{ {
return firstMatch(supportedMimeTypes, {Mimer::Postscript}); return firstMatch(supportedMimeTypes, {Mimer::Postscript});
} }
else if(Mimer::isOffice(mimeType))
{
return firstMatch(supportedMimeTypes, {Mimer::PDF, Mimer::Postscript, Mimer::PWG, Mimer::URF });
}
else if(Mimer::isImage(mimeType)) else if(Mimer::isImage(mimeType))
{ {
QStringList ImageFormatPrioList {Mimer::PNG, Mimer::PWG, Mimer::URF, Mimer::JPEG}; QStringList ImageFormatPrioList {Mimer::PNG, Mimer::PWG, Mimer::URF, Mimer::JPEG};