r24264 by jghali - Small code cleanup

scribus-commit scribus-commit at lists.scribus.net
Wed Nov 18 21:01:55 UTC 2020


Author: jghali
Date: Wed Nov 18 21:01:55 2020
New Revision: 24264

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24264
Log:
Small code cleanup

Modified:
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24264&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp	Wed Nov 18 21:01:55 2020
@@ -135,15 +135,14 @@
 		// Not gzip encoded, just load it
 		loadRawText(fileName, docBytes);
 	}
-//	if (docBytes.left(16) == "<SCRIBUSUTF8NEW " && docBytes.left(35).contains("Version=\"1.3.4"))
-//		return true;
+
 	QRegExp regExp134("Version=\"1.3.[4-9]");
 	QRegExp regExp140("Version=\"1.4.[0-9]");
 	int startElemPos = docBytes.left(512).indexOf("<SCRIBUSUTF8NEW ");
 	if (startElemPos >= 0)
 	{
-		bool is134 = ( regExp134.indexIn(docBytes.mid(startElemPos, 64)) >= 0 );
-		bool is140 = ( regExp140.indexIn(docBytes.mid(startElemPos, 64)) >= 0 );
+		bool is134 = (regExp134.indexIn(docBytes.mid(startElemPos, 64)) >= 0);
+		bool is140 = (regExp140.indexIn(docBytes.mid(startElemPos, 64)) >= 0);
 		return (is134 || is140);
 	}
 	return false;

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24264&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Wed Nov 18 21:01:55 2020
@@ -141,11 +141,12 @@
 		// Not gzip encoded, just load it
 		loadRawText(fileName, docBytes);
 	}
+
 	QRegExp regExp150("Version=\"1.5.[0-9]");
 	int startElemPos = docBytes.left(512).indexOf("<SCRIBUSUTF8NEW ");
 	if (startElemPos >= 0)
 	{
-		bool is150 = ( regExp150.indexIn(docBytes.mid(startElemPos, 64)) >= 0 );
+		bool is150 = (regExp150.indexIn(docBytes.mid(startElemPos, 64)) >= 0);
 		return is150;
 	}
 	return false;




More information about the scribus-commit mailing list