Re: How to find all CellComments in XLS[X]

2015-09-03 Thread Mark Beardsley
My only concern with allowing access to the CoomentsTable is the potential
for drastically breaking the workbook file. With a reference to the
CommentsTable in hand it would be possible to add new comments and remove
existing ones and I am concerned that the logic is not in place to deal with
all of the internal references necessary to link comments to rows etc.

What might make sense is to create a method that returns a List or array
containing the comments themselves. This would be read only, of course, and
protect the workbook from modifications that might otherwise break it.



--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/How-to-find-all-CellComments-in-XLS-X-tp5720014p5720024.html
Sent from the POI - Dev mailing list archive at Nabble.com.

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



Build failed in Jenkins: POI #832

2015-09-03 Thread Apache Jenkins Server
See 

Changes:

[centic] Don't warn about unknown @SupressWarnings() in Eclipse

--
[...truncated 265 lines...]
[junit] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.007 sec
[junit] Running org.apache.poi.hssf.model.TestLinkTable
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.356 sec
[junit] Running org.apache.poi.hssf.model.TestOperandClassTransformer
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.model.TestRVA
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.011 sec
[junit] Running org.apache.poi.hssf.model.TestRowBlocksReader
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.model.TestShapes
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.model.TestSheet
[junit] Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.479 sec
[junit] Running org.apache.poi.hssf.model.TestSheetAdditional
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.model.TestWorkbook
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.011 sec
[junit] Running org.apache.poi.hssf.record.TestArrayRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.413 sec
[junit] Running org.apache.poi.hssf.record.TestAutoFilterInfoRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestBOFRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestBoolErrRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestBoundSheetRecord
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestCFHeaderRecord
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestCFRuleRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.365 sec
[junit] Running org.apache.poi.hssf.record.TestColumnInfoRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestCommonObjectDataSubRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDConRefRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDVALRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestDrawingGroupRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDrawingRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestEmbeddedObjectRefSubRecord
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestEndSubRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestEscherAggregate
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestExtSSTRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.005 sec
[junit] Running org.apache.poi.hssf.record.TestExtendedFormatRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestExternalNameRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestFeatRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestFontRecord
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestFormulaRecord
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestFtCblsSubRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time 

Build failed in Jenkins: POI-JDK8 #559

2015-09-03 Thread Apache Jenkins Server
See 

Changes:

[centic] Don't warn about unknown @SupressWarnings() in Eclipse

--
[...truncated 278 lines...]
[junit] Tests run: 68, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.063 sec
[junit] Running org.apache.poi.hssf.model.TestFormulaParserEval
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.155 sec
[junit] Running org.apache.poi.hssf.model.TestFormulaParserIf
[junit] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.004 sec
[junit] Running org.apache.poi.hssf.model.TestHSSFAnchor
[junit] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.007 sec
[junit] Running org.apache.poi.hssf.model.TestLinkTable
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.299 sec
[junit] Running org.apache.poi.hssf.model.TestOperandClassTransformer
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.model.TestRVA
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.008 sec
[junit] Running org.apache.poi.hssf.model.TestRowBlocksReader
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.model.TestShapes
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.model.TestSheet
[junit] Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.315 sec
[junit] Running org.apache.poi.hssf.model.TestSheetAdditional
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.model.TestWorkbook
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.01 sec
[junit] Running org.apache.poi.hssf.record.TestArrayRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.44 sec
[junit] Running org.apache.poi.hssf.record.TestAutoFilterInfoRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestBOFRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestBoolErrRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestBoundSheetRecord
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestCFHeaderRecord
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestCFRuleRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.244 sec
[junit] Running org.apache.poi.hssf.record.TestColumnInfoRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestCommonObjectDataSubRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDConRefRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestDVALRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestDrawingGroupRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDrawingRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestEmbeddedObjectRefSubRecord
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestEndSubRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestEscherAggregate
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestExtSSTRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.004 sec
[junit] Running org.apache.poi.hssf.record.TestExtendedFormatRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestExternalNameRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestFeatRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, 

Re: Time Zone Setting

2015-09-03 Thread Dominik Stadler
Hi,

Sorry, but I fear that through this we change the default behavior of POI:
* A ThreadLocal can lead to hard-to-find errors when people use POI in
a multi-threading environment. While it is better in some cases than
having a global static, it now requires the developer to ensure that
the timezone is set for each thread that is started without a way to
set it globally.
* I think previously POI used the java default settings which look at
the operating system, this is now broken as we have "UTC" as default,
which potentially leads to many people seeing different results
compared to before, in fact almost anybody would now see UTC-formatted
dates instead of local timezone, or?
* The java default is to either use the system default timezone or if
it should be different then use -Duser.timezone when invoking the JRE,
see e.g. 
http://stackoverflow.com/questions/2493749/how-to-set-a-jvm-timezone-properly

So my approach would be to:
* Not use the DateUtil.setTimezone() approach as it has quite some
potential for regressions but also not use TimeZone.setDefault() in
unit tests at all
* Ensure that we set -Duser.timezone to a fixed value when running
unit tests in the various CI systems. We already do this for
user.language and user.country, so setting the timezone as well here
seems a natural choice

This way we do not change default behavior for users and still make
the CI runs a bit more reproducible time-wise...

Dominik.

