From: Alvin Penner Date: Sun, 28 Feb 2010 22:40:23 +0000 (-0500) Subject: patch by Horst Schottky for LP 529114 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=52d62650393407fd50887902c99c6dec650d74ea;p=inkscape.git patch by Horst Schottky for LP 529114 --- diff --git a/share/extensions/Barcode/Code128.py b/share/extensions/Barcode/Code128.py index 42342c400..2f0b327ed 100644 --- a/share/extensions/Barcode/Code128.py +++ b/share/extensions/Barcode/Code128.py @@ -2,6 +2,7 @@ Copyright (C) 2007 Martin Owens Debugged by Ralf Heinecke & Martin Siepmann 09/07/2007 +Debugged by Horst Schottky Feb. 27. 2010 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,7 +52,7 @@ class Object(Barcode): # Split up into sections of numbers, or charicters # This makes sure that all the charicters are encoded # In the best way posible for Code128 - for datum in re.findall(r'(?:(?:\d\d){2,})|.', text): + for datum in re.findall(r'(?:(?:\d\d){2,})|(?:^\d\d)|.', text): if len(datum) == 1: block = block + datum else: @@ -96,7 +97,7 @@ class Object(Barcode): i = pos if pos: - num = num + (math.abs(num - 102) * 2) + num = 204 - num else: i = 1