poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r591667 - in /poi/trunk/src: documentation/content/xdocs/hssf/quick-guide.xml java/org/apache/poi/hssf/usermodel/HSSFPicture.java testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java
Date Sat, 03 Nov 2007 19:50:40 GMT
Author: yegor
Date: Sat Nov  3 12:50:40 2007
New Revision: 591667

URL: http://svn.apache.org/viewvc?rev=591667&view=rev
Log:
fixed a silly typo in the method signature. It should be HFFSPicture.getPreferredSize(), not
HFFSPicture.getPrefferedSize()

Modified:
    poi/trunk/src/documentation/content/xdocs/hssf/quick-guide.xml
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java

Modified: poi/trunk/src/documentation/content/xdocs/hssf/quick-guide.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/hssf/quick-guide.xml?rev=591667&r1=591666&r2=591667&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/hssf/quick-guide.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/hssf/quick-guide.xml Sat Nov  3 12:50:40 2007
@@ -1020,8 +1020,8 @@
     HSSFPatriarch patriarch = sheet5.createDrawingPatriarch();
 
     HSSFPicture picture = patriarch.createPicture(new HSSFClientAnchor(), loadPicture( "src/resources/logos/logoKarmokar4.png",
wb ));
-    HSSFClientAnchor prefferedSize = picture.getPrefferedSize();
-    picture.setAnchor(prefferedSize);
+    HSSFClientAnchor preferredSize = picture.getPreferredSize();
+    picture.setAnchor(preferredSize);
       </source>
         <warning>
           HSSFPicture.resize() works only for JPEG and PNG. Other formats are not yet supported.

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java?rev=591667&r1=591666&r2=591667&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java Sat Nov  3 12:50:40
2007
@@ -79,7 +79,7 @@
         HSSFClientAnchor anchor = (HSSFClientAnchor)getAnchor();
         anchor.setAnchorType(2);
 
-        HSSFClientAnchor pref = getPrefferedSize();
+        HSSFClientAnchor pref = getPreferredSize();
 
         int row2 = anchor.getRow1() + (pref.getRow2() - pref.getRow1());
         int col2 = anchor.getCol1() + (pref.getCol2() - pref.getCol1());
@@ -94,19 +94,19 @@
     }
 
     /**
-     * Calculate the preffered size for this picture.
+     * Calculate the preferred size for this picture.
      *
-     * @return HSSFClientAnchor with the preffered size for this image
+     * @return HSSFClientAnchor with the preferred size for this image
      * @since POI 3.0.2
      */
-    public HSSFClientAnchor getPrefferedSize(){
+    public HSSFClientAnchor getPreferredSize(){
         HSSFClientAnchor anchor = new HSSFClientAnchor();
 
         EscherBSERecord bse = (EscherBSERecord)patriarch.sheet.book.getBSERecord(pictureIndex);
         byte[] data = bse.getBlipRecord().getPicturedata();
         int type = bse.getBlipTypeWin32();
         switch (type){
-            //we can calculate the preffered size only for JPEG and PNG
+            //we can calculate the preferred size only for JPEG and PNG
             //other formats like WMF, EMF and PICT are not supported in Java
             case HSSFWorkbook.PICTURE_TYPE_JPEG:
             case HSSFWorkbook.PICTURE_TYPE_PNG:

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java?rev=591667&r1=591666&r2=591667&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java Sat Nov  3
12:50:40 2007
@@ -36,7 +36,7 @@
 
         int idx1 = loadPicture( "src/resources/logos/logoKarmokar4.png", wb);
         HSSFPicture picture1 = p1.createPicture(new HSSFClientAnchor(), idx1);
-        HSSFClientAnchor anchor1 = picture1.getPrefferedSize();
+        HSSFClientAnchor anchor1 = picture1.getPreferredSize();
 
         //assert against what would BiffViewer print if we insert the image in xls and dump
the file
         assertEquals(0, anchor1.getCol1());



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


Mime
View raw message