|
@@ -326,7 +326,7 @@ public class ExportPaperUtil {
|
|
|
|
|
|
private static List<JSection> getSections(String html, boolean diposeFillBlank) {
|
|
|
if (StringUtils.isBlank(html)) {
|
|
|
- return null;
|
|
|
+ return getEmptySections();
|
|
|
}
|
|
|
html = html.trim();
|
|
|
if (!html.startsWith("<p>")) {
|
|
@@ -349,6 +349,19 @@ public class ExportPaperUtil {
|
|
|
return ss;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ private static List<JSection> getEmptySections(){
|
|
|
+ List<JSection> ss = new ArrayList<JSection>();
|
|
|
+ JSection s = new JSection();
|
|
|
+ List<SectionElement> ses = new ArrayList<SectionElement>();
|
|
|
+ s.setElements(ses);
|
|
|
+ SectionElement se=new SectionElement();
|
|
|
+ se.setType(ELEMENT_TYPE_TEXT);
|
|
|
+ se.setValue("");
|
|
|
+ ses.add(se);
|
|
|
+ ss.add(s);
|
|
|
+ return ss;
|
|
|
+ }
|
|
|
|
|
|
private static void getSectionElement(Node ce, List<SectionElement> ses, boolean diposeFillBlank) {
|
|
|
if ("span".equals(ce.nodeName()) && ce.childNodeSize() > 0) {
|