EPUB 3 preparations + embed HTML images as base 64

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@226 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2015-01-17 11:23:57 +00:00
parent 951bcc0f85
commit 53c84ca717
21 changed files with 209 additions and 61 deletions

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright: 2002-2014 by Henrik Just
* Copyright: 2002-2015 by Henrik Just
*
* All Rights Reserved.
*
* Version 1.6 (2014-10-07)
* Version 1.6 (2015-01-13)
*
*/
package org.openoffice.da.comp.w2lcommon.filter;
@ -79,6 +79,7 @@ public class UNOConverter {
filterNames.put("org.openoffice.da.writer2xhtml5","text/html5");
filterNames.put("org.openoffice.da.writer2xhtml.mathml","application/xhtml+xml");
filterNames.put("org.openoffice.da.writer2xhtml.epub","application/epub+zip");
filterNames.put("org.openoffice.da.writer2xhtml.epub3","epub3");
filterNames.put("org.openoffice.da.calc2xhtml","text/html");
filterNames.put("org.openoffice.da.calc2xhtml11","application/xhtml11");
filterNames.put("org.openoffice.da.calc2xhtml5","text/html5");

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright: 2002-2014 by Henrik Just
* Copyright: 2002-2015 by Henrik Just
*
* All Rights Reserved.
*
* Version 1.6 (2014-12-27)
* Version 1.6 (2015-01-09)
*
*/
package org.openoffice.da.comp.w2lcommon.filter;
@ -51,7 +51,7 @@ import com.sun.star.util.XModifiable;
*/
public class UNOPublisher {
public enum TargetFormat { xhtml, xhtml11, xhtml_mathml, html5, epub, latex };
public enum TargetFormat { xhtml, xhtml11, xhtml_mathml, html5, epub, epub3, latex };
private String sAppName;
@ -294,6 +294,7 @@ public class UNOPublisher {
case xhtml_mathml: return ".xhtml";
case html5: return ".html";
case epub: return ".epub";
case epub3: return ".epub";
case latex: return ".tex";
default: return "";
}
@ -306,6 +307,7 @@ public class UNOPublisher {
case xhtml_mathml:
case html5: return "org.openoffice.da.comp.writer2xhtml.XhtmlOptionsDialogMath";
case epub: return "org.openoffice.da.comp.writer2xhtml.EpubOptionsDialog";
case epub3: return "org.openoffice.da.comp.writer2xhtml.EpubOptionsDialog";
case latex: return "org.openoffice.da.comp.writer2latex.LaTeXOptionsDialog";
default: return null;
}
@ -318,6 +320,7 @@ public class UNOPublisher {
case xhtml_mathml:
case html5: return "org.openoffice.da.comp.writer2xhtml.XhtmlOptionsDialogCalc";
case epub:
case epub3:
case latex:
default: return null;
}
@ -330,6 +333,7 @@ public class UNOPublisher {
case xhtml_mathml: return "org.openoffice.da.writer2xhtml.mathml";
case html5: return "org.openoffice.da.writer2xhtml5";
case epub: return "org.openoffice.da.writer2xhtml.epub";
case epub3: return "org.openoffice.da.writer2xhtml.epub";
case latex: return "org.openoffice.da.writer2latex";
default: return "";
}

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright: 2002-2014 by Henrik Just
* Copyright: 2002-2015 by Henrik Just
*
* All Rights Reserved.
*
* Version 1.4 (2014-09-26)
* Version 1.6 (2015-01-14)
*
*/
@ -518,6 +518,7 @@ public class ConfigurationDialog extends ConfigurationDialogBase implements XSer
textFieldFromConfig(dlg, "EndnotesHeading", "endnotes_heading");
textFieldFromConfig(dlg, "FootnotesHeading", "footnotes_heading");
checkBoxFromConfig(dlg, "EmbedSvg", "embed_svg");
checkBoxFromConfig(dlg, "EmbedImg", "embed_img");
}
@Override protected void getControls(DialogAccess dlg) {
@ -525,6 +526,7 @@ public class ConfigurationDialog extends ConfigurationDialogBase implements XSer
textFieldToConfig(dlg, "EndnotesHeading", "endnotes_heading");
textFieldToConfig(dlg, "FootnotesHeading", "footnotes_heading");
checkBoxToConfig(dlg, "EmbedSvg", "embed_svg");
checkBoxToConfig(dlg, "EmbedImg", "embed_img");
}
@Override protected boolean handleEvent(DialogAccess dlg, String sMethod) {

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright: 2002-2014 by Henrik Just
* Copyright: 2002-2015 by Henrik Just
*
* All Rights Reserved.
*
* Version 1.6 (2014-11-15)
* Version 1.6 (2015-01-09)
*
*/
@ -59,7 +59,7 @@ public final class Writer2xhtml extends WeakBase
// TODO: These should be configurable
private TargetFormat xhtmlFormat = TargetFormat.html5;
private TargetFormat epubFormat = TargetFormat.epub;
private TargetFormat epubFormat = TargetFormat.epub3;
public Writer2xhtml(XComponentContext xContext) {
m_xContext = xContext;