Remove odt file format option from print model
This commit is contained in:
@@ -67,10 +67,10 @@ void PrintDialog::on_printButton_clicked()
|
|||||||
|
|
||||||
void PrintDialog::on_printFileButton_clicked()
|
void PrintDialog::on_printFileButton_clicked()
|
||||||
{
|
{
|
||||||
QString fn = QFileDialog::getSaveFileName(this,tr("Select PDF output file"),QString(),tr("ODF files (*.odt);;PDF Files(*.pdf);;HTML-Files (*.htm *.html);;All Files (*)"));
|
QString fn = QFileDialog::getSaveFileName(this,tr("Select output file"),QString(),tr("PDF files(*.pdf);;HTML files (*.htm *.html);;All files (*)"));
|
||||||
if (fn.isEmpty())
|
if (fn.isEmpty())
|
||||||
return;
|
return;
|
||||||
if (! (fn.endsWith(".odt", Qt::CaseInsensitive) || fn.endsWith(".pdf", Qt::CaseInsensitive) || fn.endsWith(".htm", Qt::CaseInsensitive) || fn.endsWith(".html", Qt::CaseInsensitive)) )
|
if (! (fn.endsWith(".pdf", Qt::CaseInsensitive) || fn.endsWith(".htm", Qt::CaseInsensitive) || fn.endsWith(".html", Qt::CaseInsensitive)) )
|
||||||
fn += ".pdf"; // default
|
fn += ".pdf"; // default
|
||||||
if (fn.endsWith(".pdf", Qt::CaseInsensitive)) {
|
if (fn.endsWith(".pdf", Qt::CaseInsensitive)) {
|
||||||
QPrinter printer;
|
QPrinter printer;
|
||||||
@@ -90,7 +90,7 @@ void PrintDialog::printToFile()
|
|||||||
{
|
{
|
||||||
if (printfilename.isEmpty())
|
if (printfilename.isEmpty())
|
||||||
return;
|
return;
|
||||||
if (! (printfilename.endsWith(".odt", Qt::CaseInsensitive) || printfilename.endsWith(".pdf", Qt::CaseInsensitive) || printfilename.endsWith(".htm", Qt::CaseInsensitive) || printfilename.endsWith(".html", Qt::CaseInsensitive)) )
|
if (! (printfilename.endsWith(".pdf", Qt::CaseInsensitive) || printfilename.endsWith(".htm", Qt::CaseInsensitive) || printfilename.endsWith(".html", Qt::CaseInsensitive)) )
|
||||||
printfilename += ".pdf"; // default
|
printfilename += ".pdf"; // default
|
||||||
if (printfilename.endsWith(".pdf", Qt::CaseInsensitive)) {
|
if (printfilename.endsWith(".pdf", Qt::CaseInsensitive)) {
|
||||||
QPrinter printer;
|
QPrinter printer;
|
||||||
|
|||||||
Reference in New Issue
Block a user