Support full screen images in EPUB export - bug fixing and adding the option image_split
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@111 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
0e45414378
commit
63e9c4c66d
11 changed files with 157 additions and 127 deletions
|
@ -2,7 +2,9 @@ Changelog for Writer2LaTeX version 1.0 -> 1.2
|
|||
|
||||
---------- version 1.1.8 ----------
|
||||
|
||||
[w2x] In EPUB export, a large image is now automatically placed in a separate file as a full screen image
|
||||
[w2x] New option image_split with values "none" or a percentage. In EPUB export, if image_size is "relative", an image
|
||||
of width greater than or equal to this percentage is placed in a separate file as a full screen image.
|
||||
This takes effect only if the aspect ratio is at least 3:4
|
||||
|
||||
[w2x] The EPUB export now supports additional resource files (e.g. images, fonts) to the custom style sheet
|
||||
- using the readResource method of the converter API
|
||||
|
|
Binary file not shown.
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2011-06-06)
|
||||
* Version 1.2 (2011-06-16)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -98,10 +98,10 @@ public class EpubOptionsDialog extends OptionsDialogBase {
|
|||
loadCheckBoxOption(xProps, "Notes");
|
||||
|
||||
// Document division
|
||||
loadCheckBoxOption(xProps, "Split");
|
||||
loadListBoxOption(xProps, "SplitLevel");
|
||||
loadCheckBoxOption(xProps, "UsePageBreakSplit");
|
||||
loadListBoxOption(xProps, "PageBreakSplit");
|
||||
loadCheckBoxOption(xProps, "UseImageSplit");
|
||||
loadNumericOption(xProps, "ImageSplit");
|
||||
loadCheckBoxOption(xProps, "UseSplitAfter");
|
||||
loadNumericOption(xProps, "SplitAfter");
|
||||
|
||||
|
@ -150,30 +150,30 @@ public class EpubOptionsDialog extends OptionsDialogBase {
|
|||
saveCheckBoxOption(xProps, helper, "Notes", "notes");
|
||||
|
||||
// Document division
|
||||
boolean bSplit = saveCheckBoxOption(xProps, "Split");
|
||||
short nSplitLevel = saveListBoxOption(xProps, "SplitLevel");
|
||||
if (!isLocked("split_level")) {
|
||||
if (bSplit) {
|
||||
helper.put("split_level",Integer.toString(nSplitLevel+1));
|
||||
}
|
||||
else {
|
||||
helper.put("split_level","0");
|
||||
}
|
||||
helper.put("split_level",Integer.toString(nSplitLevel));
|
||||
}
|
||||
|
||||
boolean bUsePageBreakSplit = saveCheckBoxOption(xProps, "UsePageBreakSplit");
|
||||
short nPageBreakSplit = saveListBoxOption(xProps, "PageBreakSplit");
|
||||
if (!isLocked("page_break_split")) {
|
||||
if (bUsePageBreakSplit) {
|
||||
switch (nPageBreakSplit) {
|
||||
case 0: helper.put("page_break_split", "styles"); break;
|
||||
case 1: helper.put("page_break_split", "explicit"); break;
|
||||
case 2: helper.put("page_break_split", "all");
|
||||
}
|
||||
}
|
||||
else {
|
||||
helper.put("page_break_split","none");
|
||||
}
|
||||
switch (nPageBreakSplit) {
|
||||
case 0: helper.put("page_break_split","none"); break;
|
||||
case 1: helper.put("page_break_split", "styles"); break;
|
||||
case 2: helper.put("page_break_split", "explicit"); break;
|
||||
case 3: helper.put("page_break_split", "all");
|
||||
}
|
||||
}
|
||||
|
||||
boolean bUseImageSplit = saveCheckBoxOption(xProps, "UseImageSplit");
|
||||
int nImageSplit = saveNumericOption(xProps, "ImageSplit");
|
||||
if (!isLocked("image_split")) {
|
||||
if (bUseImageSplit) {
|
||||
helper.put("image_split", nImageSplit+"%");
|
||||
}
|
||||
else {
|
||||
helper.put("image_split", "none");
|
||||
}
|
||||
}
|
||||
|
||||
boolean bUseSplitAfter = saveCheckBoxOption(xProps, "UseSplitAfter");
|
||||
|
@ -206,14 +206,14 @@ public class EpubOptionsDialog extends OptionsDialogBase {
|
|||
else if (sMethod.equals("UseDefaultFontChange")) {
|
||||
useDefaultFontChange();
|
||||
}
|
||||
else if (sMethod.equals("ImageSizeChange")) {
|
||||
imageSizeChange();
|
||||
}
|
||||
else if (sMethod.equals("EditMetadataClick")) {
|
||||
editMetadataClick();
|
||||
}
|
||||
else if (sMethod.equals("SplitChange")) {
|
||||
splitChange();
|
||||
}
|
||||
else if (sMethod.equals("UsePageBreakSplitChange")) {
|
||||
usePageBreakSplitChange();
|
||||
else if (sMethod.equals("UseImageSplitChange")) {
|
||||
useImageSplitChange();
|
||||
}
|
||||
else if (sMethod.equals("UseSplitAfterChange")) {
|
||||
useSplitAfterChange();
|
||||
|
@ -223,7 +223,7 @@ public class EpubOptionsDialog extends OptionsDialogBase {
|
|||
|
||||
@Override public String[] getSupportedMethodNames() {
|
||||
String[] sNames = { "ConfigChange", "RelativeFontSizeChange", "UseDefaultFontChange", "EditMetadataClick",
|
||||
"SplitChange", "UsePageBreakSplitChange", "UseSplitAfterChange" };
|
||||
"UseImageSplitChange", "UseSplitAfterChange" };
|
||||
return sNames;
|
||||
}
|
||||
|
||||
|
@ -258,16 +258,18 @@ public class EpubOptionsDialog extends OptionsDialogBase {
|
|||
setControlEnabled("Notes",!isLocked("notes"));
|
||||
|
||||
// Document division
|
||||
boolean bSplit = getCheckBoxStateAsBoolean("Split");
|
||||
setControlEnabled("Split",!isLocked("split_level"));
|
||||
setControlEnabled("SplitLevelLabel",!isLocked("split_level") && bSplit);
|
||||
setControlEnabled("SplitLevel",!isLocked("split_level") && bSplit);
|
||||
setControlEnabled("SplitLevelLabel",!isLocked("split_level"));
|
||||
setControlEnabled("SplitLevel",!isLocked("split_level"));
|
||||
|
||||
setControlEnabled("PageBreakSplitLabel",!isLocked("page_break_split"));
|
||||
setControlEnabled("PageBreakSplit",!isLocked("page_break_split"));
|
||||
|
||||
boolean bUseImageSplit = getCheckBoxStateAsBoolean("UseImageSplit");
|
||||
setControlEnabled("UseImageSplit",!isLocked("image_split"));
|
||||
setControlEnabled("ImageSplitLabel",!isLocked("image_split") && bUseImageSplit);
|
||||
setControlEnabled("ImageSplit",!isLocked("image_split") && bUseImageSplit);
|
||||
setControlEnabled("ImageSplitPercentLabel",!isLocked("image_split") && bUseImageSplit);
|
||||
|
||||
boolean bUsePageBreakSplit = getCheckBoxStateAsBoolean("UsePageBreakSplit");
|
||||
setControlEnabled("UsePageBreakSplit",!isLocked("page_break_split"));
|
||||
setControlEnabled("PageBreakSplitLabel",!isLocked("page_break_split") && bUsePageBreakSplit);
|
||||
setControlEnabled("PageBreakSplit",!isLocked("page_break_split") && bUsePageBreakSplit);
|
||||
|
||||
boolean bUseSplitAfter = getCheckBoxStateAsBoolean("UseSplitAfter");
|
||||
setControlEnabled("UseSplitAfter",!isLocked("split_after"));
|
||||
setControlEnabled("SplitAfterLabel",!isLocked("split_after") && bUseSplitAfter);
|
||||
|
@ -296,6 +298,13 @@ public class EpubOptionsDialog extends OptionsDialogBase {
|
|||
}
|
||||
}
|
||||
|
||||
private void imageSizeChange() {
|
||||
if (!isLocked("image_split")) {
|
||||
setControlEnabled("UseImageSplit", getListBoxSelectedItem("ImageSize")==1);
|
||||
useImageSplitChange();
|
||||
}
|
||||
}
|
||||
|
||||
private void editMetadataClick() {
|
||||
Object dialog;
|
||||
try {
|
||||
|
@ -313,22 +322,15 @@ public class EpubOptionsDialog extends OptionsDialogBase {
|
|||
}
|
||||
}
|
||||
|
||||
private void splitChange() {
|
||||
if (!isLocked("split_level")) {
|
||||
boolean bState = getCheckBoxStateAsBoolean("Split");
|
||||
setControlEnabled("SplitLevelLabel",bState);
|
||||
setControlEnabled("SplitLevel",bState);
|
||||
private void useImageSplitChange() {
|
||||
if (!isLocked("image_split")) {
|
||||
boolean bEnable = getCheckBoxStateAsBoolean("UseImageSplit") && (getListBoxSelectedItem("ImageSize")==1);
|
||||
setControlEnabled("ImageSplitLabel",bEnable);
|
||||
setControlEnabled("ImageSplit",bEnable);
|
||||
setControlEnabled("ImageSplitPercentLabel",bEnable);
|
||||
}
|
||||
}
|
||||
|
||||
private void usePageBreakSplitChange() {
|
||||
if (!isLocked("page_break_split")) {
|
||||
boolean bState = getCheckBoxStateAsBoolean("UsePageBreakSplit");
|
||||
setControlEnabled("PageBreakSplitLabel",bState);
|
||||
setControlEnabled("PageBreakSplit",bState);
|
||||
}
|
||||
}
|
||||
|
||||
private void useSplitAfterChange() {
|
||||
if (!isLocked("split_after")) {
|
||||
boolean bState = getCheckBoxStateAsBoolean("UseSplitAfter");
|
||||
|
@ -336,7 +338,5 @@ public class EpubOptionsDialog extends OptionsDialogBase {
|
|||
setControlEnabled("SplitAfter",bState);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2011-06-14)
|
||||
* Version 1.2 (2011-06-16)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -33,7 +33,7 @@ public class ConverterFactory {
|
|||
|
||||
// Version information
|
||||
private static final String VERSION = "1.1.8";
|
||||
private static final String DATE = "2011-06-14";
|
||||
private static final String DATE = "2011-06-16";
|
||||
|
||||
/** Return the Writer2LaTeX version in the form
|
||||
* (major version).(minor version).(patch level)<br/>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2011-06-14)
|
||||
* Version 1.2 (2011-06-16)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -96,6 +96,7 @@ public class DrawConverter extends ConverterHelper {
|
|||
private String sScale;
|
||||
private boolean bConvertToPx;
|
||||
private int nImageSize;
|
||||
private String sImageSplit;
|
||||
|
||||
// Frames in spreadsheet documents are collected here
|
||||
private Vector<Element> frames = new Vector<Element>();
|
||||
|
@ -120,6 +121,7 @@ public class DrawConverter extends ConverterHelper {
|
|||
sScale = config.getXhtmlScaling();
|
||||
bConvertToPx = config.xhtmlConvertToPx();
|
||||
nImageSize = config.imageSize();
|
||||
sImageSplit = config.imageSplit();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
@ -233,10 +235,10 @@ public class DrawConverter extends ConverterHelper {
|
|||
Element currentFrame = hnode;
|
||||
if (converter.isTopLevel() && !fullscreenFrames.isEmpty()) {
|
||||
bCollectFullscreenFrames = false;
|
||||
currentFrame = converter.nextOutFile();
|
||||
currentFrame = getTextCv().doMaybeSplit(hnode, 0);
|
||||
for (Element image : fullscreenFrames) {
|
||||
handleDrawElement(image,currentFrame,null,FULL_SCREEN);
|
||||
currentFrame = converter.nextOutFile();
|
||||
currentFrame = getTextCv().doMaybeSplit(hnode, 0);
|
||||
}
|
||||
fullscreenFrames.clear();
|
||||
bCollectFullscreenFrames = true;
|
||||
|
@ -401,15 +403,16 @@ public class DrawConverter extends ConverterHelper {
|
|||
// First check to see if we should treat this image as a "full screen" image
|
||||
// This is only supported for EPUB documents with relative image size
|
||||
// (Currently only images are handled like this, hence the code is here rather than in handleDrawElement)
|
||||
if (bCollectFullscreenFrames && converter.isOPS() && nImageSize==XhtmlConfig.RELATIVE && converter.isTopLevel()) {
|
||||
if (bCollectFullscreenFrames && converter.isOPS() && nImageSize==XhtmlConfig.RELATIVE && !"none".equals(sImageSplit)
|
||||
&& converter.isTopLevel()) {
|
||||
StyleWithProperties style = ofr.getFrameStyle(frame.getAttribute(XMLString.DRAW_STYLE_NAME));
|
||||
String sWidth = getFrameWidth(frame, style);
|
||||
String sHeight = getFrameHeight(frame, style);
|
||||
// It is if the image width exceeds 30% of the current text width and the height is greater than 1.33*the width
|
||||
// Values recommended by Michel "Coolmicro", should probably be configurable
|
||||
// It is if the image width exceeds a certain percentage of the current text width and the height is
|
||||
// greater than 1.33*the width (recommended by Michel "Coolmicro")
|
||||
if (sWidth!=null && sHeight!=null &&
|
||||
Misc.sub(Misc.multiply("133%",sWidth), sHeight).startsWith("-") &&
|
||||
Misc.sub(Misc.multiply("30%",converter.getContentWidth()),
|
||||
Misc.sub(Misc.multiply(sImageSplit,converter.getContentWidth()),
|
||||
Misc.multiply(sScale,Misc.truncateLength(sWidth))).startsWith("-")) {
|
||||
fullscreenFrames.add(onode);
|
||||
return;
|
||||
|
@ -458,7 +461,7 @@ public class DrawConverter extends ConverterHelper {
|
|||
// Now style it
|
||||
StyleInfo info = new StyleInfo();
|
||||
String sStyleName = Misc.getAttribute(frame, XMLString.DRAW_STYLE_NAME);
|
||||
getFrameSc().applyStyle(sStyleName,info);
|
||||
if (nMode!=FULL_SCREEN) { getFrameSc().applyStyle(sStyleName,info); }
|
||||
applyImageSize(frame,info.props,false);
|
||||
|
||||
// Apply placement
|
||||
|
@ -511,6 +514,8 @@ public class DrawConverter extends ConverterHelper {
|
|||
break;
|
||||
case ABSOLUTE:
|
||||
sContentWidth = applyImageSize(frame,info.props,false);
|
||||
info.props.addValue("margin-left","auto");
|
||||
info.props.addValue("margin-right","auto");
|
||||
applyPosition(frame,info.props);
|
||||
break;
|
||||
case CENTERED:
|
||||
|
@ -932,7 +937,9 @@ public class DrawConverter extends ConverterHelper {
|
|||
else { // Full screen image
|
||||
props.addValue("max-width","100%");
|
||||
props.addValue("height","100%");
|
||||
|
||||
props.addValue("display","block");
|
||||
props.addValue("margin-left","auto");
|
||||
props.addValue("margin-right","auto");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2011-06-14)
|
||||
* Version 1.2 (2011-06-16)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -499,8 +499,8 @@ public class TextConverter extends ConverterHelper {
|
|||
// Remember if this was a heading
|
||||
if (nDontSplitLevel==0) {
|
||||
bAfterHeading = nodeName.equals(XMLString.TEXT_H);
|
||||
hnode = getDrawCv().flushFullscreenFrames((Element)hnode);
|
||||
}
|
||||
hnode = getDrawCv().flushFullscreenFrames((Element)hnode);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
@ -558,15 +558,15 @@ public class TextConverter extends ConverterHelper {
|
|||
}
|
||||
}
|
||||
|
||||
private Node doMaybeSplit(Node node, int nLevel) {
|
||||
protected Element doMaybeSplit(Node node, int nLevel) {
|
||||
if (nDontSplitLevel>1) { // we cannot split due to a nested structure
|
||||
return node;
|
||||
return (Element) node;
|
||||
}
|
||||
if (!converter.isOPS() && bAfterHeading && nLevel-nLastSplitLevel<=nRepeatLevels) {
|
||||
// we cannot split because we are right after a heading and the
|
||||
// maximum number of parent headings on the page is not reached
|
||||
// TODO: Something wrong here....nLastSplitLevel is never set???
|
||||
return node;
|
||||
return (Element) node;
|
||||
}
|
||||
if (nSplit>=nLevel && converter.outFileHasContent()) {
|
||||
// No objections, this is a level that causes splitting
|
||||
|
@ -575,7 +575,7 @@ public class TextConverter extends ConverterHelper {
|
|||
if (converter.getOutFileIndex()>=0) { insertFootnotes(node,false); }
|
||||
return converter.nextOutFile();
|
||||
}
|
||||
return node;
|
||||
return (Element) node;
|
||||
}
|
||||
|
||||
/* Process a text:section tag (returns current html node) */
|
||||
|
@ -817,6 +817,11 @@ public class TextConverter extends ConverterHelper {
|
|||
par.appendChild( converter.createTextNode("\u00A0") );
|
||||
sCurrentListLabel = null;
|
||||
}
|
||||
|
||||
// Finally, in EPUB export, if the exported paragraph turns out to be empty, remove it
|
||||
if (converter.isOPS() && !par.hasChildNodes()) {
|
||||
hnode.removeChild(par);
|
||||
}
|
||||
}
|
||||
|
||||
private void prependAsapNode(Node node) {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2011-03-16)
|
||||
* Version 1.2 (2011-06-16)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -41,7 +41,7 @@ import writer2latex.util.Misc;
|
|||
|
||||
public class XhtmlConfig extends writer2latex.base.ConfigBase {
|
||||
// Implement configuration methods
|
||||
protected int getOptionCount() { return 54; }
|
||||
protected int getOptionCount() { return 55; }
|
||||
protected String getDefaultConfigPath() { return "/writer2latex/xhtml/config/"; }
|
||||
|
||||
// Override setOption: To be backwards compatible, we must accept options
|
||||
|
@ -135,19 +135,20 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase {
|
|||
private static final int REPEAT_LEVELS = 38;
|
||||
private static final int PAGE_BREAK_SPLIT = 39;
|
||||
private static final int SPLIT_AFTER = 40;
|
||||
private static final int CALC_SPLIT = 41;
|
||||
private static final int DISPLAY_HIDDEN_SHEETS = 42;
|
||||
private static final int DISPLAY_HIDDEN_ROWS_COLS = 43;
|
||||
private static final int DISPLAY_FILTERED_ROWS_COLS = 44;
|
||||
private static final int APPLY_PRINT_RANGES = 45;
|
||||
private static final int USE_TITLE_AS_HEADING = 46;
|
||||
private static final int USE_SHEET_NAMES_AS_HEADINGS = 47;
|
||||
private static final int XSLT_PATH = 48;
|
||||
private static final int SAVE_IMAGES_IN_SUBDIR = 49;
|
||||
private static final int UPLINK = 50;
|
||||
private static final int DIRECTORY_ICON = 51;
|
||||
private static final int DOCUMENT_ICON = 52;
|
||||
private static final int ZEN_HACK = 53; // temporary hack for ePub Zen Garden styles
|
||||
private static final int IMAGE_SPLIT = 41;
|
||||
private static final int CALC_SPLIT = 42;
|
||||
private static final int DISPLAY_HIDDEN_SHEETS = 43;
|
||||
private static final int DISPLAY_HIDDEN_ROWS_COLS = 44;
|
||||
private static final int DISPLAY_FILTERED_ROWS_COLS = 45;
|
||||
private static final int APPLY_PRINT_RANGES = 46;
|
||||
private static final int USE_TITLE_AS_HEADING = 47;
|
||||
private static final int USE_SHEET_NAMES_AS_HEADINGS = 48;
|
||||
private static final int XSLT_PATH = 49;
|
||||
private static final int SAVE_IMAGES_IN_SUBDIR = 50;
|
||||
private static final int UPLINK = 51;
|
||||
private static final int DIRECTORY_ICON = 52;
|
||||
private static final int DOCUMENT_ICON = 53;
|
||||
private static final int ZEN_HACK = 54; // temporary hack for ePub Zen Garden styles
|
||||
|
||||
protected ComplexOption xheading = addComplexOption("heading-map");
|
||||
protected ComplexOption xpar = addComplexOption("paragraph-map");
|
||||
|
@ -256,6 +257,7 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase {
|
|||
nValue = Misc.getPosInteger(sValue, 0);
|
||||
}
|
||||
};
|
||||
options[IMAGE_SPLIT] = new Option("image_split","none");
|
||||
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");
|
||||
|
@ -380,6 +382,7 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase {
|
|||
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 String imageSplit() { return options[IMAGE_SPLIT].getString(); }
|
||||
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(); }
|
||||
|
|
|
@ -71,10 +71,10 @@
|
|||
<prop oor:name="Notes" oor:type="xs:boolean" />
|
||||
<prop oor:name="UseDublinCore" oor:type="xs:boolean" />
|
||||
<!-- Files -->
|
||||
<prop oor:name="Split" oor:type="xs:boolean" />
|
||||
<prop oor:name="SplitLevel" oor:type="xs:short" />
|
||||
<prop oor:name="UsePageBreakSplit" oor:type="xs:boolean" />
|
||||
<prop oor:name="PageBreakSplit" oor:type="xs:short" />
|
||||
<prop oor:name="UseImageSplit" oor:type="xs:boolean" />
|
||||
<prop oor:name="ImageSplit" oor:type="xs:int" />
|
||||
<prop oor:name="UseSplitAfter" oor:type="xs:boolean" />
|
||||
<prop oor:name="SplitAfter" oor:type="xs:int" />
|
||||
<!-- Table of contents -->
|
||||
|
|
|
@ -103,18 +103,18 @@
|
|||
<prop oor:name="UseDublinCore" oor:type="xs:boolean">
|
||||
<value>true</value>
|
||||
</prop>
|
||||
<prop oor:name="Split" oor:type="xs:boolean">
|
||||
<value>false</value>
|
||||
</prop>
|
||||
<prop oor:name="SplitLevel" oor:type="xs:short">
|
||||
<value>1</value>
|
||||
</prop>
|
||||
<prop oor:name="UsePageBreakSplit" oor:type="xs:boolean">
|
||||
<value>false</value>
|
||||
</prop>
|
||||
<prop oor:name="PageBreakSplit" oor:type="xs:short">
|
||||
<value>0</value>
|
||||
</prop>
|
||||
<prop oor:name="UseImageSplit" oor:type="xs:boolean">
|
||||
<value>false</value>
|
||||
</prop>
|
||||
<prop oor:name="ImageSplit" oor:type="xs:int">
|
||||
<value>30</value>
|
||||
</prop>
|
||||
<prop oor:name="UseSplitAfter" oor:type="xs:boolean">
|
||||
<value>true</value>
|
||||
</prop>
|
||||
|
|
|
@ -24,12 +24,10 @@
|
|||
<dlg:checkbox dlg:id="IgnoreHardLineBreaks" dlg:tab-index="14" dlg:left="10" dlg:top="162" dlg:width="155" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsIgnoreHardLineBreaks" dlg:value="Ignore hard line breaks" dlg:checked="false"/>
|
||||
<dlg:checkbox dlg:id="IgnoreEmptyParagraphs" dlg:tab-index="15" dlg:left="10" dlg:top="176" dlg:width="155" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsIgnoreEmptyParagraphs" dlg:value="Ignore empty paragraphs" dlg:checked="false"/>
|
||||
<dlg:checkbox dlg:id="IgnoreDoubleSpaces" dlg:tab-index="16" dlg:left="10" dlg:top="190" dlg:width="155" dlg:height="15" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsIgnoreDoubleSpaces" dlg:value="Ignore double spaces" dlg:checked="false"/>
|
||||
<dlg:checkbox dlg:id="Split" dlg:tab-index="20" dlg:left="190" dlg:top="78" dlg:width="155" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsSplit" dlg:value="Split document at headings" dlg:checked="false">
|
||||
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.UNO:SplitChange" script:language="UNO"/>
|
||||
</dlg:checkbox>
|
||||
<dlg:text dlg:id="SplitLevelLabel" dlg:tab-index="32" dlg:left="199" dlg:top="92" dlg:width="100" dlg:height="12" dlg:value="Heading level"/>
|
||||
<dlg:menulist dlg:id="SplitLevel" dlg:tab-index="21" dlg:left="305" dlg:top="90" dlg:width="40" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsSplitLevel" dlg:spin="true" dlg:linecount="6">
|
||||
<dlg:text dlg:id="SplitLevelLabel" dlg:tab-index="32" dlg:left="190" dlg:top="78" dlg:width="90" dlg:height="12" dlg:value="At heading level"/>
|
||||
<dlg:menulist dlg:id="SplitLevel" dlg:tab-index="20" dlg:left="285" dlg:top="76" dlg:width="60" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsSplitLevel" dlg:spin="true" dlg:linecount="7">
|
||||
<dlg:menupopup>
|
||||
<dlg:menuitem dlg:value="None"/>
|
||||
<dlg:menuitem dlg:value="1"/>
|
||||
<dlg:menuitem dlg:value="2"/>
|
||||
<dlg:menuitem dlg:value="3"/>
|
||||
|
@ -54,12 +52,10 @@
|
|||
<dlg:text dlg:id="DefaultFontNameLabel" dlg:tab-index="39" dlg:left="19" dlg:top="106" dlg:width="50" dlg:height="12" dlg:value="Font name"/>
|
||||
<dlg:combobox dlg:id="DefaultFontName" dlg:tab-index="11" dlg:left="75" dlg:top="104" dlg:width="90" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsDefaultFontName" dlg:spin="true"/>
|
||||
<dlg:checkbox dlg:id="DisplayHiddenText" dlg:tab-index="17" dlg:left="190" dlg:top="22" dlg:width="155" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsDisplayHiddenText" dlg:value="Display hidden text" dlg:checked="false"/>
|
||||
<dlg:checkbox dlg:id="UsePageBreakSplit" dlg:tab-index="22" dlg:left="190" dlg:top="106" dlg:width="155" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsPageBreakSplit" dlg:value="Split document at page breaks" dlg:checked="false">
|
||||
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.UNO:UsePageBreakSplitChange" script:language="UNO"/>
|
||||
</dlg:checkbox>
|
||||
<dlg:text dlg:id="PageBreakSplitLabel" dlg:tab-index="40" dlg:left="199" dlg:top="120" dlg:width="45" dlg:height="12" dlg:value="Types"/>
|
||||
<dlg:menulist dlg:id="PageBreakSplit" dlg:tab-index="23" dlg:left="255" dlg:top="118" dlg:width="90" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsPageBreakSplitType" dlg:spin="true" dlg:linecount="3">
|
||||
<dlg:text dlg:id="PageBreakSplitLabel" dlg:tab-index="40" dlg:left="190" dlg:top="92" dlg:width="90" dlg:height="12" dlg:value="At page breaks"/>
|
||||
<dlg:menulist dlg:id="PageBreakSplit" dlg:tab-index="21" dlg:left="285" dlg:top="90" dlg:width="60" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsPageBreakSplit" dlg:spin="true" dlg:linecount="4">
|
||||
<dlg:menupopup>
|
||||
<dlg:menuitem dlg:value="None"/>
|
||||
<dlg:menuitem dlg:value="Defined by styles"/>
|
||||
<dlg:menuitem dlg:value="All explicit"/>
|
||||
<dlg:menuitem dlg:value="All"/>
|
||||
|
@ -69,10 +65,10 @@
|
|||
<dlg:checkbox dlg:id="UseSplitAfter" dlg:tab-index="24" dlg:left="190" dlg:top="134" dlg:width="155" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsUseEpubAutoSplit" dlg:value="Automatic split of long documents" dlg:checked="false">
|
||||
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.UNO:UseSplitAfterChange" script:language="UNO"/>
|
||||
</dlg:checkbox>
|
||||
<dlg:text dlg:id="SplitAfterLabel" dlg:tab-index="41" dlg:left="199" dlg:top="148" dlg:width="100" dlg:height="12" dlg:value="After (in 1000 characters)"/>
|
||||
<dlg:numericfield dlg:id="SplitAfter" dlg:tab-index="25" dlg:left="305" dlg:top="146" dlg:width="40" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsEpubAutoSplit" dlg:strict-format="true" dlg:decimal-accuracy="0" dlg:value-min="10" dlg:value-max="1000" dlg:value-step="10" dlg:spin="true"/>
|
||||
<dlg:text dlg:id="ExternalTocDepthLabel" dlg:tab-index="42" dlg:left="190" dlg:top="176" dlg:width="110" dlg:height="12" dlg:value="Number of heading levels to include"/>
|
||||
<dlg:menulist dlg:id="ExternalTocDepth" dlg:tab-index="26" dlg:left="305" dlg:top="174" dlg:width="40" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsExternalTocDepth" dlg:spin="true" dlg:linecount="10">
|
||||
<dlg:text dlg:id="SplitAfterLabel" dlg:tab-index="41" dlg:left="199" dlg:top="148" dlg:width="90" dlg:height="12" dlg:value="After (in 1000 characters)"/>
|
||||
<dlg:numericfield dlg:id="SplitAfter" dlg:tab-index="25" dlg:left="300" dlg:top="146" dlg:width="45" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsEpubAutoSplit" dlg:strict-format="true" dlg:decimal-accuracy="0" dlg:value-min="10" dlg:value-max="1000" dlg:value-step="10" dlg:spin="true"/>
|
||||
<dlg:text dlg:id="ExternalTocDepthLabel" dlg:tab-index="42" dlg:left="190" dlg:top="176" dlg:width="100" dlg:height="12" dlg:value="Number of heading levels to include"/>
|
||||
<dlg:menulist dlg:id="ExternalTocDepth" dlg:tab-index="26" dlg:left="300" dlg:top="174" dlg:width="45" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsExternalTocDepth" dlg:spin="true" dlg:linecount="10">
|
||||
<dlg:menupopup>
|
||||
<dlg:menuitem dlg:value="1"/>
|
||||
<dlg:menuitem dlg:value="2"/>
|
||||
|
@ -92,12 +88,19 @@
|
|||
<script:event script:event-name="on-mouseup" script:macro-name="vnd.sun.star.UNO:EditMetadataClick" script:language="UNO"/>
|
||||
</dlg:button>
|
||||
<dlg:text dlg:id="ImageSizeLabel" dlg:tab-index="44" dlg:left="10" dlg:top="134" dlg:width="60" dlg:height="12" dlg:value="Image size"/>
|
||||
<dlg:menulist dlg:id="ImageSize" dlg:tab-index="13" dlg:left="75" dlg:top="132" dlg:width="90" dlg:height="12" dlg:spin="true" dlg:linecount="3" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsImageSize">
|
||||
<dlg:menulist dlg:id="ImageSize" dlg:tab-index="13" dlg:left="75" dlg:top="132" dlg:width="90" dlg:height="12" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsImageSize" dlg:spin="true" dlg:linecount="3">
|
||||
<dlg:menupopup>
|
||||
<dlg:menuitem dlg:value="Use absolute size"/>
|
||||
<dlg:menuitem dlg:value="Use relative size (%)"/>
|
||||
<dlg:menuitem dlg:value="Use original image size"/>
|
||||
</dlg:menupopup>
|
||||
<script:event script:event-name="on-mouseup" script:macro-name="vnd.sun.star.UNO:ImageSizeChange" script:language="UNO"/>
|
||||
</dlg:menulist>
|
||||
<dlg:checkbox dlg:id="UseImageSplit" dlg:tab-index="22" dlg:left="190" dlg:top="106" dlg:width="155" dlg:height="12" dlg:value="Use full screen for large images" dlg:checked="false" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsUseImageSplit">
|
||||
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.UNO:UseImageSplitChange" script:language="UNO"/>
|
||||
</dlg:checkbox>
|
||||
<dlg:text dlg:id="ImageSplitLabel" dlg:tab-index="45" dlg:left="199" dlg:top="120" dlg:width="90" dlg:height="12" dlg:value="Minimum width"/>
|
||||
<dlg:text dlg:id="ImageSplitPercentLabel" dlg:tab-index="46" dlg:left="335" dlg:top="120" dlg:width="10" dlg:height="12" dlg:value="%"/>
|
||||
<dlg:numericfield dlg:id="ImageSplit" dlg:tab-index="23" dlg:left="300" dlg:top="118" dlg:width="30" dlg:height="12" dlg:strict-format="true" dlg:decimal-accuracy="0" dlg:value="100" dlg:value-min="0" dlg:value-max="100" dlg:spin="true" dlg:help-url="org.openoffice.da.writer2xhtml.oxt:EpubOptionsImageSplit"/>
|
||||
</dlg:bulletinboard>
|
||||
</dlg:window>
|
|
@ -144,32 +144,30 @@
|
|||
<paragraph role="heading" level="2" xml-lang="en-US">Document division</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Technically an EPUB document consists of several document parts in XHTML format.
|
||||
In principle you can have only one part, but this is not recommended. For performance reasons and because some EPUB readers have
|
||||
a limitation on the size of the individual files in the doucment you should select one of the following options to split the document.
|
||||
a limitation on the size of the individual files in the doucment you should select one or more
|
||||
of the following options to split the document.
|
||||
</paragraph>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer2xhtml.oxt:EpubOptionsSplit" id="bm_options_split"/>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">Split document at headings</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer2xhtml.oxt:EpubOptionsSplit" visibility="hidden">Check this to create a new document part for each heading</ahelp></paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Use this option to split the document at headings. This is the most common way
|
||||
to split the document.</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Note that this option has no effect for headings
|
||||
inside tables.</paragraph>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer2xhtml.oxt:EpubOptionsSplitLevel" id="bm_options_splitlevel"/>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer2xhtml.oxt:EpubOptionsSplitLevel" visibility="hidden">Select the heading level at which spliting should occur</ahelp></paragraph>
|
||||
<embed href="org.openoffice.da.writer2xhtml.oxt/export.xhp#splitlevel"/>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer2xhtml.oxt:EpubOptionsSplitLevel" visibility="hidden">Select the heading level at which spliting should occur, or "None" if you do not want to split at headings</ahelp></paragraph>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">At heading level</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Use this option to split the document at headings. This is the most common way
|
||||
to split the document. Note that this option has no effect for headings
|
||||
inside tables.</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">You can either select <emph>None</emph> (the document will not split at headings),
|
||||
or you can select at which level splitting should occur.
|
||||
For example 2 to split the document at all headings of level 1 or 2.</paragraph>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer2xhtml.oxt:EpubOptionsPageBreakSplit" id="bm_options_pagebreaksplit"/>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">Split document at page breaks</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer2xhtml.oxt:EpubOptionsPageBreakSplit" visibility="hidden">Check this to create a new document par at page breaks</ahelp></paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Use this option to split the document at the original page breaks.</paragraph>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer2xhtml.oxt:EpubOptionsPageBreakSplitType" id="bm_options_pagebreaksplittype"/>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">Types of page break</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer2xhtml.oxt:EpubOptionsPageBreakSplitType" visibility="hidden">Select the types of page breaks at which splitting should occur</ahelp></paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">If you have chosen to split the document at page break, use this option to select
|
||||
the types of page breaks to use:</paragraph>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">At page breaks</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer2xhtml.oxt:EpubOptionsPageBreakSplit" visibility="hidden">Select the type page breaks at which you want to split the document</ahelp></paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">This option enables you to split the document at the original page breaks.
|
||||
Select the type of page breaks in the list:</paragraph>
|
||||
<list type="unordered">
|
||||
<listitem>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Select <emph>None</emph> if you do not want to split at page breaks.</paragraph>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Select <emph>Defined by styles</emph> to split at page breaks defined
|
||||
in paragraph styles.</paragraph>
|
||||
|
@ -184,6 +182,18 @@
|
|||
</listitem>
|
||||
</list>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer2xhtml.oxt:EpubOptionsUseImageSplit" id="bm_options_useimagesplit"/>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">Use full screen for large images</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer2xhtml.oxt:EpubOptionsUseImageSplit" visibility="hidden">Select this option to show large images on full screen rather than embedded in the text</ahelp></paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Select this option to show large images on full screen rather than embedded
|
||||
in the text.</paragraph>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer2xhtml.oxt:EpubOptionsImageSplit" id="bm_options_imagesplit"/>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">Minimum width</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer2xhtml.oxt:EpubOptionsUseEpubAutoSplit" visibility="hidden">Enter the minimum width used to identify a large image</ahelp></paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Enter the minimum width for a large image. Only images with at least this relative width
|
||||
and an aspect ratio of 3:4 or higher will be export as full screen images.</paragraph>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer2xhtml.oxt:EpubOptionsUseEpubAutoSplit" id="bm_options_useepubautosplit"/>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">Automatic split of long documents</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer2xhtml.oxt:EpubOptionsUseEpubAutoSplit" visibility="hidden">Check this to enable automatic split of long documents based on the number of characters</ahelp></paragraph>
|
||||
|
|
Loading…
Add table
Reference in a new issue