From 1c685517c586d79e5e02a0be102442f33aaf0a52 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 4 Mar 2004 15:47:00 +0000 Subject: [PATCH] Update svn: r2963 --- src/docgen/LPRDoc.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/docgen/LPRDoc.py b/src/docgen/LPRDoc.py index 908763b32..bf125c201 100644 --- a/src/docgen/LPRDoc.py +++ b/src/docgen/LPRDoc.py @@ -76,12 +76,6 @@ _SUPER = "Super" # Units conversion # #------------------------------------------------------------------------ -def u2cm(unit): - """ - Convert gnome-print units to cm - """ - return 2.54 * unit / 72.0 - def cm2u(cm): """ Convert cm to gnome-print units @@ -221,6 +215,7 @@ class GnomePrintParagraph: self.style = paragraph_style self.fontstyle = self.style.get_font() self.piece_list = [] + self.lines = [] def add_piece(self,directive,text): """ @@ -320,12 +315,12 @@ class GnomePrintParagraph: if get_text_width(the_text + element + " ",fontstyle) < avail_width: the_text = the_text + element + " " else: - #__text contains as many words as this __width allows + # the_text contains as much as avail_width allows nlines += 1 the_text = element + " " avail_width = width - #if __text still contains data, we will want to print it out + # if the_text still contains data, we will want to print it out if the_text: avail_width = width - get_text_width(the_text,fontstyle)