r16072 by jghali - - set version in win-config.h to 1.4.0svn
scribus-commit
scribus-commit at lists.scribus.net
Sun Dec 5 22:47:49 CET 2010
Author: jghali
Date: Sun Dec 5 21:47:49 2010
New Revision: 16072
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16072
Log:
- set version in win-config.h to 1.4.0svn
- allow 134+ fileloader to load 1.4.0svn files
Modified:
branches/Version135/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
branches/Version135/Scribus/win32/vc8/win-config.h
Modified: branches/Version135/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16072&path=/branches/Version135/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ branches/Version135/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Sun Dec 5 21:47:49 2010
@@ -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;
}
Modified: branches/Version135/Scribus/win32/vc8/win-config.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16072&path=/branches/Version135/Scribus/win32/vc8/win-config.h
==============================================================================
--- branches/Version135/Scribus/win32/vc8/win-config.h (original)
+++ branches/Version135/Scribus/win32/vc8/win-config.h Sun Dec 5 21:47:49 2010
@@ -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). */
More information about the scribus-commit
mailing list