On Wed, Sep 2, 2015 at 9:38 AM, Andreas Beeker  wrote:
> Hi,
>
> in the code we have some places where we reset the default time zone [1], 
> like the following:
>
> TimeZone cet = TimeZone.getTimeZone("Europe/Copenhagen");
> TimeZone.setDefault(cet);
>
> Although this is just in a junit test, I don't think it's a good idea to set 
> the jdk default.
> I've added a new ThreadLocal to DateUtil and although I'm not convinced, that 
> this
> is a definite solution, at least it's pragmatical:
>
> @BeforeClass
> public static void setTimeZone() {
> userTimeZone = DateUtil.getUserTimeZone();
> DateUtil.setUserTimeZone(TimeZone.getTimeZone("CET"));
> }
>
> Another solution would be, to guess the TimeZone by parsing date cells in the 
> workbook
> and compare them to the stored string values ... of course this only applies 
> to X/HSLF.
>
> What do you think about it?
>
> Andi.
>
>
>
> [1] org.apache.poi.hssf.usermodel.TestHSSFDateUtil
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
> For additional commands, e-mail: dev-h...@poi.apache.org
>

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



[Bug 58039] [PATCH] Make D* functions thread safe

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58039

--- Comment #2 from Patrick Zimmermann  ---
This patch has proven reliable in our production system over the past two
months. Is there any reason for not merging?

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

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



Re: Time Zone Setting

2015-09-03 Thread Andreas Beeker
Hi,

I have a lot of test errors and already fixed quite a lot, but haven't 
committed them yet.

Short version:
how about ... instead of using Locale.ROOT and Timezone UTC,
the initial value of the ThreadLocal return Locale.getDefault() and 
Timezone.getDefault()
and can be set if needed ... so the handling is similar to older versions?

Long version:
When I've started to fix the forbidden api errors, I've only touched places,
where I was quite sure that Locale.ROOT won't do any harm.
But of course now we also have to face the other issues...

The reason for having a thread local is ...:
- that having the timezone/locale as an additional parameter would lead to a 
lot of methods
  to be marked deprecated (at least I would do it...)
- I've read about use-cases where workbooks from different time zones need to
  be processed, so it's not only the current environment time zone

- "A ThreadLocal can lead to hard-to-find errors ...":
  I think the hardest part is, making the new handling public.
  Another problem I see with thread locals is, the reuse of servlet threads.
  So the usage pattern would need to restore the original setting in a finally 
block.

- "... in fact almost anybody would now see UTC-formatted dates instead
   of local timezone, or?"
  I guess so too, and the tests fail when my CET-timezone is ignored
  (the DE-locale is only affecting very few cases), i.e. I have to set it 
explicitly

- "The java default is to either use the system default ..."
  As noted above, I would like to provide a multi timezone/locale approach, but
  still keep a lot of the poi api as-is.

I guess the discussion will continue for a bit, so I create a patch file 
instead of committing
the changes and check your feedback then.
If you commit changes in the meantime, I'll update my version accordingly, so 
don't be
blocked ;)

Andi


On 03.09.2015 16:25, Uwe Schindler wrote:
> Hi,
>
> This may be only slightly related: to work around the forbidden-apis issue, 
> you can still pass Timezone.getDefault() to the Java APIs - this is not 
> forbidden. Forbidden APIs just wants to make sure you know what you are 
> doing. By writing Timezone.getDefault() you explicitely say what you are 
> doing. And maybe add a comment why you do this. The same applies for Locales 
> or Charsets. E.g., At some places in Lucene we explicitely use the charset of 
> the console, so we use Charset.getDefault() at all those places.
>
> Uwe
>
> -
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: u...@thetaphi.de
>
>
>> -Original Message-
>> From: Dominik Stadler [mailto:dominik.stad...@gmx.at]
>> Sent: Thursday, September 03, 2015 4:05 PM
>> To: POI Developers List
>> Subject: Re: Time Zone Setting
>>
>> Hi,
>>
>> Sorry, but I fear that through this we change the default behavior of POI:
>> * A ThreadLocal can lead to hard-to-find errors when people use POI in a
>> multi-threading environment. While it is better in some cases than having a
>> global static, it now requires the developer to ensure that the timezone is 
>> set
>> for each thread that is started without a way to set it globally.
>> * I think previously POI used the java default settings which look at the
>> operating system, this is now broken as we have "UTC" as default, which
>> potentially leads to many people seeing different results compared to
>> before, in fact almost anybody would now see UTC-formatted dates instead
>> of local timezone, or?
>> * The java default is to either use the system default timezone or if it 
>> should
>> be different then use -Duser.timezone when invoking the JRE, see e.g.
>> http://stackoverflow.com/questions/2493749/how-to-set-a-jvm-timezone-
>> properly
>>
>> So my approach would be to:
>> * Not use the DateUtil.setTimezone() approach as it has quite some potential
>> for regressions but also not use TimeZone.setDefault() in unit tests at all
>> * Ensure that we set -Duser.timezone to a fixed value when running unit
>> tests in the various CI systems. We already do this for user.language and
>> user.country, so setting the timezone as well here seems a natural choice
>>
>> This way we do not change default behavior for users and still make the CI
>> runs a bit more reproducible time-wise...
>>
>> Dominik.
>>
>>



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



RE: Time Zone Setting

2015-09-03 Thread Uwe Schindler
Hi,

This may be only slightly related: to work around the forbidden-apis issue, you 
can still pass Timezone.getDefault() to the Java APIs - this is not forbidden. 
Forbidden APIs just wants to make sure you know what you are doing. By writing 
Timezone.getDefault() you explicitely say what you are doing. And maybe add a 
comment why you do this. The same applies for Locales or Charsets. E.g., At 
some places in Lucene we explicitely use the charset of the console, so we use 
Charset.getDefault() at all those places.

