w2l: Remove experimental option use_oooref

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@259 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2015-06-23 20:22:45 +00:00
parent 1d33ea6222
commit 58a4ceef23
3 changed files with 50 additions and 68 deletions

View file

@ -2,6 +2,8 @@ Changelog for Writer2LaTeX version 1.4 -> 1.6
---------- version 1.5.3 ----------
[w2l] Removed old experimental option use_oooref
[w2x] Bugfix: writer2latex.xhtml.TableConverter.borderWidth ran into an infinite loop if border shorthand properties
didn't begin with width, but e.g. with colour (e.g. "#000000 0.035cm solid").
See bug tracker #4 fix for infinite loop in writer2latex.xhtml.TableConverter.borderWidth

View file

@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
* Version 1.6 (2015-06-22)
* Version 1.6 (2015-06-23)
*
*/
@ -43,14 +43,13 @@ import writer2latex.latex.util.HeadingMap;
import writer2latex.office.ListStyle;
import writer2latex.office.OfficeReader;
import writer2latex.office.XMLString;
import writer2latex.util.CSVList;
import writer2latex.util.ExportNameCollection;
import writer2latex.util.Misc;
import writer2latex.util.SimpleInputBuffer;
/**
* This class handles text fields and links in the document.
* Packages: lastpage, hyperref, titleref, oooref (all optional)
* Packages: lastpage, hyperref, titleref (all optional)
* TODO: Need proper treatment of "caption" and "text" for sequence
* references not to figures and tables (should be fairly rare, though)
@ -80,7 +79,6 @@ public class FieldConverter extends ConverterHelper {
private boolean bUseHyperref = false;
private boolean bUsesPageCount = false;
private boolean bUsesTitleref = false;
private boolean bUsesOooref = false;
private boolean bConvertZotero = false;
private boolean bConvertJabRef = false;
private boolean bIncludeOriginalCitations = false;
@ -88,8 +86,8 @@ public class FieldConverter extends ConverterHelper {
public FieldConverter(OfficeReader ofr, LaTeXConfig config, ConverterPalette palette) {
super(ofr,config,palette);
// hyperref.sty is not compatible with titleref.sty and oooref.sty:
bUseHyperref = config.useHyperref() && !config.useTitleref() && !config.useOooref();
// hyperref.sty is not compatible with titleref.sty:
bUseHyperref = config.useHyperref() && !config.useTitleref();
bConvertZotero = config.useBibtex() && config.zoteroBibtexFiles().length()>0;
bConvertJabRef = config.useBibtex() && config.jabrefBibtexFiles().length()>0;
bIncludeOriginalCitations = config.includeOriginalCitations();
@ -122,15 +120,6 @@ public class FieldConverter extends ConverterHelper {
pack.append("\\usepackage{titleref}").nl();
}
// use oooref.sty
if (bUsesOooref) {
pack.append("\\usepackage[");
HeadingMap hm = config.getHeadingMap();
CSVList opt = new CSVList(",");
for (int i=0; i<=hm.getMaxLevel(); i++) { opt.addValue(hm.getName(i)); }
pack.append(opt.toString()).append("]{oooref}").nl();
}
// use hyperref.sty
if (bUseHyperref){
pack.append("\\usepackage{hyperref}").nl();
@ -414,12 +403,6 @@ public class FieldConverter extends ConverterHelper {
.append(seqrefnames.getExportName(sRefName))
.append("}");
}
else if ("chapter".equals(sFormat) && config.useOooref()) {
ldp.append("\\chapterref{seq:")
.append(seqrefnames.getExportName(sRefName))
.append("}");
bUsesOooref = true;
}
else if ("caption".equals(sFormat) && config.useTitleref() &&
(ofr.isFigureSequenceName(sName) || ofr.isTableSequenceName(sName))) {
ldp.append("\\titleref{seq:")

View file

@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
* Version 1.6 (2015-05-22)
* Version 1.6 (2015-06-23)
*
*/
@ -49,7 +49,7 @@ public class LaTeXConfig extends writer2latex.base.ConfigBase {
/////////////////////////////////////////////////////////////////////////
// I. Define items needed by ConfigBase
protected int getOptionCount() { return 73; }
protected int getOptionCount() { return 72; }
protected String getDefaultConfigPath() { return "/writer2latex/latex/config/"; }
/////////////////////////////////////////////////////////////////////////
@ -141,49 +141,48 @@ public class LaTeXConfig extends writer2latex.base.ConfigBase {
private static final int USE_ULEM = 27;
private static final int USE_LASTPAGE = 28;
private static final int USE_TITLEREF = 29;
private static final int USE_OOOREF = 30;
private static final int USE_BIBTEX = 31;
private static final int BIBTEX_STYLE = 32;
private static final int EXTERNAL_BIBTEX_FILES = 33;
private static final int ZOTERO_BIBTEX_FILES = 34;
private static final int JABREF_BIBTEX_FILES = 35;
private static final int INCLUDE_ORIGINAL_CITATIONS = 36;
private static final int USE_NATBIB = 37;
private static final int NATBIB_OPTIONS = 38;
private static final int FONT = 39;
private static final int FORMATTING = 40;
private static final int PAGE_FORMATTING = 41;
private static final int OTHER_STYLES = 42;
private static final int IMAGE_CONTENT = 43;
private static final int TABLE_CONTENT = 44;
private static final int TABLE_FIRST_HEAD_STYLE = 45;
private static final int TABLE_HEAD_STYLE = 46;
private static final int TABLE_FOOT_STYLE = 47;
private static final int TABLE_LAST_FOOT_STYLE = 48;
private static final int IGNORE_HARD_PAGE_BREAKS = 49;
private static final int IGNORE_HARD_LINE_BREAKS = 50;
private static final int IGNORE_EMPTY_PARAGRAPHS =51;
private static final int IGNORE_DOUBLE_SPACES = 52;
private static final int DISPLAY_HIDDEN_TEXT = 53;
private static final int ALIGN_FRAMES = 54;
private static final int FLOAT_FIGURES = 55;
private static final int FLOAT_TABLES = 56;
private static final int FLOAT_OPTIONS = 57;
private static final int FIGURE_SEQUENCE_NAME = 58;
private static final int TABLE_SEQUENCE_NAME = 59;
private static final int IMAGE_OPTIONS = 60;
private static final int REMOVE_GRAPHICS_EXTENSION = 61;
private static final int ORIGINAL_IMAGE_SIZE = 62;
private static final int SIMPLE_TABLE_LIMIT = 63;
private static final int NOTES = 64;
private static final int METADATA = 65;
private static final int TABSTOP = 66;
private static final int WRAP_LINES_AFTER = 67;
private static final int SPLIT_LINKED_SECTIONS = 68;
private static final int SPLIT_TOPLEVEL_SECTIONS = 69;
private static final int SAVE_IMAGES_IN_SUBDIR = 70;
private static final int OLD_MATH_COLORS = 71;
private static final int DEBUG = 72;
private static final int USE_BIBTEX = 30;
private static final int BIBTEX_STYLE = 31;
private static final int EXTERNAL_BIBTEX_FILES = 32;
private static final int ZOTERO_BIBTEX_FILES = 33;
private static final int JABREF_BIBTEX_FILES = 34;
private static final int INCLUDE_ORIGINAL_CITATIONS = 35;
private static final int USE_NATBIB = 36;
private static final int NATBIB_OPTIONS = 37;
private static final int FONT = 38;
private static final int FORMATTING = 39;
private static final int PAGE_FORMATTING = 40;
private static final int OTHER_STYLES = 41;
private static final int IMAGE_CONTENT = 42;
private static final int TABLE_CONTENT = 43;
private static final int TABLE_FIRST_HEAD_STYLE = 44;
private static final int TABLE_HEAD_STYLE = 45;
private static final int TABLE_FOOT_STYLE = 46;
private static final int TABLE_LAST_FOOT_STYLE = 47;
private static final int IGNORE_HARD_PAGE_BREAKS = 48;
private static final int IGNORE_HARD_LINE_BREAKS = 49;
private static final int IGNORE_EMPTY_PARAGRAPHS =50;
private static final int IGNORE_DOUBLE_SPACES = 51;
private static final int DISPLAY_HIDDEN_TEXT = 52;
private static final int ALIGN_FRAMES = 53;
private static final int FLOAT_FIGURES = 54;
private static final int FLOAT_TABLES = 55;
private static final int FLOAT_OPTIONS = 56;
private static final int FIGURE_SEQUENCE_NAME = 57;
private static final int TABLE_SEQUENCE_NAME = 58;
private static final int IMAGE_OPTIONS = 59;
private static final int REMOVE_GRAPHICS_EXTENSION = 60;
private static final int ORIGINAL_IMAGE_SIZE = 61;
private static final int SIMPLE_TABLE_LIMIT = 62;
private static final int NOTES = 63;
private static final int METADATA = 64;
private static final int TABSTOP = 65;
private static final int WRAP_LINES_AFTER = 66;
private static final int SPLIT_LINKED_SECTIONS = 67;
private static final int SPLIT_TOPLEVEL_SECTIONS = 68;
private static final int SAVE_IMAGES_IN_SUBDIR = 69;
private static final int OLD_MATH_COLORS = 70;
private static final int DEBUG = 71;
/////////////////////////////////////////////////////////////////////////
// IV. Our options data
@ -252,7 +251,6 @@ public class LaTeXConfig extends writer2latex.base.ConfigBase {
options[USE_ULEM] = new BooleanOption("use_ulem","false");
options[USE_LASTPAGE] = new BooleanOption("use_lastpage","false");
options[USE_TITLEREF] = new BooleanOption("use_titleref","false");
options[USE_OOOREF] = new BooleanOption("use_oooref","false");
options[USE_BIBTEX] = new BooleanOption("use_bibtex","false");
options[BIBTEX_STYLE] = new Option("bibtex_style","plain");
options[EXTERNAL_BIBTEX_FILES] = new Option("external_bibtex_files","");
@ -682,7 +680,6 @@ public class LaTeXConfig extends writer2latex.base.ConfigBase {
public boolean useUlem() { return ((BooleanOption) options[USE_ULEM]).getValue(); }
public boolean useLastpage() { return ((BooleanOption) options[USE_LASTPAGE]).getValue(); }
public boolean useTitleref() { return ((BooleanOption) options[USE_TITLEREF]).getValue(); }
public boolean useOooref() { return ((BooleanOption) options[USE_OOOREF]).getValue(); }
public boolean useBibtex() { return ((BooleanOption) options[USE_BIBTEX]).getValue(); }
public String bibtexStyle() { return options[BIBTEX_STYLE].getString(); }
public String externalBibtexFiles() { return options[EXTERNAL_BIBTEX_FILES].getString(); }