You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2016/09/14 02:41:02 UTC
svn commit: r1760617 - in /poi/trunk/src:
java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java
java/org/apache/poi/ss/usermodel/ClientAnchor.java
ooxml/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java
Author: onealj
Date: Wed Sep 14 02:41:01 2016
New Revision: 1760617
URL: http://svn.apache.org/viewvc?rev=1760617&view=rev
Log:
bug 59907: restore ClientAnchor#setAnchorType(int) that was removed in POI 3.14 beta 1 and broke backwards compatibility without a 2 release deprecation notice
Modified:
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java
poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java
Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java?rev=1760617&r1=1760616&r2=1760617&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java Wed Sep 14 02:41:01 2016
@@ -250,6 +250,7 @@ public final class HSSFClientAnchor exte
/**
* Gets the anchor type
+ * Changed from returning an int to an enum in POI 3.14 beta 1.
* @return the anchor type
*/
@Override
@@ -260,11 +261,20 @@ public final class HSSFClientAnchor exte
/**
* Sets the anchor type
* @param anchorType the anchor type to set
+ * @since POI 3.14
*/
@Override
public void setAnchorType(AnchorType anchorType) {
_escherClientAnchor.setFlag(anchorType.value);
}
+ /**
+ * Sets the anchor type
+ * @param anchorType the anchor type to set
+ * @deprecated POI 3.15. Use {@link #setAnchorType(AnchorType)} instead.
+ */
+ public void setAnchorType(int anchorType) {
+ _escherClientAnchor.setFlag((short) anchorType);
+ }
private void checkRange(int value, int minRange, int maxRange, String varName) {
if (value < minRange || value > maxRange)
Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java?rev=1760617&r1=1760616&r2=1760617&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java Wed Sep 14 02:41:01 2016
@@ -288,11 +288,19 @@ public interface ClientAnchor {
/**
* Sets the anchor type
* @param anchorType the anchor type to set
+ * @since POI 3.14
*/
public void setAnchorType( AnchorType anchorType );
+ /**
+ * Sets the anchor type
+ * @param anchorType the anchor type to set
+ * @deprecated POI 3.15. Use {@link #setAnchorType(AnchorType)} instead.
+ */
+ public void setAnchorType( int anchorType );
/**
* Gets the anchor type
+ * Changed from returning an int to an enum in POI 3.14 beta 1.
* @return the anchor type
*/
public AnchorType getAnchorType();
Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java?rev=1760617&r1=1760616&r2=1760617&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java Wed Sep 14 02:41:01 2016
@@ -218,15 +218,27 @@ public final class XSSFClientAnchor exte
/**
* Sets the anchor type
* @param anchorType the anchor type to set
+ * @since POI 3.14
*/
@Override
public void setAnchorType( AnchorType anchorType )
{
this.anchorType = anchorType;
}
+ /**
+ * Sets the anchor type
+ * @param anchorType the anchor type to set
+ * @deprecated POI 3.15. Use {@link #setAnchorType(AnchorType)} instead
+ */
+ @Override
+ public void setAnchorType( int anchorType )
+ {
+ this.anchorType = AnchorType.byId(anchorType);
+ }
/**
* Gets the anchor type
+ * Changed from returning an int to an enum in POI 3.14 beta 1.
* @return the anchor type
*/
@Override
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org