Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 17720 → Rev 17721

/branches/Version14x/Scribus/scribus/printdialog.cpp
313,7 → 313,14
if (fi.isRelative()) // if (m_doc->DocName.startsWith( tr("Document")))
LineEdit1->setText( QDir::toNativeSeparators(QDir::currentPath() + "/" + m_doc->DocName + ".ps") );
else
LineEdit1->setText( QDir::toNativeSeparators(fi.path() + "/" + fi.baseName() + ".ps") );
{
QString completeBaseName = fi.completeBaseName();
if (completeBaseName.endsWith(".sla", Qt::CaseInsensitive))
if (completeBaseName.length() > 4) completeBaseName.chop(4);
if (completeBaseName.endsWith(".gz", Qt::CaseInsensitive))
if (completeBaseName.length() > 3) completeBaseName.chop(3);
LineEdit1->setText( QDir::toNativeSeparators(fi.path() + "/" + completeBaseName + ".ps") );
}
}
 
// Get page description language supported by the selected printer
/branches/Version14x/Scribus/scribus/scribus.cpp
4521,8 → 4521,13
if (doc->hasName)
{
QFileInfo fi(doc->DocName);
QString completeBaseName = fi.completeBaseName();
if (completeBaseName.endsWith(".sla", Qt::CaseInsensitive))
completeBaseName.chop(4);
else if (completeBaseName.endsWith(".gz", Qt::CaseInsensitive))
completeBaseName.chop(3);
wdir = QDir::fromNativeSeparators( fi.path() );
fna = QDir::fromNativeSeparators( fi.path()+"/"+fi.baseName()+".sla" );
fna = QDir::fromNativeSeparators( fi.path()+"/"+completeBaseName+".sla" );
}
else
{
4878,7 → 4883,12
if (!doc->DocName.startsWith( tr("Document")))
{
QFileInfo fi(doc->DocName);
doc->Print_Options.filename = fi.path()+"/"+fi.baseName()+".ps";
QString completeBaseName = fi.completeBaseName();
if (completeBaseName.endsWith(".sla", Qt::CaseInsensitive))
if (completeBaseName.length() > 4) completeBaseName.chop(4);
if (completeBaseName.endsWith(".gz", Qt::CaseInsensitive))
if (completeBaseName.length() > 3) completeBaseName.chop(3);
doc->Print_Options.filename = fi.path()+"/"+completeBaseName+".ps";
}
else
{
8864,8 → 8874,8
if (!defNa.isEmpty())
{
QFileInfo f(defNa);
dia->setExtension(f.completeSuffix());
dia->setZipExtension(f.completeSuffix() + ".gz");
dia->setExtension(f.suffix());
dia->setZipExtension(f.suffix() + ".gz");
dia->setSelection(defNa);
}
if (optionFlags & fdDirectoriesOnly)
/branches/Version14x/Scribus/scribus/pdfopts.cpp
75,9 → 75,14
else
{
QFileInfo fi(docFileName);
QString completeBaseName = fi.completeBaseName();
if (completeBaseName.endsWith(".sla", Qt::CaseInsensitive))
if (completeBaseName.length() > 4) completeBaseName.chop(4);
if (completeBaseName.endsWith(".gz", Qt::CaseInsensitive))
if (completeBaseName.length() > 3) completeBaseName.chop(3);
if (fi.exists())
{
QString fileName(fi.path()+"/"+fi.baseName()+".pdf");
QString fileName(fi.path() + "/" + completeBaseName + ".pdf");
fileNameLineEdit->setText( QDir::toNativeSeparators(fileName) );
}
else
86,7 → 91,7
QString pdfdir = dirs->get("pdf", fi.path());
if (pdfdir.right(1) != "/")
pdfdir += "/";
QString fileName(pdfdir+fi.baseName()+".pdf");
QString fileName(pdfdir + completeBaseName + ".pdf");
fileNameLineEdit->setText( QDir::toNativeSeparators(fileName) );
}
}
/branches/Version14x/Scribus/scribus/customfdialog.cpp
456,26 → 456,28
 
void CustomFDialog::handleCompress()
{
QFileInfo tmp;
tmp.setFile(selectedFile());
QString e(tmp.completeSuffix());
QStringList ex = e.split(".", QString::SkipEmptyParts);
QString baseExt = "";
for (int a = 0; a < ex.count(); a++)
QString fileName;
QFileInfo tmp(selectedFile());
QString fn(tmp.fileName());
QStringList fc = fn.split(".", QString::KeepEmptyParts);
if (fc.count() > 0)
fileName = fc.at(0);
for (int a = 1; a < fc.count(); a++)
{
if ((ex[a] != "sla") && (ex[a] != "SLA") && (ex[a] != "gz") && (ex[a] != "GZ"))
baseExt += "."+ex[a];
if (fc.at(a).compare("sla", Qt::CaseInsensitive) == 0)
continue;
if (fc.at(a).compare("gz", Qt::CaseInsensitive) == 0)
continue;
if (fc.at(a).compare(ext, Qt::CaseInsensitive) == 0)
continue;
if (fc.at(a).compare(extZip, Qt::CaseInsensitive) == 0)
continue;
fileName += "." + fc[a];
}
if (SaveZip->isChecked())
{
if (e != extZip)
tmp.setFile(tmp.baseName() + baseExt + "." + extZip);
}
tmp.setFile(fileName + "." + extZip);
else
{
if (e != ext)
tmp.setFile(tmp.baseName() + baseExt + "." + ext);
}
tmp.setFile(fileName + "." + ext);
setSelection(tmp.fileName());
}