From 205529f448ace47aebaa65c6729a0c24f50a470d Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Wed, 17 Dec 2014 19:57:43 -0800 Subject: [PATCH] 8185: Gramps freeze after defining a report stile with German cm values --- gramps/gen/plug/docgen/stylesheet.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gramps/gen/plug/docgen/stylesheet.py b/gramps/gen/plug/docgen/stylesheet.py index fed5b97b8..67f7b149b 100644 --- a/gramps/gen/plug/docgen/stylesheet.py +++ b/gramps/gen/plug/docgen/stylesheet.py @@ -45,7 +45,6 @@ from .paragraphstyle import ParagraphStyle from .fontstyle import FontStyle from .tablestyle import TableStyle, TableCellStyle from .graphicstyle import GraphicsStyle -from gramps.gen.const import GRAMPS_LOCALE as glocale #------------------------------------------------------------------------- # @@ -406,17 +405,17 @@ class SheetParser(handler.ContentHandler): elif tag == "para": if 'description' in attrs: self.p.set_description(attrs['description']) - self.p.set_right_margin(glocale.float(attrs['rmargin'])) - self.p.set_left_margin(glocale.float(attrs['lmargin'])) - self.p.set_first_indent(glocale.float(attrs['first'])) + self.p.set_right_margin(float(attrs['rmargin'])) + self.p.set_left_margin(float(attrs['lmargin'])) + self.p.set_first_indent(float(attrs['first'])) try: # This is needed to read older style files # lacking tmargin and bmargin - self.p.set_top_margin(glocale.float(attrs['tmargin'])) - self.p.set_bottom_margin(glocale.float(attrs['bmargin'])) + self.p.set_top_margin(float(attrs['tmargin'])) + self.p.set_bottom_margin(float(attrs['bmargin'])) except KeyError: pass - self.p.set_padding(glocale.float(attrs['pad'])) + self.p.set_padding(float(attrs['pad'])) self.p.set_alignment(int(attrs['align'])) self.p.set_right_border(int(attrs['rborder'])) self.p.set_header_level(int(attrs['level']))