aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml
diff options
context:
space:
mode:
Diffstat (limited to 'src/ooxml')
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java20
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java22
2 files changed, 41 insertions, 1 deletions
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
index c31e2fa22f..e8e000b4ef 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
@@ -431,6 +431,26 @@ public class SXSSFSheet implements Sheet, Cloneable
{
return _sh.isDisplayZeros();
}
+
+ /**
+ * Sets whether the worksheet is displayed from right to left instead of from left to right.
+ *
+ * @param value true for right to left, false otherwise.
+ */
+ public void setRightToLeft(boolean value)
+ {
+ _sh.setRightToLeft(value);
+ }
+
+ /**
+ * Whether the text is displayed in right-to-left mode in the window
+ *
+ * @return whether the text is displayed in right-to-left mode in the window
+ */
+ public boolean isRightToLeft()
+ {
+ return _sh.isRightToLeft();
+ }
/**
* Flag indicating whether the Fit to Page print option is enabled.
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
index 24cd2ba245..281f773495 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
@@ -46,7 +46,6 @@ import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.DataValidation;
import org.apache.poi.ss.usermodel.DataValidationHelper;
import org.apache.poi.ss.usermodel.Footer;
-import org.apache.poi.ss.usermodel.FormulaEvaluator;
import org.apache.poi.ss.usermodel.Header;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
@@ -713,6 +712,27 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
return getWorkbook().getCellStyleAt((short)(idx == -1 ? 0 : idx));
}
+ /**
+ * Sets whether the worksheet is displayed from right to left instead of from left to right.
+ *
+ * @param value true for right to left, false otherwise.
+ */
+ public void setRightToLeft(boolean value)
+ {
+ CTSheetView view = getDefaultSheetView();
+ view.setRightToLeft(value);
+ }
+
+ /**
+ * Whether the text is displayed in right-to-left mode in the window
+ *
+ * @return whether the text is displayed in right-to-left mode in the window
+ */
+ public boolean isRightToLeft()
+ {
+ CTSheetView view = getDefaultSheetView();
+ return view == null ? false : view.getRightToLeft();
+ }
/**
* Get whether to display the guts or not,