From c1d0cd4bf74fb50b12b48d57b5a0f6e8f445a8d7 Mon Sep 17 00:00:00 2001 From: henrikjust Date: Wed, 22 Feb 2012 08:42:40 +0000 Subject: [PATCH] w2l bugfix: Export headings in footnotes as ordinary texts git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@127 f0f2a975-2e09-46c8-9428-3b39399b9f3c --- source/distro/changelog.txt | 3 +++ source/java/writer2latex/api/ConverterFactory.java | 4 ++-- source/java/writer2latex/latex/NoteConverter.java | 11 ++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/distro/changelog.txt b/source/distro/changelog.txt index 8e1e45c..87f8770 100644 --- a/source/distro/changelog.txt +++ b/source/distro/changelog.txt @@ -2,6 +2,9 @@ Changelog for Writer2LaTeX version 1.0 -> 1.2 ---------- version 1.1.9 ---------- +[w2l] Bugfix: Ignore headings inside footnotes (export as normal paragraph). Footnotes should not contain headings, and this + change avoids an infinite loop if such a footnote is within a table. + [w2l] Fixed bugs on the "Text and Math" options page (controls were not updated correctly leading to erratic behavior) [w2l] Added support for the font "Greek" diff --git a/source/java/writer2latex/api/ConverterFactory.java b/source/java/writer2latex/api/ConverterFactory.java index 432fbc7..b694ba8 100644 --- a/source/java/writer2latex/api/ConverterFactory.java +++ b/source/java/writer2latex/api/ConverterFactory.java @@ -20,7 +20,7 @@ * * All Rights Reserved. * - * Version 1.2 (2011-09-20) + * Version 1.2 (2012-02-22) * */ @@ -33,7 +33,7 @@ public class ConverterFactory { // Version information private static final String VERSION = "1.1.9"; - private static final String DATE = "2011-09-20"; + private static final String DATE = "2012-02-22"; /** Return the Writer2LaTeX version in the form * (major version).(minor version).(patch level)
diff --git a/source/java/writer2latex/latex/NoteConverter.java b/source/java/writer2latex/latex/NoteConverter.java index b885b11..0d80e0c 100644 --- a/source/java/writer2latex/latex/NoteConverter.java +++ b/source/java/writer2latex/latex/NoteConverter.java @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * - * Copyright: 2002-2010 by Henrik Just + * Copyright: 2002-2012 by Henrik Just * * All Rights Reserved. * - * Version 1.2 (2010-11-21) + * Version 1.2 (2012-02-22) * */ @@ -273,11 +273,8 @@ public class NoteConverter extends ConverterHelper { palette.getInfo().addDebugInfo(child,ldp); - if (nodeName.equals(XMLString.TEXT_H)) { - palette.getHeadingCv().handleHeading(child,ldp,oc); - } - - if (nodeName.equals(XMLString.TEXT_P)) { + // Headings inside footnotes are considere a mistake and exported as ordinary paragraphs + if (nodeName.equals(XMLString.TEXT_H) || nodeName.equals(XMLString.TEXT_P)) { StyleWithProperties style = ofr.getParStyle(node.getAttribute(XMLString.TEXT_STYLE_NAME)); oc.resetFormattingFromStyle(style); palette.getInlineCv().traverseInlineText(child,ldp,oc);