From f806f79c000ec109b82b23bf43cd887badedf13f Mon Sep 17 00:00:00 2001 From: henrikjust Date: Sun, 2 Nov 2014 09:48:28 +0000 Subject: [PATCH] Bugfix: Format in LaTeX export dialog is now persistent git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@200 f0f2a975-2e09-46c8-9428-3b39399b9f3c --- .../da/comp/w2lcommon/filter/OptionsDialogBase.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java b/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java index 4d9493d..dccc001 100644 --- a/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java +++ b/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java @@ -20,7 +20,7 @@ * * All Rights Reserved. * - * Version 1.4 (2014-09-16) + * Version 1.4 (2014-11-01) * */ @@ -385,11 +385,11 @@ public abstract class OptionsDialogBase extends DialogBase implements XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class,configurations); - boolean bFound = false; short nConfig = getListBoxSelectedItem("Config"); int nStdConfigs = getListBoxStringItemList("Config").length - sConfigNames.length; if (nConfig>=nStdConfigs) { // only handle registry configurations int i = nConfig-nStdConfigs; + XPropertySetHelper.setPropertyValue(xProps,"ConfigName",sConfigNames[i]); try { Object config = xNameAccess.getByName(sConfigNames[i]); XPropertySet xCfgProps = (XPropertySet) @@ -414,17 +414,16 @@ public abstract class OptionsDialogBase extends DialogBase implements if (buf.length()>0) { buf.append(';'); } buf.append(sURL).append("::").append(sFileName).append("::").append(sMediaType); } - filterData.put("Resources",buf.toString()); - - XPropertySetHelper.setPropertyValue(xProps,"ConfigName",sConfigNames[i]); - bFound = true; + filterData.put("Resources",buf.toString()); } } catch (Exception e) { } } + else { // Standard configurations have no name + XPropertySetHelper.setPropertyValue(xProps,"ConfigName",""); + } XPropertySetHelper.setPropertyValue(xProps,"Config",nConfig); - if (!bFound) { XPropertySetHelper.setPropertyValue(xProps,"ConfigName",""); } return nConfig; }