From 6b54787c8edcb9ed278c4ffe67053d769cbaa80e Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Mon, 1 Feb 2021 23:00:51 -0600 Subject: [PATCH] Fix in render cell --- source/easymacro.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/easymacro.py b/source/easymacro.py index 0745d96..cc56233 100644 --- a/source/easymacro.py +++ b/source/easymacro.py @@ -1166,6 +1166,9 @@ class LODocument(object): return def to_pdf(self, path: str='', args: dict={}): + """ + https://wiki.documentfoundation.org/Macros/Python_Guide/PDF_export_filter_data + """ path_pdf = path filter_name = '{}_pdf_Export'.format(self.type) filter_data = dict_to_property(args, True) @@ -2558,6 +2561,7 @@ class LOCalcRange(object): cell = None if isinstance(value, dict): for k, v in value.items(): + # ~ print(1, 'RENDER', k, v) cell = self._render_value(k, v, key) return cell elif isinstance(value, (list, tuple)): @@ -2569,7 +2573,11 @@ class LOCalcRange(object): search = f'{{{parent}.{key}}}' ranges = self.find_all(search) - for cell in ranges or range(0): + if ranges is None: + return + + # ~ for cell in ranges or range(0): + for cell in ranges: self._set_new_value(cell, search, value) return LOCalcRange(cell)