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: [email protected]
          Reporter: [email protected]
  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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to