Uwe

-
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -Original Message-
> From: Dominik Stadler [mailto:dominik.stad...@gmx.at]
> Sent: Thursday, September 03, 2015 4:05 PM
> To: POI Developers List
> Subject: Re: Time Zone Setting
> 
> Hi,
> 
> Sorry, but I fear that through this we change the default behavior of POI:
> * A ThreadLocal can lead to hard-to-find errors when people use POI in a
> multi-threading environment. While it is better in some cases than having a
> global static, it now requires the developer to ensure that the timezone is 
> set
> for each thread that is started without a way to set it globally.
> * I think previously POI used the java default settings which look at the
> operating system, this is now broken as we have "UTC" as default, which
> potentially leads to many people seeing different results compared to
> before, in fact almost anybody would now see UTC-formatted dates instead
> of local timezone, or?
> * The java default is to either use the system default timezone or if it 
> should
> be different then use -Duser.timezone when invoking the JRE, see e.g.
> http://stackoverflow.com/questions/2493749/how-to-set-a-jvm-timezone-
> properly
> 
> So my approach would be to:
> * Not use the DateUtil.setTimezone() approach as it has quite some potential
> for regressions but also not use TimeZone.setDefault() in unit tests at all
> * Ensure that we set -Duser.timezone to a fixed value when running unit
> tests in the various CI systems. We already do this for user.language and
> user.country, so setting the timezone as well here seems a natural choice
> 
> This way we do not change default behavior for users and still make the CI
> runs a bit more reproducible time-wise...
> 
> Dominik.
> 
> On Wed, Sep 2, 2015 at 9:38 AM, Andreas Beeker 
> wrote:
> > Hi,
> >
> > in the code we have some places where we reset the default time zone
> [1], like the following:
> >
> > TimeZone cet = TimeZone.getTimeZone("Europe/Copenhagen");
> > TimeZone.setDefault(cet);
> >
> > Although this is just in a junit test, I don't think it's a good idea to 
> > set the jdk
> default.
> > I've added a new ThreadLocal to DateUtil and although I'm not
> > convinced, that this is a definite solution, at least it's pragmatical:
> >
> > @BeforeClass
> > public static void setTimeZone() {
> > userTimeZone = DateUtil.getUserTimeZone();
> > DateUtil.setUserTimeZone(TimeZone.getTimeZone("CET"));
> > }
> >
> > Another solution would be, to guess the TimeZone by parsing date cells
> > in the workbook and compare them to the stored string values ... of course
> this only applies to X/HSLF.
> >
> > What do you think about it?
> >
> > Andi.
> >
> >
> >
> > [1] org.apache.poi.hssf.usermodel.TestHSSFDateUtil
> >
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional
> > commands, e-mail: dev-h...@poi.apache.org
> >
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional
> commands, e-mail: dev-h...@poi.apache.org


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



[Bug 58039] [PATCH] Make D* functions thread safe

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58039

David North  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #3 from David North  ---
Looks good to me. Merged with some minor tweaks in svn r1701055

Should be in the next beta release.

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

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



Build failed in Jenkins: POI #833

2015-09-03 Thread Apache Jenkins Server
See 

Changes:

[dnorth] Note my recent fix.

https://bz.apache.org/bugzilla/show_bug.cgi?id=58039

[dnorth] Make D* functions thread safe, thanks to Patrick Zimmermann for the 
patch.

https://bz.apache.org/bugzilla/show_bug.cgi?id=58039

--
[...truncated 3 lines...]
Updating http://svn.apache.org/repos/asf/poi/trunk at revision 
'2015-09-03T17:34:14.651 +0100'
U src\java\org\apache\poi\ss\formula\eval\FunctionEval.java
U src\java\org\apache\poi\ss\formula\functions\DStarRunner.java
U src\java\org\apache\poi\ss\formula\functions\DGet.java
U src\java\org\apache\poi\ss\formula\functions\DMin.java
U src\java\org\apache\poi\ss\formula\functions\IDStarAlgorithm.java
U src\testcases\org\apache\poi\ss\formula\eval\AllFormulaEvalTests.java
U src\testcases\org\apache\poi\ss\formula\ptg\AllFormulaTests.java
U doap_POI.rdf
U .settings\org.eclipse.jdt.core.prefs
Fetching 'https://svn.apache.org/repos/asf/poi/site/forrest.properties' at -1 
into 'F:\hudson\hudson-slave\workspace\POI\forrest.properties'
Fetching 'https://svn.apache.org/repos/asf/poi/site/src/documentation' at -1 
into 'F:\hudson\hudson-slave\workspace\POI\src\documentation'
U src\documentation\content\xdocs\status.xml
At revision 1701064
At revision 1701064
WARNING: clock of the subversion server appears to be out of sync. This can 
result in inconsistent check out behavior.
no change for http://svn.apache.org/repos/asf/poi/trunk/forrest.properties 
since the previous build
Deleting old artifacts from #831
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
LANG=en_US.UTF-8

[EnvInject] - Variables injected successfully.
[POI] $ cmd.exe /C '"f:\hudson\tools\ant\latest\bin\ant.bat 
-Dcoverage.enabled=true clean jenkins && exit %%ERRORLEVEL%%"'
Buildfile: 

clean:
   [delete] Deleting directory 

check-jars:

fetch-jars:

