diff --git a/src/main/java/writer2latex/xhtml/TextStyleConverter.java b/src/main/java/writer2latex/xhtml/TextStyleConverter.java
index cc84909..8efc857 100644
--- a/src/main/java/writer2latex/xhtml/TextStyleConverter.java
+++ b/src/main/java/writer2latex/xhtml/TextStyleConverter.java
@@ -70,6 +70,8 @@ public class TextStyleConverter extends StyleWithPropertiesConverterHelper {
// Use default font?
private boolean bConvertFont = false;
+ //convert letter spacing
+ private boolean addLetterSpacing = false;
/** Create a new TextStyleConverter
* @param ofr an OfficeReader
to read style information from
@@ -92,6 +94,7 @@ public class TextStyleConverter extends StyleWithPropertiesConverterHelper {
}
}
this.bConvertFont = !config.useDefaultFont();
+ this.addLetterSpacing = config.exportLetterSpacing();
}
/** Apply a link style, using a combination of two text styles
@@ -384,7 +387,7 @@ public class TextStyleConverter extends StyleWithPropertiesConverterHelper {
// Letter spacing: This property fit with css
s = style.getProperty(XMLString.FO_LETTER_SPACING,bInherit);
- if (s!=null) { props.addValue("letter-spacing",scale(s)); }
+ if (s!=null && addLetterSpacing ) { props.addValue("letter-spacing",scale(s)); }
// Capitalization: This property fit with css
s = style.getProperty(XMLString.FO_TEXT_TRANSFORM,bInherit);
diff --git a/src/main/java/writer2latex/xhtml/XhtmlConfig.java b/src/main/java/writer2latex/xhtml/XhtmlConfig.java
index 16c0602..e7f16d4 100644
--- a/src/main/java/writer2latex/xhtml/XhtmlConfig.java
+++ b/src/main/java/writer2latex/xhtml/XhtmlConfig.java
@@ -160,6 +160,7 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase {
private static final int DOCUMENT_ICON = 58;
private static final int HEADING_TAGS = 59;
private static final int PAGE_TAGS = 60;
+ private static final int EXPORT_LETTER_SPACING = 61;
protected ComplexOption xheading = addComplexOption("heading-map");
protected ComplexOption xpar = addComplexOption("paragraph-map");
@@ -295,6 +296,8 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase {
options[DOCUMENT_ICON] = new Option("document_icon","");
options[HEADING_TAGS] = new Option("heading_tags","sections");
options[PAGE_TAGS] = new Option("page_tags","div");
+ options[EXPORT_LETTER_SPACING] = new Option("export_letter_spacing","false");
+
}
protected void readInner(Element elm) {
@@ -439,7 +442,9 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase {
public String getXhtmlDocumentIcon() { return options[DOCUMENT_ICON].getString(); }
public String getHeadingTags() { return options[HEADING_TAGS].getString(); }
public String getPageTags() { return options[PAGE_TAGS].getString(); }
+ public boolean exportLetterSpacing() { return ((BooleanOption) options[EXPORT_LETTER_SPACING]).getValue(); }
+
public XhtmlStyleMap getXParStyleMap() { return getStyleMap(xpar); }
public XhtmlStyleMap getXHeadingStyleMap() { return getStyleMap(xheading); }
public XhtmlStyleMap getXTextStyleMap() { return getStyleMap(xtext); }