From cbeb691a419be6df667553206738e9a124f3aade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 10 Dec 2014 15:28:45 +0100 Subject: [PATCH] legi2odf: fix handling of captions (#6132) --- legi2odf/legi2odf.xsl | 27 ++++++++++++++++++++++++++- odf2legi/odf2legi.py | 1 + 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/legi2odf/legi2odf.xsl b/legi2odf/legi2odf.xsl index f4c71d4..49eafa7 100644 --- a/legi2odf/legi2odf.xsl +++ b/legi2odf/legi2odf.xsl @@ -336,7 +336,32 @@ - + + + + + + + + + + + + + Illustration + + + + X : + + + + + + + + + diff --git a/odf2legi/odf2legi.py b/odf2legi/odf2legi.py index 81751a8..2896103 100644 --- a/odf2legi/odf2legi.py +++ b/odf2legi/odf2legi.py @@ -1073,6 +1073,7 @@ def convert_to_legi_xml(content, metadata = None): # authorized but people got used to do that for prefaces if len(current_top[0].getchildren()) == 1 and offstructure is None: offstructure = ET.SubElement(current_top[-1], 'nosection') + handle_elem(offstructure, elem) elif len(current_top[0].getchildren()) == 2 and offstructure is not None: handle_elem(offstructure, elem) if len(offstructure.getchildren()) > 0 and \