Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 16071 → Rev 16072

/branches/Version135/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
122,9 → 122,16
}
// if (docBytes.left(16) == "<SCRIBUSUTF8NEW " && docBytes.left(35).contains("Version=\"1.3.4"))
// return true;
QRegExp regExp("Version=\"1.3.[4-9]");
QRegExp regExp134("Version=\"1.3.[4-9]");
QRegExp regExp140("Version=\"1.4.[0-9]");
int startElemPos = docBytes.left(512).indexOf("<SCRIBUSUTF8NEW ");
return startElemPos >= 0 && (regExp.indexIn(docBytes.mid(startElemPos, 64)) >= 0);
if (startElemPos >= 0)
{
bool is134 = ( regExp134.indexIn(docBytes.mid(startElemPos, 64)) >= 0 );
bool is140 = ( regExp140.indexIn(docBytes.mid(startElemPos, 64)) >= 0 );
return (is134 || is140);
}
return false;
}
 
QString Scribus134Format::readSLA(const QString & fileName)
144,14 → 151,20
loadRawText(fileName, docBytes);
}
QString docText("");
QRegExp regExp("Version=\"1.3.[4-9]");
int startElemPos = docBytes.left(512).indexOf("<SCRIBUSUTF8NEW ");
if (startElemPos >= 0 && (regExp.indexIn(docBytes.mid(startElemPos, 64)) >= 0))
docText = QString::fromUtf8(docBytes);
else
if (startElemPos >= 0)
{
QRegExp regExp134("Version=\"1.3.[4-9]");
QRegExp regExp140("Version=\"1.4.[0-9]");
bool is134 = ( regExp134.indexIn(docBytes.mid(startElemPos, 64)) >= 0 );
bool is140 = ( regExp140.indexIn(docBytes.mid(startElemPos, 64)) >= 0 );
if (is134 || is140)
docText = QString::fromUtf8(docBytes);
if (docText.endsWith(QChar(10)) || docText.endsWith(QChar(13)))
docText.truncate(docText.length()-1);
}
if (docText.isEmpty())
return QString::null;
if (docText.endsWith(QChar(10)) || docText.endsWith(QChar(13)))
docText.truncate(docText.length()-1);
return docText;
}
 
/branches/Version135/Scribus/win32/vc8/win-config.h
177,7 → 177,7
#define STDC_HEADERS 1
 
/* Version number of package */
#define VERSION "1.3.9svn"
#define VERSION "1.4.0svn"
 
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */