[Bug 63108] New: XSSFSheet.GetColumnWidth() return value is smaller than actual for default width column

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 63108] New: XSSFSheet.GetColumnWidth() return value is smaller than actual for default width column

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63108

            Bug ID: 63108
           Summary: XSSFSheet.GetColumnWidth() return value is smaller
                    than actual for default width column
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: minor
          Priority: P2
         Component: XSSF
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

getColumnWidth()'s comment says "returned  value is always gerater that
getDefaultColumnWidth() because the latter does not include margins". But if
one  column keep default, getColumnWidth() will just call
getDefaultColumnWidth() and return, no more margin or padding pixels added. So
the returned value is always 8*256=2048, smaller than actual value.


   public int getColumnWidth(int columnIndex) {
        CTCol col = columnHelper.getColumn(columnIndex, false);
        double width = col == null || !col.isSetWidth() ?
getDefaultColumnWidth() : col.getWidth();
        return (int)(width*256);
    }

I think we should add some extra width after call getDefaultColumnWidth(), but
don't know how to calculate that.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 63108] XSSFSheet.GetColumnWidth() return value is smaller than actual for default width column

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63108

Dominik Stadler <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]