From: Yegor Kozlov Date: Mon, 21 Dec 2009 14:51:39 +0000 (+0000) Subject: improved javadoc on Picture.resize() X-Git-Tag: REL_3_7_BETA1~202 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=28c5b0fd2b707f65da3f0765175bf5ec15f38886;p=poi.git improved javadoc on Picture.resize() git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@892839 13f79535-47bb-0310-9956-ffa450edef68 --- 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 @@ + 48415 - improved javadoc on HSSPicture.resize() added Ant target to install artifacts in local repository 48026 - fixed PageSettingsBlock to allow multiple HeaderFooterRecord records 48202 - fixed CellRangeUtil.mergeCellRanges to work for adjacent cell regions 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 + * 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. + *

* * @param scale the amount by which image dimensions are multiplied relative to the original size. * resize(1.0) sets the original size, resize(0.5) 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. + * + *

+ * 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. + *

*/ 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. + * + *

+ * 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. + *

*/ void resize(); /** * Reset the image to the original size. * + *

+ * 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'. + *

+ * * @param scale the amount by which image dimensions are multiplied relative to the original size. * resize(1.0) sets the original size, resize(0.5) resize to 50% of the original, * resize(2.0) 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. + * + *

+ * 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. + *

*/ 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. + *

+ * 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. + *

* * @param scale the amount by which image dimensions are multiplied relative to the original size. * resize(1.0) sets the original size, resize(0.5) resize to 50% of the original,