aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYegor Kozlov <yegor@apache.org>2009-12-21 14:51:39 +0000
committerYegor Kozlov <yegor@apache.org>2009-12-21 14:51:39 +0000
commit28c5b0fd2b707f65da3f0765175bf5ec15f38886 (patch)
tree87bcd349a59d5bff4783d0508b723415a57d7e09 /src
parent69b3b9f625b04909cdc636a246c29351b6507d5e (diff)
downloadpoi-28c5b0fd2b707f65da3f0765175bf5ec15f38886.tar.gz
poi-28c5b0fd2b707f65da3f0765175bf5ec15f38886.zip
improved javadoc on Picture.resize()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@892839 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/documentation/content/xdocs/status.xml1
-rw-r--r--src/java/org/apache/poi/hssf/dev/BiffViewer.java2
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java11
-rw-r--r--src/java/org/apache/poi/ss/usermodel/Picture.java12
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java11
5 files changed, 36 insertions, 1 deletions
diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml
index 2a1ce7d658..76c0e85563 100644
--- a/src/documentation/content/xdocs/status.xml
+++ b/src/documentation/content/xdocs/status.xml
@@ -34,6 +34,7 @@
<changes>
<release version="3.7-SNAPSHOT" date="2010-??-??">
+ <action dev="POI-DEVELOPERS" type="fix">48415 - improved javadoc on HSSPicture.resize() </action>
<action dev="POI-DEVELOPERS" type="add">added Ant target to install artifacts in local repository </action>
<action dev="POI-DEVELOPERS" type="fix">48026 - fixed PageSettingsBlock to allow multiple HeaderFooterRecord records </action>
<action dev="POI-DEVELOPERS" type="fix">48202 - fixed CellRangeUtil.mergeCellRanges to work for adjacent cell regions </action>
diff --git a/src/java/org/apache/poi/hssf/dev/BiffViewer.java b/src/java/org/apache/poi/hssf/dev/BiffViewer.java
index 7340631680..a3b446e721 100644
--- a/src/java/org/apache/poi/hssf/dev/BiffViewer.java
+++ b/src/java/org/apache/poi/hssf/dev/BiffViewer.java
@@ -294,7 +294,7 @@ public final class BiffViewer {
boolean noint = false;
boolean out = false;
boolean rawhex = false;
- boolean header = false;
+ boolean header = true;
File file = null;
for (int i=0; i<nArgs; i++) {
String arg = args[i];
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java b/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java
index 6b266a0362..4aa75f875b 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java
@@ -78,6 +78,11 @@ public final class HSSFPicture extends HSSFSimpleShape implements Picture {
/**
* Resize the image
+ * <p>
+ * Please note, that this method works correctly only for workbooks
+ * with default font size (Arial 10pt for .xls).
+ * If the default font is changed the resized image can be streched vertically or horizontally.
+ * </p>
*
* @param scale the amount by which image dimensions are multiplied relative to the original size.
* <code>resize(1.0)</code> sets the original size, <code>resize(0.5)</code> resize to 50% of the original,
@@ -103,6 +108,12 @@ public final class HSSFPicture extends HSSFSimpleShape implements Picture {
/**
* Reset the image to the original size.
+ *
+ * <p>
+ * Please note, that this method works correctly only for workbooks
+ * with default font size (Arial 10pt for .xls).
+ * If the default font is changed the resized image can be streched vertically or horizontally.
+ * </p>
*/
public void resize(){
resize(1.0);
diff --git a/src/java/org/apache/poi/ss/usermodel/Picture.java b/src/java/org/apache/poi/ss/usermodel/Picture.java
index e816c9ac15..1959cad0ce 100644
--- a/src/java/org/apache/poi/ss/usermodel/Picture.java
+++ b/src/java/org/apache/poi/ss/usermodel/Picture.java
@@ -25,12 +25,24 @@ public interface Picture {
/**
* Reset the image to the original size.
+ *
+ * <p>
+ * Please note, that this method works correctly only for workbooks
+ * with default font size (Arial 10pt for .xls and Calibri 11pt for .xlsx).
+ * If the default font is changed the resized image can be streched vertically or horizontally.
+ * </p>
*/
void resize();
/**
* Reset the image to the original size.
*
+ * <p>
+ * Please note, that this method works correctly only for workbooks
+ * with default font size (Arial 10pt for .xls and Calibri 11pt for .xlsx).
+ * If the default font is changed the resize() procedure can be 'off'.
+ * </p>
+ *
* @param scale the amount by which image dimensions are multiplied relative to the original size.
* <code>resize(1.0)</code> sets the original size, <code>resize(0.5)</code> resize to 50% of the original,
* <code>resize(2.0)</code> resizes to 200% of the original.
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
index 12f6b064de..66a6d9c5a7 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
@@ -149,6 +149,12 @@ public final class XSSFPicture extends XSSFShape implements Picture {
/**
* Reset the image to the original size.
+ *
+ * <p>
+ * Please note, that this method works correctly only for workbooks
+ * with the default font size (Calibri 11pt for .xlsx).
+ * If the default font is changed the resized image can be streched vertically or horizontally.
+ * </p>
*/
public void resize(){
resize(1.0);
@@ -156,6 +162,11 @@ public final class XSSFPicture extends XSSFShape implements Picture {
/**
* Reset the image to the original size.
+ * <p>
+ * Please note, that this method works correctly only for workbooks
+ * with the default font size (Calibri 11pt for .xlsx).
+ * If the default font is changed the resized image can be streched vertically or horizontally.
+ * </p>
*
* @param scale the amount by which image dimensions are multiplied relative to the original size.
* <code>resize(1.0)</code> sets the original size, <code>resize(0.5)</code> resize to 50% of the original,