check-ooxml-jars:

fetch-ooxml-jars:

init:
[mkdir] Created dir: 
[mkdir] Created dir: 
[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 
[mkdir] Created dir: 

 [echo] Using Java: 1.6.0_27/1.6.0_27-b07/20.2-b06/Java HotSpot(TM) 64-Bit 
Server VM from Sun Microsystems Inc. on Windows Server 2008: 6.0

compile-main:
[javac] Compiling 1177 source files to 

[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] Compiling 515 source files to 

[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
 [copy] Copying 4 files to 


check-ooxml-xsds:

fetch-ooxml-xsds:

generate-geometry:

compile-scratchpad:
[javac] Compiling 506 source files to 

[Bug 52903] XSSF & HSSF shiftrows does not shift hyperlink references

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=52903

Dominik Stadler  changed:

   What|Removed |Added

Version|3.8-dev |3.13-dev

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

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



[Bug 53105] Summing an entire row of an .xlsx spreadsheet fails

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=53105

Dominik Stadler  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #2 from Dominik Stadler  ---
This actually works for me with the current trunk-version (3.13dev).

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

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



[Bug 58260] Formatting Fails after 32768 Rows. Works again after 65538

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58260

Dominik Stadler  changed:

   What|Removed |Added

 CC||a...@mbcli.com

--- Comment #16 from Dominik Stadler  ---
*** Bug 53209 has been marked as a duplicate of this bug. ***

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

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



[Bug 52836] Cannot create a new XSSFDrawing object

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=52836

Dominik Stadler  changed:

   What|Removed |Added

 Resolution|--- |WORKSFORME
 Status|NEW |RESOLVED

--- Comment #4 from Dominik Stadler  ---
Works for me with current trunk (3.13-beta1 + some more changes), so it seems
to have been fixed at some point.

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

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



[Bug 52836] Cannot create a new XSSFDrawing object

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=52836

Dominik Stadler  changed:

   What|Removed |Added

 Resolution|WORKSFORME  |---
 Status|RESOLVED|REOPENED

--- Comment #5 from Dominik Stadler  ---
sorry, I was wrong, it still happens when I use the correct sample file.

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

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



[Bug 53262] XSSFCellStyle.getFillForegroundXSSFColor returs null if theme color is set as Accent color in the Styles panel

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=53262

Dominik Stadler  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|NEW |RESOLVED

--- Comment #3 from Dominik Stadler  ---
No update in years, no sample code, therefore closing this as WONTFIX for now.
If this is still an issue for you with the latest release 3.13-beta1 then
please reopen with at least some sample code that shows the problem, preferably
as unit test.

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

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



Build failed in Jenkins: POI-JDK8 #560

2015-09-03 Thread Apache Jenkins Server
See 

Changes:

[dnorth] Note my recent fix.

https://bz.apache.org/bugzilla/show_bug.cgi?id=58039

[dnorth] Make D* functions thread safe, thanks to Patrick Zimmermann for the 
patch.

https://bz.apache.org/bugzilla/show_bug.cgi?id=58039

--
[...truncated 507 lines...]
[junit] Tests run: 68, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.057 sec
[junit] Running org.apache.poi.hssf.model.TestFormulaParserEval
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.122 sec
[junit] Running org.apache.poi.hssf.model.TestFormulaParserIf
[junit] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.005 sec
[junit] Running org.apache.poi.hssf.model.TestHSSFAnchor
[junit] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.007 sec
[junit] Running org.apache.poi.hssf.model.TestLinkTable
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.306 sec
[junit] Running org.apache.poi.hssf.model.TestOperandClassTransformer
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.model.TestRVA
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.011 sec
[junit] Running org.apache.poi.hssf.model.TestRowBlocksReader
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.model.TestShapes
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.model.TestSheet
[junit] Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.398 sec
[junit] Running org.apache.poi.hssf.model.TestSheetAdditional
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.model.TestWorkbook
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.009 sec
[junit] Running org.apache.poi.hssf.record.TestArrayRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.289 sec
[junit] Running org.apache.poi.hssf.record.TestAutoFilterInfoRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestBOFRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestBoolErrRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestBoundSheetRecord
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestCFHeaderRecord
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestCFRuleRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.212 sec
[junit] Running org.apache.poi.hssf.record.TestColumnInfoRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestCommonObjectDataSubRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestDConRefRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDVALRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestDrawingGroupRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestDrawingRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestEmbeddedObjectRefSubRecord
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestEndSubRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestEscherAggregate
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestExtSSTRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestExtendedFormatRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestExternalNameRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, 

Re: How to find all CellComments in XLS[X]

2015-09-03 Thread Dominik Stadler
Hi,

I did not actually try it, but you should be able to get the
CommentsTable already now via something like the following:

for(POIXMLDocumentPart p : sheet.getRelations()){
if(p instanceof CommentsTable) {
CommentsTable sheetComments = (CommentsTable)p;
...
}
}

Dominik.

On Thu, Sep 3, 2015 at 5:13 PM, Mark Beardsley  wrote:
> My only concern with allowing access to the CoomentsTable is the potential
> for drastically breaking the workbook file. With a reference to the
> CommentsTable in hand it would be possible to add new comments and remove
> existing ones and I am concerned that the logic is not in place to deal with
> all of the internal references necessary to link comments to rows etc.
>
> What might make sense is to create a method that returns a List or array
> containing the comments themselves. This would be read only, of course, and
> protect the workbook from modifications that might otherwise break it.
>
>
>
> --
> View this message in context: 
> http://apache-poi.1045710.n5.nabble.com/How-to-find-all-CellComments-in-XLS-X-tp5720014p5720024.html
> Sent from the POI - Dev mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
> For additional commands, e-mail: dev-h...@poi.apache.org
>

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



Re: How to find all CellComments in XLS[X]

2015-09-03 Thread Hannes Erven

Hi Mark and Dominik,


> I did not actually try it, but you should be able to get the

CommentsTable already now via something like the following:

 for(POIXMLDocumentPart p : sheet.getRelations()){
 if(p instanceof CommentsTable) {
 CommentsTable sheetComments = (CommentsTable)p;
 ...
 }
 }


Thank you very much for yor replies and suggestions. While the above 
does indeed do the trick, I feel it depends too heavily on POI internals 
(CTComments) to extract useful data.


I took a shot at adding a public method to extract the comment 
locations, please see the attached patch.



Would you consider adding that and/or an additional method to extract a 
Map (with REF being String or CellReference)?
If yes, I'll happily put together a patch that supports all HSSF, XSSF 
and HXSSF.

If no, I'll just stick with Dominik's suggestion.


Thanks again,
best regards

-hannes
### Eclipse Workspace Patch 1.0
#P ApachePOI
Index: src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
===
--- src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java	(revision 1701002)
+++ src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java	(working copy)
@@ -3965,4 +3965,8 @@
 }
 return col.getOutlineLevel();
 }
