From a01aea739c68da451d3e027ef48357857db40f5c Mon Sep 17 00:00:00 2001 From: henrikjust Date: Sun, 14 Jun 2015 20:13:45 +0000 Subject: [PATCH] w2x: epub 3 semantic inflection git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@253 f0f2a975-2e09-46c8-9428-3b39399b9f3c --- .../writer2latex/xhtml/EndnoteConverter.java | 6 +++--- .../writer2latex/xhtml/FootnoteConverter.java | 10 ++++------ .../java/writer2latex/xhtml/NoteConverter.java | 18 +++++++++--------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/source/java/writer2latex/xhtml/EndnoteConverter.java b/source/java/writer2latex/xhtml/EndnoteConverter.java index 06e4c08..0a0b10b 100644 --- a/source/java/writer2latex/xhtml/EndnoteConverter.java +++ b/source/java/writer2latex/xhtml/EndnoteConverter.java @@ -30,9 +30,9 @@ import org.w3c.dom.Node; import writer2latex.office.OfficeReader; -public class EndnoteConverter extends NoteConverter { +class EndnoteConverter extends NoteConverter { - public EndnoteConverter(OfficeReader ofr, XhtmlConfig config, Converter converter) { + EndnoteConverter(OfficeReader ofr, XhtmlConfig config, Converter converter) { super(ofr,config,converter,ofr.getEndnotesConfiguration()); } @@ -40,7 +40,7 @@ public class EndnoteConverter extends NoteConverter { * * @param hnode a block HTML element to contain the endnotes */ - public void insertEndnotes(Node hnode) { + void insertEndnotes(Node hnode) { if (hasNotes()) { if (config.getXhtmlSplitLevel()>0) { hnode = converter.nextOutFile(); } Element section = createNoteSection(hnode, "rearnotes"); diff --git a/source/java/writer2latex/xhtml/FootnoteConverter.java b/source/java/writer2latex/xhtml/FootnoteConverter.java index 5a17299..ebb91cd 100644 --- a/source/java/writer2latex/xhtml/FootnoteConverter.java +++ b/source/java/writer2latex/xhtml/FootnoteConverter.java @@ -20,7 +20,7 @@ * * All Rights Reserved. * - * Version 1.6 (2015-06-12) + * Version 1.6 (2015-06-14) * */ package writer2latex.xhtml; @@ -32,12 +32,12 @@ import writer2latex.office.OfficeReader; import writer2latex.office.PropertySet; import writer2latex.office.XMLString; -public class FootnoteConverter extends NoteConverter { +class FootnoteConverter extends NoteConverter { // Footnote position (can be page or document) private boolean bFootnotesAtPage = true; - public FootnoteConverter(OfficeReader ofr, XhtmlConfig config, Converter converter) { + FootnoteConverter(OfficeReader ofr, XhtmlConfig config, Converter converter) { super(ofr,config,converter,ofr.getFootnotesConfiguration()); PropertySet configuration=ofr.getFootnotesConfiguration(); if (configuration!=null) { @@ -51,7 +51,7 @@ public class FootnoteConverter extends NoteConverter { * @param hnode a block HTML element to contain the footnotes * @param bFinal true if this is the final call */ - public void insertFootnotes(Node hnode, boolean bFinal) { + void insertFootnotes(Node hnode, boolean bFinal) { if (hasNotes()) { if (bFootnotesAtPage) { Element section = createNoteSection(hnode, "footnotes"); @@ -76,5 +76,3 @@ public class FootnoteConverter extends NoteConverter { } } - - diff --git a/source/java/writer2latex/xhtml/NoteConverter.java b/source/java/writer2latex/xhtml/NoteConverter.java index 2866285..f012127 100644 --- a/source/java/writer2latex/xhtml/NoteConverter.java +++ b/source/java/writer2latex/xhtml/NoteConverter.java @@ -20,7 +20,7 @@ * * All Rights Reserved. * - * Version 1.6 (2015-06-12) + * Version 1.6 (2015-06-14) * */ package writer2latex.xhtml; @@ -38,7 +38,7 @@ import writer2latex.util.Misc; /** This is a base class handles the conversion of footnotes and endnotes */ -public class NoteConverter extends ConverterHelper { +class NoteConverter extends ConverterHelper { // The notes configuration private PropertySet noteConfig; @@ -53,7 +53,7 @@ public class NoteConverter extends ConverterHelper { * @param converter the converter * @param noteConfig the configuration of the notes */ - public NoteConverter(OfficeReader ofr, XhtmlConfig config, Converter converter, PropertySet noteConfig) { + NoteConverter(OfficeReader ofr, XhtmlConfig config, Converter converter, PropertySet noteConfig) { super(ofr,config,converter); this.noteConfig = noteConfig; } @@ -63,7 +63,7 @@ public class NoteConverter extends ConverterHelper { * @param onode a text:note element * @param hnode the inline HTML element to contain the citation */ - public void handleNote(Node onode, Node hnode) { + void handleNote(Node onode, Node hnode) { // Create a style span for the citation String sCitBodyStyle = noteConfig.getProperty(XMLString.TEXT_CITATION_BODY_STYLE_NAME); Element span = getTextCv().createInline((Element) hnode,sCitBodyStyle); @@ -89,18 +89,18 @@ public class NoteConverter extends ConverterHelper { notes.add(onode); } - protected boolean hasNotes() { + boolean hasNotes() { return notes.size()>0; } - protected Element createNoteSection(Node hnode, String sEpubType) { + Element createNoteSection(Node hnode, String sEpubType) { Element section = converter.createElement(converter.isHTML5() ? "section" : "div"); hnode.appendChild(section); converter.addEpubType(section, sEpubType); return section; } - protected void insertNoteHeading(Node hnode, String sHeading, String sTarget) { + void insertNoteHeading(Node hnode, String sHeading, String sTarget) { if (sHeading.length()>0) { // Create heading Element heading = converter.createElement("h1"); @@ -119,7 +119,7 @@ public class NoteConverter extends ConverterHelper { } } - protected void flushNotes(Node hnode, String sEpubType) { + void flushNotes(Node hnode, String sEpubType) { int nSize = notes.size(); for (int i=0; i