You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2013/06/07 17:13:05 UTC

[Bug 55075] New: SXSSF: Pictures skewed on rows which have non-default height

https://issues.apache.org/bugzilla/show_bug.cgi?id=55075

            Bug ID: 55075
           Summary: SXSSF: Pictures skewed on rows which have non-default
                    height
           Product: POI
           Version: 3.9
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SXSSF
          Assignee: dev@poi.apache.org
          Reporter: fploessel@beyond-data.de

Created attachment 30405
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30405&action=edit
patch fixing the problem (see description and comments in the code in the
files)

picture.resize() skews pictures in SXSSF if the picture is in a row having
non-default height. As we set the row height so that the picture fits into one
row in our code, this results in pictures scaled sometimes by a factor 2 or 3
in height, but having their correct width, looking very ugly.

The reason is that the XSSF code to which the SXSSF code delegates the size
calculation checks the rows in the XSSF sheet for their height, and - as all
rows are in the SXSSF sheet - does not find any rows and assumes the default
row height.

I have attached a fix for the problem that works fine with POI 3.9. This
contains two new SXSSF classes which in the current 3.9 code do not exist, as
their role is taken by the XSSF classes, and a one line change of SXSSFSheet:
method createDrawingPatriarch() in line 1195 should return the new SXSSFDrawing
instead of an XSSFDrawing.

I would assume that in addition to Picture, Comment and Chart may have similar
issues, but as we do not need them, I did not check that.

Of course, as always with SXSSF, if the row is already flushed out, there will
be problems.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55075] SXSSF: Pictures skewed on rows which have non-default height

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55075

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
                 OS|                            |All

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Are you able to write a junit test that shows the problem, and confirms it's
fixed with the patch? Perhaps something that uses SXSSF to write a file, then
loads it via XSSF and checks to see if the picture is the right size or not?

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55075] [PATCH] SXSSF: Pictures skewed on rows which have non-default height

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55075

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |51233

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55075] [PATCH] SXSSF: Pictures skewed on rows which have non-default height

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55075

--- Comment #2 from Frank Plößel <fp...@beyond-data.de> ---
Would the test cases in issue 51233 be ok as test case, or would you need a
more detailed one? I just discovered this seems to be a duplicate.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 55075] [PATCH] SXSSF: Pictures skewed on rows which have non-default height

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55075

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|SXSSF: Pictures skewed on   |[PATCH] SXSSF: Pictures
                   |rows which have non-default |skewed on rows which have
                   |height                      |non-default height

-- 
You are receiving this mail because:
You are the assignee for the bug.

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