+
+public Set getAllCellCommentRefs() {
+return sheetComments.getAllCommentRefs();
+}
 }
Index: src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java
===
--- src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java	(revision 1701002)
+++ src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java	(working copy)
@@ -19,8 +19,10 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.poi.POIXMLDocumentPart;
 import org.apache.poi.openxml4j.opc.PackagePart;
@@ -40,6 +42,7 @@
  *  map for fast lookup.
  */
 private Map commentRefs;
+private Set commentRefsUnmodifiable;
 
 public CommentsTable() {
 super();
@@ -117,15 +120,28 @@
 @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
 public CTComment getCTComment(String cellRef) {
 // Create the cache if needed
+prepareCTCommentCache();
+
+// Return the comment, or null if not known
+return commentRefs.get(cellRef);
+}
+
+public Set getAllCommentRefs(){
+prepareCTCommentCache();
+
+return commentRefsUnmodifiable;
+}
+
+@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
+private void prepareCTCommentCache() {
+// Create the cache if needed
 if(commentRefs == null) {
commentRefs = new HashMap();
for (CTComment comment : comments.getCommentList().getCommentArray()) {
   commentRefs.put(comment.getRef(), comment);
}
+   commentRefsUnmodifiable = Collections.unmodifiableSet(commentRefs.keySet());
 }
-
-// Return the comment, or null if not known
-return commentRefs.get(cellRef);
 }
 
 /**
Index: src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
===
--- src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java	(revision 1701002)
+++ src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java	(working copy)
@@ -22,6 +22,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.TreeMap;
 
 import org.apache.poi.hssf.util.PaneInformation;
@@ -1539,4 +1540,8 @@
 public int getColumnOutlineLevel(int columnIndex) {
 return _sh.getColumnOutlineLevel(columnIndex);
 }
+
+public Set getAllCellCommentRefs() {
+return _sh.getAllCellCommentRefs();
+}
 }



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

Re: Time Zone Setting

2015-09-03 Thread Dominik Stadler
Hi,

Using the ".getDefault()" values sounds good, as this way we run less
risk of breaking existing stuff.

But overall it would be good if we can get back to a "green" build
again somehow first, I tried to see what changes are necessary right
now to make tests work, but the tests all are quite complicated and
not easy to fix for me. Should we take a step back and revert some of
those "forbidden-api-check" changes and do them in a more step-by-step
manner?

Dominik.

On Thu, Sep 3, 2015 at 5:10 PM, Andreas Beeker  wrote:
> Hi,
>
> I have a lot of test errors and already fixed quite a lot, but haven't 
> committed them yet.
>
> Short version:
> how about ... instead of using Locale.ROOT and Timezone UTC,
> the initial value of the ThreadLocal return Locale.getDefault() and 
> Timezone.getDefault()
> and can be set if needed ... so the handling is similar to older versions?
>
> Long version:
> When I've started to fix the forbidden api errors, I've only touched places,
> where I was quite sure that Locale.ROOT won't do any harm.
> But of course now we also have to face the other issues...
>
> The reason for having a thread local is ...:
> - that having the timezone/locale as an additional parameter would lead to a 
> lot of methods
>   to be marked deprecated (at least I would do it...)
> - I've read about use-cases where workbooks from different time zones need to
>   be processed, so it's not only the current environment time zone
>
> - "A ThreadLocal can lead to hard-to-find errors ...":
>   I think the hardest part is, making the new handling public.
>   Another problem I see with thread locals is, the reuse of servlet threads.
>   So the usage pattern would need to restore the original setting in a 
> finally block.
>
> - "... in fact almost anybody would now see UTC-formatted dates instead
>of local timezone, or?"
>   I guess so too, and the tests fail when my CET-timezone is ignored
>   (the DE-locale is only affecting very few cases), i.e. I have to set it 
> explicitly
>
> - "The java default is to either use the system default ..."
>   As noted above, I would like to provide a multi timezone/locale approach, 
> but
>   still keep a lot of the poi api as-is.
>
> I guess the discussion will continue for a bit, so I create a patch file 
> instead of committing
> the changes and check your feedback then.
> If you commit changes in the meantime, I'll update my version accordingly, so 
> don't be
> blocked ;)
>
> Andi
>
>
> On 03.09.2015 16:25, Uwe Schindler wrote:
>> Hi,
>>
>> This may be only slightly related: to work around the forbidden-apis issue, 
>> you can still pass Timezone.getDefault() to the Java APIs - this is not 
>> forbidden. Forbidden APIs just wants to make sure you know what you are 
>> doing. By writing Timezone.getDefault() you explicitely say what you are 
>> doing. And maybe add a comment why you do this. The same applies for Locales 
>> or Charsets. E.g., At some places in Lucene we explicitely use the charset 
>> of the console, so we use Charset.getDefault() at all those places.
>>
>> Uwe
>>
>> -
>> Uwe Schindler
>> H.-H.-Meier-Allee 63, D-28213 Bremen
>> http://www.thetaphi.de
>> eMail: u...@thetaphi.de
>>
>>
>>> -Original Message-
>>> From: Dominik Stadler [mailto:dominik.stad...@gmx.at]
>>> Sent: Thursday, September 03, 2015 4:05 PM
>>> To: POI Developers List
>>> Subject: Re: Time Zone Setting
>>>
>>> Hi,
>>>
>>> Sorry, but I fear that through this we change the default behavior of POI:
>>> * A ThreadLocal can lead to hard-to-find errors when people use POI in a
>>> multi-threading environment. While it is better in some cases than having a
>>> global static, it now requires the developer to ensure that the timezone is 
>>> set
>>> for each thread that is started without a way to set it globally.
>>> * I think previously POI used the java default settings which look at the
>>> operating system, this is now broken as we have "UTC" as default, which
>>> potentially leads to many people seeing different results compared to
>>> before, in fact almost anybody would now see UTC-formatted dates instead
>>> of local timezone, or?
>>> * The java default is to either use the system default timezone or if it 
>>> should
>>> be different then use -Duser.timezone when invoking the JRE, see e.g.
>>> http://stackoverflow.com/questions/2493749/how-to-set-a-jvm-timezone-
>>> properly
>>>
>>> So my approach would be to:
>>> * Not use the DateUtil.setTimezone() approach as it has quite some potential
>>> for regressions but also not use TimeZone.setDefault() in unit tests at all
>>> * Ensure that we set -Duser.timezone to a fixed value when running unit
>>> tests in the various CI systems. We already do this for user.language and
>>> user.country, so setting the timezone as well here seems a natural choice
>>>
>>> This way we do not change default behavior for users and still make the CI
>>> runs a bit more reproducible time-wise...
>>>
>>> Dominik.
>>>

[Bug 53275] XSSFColor.setColor requires to clear previously set 'indexed' flag if color is non-indexed (theme) color

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=53275

Dominik Stadler  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #1 from Dominik Stadler  ---
Fixed via r1701134, thanks for the suggestion.

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

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



[Bug 53371] XSSFColor not correctly created from hex code

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=53371

Dominik Stadler  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|NEW |RESOLVED

--- Comment #1 from Dominik Stadler  ---
If you construct a color with a color-value, it is not indexed, POI does
currently not try to map known colors to indexes. Thus getIndexed() returns 0
by design in this case. Use isIndexed() to check if the color is actually
indexed. And if not, use getRGB() to get the color value.

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

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



Re: extract texts from a textshape with bullets

2015-09-03 Thread teresa
Hi Andi

Many thanks.

I downloaded the trunk branch (2015-09-03 version) and used ant to create
jar files.

Yes, it works for me - now using HSLFTextParagraph, I am able to output
texts with styles and bullets correctly.

Thanks
T.



--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/ANNOUNCE-Apache-POI-3-13-beta1-released-tp5719469p5720010.html
Sent from the POI - Dev mailing list archive at Nabble.com.

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



[Bug 57062] poi cannot read date is when first column is empty and second column in date

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57062

Herve  changed:

   What|Removed |Added

Version|3.10-FINAL  |3.12-FINAL
 Depends on||57002

--- Comment #5 from Herve  ---
I got this bug in 3.12final too.
I think it has a common cause with
https://bz.apache.org/bugzilla/show_bug.cgi?id=56702 so I put my comment only
in the 56702 and I put a dependency upon this bug.

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

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



Build failed in Jenkins: POI-JDK8 #558

2015-09-03 Thread Apache Jenkins Server
See 

Changes:

[centic] One more place where we should state closer.lua now

--
[...truncated 413 lines...]
[junit] Tests run: 68, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.061 sec
[junit] Running org.apache.poi.hssf.model.TestFormulaParserEval
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.154 sec
[junit] Running org.apache.poi.hssf.model.TestFormulaParserIf
[junit] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.006 sec
[junit] Running org.apache.poi.hssf.model.TestHSSFAnchor
[junit] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.008 sec
[junit] Running org.apache.poi.hssf.model.TestLinkTable
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.315 sec
[junit] Running org.apache.poi.hssf.model.TestOperandClassTransformer
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.model.TestRVA
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.035 sec
[junit] Running org.apache.poi.hssf.model.TestRowBlocksReader
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.model.TestShapes
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.006 sec
[junit] Running org.apache.poi.hssf.model.TestSheet
[junit] Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.413 sec
[junit] Running org.apache.poi.hssf.model.TestSheetAdditional
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.model.TestWorkbook
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.01 sec
[junit] Running org.apache.poi.hssf.record.TestArrayRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.306 sec
[junit] Running org.apache.poi.hssf.record.TestAutoFilterInfoRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestBOFRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestBoolErrRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestBoundSheetRecord
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestCFHeaderRecord
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestCFRuleRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.219 sec
[junit] Running org.apache.poi.hssf.record.TestColumnInfoRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestCommonObjectDataSubRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDConRefRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDVALRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestDrawingGroupRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDrawingRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestEmbeddedObjectRefSubRecord
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestEndSubRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestEscherAggregate
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestExtSSTRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestExtendedFormatRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestExternalNameRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestFeatRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time 

Build failed in Jenkins: POI #834

2015-09-03 Thread Apache Jenkins Server
See 

Changes:

[centic] Eclipse warnings, close resources in CommandLineTextExtractor, add 
try/finally, formatting, ...

[centic] Bug 56959: Add verification unit test to show that the bug cannot be 
reproduced

[centic] Fix bug 53275: reset indexed color flag when setting a non-indexed 
color

[centic] Add unit test which verifies that bug 53105 is actually fixed now

[centic] Add unit tests to verify that bug 51626 and bug 51451 are fixed

Conflicts:
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java

[centic] Add unit tests which verify that the issues from bug 48962 and 50755 
do not occur any more on the latest version

--
[...truncated 11 lines...]
U 
src\scratchpad\src\org\apache\poi\hdgf\extractor\VisioTextExtractor.java
U src\ooxml\testcases\org\apache\poi\xssf\usermodel\TestXSSFBugs.java
U src\ooxml\testcases\org\apache\poi\xssf\usermodel\TestXSSFFont.java
U 
src\ooxml\testcases\org\apache\poi\xslf\usermodel\TestXSLFAutoShape.java
U src\ooxml\java\org\apache\poi\extractor\CommandLineTextExtractor.java
U src\ooxml\java\org\apache\poi\openxml4j\opc\ZipPackage.java
U src\ooxml\java\org\apache\poi\xssf\usermodel\XSSFCellStyle.java
U src\ooxml\java\org\apache\poi\xssf\usermodel\XSSFFont.java
U src\testcases\org\apache\poi\hssf\usermodel\TestHSSFDataFormatter.java
U src\testcases\org\apache\poi\hssf\usermodel\TestCellStyle.java
Fetching 'https://svn.apache.org/repos/asf/poi/site/forrest.properties' at -1 
into 'F:\hudson\hudson-slave\workspace\POI\forrest.properties'
Fetching 'https://svn.apache.org/repos/asf/poi/site/src/documentation' at -1 
into 'F:\hudson\hudson-slave\workspace\POI\src\documentation'
At revision 1701142
At revision 1701142
WARNING: clock of the subversion server appears to be out of sync. This can 
result in inconsistent check out behavior.
no change for http://svn.apache.org/repos/asf/poi/trunk/forrest.properties 
since the previous build
no change for https://svn.apache.org/repos/asf/poi/site/src/documentation since 
the previous build
Deleting old artifacts from #832
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
LANG=en_US.UTF-8

[EnvInject] - Variables injected successfully.
[POI] $ cmd.exe /C '"f:\hudson\tools\ant\latest\bin\ant.bat 
-Dcoverage.enabled=true clean jenkins && exit %%ERRORLEVEL%%"'
Buildfile: 

clean:
   [delete] Deleting directory 

check-jars:

fetch-jars:

check-ooxml-jars:

fetch-ooxml-jars:

init:
[mkdir] Created dir: 
[mkdir] Created dir: 
[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 
[mkdir] Created dir: 

 [echo] Using Java: 1.6.0_27/1.6.0_27-b07/20.2-b06/Java HotSpot(TM) 64-Bit 
Server VM from Sun Microsystems Inc. on Windows Server 2008: 6.0

compile-main:
[javac] Compiling 1177 source files to 

[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 

Build failed in Jenkins: POI-JDK8 #561

2015-09-03 Thread Apache Jenkins Server
See 

Changes:

[centic] Eclipse warnings, close resources in CommandLineTextExtractor, add 
try/finally, formatting, ...

[centic] Bug 56959: Add verification unit test to show that the bug cannot be 
reproduced

[centic] Fix bug 53275: reset indexed color flag when setting a non-indexed 
color

[centic] Add unit test which verifies that bug 53105 is actually fixed now

[centic] Add unit tests to verify that bug 51626 and bug 51451 are fixed

Conflicts:
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java

[centic] Add unit tests which verify that the issues from bug 48962 and 50755 
do not occur any more on the latest version

--
[...truncated 293 lines...]
[junit] Tests run: 68, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.055 sec
[junit] Running org.apache.poi.hssf.model.TestFormulaParserEval
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.126 sec
[junit] Running org.apache.poi.hssf.model.TestFormulaParserIf
[junit] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.006 sec
[junit] Running org.apache.poi.hssf.model.TestHSSFAnchor
[junit] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.006 sec
[junit] Running org.apache.poi.hssf.model.TestLinkTable
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.29 sec
[junit] Running org.apache.poi.hssf.model.TestOperandClassTransformer
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.model.TestRVA
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.01 sec
[junit] Running org.apache.poi.hssf.model.TestRowBlocksReader
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.model.TestShapes
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.model.TestSheet
[junit] Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.389 sec
[junit] Running org.apache.poi.hssf.model.TestSheetAdditional
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.model.TestWorkbook
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.01 sec
[junit] Running org.apache.poi.hssf.record.TestArrayRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.293 sec
[junit] Running org.apache.poi.hssf.record.TestAutoFilterInfoRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestBOFRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestBoolErrRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestBoundSheetRecord
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestCFHeaderRecord
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestCFRuleRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.235 sec
[junit] Running org.apache.poi.hssf.record.TestColumnInfoRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestCommonObjectDataSubRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDConRefRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDVALRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestDrawingGroupRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDrawingRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestEmbeddedObjectRefSubRecord
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestEndSubRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestEscherAggregate
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] 

[Bug 56702] Get one exception "java.lang.IllegalStateException: Cannot get a numeric value from a text cell" when calling org.apache.poi.ss.usermodel.DataFormatter.formatCellValue

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=56702

Herve  changed:

   What|Removed |Added

Version|3.8-FINAL   |3.12-FINAL

--- Comment #12 from Herve  ---
I got this bug with version 3.12final

Here is my context : I ask for the values of a range of cells (tab!A1:A4 for
instance).  
In the Excel file, tab!A1 contains a formula with hlookup (or vlookup, i don't
remember) and I copy tab!A1 to tab!A1:A3  
The result of A1 is a string, the result of A2 is an empty cell (it displays
0).

POI computed tab!A1 value ok,  
and then raises the error on cell tab!A2.

I found that the exception was risen by HSSFCell.getNumericCellValue which was
called by DateUtil.isCellDateFormatted.  
The issue I found is that HSSFCell.getNumericCellValue calls
checkFormulaCachedValueType(CELL_TYPE_NUMERIC, (FormulaRecord)fr) and
checkFormulaCachedValueType() returns stringtype for A2, despite the fact that
A2 contains a number.  
I guess that the FormulaRecord of tab!A1 is the same as FormulaRecord of tab!A2
and as tab!A1 contains a string and caches this type,
checkFormulaCachedValueType returns also string for tab!A2.

I have not enough knowledge of POI code to propose a fix,
but I put the workaround I used there :
http://stackoverflow.com/questions/6508203/when-getting-cell-content-using-apache-poi-library-i-get-both-cannot-get-a-num/32376505#32376505

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

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



[Bug 58325] getShapes() returns zero if sheet has more than one embedded OLE object

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58325

ltamura  changed:

   What|Removed |Added

 OS||All

--- Comment #1 from ltamura  ---
The attachments can be found at:
https://dl.dropboxusercontent.com/u/24010836/excel%20files.zip

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

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



Build failed in Jenkins: POI #831

2015-09-03 Thread Apache Jenkins Server
See 

Changes:

[centic] One more place where we should state closer.lua now

--
[...truncated 265 lines...]
[junit] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.007 sec
[junit] Running org.apache.poi.hssf.model.TestLinkTable
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.329 sec
[junit] Running org.apache.poi.hssf.model.TestOperandClassTransformer
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.model.TestRVA
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.011 sec
[junit] Running org.apache.poi.hssf.model.TestRowBlocksReader
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.model.TestShapes
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.model.TestSheet
[junit] Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.486 sec
[junit] Running org.apache.poi.hssf.model.TestSheetAdditional
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.model.TestWorkbook
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.01 sec
[junit] Running org.apache.poi.hssf.record.TestArrayRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.383 sec
[junit] Running org.apache.poi.hssf.record.TestAutoFilterInfoRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestBOFRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.004 sec
[junit] Running org.apache.poi.hssf.record.TestBoolErrRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestBoundSheetRecord
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestCFHeaderRecord
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestCFRuleRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.367 sec
[junit] Running org.apache.poi.hssf.record.TestColumnInfoRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestCommonObjectDataSubRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDConRefRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestDVALRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestDrawingGroupRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestDrawingRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] Running org.apache.poi.hssf.record.TestEmbeddedObjectRefSubRecord
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestEndSubRecord
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestEscherAggregate
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestExtSSTRecord
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.005 sec
[junit] Running org.apache.poi.hssf.record.TestExtendedFormatRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestExternalNameRecord
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestFeatRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hssf.record.TestFontRecord
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestFormulaRecord
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] Running org.apache.poi.hssf.record.TestFtCblsSubRecord
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 

How to find all CellComments in XLS[X]

2015-09-03 Thread Hannes Erven

Hi folks,


I need to scan all comments in a given XSLX file (preferably also XLS).
It seems that the only way to access comments is 
Sheet.getCellComment(int row, int column); so I need to find all row and 
cell numbers to iterate through them.


There is just one problem: if a comment is specified outside the range 
of cells in a given row, getFirstCellNum/getLastCellNum only consider 
"present" cells and will ignore comments outside that range.


Consider this simple sheet:
A1: String "Hi"
A2: no values, but a comment
A3: String "there"

For row indizes 0 and 2, getFirstCellNum and getLastCellNum report 0.
For row index 1, they report -1; but getCellComment(1,0) will return the 
comment as expected.


Excel does create a physical row for rows with only a comment, and even 
if there are no additional rows "behind", so it's just a matter of 
detecting the right column ranges to query for a given row.



Anyways, I'd prefer having access to XSSFSheet's "sheetComments" object 
(or similar) and iterate only through the existing comments, rather than 
checking each cell's coordinates, wading through tons of cells just to 
find a handful of comments.



Is there a solution to find all comments? Would it be safe to add public 
access to CommentsTable and/or its commentRefs?




Thanks & best regards,

-hannes


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