diff --git a/src/main/java/w2phtml/office/XMLString.java b/src/main/java/w2phtml/office/XMLString.java
index da6e5f1..d9818f1 100644
--- a/src/main/java/w2phtml/office/XMLString.java
+++ b/src/main/java/w2phtml/office/XMLString.java
@@ -212,7 +212,8 @@ public class XMLString {
public static final String STYLE_COUNTRY_COMPLEX = "style:country-complex";
public static final String STYLE_LANGUAGE_ASIAN = "style:language-asian";
public static final String STYLE_COUNTRY_ASIAN = "style:country-asian";
-
+
+ public static final String LOEXT_WRITING_MODE = "loext:writing-mode";
// table namespace - elements
public static final String TABLE_ = "table:";
public static final String TABLE_TABLE = "table:table";
diff --git a/src/main/java/w2phtml/xhtml/style/CellStyleParser.java b/src/main/java/w2phtml/xhtml/style/CellStyleParser.java
index 5229ef1..fbafc59 100644
--- a/src/main/java/w2phtml/xhtml/style/CellStyleParser.java
+++ b/src/main/java/w2phtml/xhtml/style/CellStyleParser.java
@@ -79,6 +79,8 @@ public class CellStyleParser extends StyleWithPropertiesParser {
getFrameSP().cssBorder(style,props,bInherit);
getFrameSP().cssPadding(style,props,bInherit);
getFrameSP().cssBackground(style,props,bInherit);
+ getFrameSP().cssWritingMode(style,props,bInherit);
+
// only relevant for spreadsheets
getParSP().cssPar(style,props,bInherit);
getTextSP().cssTextCommon(style,props,bInherit);
diff --git a/src/main/java/w2phtml/xhtml/style/FrameStyleParser.java b/src/main/java/w2phtml/xhtml/style/FrameStyleParser.java
index 4d924fc..34a7a19 100644
--- a/src/main/java/w2phtml/xhtml/style/FrameStyleParser.java
+++ b/src/main/java/w2phtml/xhtml/style/FrameStyleParser.java
@@ -139,8 +139,22 @@ public class FrameStyleParser extends StyleWithPropertiesParser {
cssBorder(style,props,bInherit);
cssPadding(style,props,bInherit);
cssBackground(style,props,bInherit);
+ cssWritingMode(style,props,bInherit);
+
}
+ public void cssWritingMode(StyleWithProperties style, Properties props, boolean bInherit) {
+ String s;
+ if (bInherit || style.hasProperty(XMLString.LOEXT_WRITING_MODE)) {
+ s = style.getAbsoluteProperty(XMLString.LOEXT_WRITING_MODE);
+ if (s != null) {
+ if (s.equals("bt-lr")) {
+ props.addProperty("writing-mode", "sideways-lr");
+ }
+ }
+ }
+ }
+
public void cssMargins(StyleWithProperties style, Properties props, boolean bInherit){
// *Absolute* values fit with css
String s;
@@ -265,7 +279,9 @@ public class FrameStyleParser extends StyleWithPropertiesParser {
public void cssBackground(StyleWithProperties style, Properties props, boolean bInherit){
// Background color: Same as in css
String s = style.getProperty(XMLString.FO_BACKGROUND_COLOR,bInherit);
- if (s!=null) { props.addProperty("background-color",s); }
+ if (s!=null) {
+ props.addProperty("background-color",s);
+ }
cssBackgroundCommon(style,props,bInherit);
}