From 1e57f500c9da44089f6f5dc0b1576c65b0dac1da Mon Sep 17 00:00:00 2001 From: henrikjust Date: Thu, 30 Dec 2010 06:56:54 +0000 Subject: [PATCH] EPUB export dialog git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@82 f0f2a975-2e09-46c8-9428-3b39399b9f3c --- source/distro/changelog.txt | 10 +-- .../comp/writer2xhtml/EpubOptionsDialog.java | 26 +++--- .../writer2latex/api/ConverterFactory.java | 4 +- source/java/writer2latex/epub/OPFWriter.java | 16 ++-- .../writer2latex/xhtml/StyleConverter.java | 5 +- .../writer2latex/xhtml/TextConverter.java | 41 +++++----- .../xhtml/TextStyleConverter.java | 18 +++-- .../java/writer2latex/xhtml/XhtmlConfig.java | 81 ++++++++++++------- .../writer2xhtml/W2XDialogs2/EpubOptions.xdl | 2 +- 9 files changed, 120 insertions(+), 83 deletions(-) diff --git a/source/distro/changelog.txt b/source/distro/changelog.txt index 83f451b..58dd4ed 100644 --- a/source/distro/changelog.txt +++ b/source/distro/changelog.txt @@ -2,18 +2,18 @@ Changelog for Writer2LaTeX version 1.0 -> 1.2 ---------- version 1.1.9 ---------- -[w2x] *New option include_toc (default true) for EPUB export: If set to false, the table of content will not be exported +[w2x] New option include_toc (default true) for EPUB export: If set to false, the table of content will not be exported -[w2x] *New option split_after (default 0) for EPUB export: This sets the number of characters (in thousands) after +[w2x] New option split_after (default 0) for EPUB export: This sets the number of characters (in thousands) after which an automatic split will occur (0 means no automatic split) -[w2x] *New options use_default_font (default false) and default_font_name (default empty) for EPUB export. +[w2x] New options use_default_font (default false) and default_font_name (default empty). If the former is true, font names are not exported, but the latter will be exported as default font (if non-empty) -[w2x] *New options relative_font_size (default false) and font_scaling (default 100%) for EPUB export. +[w2x] New options relative_font_size (default false) and font_scaling (default 100%) for EPUB export. If the former is true, relative font sizes are used, scaled by the percentage given by the latter -[w2x] *EPUB export now has its own export dialog +[w2x] EPUB export now has its own export dialog [all] *API change: Added the method readResource to the Converter interface (only used by EPUB export currently) diff --git a/source/java/org/openoffice/da/comp/writer2xhtml/EpubOptionsDialog.java b/source/java/org/openoffice/da/comp/writer2xhtml/EpubOptionsDialog.java index b3dc0aa..9f0d0d9 100644 --- a/source/java/org/openoffice/da/comp/writer2xhtml/EpubOptionsDialog.java +++ b/source/java/org/openoffice/da/comp/writer2xhtml/EpubOptionsDialog.java @@ -20,13 +20,13 @@ * * All Rights Reserved. * - * Version 1.2 (2010-12-28) + * Version 1.2 (2010-12-29) * */ // TODO: Add to doc: // New options relative_font_size, font_scaling, use_default_font, default_font_name, split_after, page_break_split, include_toc -// Also add to list of possible locked options external_toc_depth +// Also add to list of possible locked options external_toc_depth, display_hidden_text package org.openoffice.da.comp.writer2xhtml; @@ -39,7 +39,7 @@ import com.sun.star.uno.XComponentContext; import org.openoffice.da.comp.w2lcommon.helper.PropertyHelper; import org.openoffice.da.comp.w2lcommon.filter.OptionsDialogBase; -/** This class provides a uno component which implements a filter ui for the +/** This class provides a UNO component which implements a filter UI for the * EPUB export */ public class EpubOptionsDialog extends OptionsDialogBase { @@ -98,7 +98,7 @@ public class EpubOptionsDialog extends OptionsDialogBase { loadCheckBoxOption(xProps, "IgnoreEmptyParagraphs"); loadCheckBoxOption(xProps, "IgnoreDoubleSpaces"); - // Files + // Document division loadCheckBoxOption(xProps, "Split"); loadListBoxOption(xProps, "SplitLevel"); loadCheckBoxOption(xProps, "UsePageBreakSplit"); @@ -106,7 +106,7 @@ public class EpubOptionsDialog extends OptionsDialogBase { loadCheckBoxOption(xProps, "UseSplitAfter"); loadNumericOption(xProps, "SplitAfter"); - // Table of contents + // Navigation table loadListBoxOption(xProps, "ExternalTocDepth"); loadCheckBoxOption(xProps, "IncludeToc"); @@ -145,7 +145,7 @@ public class EpubOptionsDialog extends OptionsDialogBase { saveCheckBoxOption(xProps, helper, "IgnoreEmptyParagraphs", "ignore_empty_paragraphs"); saveCheckBoxOption(xProps, helper, "IgnoreDoubleSpaces", "ignore_double_spaces"); - // Files + // Document division boolean bSplit = saveCheckBoxOption(xProps, "Split"); short nSplitLevel = saveListBoxOption(xProps, "SplitLevel"); if (!isLocked("split_level")) { @@ -176,17 +176,17 @@ public class EpubOptionsDialog extends OptionsDialogBase { int nSplitAfter = saveNumericOption(xProps, "SplitAfter"); if (!isLocked("split_after")) { if (bUseSplitAfter) { - helper.put("split_after", nSplitAfter); + helper.put("split_after", Integer.toString(nSplitAfter)); } else { - helper.put("split_after", 0); + helper.put("split_after", "0"); } } - // Table of contents + // Navigation table short nExternalTocDepth = saveListBoxOption(xProps, "ExternalTocDepth"); - helper.put("external_toc_depth", nExternalTocDepth+1); - saveCheckBoxOption(xProps, "IncludeToc"); + helper.put("external_toc_depth", Integer.toString(nExternalTocDepth+1)); + saveCheckBoxOption(xProps, helper, "IncludeToc", "include_toc"); } @@ -251,7 +251,7 @@ public class EpubOptionsDialog extends OptionsDialogBase { setControlEnabled("IgnoreEmptyParagraphs",!isLocked("ignore_empty_paragraphs")); setControlEnabled("IgnoreDoubleSpaces",!isLocked("ignore_double_spaces")); - // Files + // Document division boolean bSplit = getCheckBoxStateAsBoolean("Split"); setControlEnabled("Split",!isLocked("split_level")); setControlEnabled("SplitLevelLabel",!isLocked("split_level") && bSplit); @@ -267,7 +267,7 @@ public class EpubOptionsDialog extends OptionsDialogBase { setControlEnabled("SplitAfterLabel",!isLocked("split_after") && bUseSplitAfter); setControlEnabled("SplitAfter",!isLocked("split_after") && bUseSplitAfter); - // Table of contents + // Navigation table setControlEnabled("ExternalTocDepthLabel", !isLocked("external_toc_depth")); setControlEnabled("ExternalTocDepth", !isLocked("external_toc_depth")); setControlEnabled("IncludeToc", !isLocked("include_toc")); diff --git a/source/java/writer2latex/api/ConverterFactory.java b/source/java/writer2latex/api/ConverterFactory.java index 1f25989..03f4b8d 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 (2010-12-16) + * Version 1.2 (2010-12-29) * */ @@ -33,7 +33,7 @@ public class ConverterFactory { // Version information private static final String VERSION = "1.1.9"; - private static final String DATE = "2010-12-16"; + private static final String DATE = "2010-12-29"; /** Return the Writer2LaTeX version in the form * (major version).(minor version).(patch level)
diff --git a/source/java/writer2latex/epub/OPFWriter.java b/source/java/writer2latex/epub/OPFWriter.java index 928c55e..633e32c 100644 --- a/source/java/writer2latex/epub/OPFWriter.java +++ b/source/java/writer2latex/epub/OPFWriter.java @@ -190,15 +190,15 @@ public class OPFWriter extends NewDOMDocument { } } - // Fall back values for creator and date + // Fall back values for identifier, creator and date + if (!bHasIdentifier) { + // Create a universal unique ID + sUID = UUID.randomUUID().toString(); + Element identifier = appendElement(contentDOM, metadata, "dc:identifier", sUID); + identifier.setAttribute("id", "BookId"); + identifier.setAttribute("opf:scheme", "UUID"); + } if (bUseDublinCore) { - if (!bHasIdentifier) { - // Create a universal unique ID - sUID = UUID.randomUUID().toString(); - Element identifier = appendElement(contentDOM, metadata, "dc:identifier", sUID); - identifier.setAttribute("id", "BookId"); - identifier.setAttribute("opf:scheme", "UUID"); - } if (!bHasCreator && cr.getMetaData().getCreator().length()>0) { appendElement(contentDOM, metadata, "dc:creator", cr.getMetaData().getCreator()); } diff --git a/source/java/writer2latex/xhtml/StyleConverter.java b/source/java/writer2latex/xhtml/StyleConverter.java index adb60c5..b962de5 100644 --- a/source/java/writer2latex/xhtml/StyleConverter.java +++ b/source/java/writer2latex/xhtml/StyleConverter.java @@ -20,7 +20,7 @@ * * All Rights Reserved. * - * Version 1.2 (2010-05-09) + * Version 1.2 (2010-12-29) * */ @@ -138,6 +138,9 @@ class StyleConverter extends ConverterHelper { CSVList props = new CSVList(";"); // text properties only! getTextSc().cssTextCommon(defaultStyle,props,true); + if (config.useDefaultFont() && config.defaultFontName().length()>0) { + props.addValue("font-family", "'"+config.defaultFontName()+"'"); + } buf.append(sIndent) .append("body {").append(props.toString()).append("}").append(config.prettyPrint() ? "\n" : " "); } diff --git a/source/java/writer2latex/xhtml/TextConverter.java b/source/java/writer2latex/xhtml/TextConverter.java index 6fc2898..7bcd8f6 100644 --- a/source/java/writer2latex/xhtml/TextConverter.java +++ b/source/java/writer2latex/xhtml/TextConverter.java @@ -20,7 +20,7 @@ * * All Rights Reserved. * - * Version 1.2 (2010-11-28) + * Version 1.2 (2010-12-29) * */ @@ -83,7 +83,7 @@ public class TextConverter extends ConverterHelper { // Some (Sony?) EPUB readers have a limit on the file size of individual files // In any case very large files could be a performance problem, hence we do automatic splitting // after this number of characters. TODO: Make configurable. - private static final int EPUB_CHARACTER_COUNT_TRESHOLD = 150000; + private int nSplitAfter = 150000; private int nPageBreakSplit = XhtmlConfig.NONE; // Should we split at page breaks? // TODO: Collect soft page breaks between table rows private boolean bPendingPageBreak = false; // We have encountered a page break which should be inserted asap @@ -145,9 +145,10 @@ public class TextConverter extends ConverterHelper { public TextConverter(OfficeReader ofr, XhtmlConfig config, Converter converter) { super(ofr,config,converter); + nSplitAfter = 1000*config.splitAfter(); nPageBreakSplit = config.pageBreakSplit(); nSplit = config.getXhtmlSplitLevel(); - nRepeatLevels = config.getXhtmlRepeatLevels(); + nRepeatLevels = converter.isOPS() ? 0 : config.getXhtmlRepeatLevels(); // never repeat headings in EPUB nExternalTocDepth = config.externalTocDepth(); if (nExternalTocDepth==0) { // A value of zero means auto (i.e. determine from split level) nExternalTocDepth = Math.max(nSplit,1); @@ -537,7 +538,7 @@ public class TextConverter extends ConverterHelper { if (getPageBreak(style)) { return doMaybeSplit(node, 0); } - if (converter.isOPS() && nCharacterCount>EPUB_CHARACTER_COUNT_TRESHOLD) { + if (converter.isOPS() && nSplitAfter>0 && nCharacterCount>nSplitAfter) { return doMaybeSplit(node, 0); } if (nLevel>=0) { @@ -1168,25 +1169,29 @@ public class TextConverter extends ConverterHelper { /* Process table of contents */ private void handleTOC(Node onode, Node hnode) { - if (!ofr.getTocReader((Element)onode).isByChapter()) { - nTocFileIndex = converter.getOutFileIndex(); - } - - converter.setTocFile(null); + if (!config.includeToc()) { return; } - Element div = converter.createElement("div"); - hnode.appendChild(div); + if (!ofr.getTocReader((Element)onode).isByChapter()) { + nTocFileIndex = converter.getOutFileIndex(); + } - IndexData data = new IndexData(); - data.nOutFileIndex = converter.getOutFileIndex(); - data.onode = (Element) onode; - data.chapter = currentChapter; - data.hnode = (Element) div; - indexes.add(data); // to be processed later with generateTOC + converter.setTocFile(null); + + Element div = converter.createElement("div"); + hnode.appendChild(div); + + IndexData data = new IndexData(); + data.nOutFileIndex = converter.getOutFileIndex(); + data.onode = (Element) onode; + data.chapter = currentChapter; + data.hnode = (Element) div; + indexes.add(data); // to be processed later with generateTOC } private void generateToc(IndexData data) { - Element onode = data.onode; + if (!config.includeToc()) { return; } + + Element onode = data.onode; Element chapter = data.chapter; Element div = data.hnode; diff --git a/source/java/writer2latex/xhtml/TextStyleConverter.java b/source/java/writer2latex/xhtml/TextStyleConverter.java index 922f73f..69eeb78 100644 --- a/source/java/writer2latex/xhtml/TextStyleConverter.java +++ b/source/java/writer2latex/xhtml/TextStyleConverter.java @@ -20,7 +20,7 @@ * * All Rights Reserved. * - * Version 1.2 (2010-12-08) + * Version 1.2 (2010-12-29) * */ @@ -66,20 +66,25 @@ public class TextStyleConverter extends StyleWithPropertiesConverterHelper { // Export font sizes as percentages? private boolean bRelativeFontSize = false; + private String sFontScaling = "100%"; private String sBaseFontSize = "12pt"; + + // Use default font? + private boolean bConvertFont = false; /** Create a new TextStyleConverter * @param ofr an OfficeReader to read style information from * @param config the configuration to use * @param converter the main Converter class - * @param nType the type of xhtml to use + * @param nType the type of XHTML to use */ public TextStyleConverter(OfficeReader ofr, XhtmlConfig config, Converter converter, int nType) { super(ofr,config,converter,nType); this.styleMap = config.getXTextStyleMap(); this.bConvertStyles = config.xhtmlFormatting()==XhtmlConfig.CONVERT_ALL || config.xhtmlFormatting()==XhtmlConfig.IGNORE_HARD; this.bConvertHard = config.xhtmlFormatting()==XhtmlConfig.CONVERT_ALL || config.xhtmlFormatting()==XhtmlConfig.IGNORE_STYLES; - this.bRelativeFontSize = converter.isOPS() && config.xhtmlConvertToPx(); + this.bRelativeFontSize = converter.isOPS() && config.relativeFontSize(); + this.sFontScaling = config.fontScaling(); StyleWithProperties defaultStyle = ofr.getDefaultParStyle(); if (defaultStyle!=null) { String sFontSize = defaultStyle.getProperty(XMLString.FO_FONT_SIZE,false); @@ -87,6 +92,7 @@ public class TextStyleConverter extends StyleWithPropertiesConverterHelper { sBaseFontSize = sFontSize; } } + this.bConvertFont = !config.useDefaultFont(); } /** Apply a link style, using a combination of two text styles @@ -249,7 +255,7 @@ public class TextStyleConverter extends StyleWithPropertiesConverterHelper { CSVList val; // Font family - if (bInherit || style.getProperty(XMLString.STYLE_FONT_NAME,false)!=null) { + if (bConvertFont && (bInherit || style.getProperty(XMLString.STYLE_FONT_NAME,false)!=null)) { val = new CSVList(","); // multivalue property! // Get font family information from font declaration or from style s = style.getProperty(XMLString.STYLE_FONT_NAME); @@ -312,7 +318,7 @@ public class TextStyleConverter extends StyleWithPropertiesConverterHelper { } if (s!=null) { if (bRelativeFontSize) { - String sFontSize = Misc.divide(Misc.multiply(s4,s), sBaseFontSize); + String sFontSize = Misc.divide(Misc.multiply(sFontScaling, Misc.multiply(s4,s)), sBaseFontSize); if (!"100%".equals(sFontSize)) props.addValue("font-size", sFontSize); } else { @@ -328,7 +334,7 @@ public class TextStyleConverter extends StyleWithPropertiesConverterHelper { } else if (s!=null) { if (bRelativeFontSize) { - String sFontSize = Misc.divide(s,sBaseFontSize); + String sFontSize = Misc.divide(Misc.multiply(sFontScaling, s),sBaseFontSize); if (!"100%".equals(sFontSize)) props.addValue("font-size", sFontSize); } else { diff --git a/source/java/writer2latex/xhtml/XhtmlConfig.java b/source/java/writer2latex/xhtml/XhtmlConfig.java index 0c62c4f..ca249bc 100644 --- a/source/java/writer2latex/xhtml/XhtmlConfig.java +++ b/source/java/writer2latex/xhtml/XhtmlConfig.java @@ -20,7 +20,7 @@ * * All Rights Reserved. * - * Version 1.2 (2010-11-28) + * Version 1.2 (2010-12-28) * */ @@ -41,7 +41,7 @@ import writer2latex.util.Misc; public class XhtmlConfig extends writer2latex.base.ConfigBase { // Implement configuration methods - protected int getOptionCount() { return 47; } + protected int getOptionCount() { return 53; } protected String getDefaultConfigPath() { return "/writer2latex/xhtml/config/"; } // Override setOption: To be backwards compatible, we must accept options @@ -103,33 +103,39 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase { private static final int TABLE_FORMATTING = 17; private static final int IGNORE_TABLE_DIMENSIONS = 18; private static final int LIST_FORMATTING = 19; - private static final int USE_DUBLIN_CORE = 20; - private static final int NOTES = 21; - private static final int DISPLAY_HIDDEN_TEXT = 22; - private static final int CONVERT_TO_PX = 23; - private static final int SCALING = 24; - private static final int COLUMN_SCALING = 25; - private static final int FLOAT_OBJECTS = 26; - private static final int TABSTOP_STYLE = 27; - private static final int FORMULAS = 28; - private static final int ENDNOTES_HEADING = 29; - private static final int EXTERNAL_TOC_DEPTH = 30; - private static final int SPLIT_LEVEL = 31; - private static final int REPEAT_LEVELS = 32; - private static final int PAGE_BREAK_SPLIT = 33; - private static final int CALC_SPLIT = 34; - private static final int DISPLAY_HIDDEN_SHEETS = 35; - private static final int DISPLAY_HIDDEN_ROWS_COLS = 36; - private static final int DISPLAY_FILTERED_ROWS_COLS = 37; - private static final int APPLY_PRINT_RANGES = 38; - private static final int USE_TITLE_AS_HEADING = 39; - private static final int USE_SHEET_NAMES_AS_HEADINGS = 40; - private static final int XSLT_PATH = 41; - private static final int SAVE_IMAGES_IN_SUBDIR = 42; - private static final int UPLINK = 43; - private static final int DIRECTORY_ICON = 44; - private static final int DOCUMENT_ICON = 45; - private static final int ZEN_HACK = 46; // temporary hack for ePub Zen Garden styles + private static final int USE_DEFAULT_FONT = 20; + private static final int DEFAULT_FONT_NAME = 21; + private static final int USE_DUBLIN_CORE = 22; + private static final int NOTES = 23; + private static final int DISPLAY_HIDDEN_TEXT = 24; + private static final int CONVERT_TO_PX = 25; + private static final int SCALING = 26; + private static final int COLUMN_SCALING = 27; + private static final int RELATIVE_FONT_SIZE = 28; + private static final int FONT_SCALING = 29; + private static final int FLOAT_OBJECTS = 30; + private static final int TABSTOP_STYLE = 31; + private static final int FORMULAS = 32; + private static final int ENDNOTES_HEADING = 33; + private static final int EXTERNAL_TOC_DEPTH = 34; + private static final int INCLUDE_TOC = 35; + private static final int SPLIT_LEVEL = 36; + private static final int REPEAT_LEVELS = 37; + private static final int PAGE_BREAK_SPLIT = 38; + private static final int SPLIT_AFTER = 39; + private static final int CALC_SPLIT = 40; + private static final int DISPLAY_HIDDEN_SHEETS = 41; + private static final int DISPLAY_HIDDEN_ROWS_COLS = 42; + private static final int DISPLAY_FILTERED_ROWS_COLS = 43; + private static final int APPLY_PRINT_RANGES = 44; + private static final int USE_TITLE_AS_HEADING = 45; + private static final int USE_SHEET_NAMES_AS_HEADINGS = 46; + private static final int XSLT_PATH = 47; + private static final int SAVE_IMAGES_IN_SUBDIR = 48; + private static final int UPLINK = 49; + private static final int DIRECTORY_ICON = 50; + private static final int DOCUMENT_ICON = 51; + private static final int ZEN_HACK = 52; // temporary hack for ePub Zen Garden styles protected ComplexOption xheading = addComplexOption("heading-map"); protected ComplexOption xpar = addComplexOption("paragraph-map"); @@ -168,12 +174,16 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase { else { nValue = CSS1; } } }; + options[USE_DEFAULT_FONT] = new BooleanOption("use_default_font","true"); + options[DEFAULT_FONT_NAME] = new BooleanOption("default_font_name",""); options[USE_DUBLIN_CORE] = new BooleanOption("use_dublin_core","true"); options[NOTES] = new BooleanOption("notes","true"); options[DISPLAY_HIDDEN_TEXT] = new BooleanOption("display_hidden_text", "false"); options[CONVERT_TO_PX] = new BooleanOption("convert_to_px","true"); options[SCALING] = new Option("scaling","100%"); options[COLUMN_SCALING] = new Option("column_scaling","100%"); + options[RELATIVE_FONT_SIZE] = new BooleanOption("relative_font_size","false"); + options[FONT_SCALING] = new Option("font_scaling","100%"); options[FLOAT_OBJECTS] = new BooleanOption("float_objects","true"); options[TABSTOP_STYLE] = new Option("tabstop_style",""); options[ENDNOTES_HEADING] = new Option("endnotes_heading",""); @@ -197,6 +207,7 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase { } } }; + options[INCLUDE_TOC] = new BooleanOption("include_toc","true"); options[SPLIT_LEVEL] = new IntegerOption("split_level","0") { @Override public void setString(String sValue) { super.setString(sValue); @@ -218,6 +229,12 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase { else { nValue = NONE; } } }; + options[SPLIT_AFTER] = new IntegerOption("split_after","0") { + @Override public void setString(String sValue) { + super.setString(sValue); + nValue = Misc.getPosInteger(sValue, 0); + } + }; options[CALC_SPLIT] = new BooleanOption("calc_split","false"); options[DISPLAY_HIDDEN_SHEETS] = new BooleanOption("display_hidden_sheets", "false"); options[DISPLAY_HIDDEN_ROWS_COLS] = new BooleanOption("display_hidden_rows_cols","false"); @@ -321,20 +338,26 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase { public int xhtmlTableFormatting() { return ((XhtmlFormatOption) options[TABLE_FORMATTING]).getValue(); } public boolean xhtmlIgnoreTableDimensions() { return ((BooleanOption) options[IGNORE_TABLE_DIMENSIONS]).getValue(); } public int listFormatting() { return ((IntegerOption) options[LIST_FORMATTING]).getValue(); } + public boolean useDefaultFont() { return ((BooleanOption) options[USE_DEFAULT_FONT]).getValue(); } + public String defaultFontName() { return options[DEFAULT_FONT_NAME].getString(); } public boolean xhtmlUseDublinCore() { return ((BooleanOption) options[USE_DUBLIN_CORE]).getValue(); } public boolean xhtmlNotes() { return ((BooleanOption) options[NOTES]).getValue(); } public boolean displayHiddenText() { return ((BooleanOption) options[DISPLAY_HIDDEN_TEXT]).getValue(); } public boolean xhtmlConvertToPx() { return ((BooleanOption) options[CONVERT_TO_PX]).getValue(); } public String getXhtmlScaling() { return options[SCALING].getString(); } public String getXhtmlColumnScaling() { return options[COLUMN_SCALING].getString(); } + public boolean relativeFontSize() { return ((BooleanOption) options[RELATIVE_FONT_SIZE]).getValue(); } + public String fontScaling() { return options[FONT_SCALING].getString(); } public boolean xhtmlFloatObjects() { return ((BooleanOption) options[FLOAT_OBJECTS]).getValue(); } public String getXhtmlTabstopStyle() { return options[TABSTOP_STYLE].getString(); } public String getEndnotesHeading() { return options[ENDNOTES_HEADING].getString(); } public int formulas() { return ((IntegerOption) options[FORMULAS]).getValue(); } public int externalTocDepth() { return ((IntegerOption) options[EXTERNAL_TOC_DEPTH]).getValue(); } + public boolean includeToc() { return ((BooleanOption) options[INCLUDE_TOC]).getValue(); } public int getXhtmlSplitLevel() { return ((IntegerOption) options[SPLIT_LEVEL]).getValue(); } public int getXhtmlRepeatLevels() { return ((IntegerOption) options[REPEAT_LEVELS]).getValue(); } public int pageBreakSplit() { return ((IntegerOption) options[PAGE_BREAK_SPLIT]).getValue(); } + public int splitAfter() { return ((IntegerOption) options[SPLIT_AFTER]).getValue(); } public boolean xhtmlCalcSplit() { return ((BooleanOption) options[CALC_SPLIT]).getValue(); } public boolean xhtmlDisplayHiddenSheets() { return ((BooleanOption) options[DISPLAY_HIDDEN_SHEETS]).getValue(); } public boolean displayHiddenRowsCols() { return ((BooleanOption) options[DISPLAY_HIDDEN_ROWS_COLS]).getValue(); } diff --git a/source/oxt/writer2xhtml/W2XDialogs2/EpubOptions.xdl b/source/oxt/writer2xhtml/W2XDialogs2/EpubOptions.xdl index b967359..29e9488 100755 --- a/source/oxt/writer2xhtml/W2XDialogs2/EpubOptions.xdl +++ b/source/oxt/writer2xhtml/W2XDialogs2/EpubOptions.xdl @@ -88,7 +88,7 @@ - + \ No newline at end of file