Writer4LaTeX help content
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@86 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
22c38c3ff4
commit
559293a169
16 changed files with 878 additions and 120 deletions
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2011-01-28)
|
||||
* Version 1.2 (2011-01-31)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -53,9 +53,6 @@ import org.openoffice.da.comp.w2lcommon.helper.MessageBox;
|
|||
import org.openoffice.da.comp.w2lcommon.helper.RegistryHelper;
|
||||
import org.openoffice.da.comp.w2lcommon.helper.XPropertySetHelper;
|
||||
|
||||
import writer2latex.util.CSVList;
|
||||
import writer2latex.util.Misc;
|
||||
|
||||
/** This class provides a uno component which implements the configuration
|
||||
* of the bibliography in Writer4LaTeX.
|
||||
*/
|
||||
|
@ -176,14 +173,16 @@ public final class BibliographyDialog
|
|||
XPropertySetHelper.getPropertyValueAsBoolean(xProps, "ConvertZoteroCitations"));
|
||||
dlg.setCheckBoxStateAsBoolean("ConvertJabRefCitations",
|
||||
XPropertySetHelper.getPropertyValueAsBoolean(xProps, "ConvertJabRefCitations"));
|
||||
dlg.setCheckBoxStateAsBoolean("UseNatbib",
|
||||
XPropertySetHelper.getPropertyValueAsBoolean(xProps, "UseNatbib"));
|
||||
dlg.setTextFieldText("NatbibOptions",
|
||||
XPropertySetHelper.getPropertyValueAsString(xProps, "NatbibOptions"));
|
||||
dlg.setCheckBoxStateAsBoolean("IncludeOriginalCitations",
|
||||
XPropertySetHelper.getPropertyValueAsBoolean(xProps, "IncludeOriginalCitations"));
|
||||
dlg.setListBoxSelectedItem("BibTeXLocation",
|
||||
XPropertySetHelper.getPropertyValueAsShort(xProps, "BibTeXLocation"));
|
||||
dlg.setTextFieldText("BibTeXDir",
|
||||
XPropertySetHelper.getPropertyValueAsString(xProps, "BibTeXDir"));
|
||||
dlg.setCheckBoxStateAsBoolean("UseNatbib",
|
||||
XPropertySetHelper.getPropertyValueAsBoolean(xProps, "UseNatbib"));
|
||||
dlg.setTextFieldText("NatbibOptions",
|
||||
XPropertySetHelper.getPropertyValueAsString(xProps, "NatbibOptions"));
|
||||
registry.disposeRegistryView(view);
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
@ -204,10 +203,11 @@ public final class BibliographyDialog
|
|||
XPropertySetHelper.setPropertyValue(xProps, "UseExternalBibTeXFiles", dlg.getCheckBoxStateAsBoolean("UseExternalBibTeXFiles"));
|
||||
XPropertySetHelper.setPropertyValue(xProps, "ConvertZoteroCitations", dlg.getCheckBoxStateAsBoolean("ConvertZoteroCitations"));
|
||||
XPropertySetHelper.setPropertyValue(xProps, "ConvertJabRefCitations", dlg.getCheckBoxStateAsBoolean("ConvertJabRefCitations"));
|
||||
XPropertySetHelper.setPropertyValue(xProps, "UseNatbib", dlg.getCheckBoxStateAsBoolean("UseNatbib"));
|
||||
XPropertySetHelper.setPropertyValue(xProps, "NatbibOptions", dlg.getTextFieldText("NatbibOptions"));
|
||||
XPropertySetHelper.setPropertyValue(xProps, "IncludeOriginalCitations", dlg.getCheckBoxStateAsBoolean("IncludeOriginalCitations"));
|
||||
XPropertySetHelper.setPropertyValue(xProps, "BibTeXLocation", dlg.getListBoxSelectedItem("BibTeXLocation"));
|
||||
XPropertySetHelper.setPropertyValue(xProps, "BibTeXDir", dlg.getTextFieldText("BibTeXDir"));
|
||||
XPropertySetHelper.setPropertyValue(xProps, "UseNatbib", dlg.getCheckBoxStateAsBoolean("UseNatbib"));
|
||||
XPropertySetHelper.setPropertyValue(xProps, "NatbibOptions", dlg.getTextFieldText("NatbibOptions"));
|
||||
|
||||
// Commit registry changes
|
||||
XChangesBatch xUpdateContext = (XChangesBatch)
|
||||
|
@ -254,10 +254,11 @@ public final class BibliographyDialog
|
|||
}
|
||||
|
||||
private void enableBibTeXSettings(DialogAccess dlg) {
|
||||
boolean bEnableLocation = dlg.getCheckBoxStateAsBoolean("UseExternalBibTeXFiles")
|
||||
|| dlg.getCheckBoxStateAsBoolean("ConvertZoteroCitations")
|
||||
boolean bConvertZoteroJabRef = dlg.getCheckBoxStateAsBoolean("ConvertZoteroCitations")
|
||||
|| dlg.getCheckBoxStateAsBoolean("ConvertJabRefCitations");
|
||||
boolean bEnableLocation = dlg.getCheckBoxStateAsBoolean("UseExternalBibTeXFiles") || bConvertZoteroJabRef;
|
||||
boolean bEnableDir = dlg.getListBoxSelectedItem("BibTeXLocation")<2;
|
||||
dlg.setControlEnabled("IncludeOriginalCitations", bConvertZoteroJabRef);
|
||||
dlg.setControlEnabled("BibTeXLocationLabel", bEnableLocation);
|
||||
dlg.setControlEnabled("BibTeXLocation", bEnableLocation);
|
||||
dlg.setControlEnabled("BibTeXDirLabel", bEnableLocation && bEnableDir);
|
||||
|
|
|
@ -88,7 +88,7 @@ public class ExternalApps {
|
|||
|
||||
/** Get the definition for an external application
|
||||
* @param sAppName the name of the application to get
|
||||
* @return a String array containg the system dependent path to the
|
||||
* @return a String array containing the system dependent path to the
|
||||
* executable file as entry 0, and the parameters as entry 1
|
||||
* returns null if the application is unknown
|
||||
*/
|
||||
|
@ -134,9 +134,6 @@ public class ExternalApps {
|
|||
pb.directory(workDir);
|
||||
if (env!=null) {
|
||||
pb.environment().putAll(env);
|
||||
if (env.containsKey("BIBINPUTS")) {
|
||||
System.out.println("Running "+sApp[0]+" with BIBINPUTS="+env.get("BIBINPUTS"));
|
||||
}
|
||||
}
|
||||
Process proc = pb.start();
|
||||
|
||||
|
@ -144,7 +141,7 @@ public class ExternalApps {
|
|||
StreamGobbler errorGobbler = new
|
||||
StreamGobbler(proc.getErrorStream(), "ERROR");
|
||||
|
||||
// Gooble the output stream of the application
|
||||
// Gobble the output stream of the application
|
||||
StreamGobbler outputGobbler = new
|
||||
StreamGobbler(proc.getInputStream(), "OUTPUT");
|
||||
|
||||
|
@ -174,7 +171,6 @@ public class ExternalApps {
|
|||
}
|
||||
catch (com.sun.star.uno.Exception e) {
|
||||
// Give up...
|
||||
//setApplication(LATEX,"Error!",e.getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -144,7 +144,6 @@ public final class TeXify {
|
|||
}
|
||||
int nReturnCode = externalApps.execute(
|
||||
sAppList[i], file.getName(), file.getParentFile(), env, true);
|
||||
System.out.println("Return code from "+sAppList[i]+": "+nReturnCode);
|
||||
if (i==0 && nReturnCode>0) {
|
||||
return false;
|
||||
//throw new IOException("Error executing "+sAppList[i]);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2011-01-28)
|
||||
* Version 1.2 (2011-02-01)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -36,12 +36,9 @@ import com.sun.star.beans.XPropertyAccess;
|
|||
import com.sun.star.beans.XPropertySet;
|
||||
import com.sun.star.container.XNameAccess;
|
||||
import com.sun.star.frame.XController;
|
||||
import com.sun.star.frame.XDesktop;
|
||||
import com.sun.star.frame.XFrame;
|
||||
import com.sun.star.frame.XModel;
|
||||
import com.sun.star.frame.XStorable;
|
||||
import com.sun.star.lang.XComponent;
|
||||
import com.sun.star.lang.XServiceInfo;
|
||||
import com.sun.star.lib.uno.helper.WeakBase;
|
||||
import com.sun.star.task.XStatusIndicator;
|
||||
import com.sun.star.task.XStatusIndicatorFactory;
|
||||
|
@ -235,6 +232,8 @@ public final class Writer4LaTeX extends WeakBase
|
|||
if (XPropertySetHelper.getPropertyValueAsBoolean(xProps, "UseExternalBibTeXFiles")) {
|
||||
filterHelper.put("external_bibtex_files", sBibTeXFiles);
|
||||
}
|
||||
filterHelper.put("include_original_citations",
|
||||
Boolean.toString(XPropertySetHelper.getPropertyValueAsBoolean(xProps, "IncludeOriginalCitations")));
|
||||
String sBibTeXDir = XPropertySetHelper.getPropertyValueAsString(xProps, "BibTeXDir");
|
||||
if (sBibTeXDir.length()>0) {
|
||||
// The separator character in BIBINPUTS is OS specific
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue