added support for user's defined style classes
This commit is contained in:
parent
5a1fa122f8
commit
29f3b82fc2
3 changed files with 11 additions and 11 deletions
|
@ -22,5 +22,8 @@
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
<classpathentry exported="true" kind="var" path="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="var" path="M2_REPO/org/odftoolkit/odfdom-java/0.8.7/odfdom-java-0.8.7.jar"/>
|
||||||
|
<classpathentry exported="true" kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
||||||
<groupId>org.bazu</groupId>
|
<groupId>org.bazu</groupId>
|
||||||
<artifactId>jotex</artifactId>
|
<artifactId>jotex</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>0.4.1-SNAPSHOT</version>
|
<version>0.4.2-SNAPSHOT</version>
|
||||||
<name>jotex</name>
|
<name>jotex</name>
|
||||||
<url>http://maven.apache.org</url>
|
<url>http://maven.apache.org</url>
|
||||||
|
|
||||||
|
|
|
@ -196,11 +196,9 @@ public class OdtEPUBlisher {
|
||||||
Utils.processMetadata(getOdt().getMetaDom(), getEpub(), getXpath());
|
Utils.processMetadata(getOdt().getMetaDom(), getEpub(), getXpath());
|
||||||
|
|
||||||
|
|
||||||
// stylesPropsToCSS( getOdtDocument().getDocumentStyles().get,
|
|
||||||
// className)
|
|
||||||
// System.out.println(getOdtDocument().getDocumentStyles());
|
|
||||||
extractDefaultStyles(getOdt().getDocumentStyles());
|
|
||||||
|
|
||||||
|
//System.out.println(getOdt().getDocumentStyles());
|
||||||
|
extractDefaultStyles(getOdt().getDocumentStyles());
|
||||||
if(getCoverPath()!=null&&getCoverPath().trim().length()>0){//a cover will be processed
|
if(getCoverPath()!=null&&getCoverPath().trim().length()>0){//a cover will be processed
|
||||||
|
|
||||||
|
|
||||||
|
@ -915,21 +913,20 @@ public class OdtEPUBlisher {
|
||||||
stylesPropsToCSS(s.getStyleProperties(), "h9", null);
|
stylesPropsToCSS(s.getStyleProperties(), "h9", null);
|
||||||
stylesPropsToCSS(s.getStyleProperties(), "h10", null);
|
stylesPropsToCSS(s.getStyleProperties(), "h10", null);
|
||||||
|
|
||||||
}
|
}else if (s.getAttribute("style:name").startsWith("Heading")) {
|
||||||
if (s.getAttribute("style:name").startsWith("Heading")) {
|
|
||||||
String level = s.getAttribute("style:default-outline-level");
|
String level = s.getAttribute("style:default-outline-level");
|
||||||
if (level != null && level.trim().length() > 0) {
|
if (level != null && level.trim().length() > 0) {
|
||||||
stylesPropsToCSS(s.getStyleProperties(), "h" + level, null);
|
stylesPropsToCSS(s.getStyleProperties(), "h" + level, null);
|
||||||
}
|
}
|
||||||
}
|
}else if (s.getAttribute("style:name").startsWith("Standard")) {
|
||||||
if (s.getAttribute("style:name").startsWith("Standard")) {
|
|
||||||
|
|
||||||
stylesPropsToCSS(s.getStyleProperties(), "p", null);
|
stylesPropsToCSS(s.getStyleProperties(), "p", null);
|
||||||
|
|
||||||
}
|
}else if (s.getAttribute("style:name").startsWith("Footnote")) {
|
||||||
if (s.getAttribute("style:name").startsWith("Footnote")) {
|
|
||||||
stylesPropsToCSS(s.getStyleProperties(), null, "Footnote");
|
stylesPropsToCSS(s.getStyleProperties(), null, "Footnote");
|
||||||
stylesPropsToCSS(s.getStyleProperties(), null, "fnDiv");
|
stylesPropsToCSS(s.getStyleProperties(), null, "fnDiv");
|
||||||
|
}else if (s.getAttribute("style:name")!=null&&!s.getAttribute("style:name").trim().equals("")) {
|
||||||
|
stylesPropsToCSS(s.getStyleProperties(), null, s.getAttribute("style:name"));
|
||||||
}
|
}
|
||||||
if (isDebugMode()) {
|
if (isDebugMode()) {
|
||||||
System.out.println("Nome: " + s.getAttribute("style:name") + " Classe: "
|
System.out.println("Nome: " + s.getAttribute("style:name") + " Classe: "
|
||||||
|
|
Loading…
Reference in a new issue