From 0966ad82e141fdb86b383caf07e20b9f23b471c5 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Fri, 23 Sep 2016 15:06:47 +0200 Subject: [PATCH] Removing PDF paragraph numbering (fixes #2425) --- openslides/motions/config_variables.py | 9 --------- openslides/motions/pdf.py | 13 ++----------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/openslides/motions/config_variables.py b/openslides/motions/config_variables.py index bc7590f67..b10f00237 100644 --- a/openslides/motions/config_variables.py +++ b/openslides/motions/config_variables.py @@ -229,12 +229,3 @@ def get_config_variables(): weight=375, group='Motions', subgroup='Export') - - yield ConfigVariable( - name='motions_pdf_paragraph_numbering', - default_value=False, - input_type='boolean', - label='Show paragraph numbering (only in PDF)', - weight=380, - group='Motions', - subgroup='Export') diff --git a/openslides/motions/pdf.py b/openslides/motions/pdf.py index fbbf224c3..296f77712 100644 --- a/openslides/motions/pdf.py +++ b/openslides/motions/pdf.py @@ -273,7 +273,6 @@ def convert_html_to_reportlab(pdf, text): tag.unwrap() # print paragraphs with numbers text = soup.body.contents - paragraph_number = 1 for paragraph in text: paragraph = str(paragraph) # ignore empty paragraphs (created by newlines/tabs of ckeditor) @@ -281,11 +280,7 @@ def convert_html_to_reportlab(pdf, text): continue if "
" in paragraph:
             txt = paragraph.replace('\n', '
').replace(' ', ' ') - if config["motions_pdf_paragraph_numbering"]: - pdf.append(Paragraph(txt, stylesheet['InnerMonotypeParagraph'], str(paragraph_number))) - paragraph_number += 1 - else: - pdf.append(Paragraph(txt, stylesheet['InnerMonotypeParagraph'])) + pdf.append(Paragraph(txt, stylesheet['InnerMonotypeParagraph'])) elif "" in paragraph: pdf.append(Paragraph(paragraph, stylesheet['InnerListParagraph'])) elif "" in paragraph: pdf.append(Paragraph(paragraph, stylesheet['InnerH3Paragraph'])) else: - if config["motions_pdf_paragraph_numbering"]: - pdf.append(Paragraph(paragraph, stylesheet['InnerParagraph'], str(paragraph_number))) - paragraph_number += 1 - else: - pdf.append(Paragraph(paragraph, stylesheet['InnerParagraph'])) + pdf.append(Paragraph(paragraph, stylesheet['InnerParagraph'])) def all_motion_cover(pdf, motions):