poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Javen O'Neal" <javenon...@gmail.com>
Subject Re: Trouble building 3.15
Date Mon, 15 Aug 2016 17:30:42 GMT
Matt,
Out of curiosity, are you using a very low or very high DPI or
diagonal size monitor? This might have caused the significant
difference in column sizing. On my computer my column widths are 1000
for the narrow column and 10,000 for the wide column, and your wide
column was less than half of that--4971 (units are 1/256th of the
default character width).

Question for POI developers: would getColumnWidthInPixels be any
better at being consistent across Java versions and vendors, OS's,
installed fonts, monitor resolution/size/density?

https://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java?revision=1754786&view=markup#l884
    public float getColumnWidthInPixels(int columnIndex) {
        float widthIn256 = getColumnWidth(columnIndex);
        return (float)(widthIn256/256.0*XSSFWorkbook.DEFAULT_CHARACTER_WIDTH);
    }

On Mon, Aug 15, 2016 at 10:18 AM, Javen O'Neal <javenoneal@gmail.com> wrote:
> Fixed in r1756402 [1]. Let us know if you have any other problems
> building or testing.
>
> [1] https://svn.apache.org/viewvc?view=revision&revision=1756402
>
> On Mon, Aug 15, 2016 at 8:32 AM, Javen O'Neal <javenoneal@gmail.com> wrote:
>> I think I wrote that frail unit test, which looks to be (Java) platform
>> dependent. I'll update the test.
>>
>> There is another test that tests the timing of autosizing columns, and that
>> test fails on slower machines or on machines where the CPU is being heavily
>> used by other processes while the unit test suite is running.
>>
>>
>> On Aug 15, 2016 8:26 AM, "Matt Barron" <mfb366@gmail.com> wrote:
>>>
>>> That is a test that was already in place, I did not modify any code prior
>>> to attempting the build.
>>>
>>> I did modify the test case
>>>
>>> "src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheetAutoSizeColumn.java"
>>> and lowered the value of COLUMN_WIDTH_THRESHOLD_BETWEEN_SHORT_AND_LONG
>>> from
>>> 5000 to 4900 per the suggestion from Andreas.
>>> After I made that change, the build process was successful and I had no
>>> errors.
>>>
>>> On Mon, Aug 15, 2016 at 11:17 AM, Murphy, Mark <murphymdev@metalexmfg.com>
>>> wrote:
>>>
>>> > Is this a test he has created which is failing, or is it a current test
>>> > that is already working for us?
>>> >
>>> > -----Original Message-----
>>> > From: Andreas Beeker [mailto:kiwiwings@apache.org]
>>> > Sent: Monday, August 15, 2016 10:25 AM
>>> > To: POI Users List <user@poi.apache.org>
>>> > Subject: Re: Trouble building 3.15
>>> >
>>> > >      [java] java.lang.AssertionError: Expected a column width greater
>>> > > than
>>> > > 5000 but found 4971
>>> >
>>> > At first glance, this looks like a font issue - why don't you simply
>>> > decrease the assertion to something above 4900 instead of 5000?
>>> >
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional
>>> > commands, e-mail: user-help@poi.apache.org
>>> >
>>> >

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


Mime
View raw message