From d3bd2a10d55123b8f3aedbf0021025e89f41b549 Mon Sep 17 00:00:00 2001 From: henrikjust Date: Tue, 5 Aug 2014 08:22:37 +0000 Subject: [PATCH] Merge bugfixes from 1.2 beta git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@157 f0f2a975-2e09-46c8-9428-3b39399b9f3c --- .../w2lcommon/filter/ConfigurationDialogBase.java | 10 ++++++---- source/java/writer2latex/latex/LaTeXConfig.java | 12 +++++++++--- .../java/writer2latex/latex/StarMathConverter.java | 6 ++++-- source/oxt/writer2xhtml/W2XDialogs2/EpubOptions.xdl | 2 +- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/source/java/org/openoffice/da/comp/w2lcommon/filter/ConfigurationDialogBase.java b/source/java/org/openoffice/da/comp/w2lcommon/filter/ConfigurationDialogBase.java index 29b77bd..2759972 100644 --- a/source/java/org/openoffice/da/comp/w2lcommon/filter/ConfigurationDialogBase.java +++ b/source/java/org/openoffice/da/comp/w2lcommon/filter/ConfigurationDialogBase.java @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * -* Copyright: 2002-2012 by Henrik Just +* Copyright: 2002-2014 by Henrik Just * * All Rights Reserved. * -* Version 1.2 (2012-03-11) +* Version 1.4 (2014-08-05) * */ @@ -687,13 +687,15 @@ public abstract class ConfigurationDialogBase extends WeakBase implements XConta private void newStyleClick(DialogAccess dlg) { if (nCurrentFamily>-1) { updateStyleMaps(dlg); + // Invalidate current style name in any case (appendItem returns null if the user + // selects an existing style, but it still changes the current item) + sCurrentStyleName = null; String sNewName = appendItem(dlg, "StyleName",styleNameProvider.getInternalNames(sOOoFamilyNames[nCurrentFamily]).keySet()); if (sNewName!=null) { styleMap[nCurrentFamily].put(sNewName, new HashMap()); clearControls(dlg); - sCurrentStyleName=null; - styleNameChange(dlg); } + styleNameChange(dlg); updateStyleControls(dlg); } } diff --git a/source/java/writer2latex/latex/LaTeXConfig.java b/source/java/writer2latex/latex/LaTeXConfig.java index d4c4611..059a662 100644 --- a/source/java/writer2latex/latex/LaTeXConfig.java +++ b/source/java/writer2latex/latex/LaTeXConfig.java @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * - * Copyright: 2002-2011 by Henrik Just + * Copyright: 2002-2014 by Henrik Just * * All Rights Reserved. * - * Version 1.2 (2011-03-30) + * Version 1.4 (2014-08-05) * */ @@ -465,7 +465,13 @@ public class LaTeXConfig extends writer2latex.base.ConfigBase { String sInput = elm.getAttribute("input"); Map attributes = new HashMap(); attributes.put("latex-code", elm.getAttribute("latex-code")); - attributes.put("fontenc", elm.getAttribute("fontenc")); + if (elm.hasAttribute("fontenc") && elm.getAttribute("fontenc").length()>0) { + // The fontenc attribute is optional + attributes.put("fontenc", elm.getAttribute("fontenc")); + } + else { + attributes.put("fontenc", "any"); + } stringReplace.put(sInput,attributes); } else if (elm.getTagName().equals("math-symbol-map")) { diff --git a/source/java/writer2latex/latex/StarMathConverter.java b/source/java/writer2latex/latex/StarMathConverter.java index 3817227..bb1224d 100644 --- a/source/java/writer2latex/latex/StarMathConverter.java +++ b/source/java/writer2latex/latex/StarMathConverter.java @@ -16,9 +16,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * - * Copyright: 2002-2012 by Henrik Just + * Copyright: 2002-2014 by Henrik Just * - * Version 1.2 (2012-03-05) + * Version 1.4 (2014-08-05) * * All Rights Reserved. */ @@ -240,6 +240,7 @@ class Token{ public static final Token COPROD=new Token(); public static final Token FORALL=new Token(); public static final Token EXISTS=new Token(); + public static final Token NOTEXISTS = new Token(); public static final Token LIM=new Token(); public static final Token NABLA=new Token(); public static final Token TOWARD=new Token(); @@ -458,6 +459,7 @@ class SmTokenTable{ new SmTokenTableEntry( "emptyset" , Token.EMPTYSET, "\\emptyset ", TGroup.STANDALONE, 5), new SmTokenTableEntry( "equiv", Token.EQUIV, "\\equiv ", TGroup.RELATION, 0), new SmTokenTableEntry( "exists", Token.EXISTS, "\\exists ", TGroup.STANDALONE, 5), + new SmTokenTableEntry( "notexists", Token.NOTEXISTS, "\\nexists ", TGroup.STANDALONE, 5), new SmTokenTableEntry( "exp", Token.EXP, "\\exp ", TGroup.FUNCTION, 5), new SmTokenTableEntry( "fact", Token.FACT, "!", TGroup.UNOPER, 5), new SmTokenTableEntry( "fixed", Token.FIXED, "\\mathtt", TGroup.FONT, 0), diff --git a/source/oxt/writer2xhtml/W2XDialogs2/EpubOptions.xdl b/source/oxt/writer2xhtml/W2XDialogs2/EpubOptions.xdl index 61e6e89..0e8eb72 100755 --- a/source/oxt/writer2xhtml/W2XDialogs2/EpubOptions.xdl +++ b/source/oxt/writer2xhtml/W2XDialogs2/EpubOptions.xdl @@ -39,7 +39,7 @@ - +