EPUB 3 support
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@239 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
b0b61acb19
commit
d141619053
15 changed files with 413 additions and 122 deletions
|
@ -0,0 +1,48 @@
|
|||
/************************************************************************
|
||||
*
|
||||
* EpubOptionsDialog.java
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Copyright: 2002-2016 by Henrik Just
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.6 (2015-04-28)
|
||||
*
|
||||
*/
|
||||
package org.openoffice.da.comp.writer2xhtml;
|
||||
|
||||
import com.sun.star.uno.XComponentContext;
|
||||
|
||||
/** This class provides a UNO component which implements a filter UI for the
|
||||
* EPUB 3 export. In this version the option to include NCX is enabled.
|
||||
*/
|
||||
public class Epub3OptionsDialog extends EpubOptionsDialog {
|
||||
|
||||
/** The component will be registered under this name.
|
||||
*/
|
||||
public static String __serviceName = "org.openoffice.da.writer2xhtml.Epub3OptionsDialog";
|
||||
|
||||
/** The component should also have an implementation name.
|
||||
*/
|
||||
public static String __implementationName = "org.openoffice.da.comp.writer2xhtml.EpubOptionsDialog3";
|
||||
|
||||
/** Create a new Epub3OptionsDialog */
|
||||
public Epub3OptionsDialog(XComponentContext xContext) {
|
||||
super(xContext);
|
||||
}
|
||||
|
||||
}
|
|
@ -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-25)
|
||||
* Version 1.6 (2015-04-28)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -119,6 +119,7 @@ public class EpubOptionsDialog extends OptionsDialogBase {
|
|||
// Navigation table
|
||||
loadListBoxOption(xProps, "ExternalTocDepth");
|
||||
loadCheckBoxOption(xProps, "IncludeToc");
|
||||
loadCheckBoxOption(xProps, "IncludeNCX");
|
||||
|
||||
updateLockedOptions();
|
||||
enableControls();
|
||||
|
@ -204,6 +205,7 @@ public class EpubOptionsDialog extends OptionsDialogBase {
|
|||
short nExternalTocDepth = saveListBoxOption(xProps, "ExternalTocDepth");
|
||||
helper.put("external_toc_depth", Integer.toString(nExternalTocDepth+1));
|
||||
saveCheckBoxOption(xProps, helper, "IncludeToc", "include_toc");
|
||||
saveCheckBoxOption(xProps, helper, "IncludeNCX", "include_ncx");
|
||||
}
|
||||
|
||||
|
||||
|
@ -291,6 +293,7 @@ public class EpubOptionsDialog extends OptionsDialogBase {
|
|||
setControlEnabled("ExternalTocDepthLabel", !isLocked("external_toc_depth"));
|
||||
setControlEnabled("ExternalTocDepth", !isLocked("external_toc_depth"));
|
||||
setControlEnabled("IncludeToc", !isLocked("include_toc"));
|
||||
setControlEnabled("IncludeNCX", (this instanceof Epub3OptionsDialog) && !isLocked("include_ncx"));
|
||||
}
|
||||
|
||||
private void relativeFontSizeChange() {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.6 (2015-04-03)
|
||||
* Version 1.6 (2015-04-28)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -102,6 +102,12 @@ public class W2XRegistration {
|
|||
multiFactory,
|
||||
regKey);
|
||||
}
|
||||
else if (implName.equals(Epub3OptionsDialog.__implementationName)) {
|
||||
xSingleServiceFactory = FactoryHelper.getServiceFactory(Epub3OptionsDialog.class,
|
||||
Epub3OptionsDialog.__serviceName,
|
||||
multiFactory,
|
||||
regKey);
|
||||
}
|
||||
else if (implName.equals(EpubMetadataDialog.__implementationName)) {
|
||||
xSingleServiceFactory = FactoryHelper.getServiceFactory(EpubMetadataDialog.class,
|
||||
EpubMetadataDialog.__serviceName,
|
||||
|
@ -148,6 +154,8 @@ public class W2XRegistration {
|
|||
XhtmlOptionsDialogCalc.__serviceName, regKey) &
|
||||
FactoryHelper.writeRegistryServiceInfo(EpubOptionsDialog.__implementationName,
|
||||
EpubOptionsDialog.__serviceName, regKey) &
|
||||
FactoryHelper.writeRegistryServiceInfo(Epub3OptionsDialog.__implementationName,
|
||||
Epub3OptionsDialog.__serviceName, regKey) &
|
||||
FactoryHelper.writeRegistryServiceInfo(EpubMetadataDialog.__implementationName,
|
||||
EpubMetadataDialog.__serviceName, regKey) &
|
||||
FactoryHelper.writeRegistryServiceInfo(ConfigurationDialog.__implementationName,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
*
|
||||
* XhtmlOptionsDialogXsl.java
|
||||
* XhtmlOptionsDialogMath.java
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -30,7 +30,7 @@ import com.sun.star.uno.XComponentContext;
|
|||
|
||||
/** This class provides a uno component which implements a filter ui for the
|
||||
* Xhtml export for the XHTML+MathML and HTML export.
|
||||
* This variant of the dialog has the MahtJax setting enabled
|
||||
* This variant of the dialog has the MathJax setting enabled
|
||||
*/
|
||||
public class XhtmlOptionsDialogMath extends XhtmlOptionsDialog {
|
||||
/** The component will be registered under this name.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue