You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ye...@apache.org on 2009/11/06 20:40:08 UTC

svn commit: r833537 - in /poi/trunk/src: documentation/content/xdocs/status.xml java/org/apache/poi/hssf/usermodel/HSSFSheet.java testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java

Author: yegor
Date: Fri Nov  6 19:40:07 2009
New Revision: 833537

URL: http://svn.apache.org/viewvc?rev=833537&view=rev
Log:
added a method to set arabic mode in HSSFSheet, see Bugzilla 47970

Modified:
    poi/trunk/src/documentation/content/xdocs/status.xml
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=833537&r1=833536&r2=833537&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Fri Nov  6 19:40:07 2009
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.6-beta1" date="2009-??-??">
+           <action dev="POI-DEVELOPERS" type="add">47970 - added a method to set arabic mode in HSSFSheet</action>
            <action dev="POI-DEVELOPERS" type="fix">48134 - release system resources when using Picture.resize()</action>
            <action dev="POI-DEVELOPERS" type="fix">48087 - avoid NPE in XSSFChartSheet  when calling methods of the superclass</action>
            <action dev="POI-DEVELOPERS" type="fix">48038 - handle reading HWPF stylesheets from non zero offsets</action>

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java?rev=833537&r1=833536&r2=833537&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java Fri Nov  6 19:40:07 2009
@@ -634,7 +634,24 @@
         return _sheet.getPageSettings().getHCenter().getHCenter();
     }
 
+    /**
+     * Sets the arabic property for this sheet, will make it right to left.
+     * @param value true for arabic, false otherwise.
+     */
+    public void setArabic(boolean value)
+    {
+	    _sheet.getWindowTwo().setArabic(value);
+    }
 
+    /**
+     * Gets the arabic property for this sheet.
+     *
+     * @return whther the arabic mode is set
+     */
+    public boolean isArabic()
+    {
+	    return _sheet.getWindowTwo().getArabic();
+    }
 
     /**
      * removes a merged region of cells (hence letting them free)

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java?rev=833537&r1=833536&r2=833537&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java Fri Nov  6 19:40:07 2009
@@ -802,4 +802,17 @@
         assertFalse(cs.getFont(wbComplex).getItalic());
         assertEquals(HSSFFont.BOLDWEIGHT_BOLD, cs.getFont(wbComplex).getBoldweight());
     }
+
+    /**
+     * Tests the arabic setting
+     */
+    public void testArabic() {
+        HSSFWorkbook wb = new HSSFWorkbook();
+        HSSFSheet s = wb.createSheet();
+
+        assertEquals(false, s.isArabic());
+        s.setArabic(true);
+        assertEquals(true, s.isArabic());
+    }
+
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org