r20315 by jghali - make barcode generator more robust vs different platform line endings in barcode.ps
scribus-commit
scribus-commit at lists.scribus.net
Tue Aug 11 23:22:56 UTC 2015
Author: jghali
Date: Tue Aug 11 23:22:56 2015
New Revision: 20315
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20315
Log:
make barcode generator more robust vs different platform line endings in barcode.ps
Modified:
trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
Modified: trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20315&path=/trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp (original)
+++ trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp Tue Aug 11 23:22:56 2015
@@ -54,10 +54,10 @@
f.close();
QRegExp rx(
- "\\n% --BEGIN (RESOURCE|RENDERER|ENCODER) ([\\w-]+)--\\n"
- "(.*\\n)?"
- "(%%BeginResource.*\\n)"
- "% --END \\1 \\2--\\n");
+ "[\\r\\n]+% --BEGIN (RESOURCE|RENDERER|ENCODER) ([\\w-]+)--[\\r\\n]+"
+ "(.*[\\r\\n]+)?"
+ "(%%BeginResource.*[\\r\\n]+)"
+ "% --END \\1 \\2--[\\r\\n]+");
rx.setMinimal(true);
int pos = 0;
while ( (pos = rx.indexIn(bwipp, pos)) != -1 )
@@ -73,11 +73,11 @@
if (restype=="ENCODER")
{
QRegExp rxhead(
- "% --REQUIRES (.*)--\\n"
- "% --DESC:(.*)\\n"
- "% --EXAM:(.*)\\n"
- "% --EXOP:(.*)\\n"
- "% --RNDR:(.*)\\n"
+ "% --REQUIRES (.*)--[\\r\\n]+"
+ "% --DESC:(.*)[\\r\\n]+"
+ "% --EXAM:(.*)[\\r\\n]+"
+ "% --EXOP:(.*)[\\r\\n]+"
+ "% --RNDR:(.*)[\\r\\n]+"
);
rxhead.indexIn(reshead);
resreqs[resname]=rxhead.cap(1).trimmed();
More information about the scribus-commit
mailing list