]> source.dussan.org Git - poi.git/commit
Bug 61203 - XSSFDrawing.getAnchorFromParent handles CTOneCellAnchor incorrectly,...
authorGreg Woolsey <gwoolsey@apache.org>
Fri, 23 Jun 2017 05:16:38 +0000 (05:16 +0000)
committerGreg Woolsey <gwoolsey@apache.org>
Fri, 23 Jun 2017 05:16:38 +0000 (05:16 +0000)
commit8c67848ad6776a01862adca073a6a475f91080e3
treecd815dc7af6755f6625f273b92912cb8aed72546
parent649280df8ca2ff3b7fb8ee06e3a5ca70557be65d
Bug 61203 - XSSFDrawing.getAnchorFromParent handles CTOneCellAnchor incorrectly, ignores CTAbsoluteAnchor

This is likely incomplete, but closer to where things should be.  It is backward compatible with previous uses of XSSFClientAnchor.

This fixes a bug in XSSFGraphicFrame that was hiding the parent class anchor property (which is a protected field set directly from XSSFDrawing).  This is a peril of using direct property access - the hiding wasn't obvious because there was no setter being overridden.

XSSFGraphicFrame now notices when it relates to a chart, and setts the frame property of the XSSFChart.  That was not being set on parse previously, only when creating charts from scratch.  That didn't seem right.

XSSFClientAnchor now calculates size and position correctly based on initial inputs from the different types of anchors.  It DOES NOT update those initial inputs, however.  It does properly adjust if the size or initial position are absolute and the corresponding row/column values are requested.

Added new class EMUUtils to centralize the measurement constants and conversions since there are so many units in play in the OOXML spec and POI APIs:

* EMUs (English Metric Units)
* Inches
* Centimeters
* Points
* Pixels
* Twips (1/20th of a point)

I'm sure there are more conversions that could be done there, I just started with what I needed.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799643 13f79535-47bb-0310-9956-ffa450edef68
src/java/org/apache/poi/ss/usermodel/ClientAnchor.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java
src/ooxml/java/org/apache/poi/xssf/util/EMUUtils.java [new file with mode: 0644]