Jenkins build is back to normal : POI #1422

2016-07-04 Thread Apache Jenkins Server
See 


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



[Bug 59786] NPE at HMEFContentsExtractor.java:78

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59786

--- Comment #8 from Nick Burch  ---
I'm reluctant to add a well-known MAPIProperty for it, until we know more about
what it is. Searching the Microsoft published specs all seem to suggest it's in
an un-used range, and none of the ID listings give a name or similar for it

I've fixed things up so that custom properties can now correctly be retrieved
by HMEFMessage, and set HMEFContentsExtractor to use a predictable (UTF8)
encoding for the raw strings rather than whatever encoding they happened to
have in the source file. Does that now behave right for you?

The ooxml-tests and lite-building ought to run relatively quickly and without
too many errors - it produces ~50 lines of output on my laptop, and runs in
just over a minute. If that isn't the case, that's an issue for another 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



Jenkins build is back to normal : POI-JDK8 #1111

2016-07-04 Thread Apache Jenkins Server
See 


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



[Bug 59786] NPE at HMEFContentsExtractor.java:78

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59786

Sebb  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #7 from Sebb  ---
[It's a bit of a pain building POI, because compile-ooxml-lite unexpectedly
runs loads of tests which don't always work for me, and even if they do, they
take a long time and produce lots of output]

I have now got "ant jar" to complete after commenting out the target
compile-ooxml-lite.

However it does not extract any body text; I get:

Extracting...
No message body found, POI/message.rtf not created
Extraction completed

A bit of experimentation shows that the new attribute has to be defined as a
new entry in MAPIProperty.java; if this is done it is then picked up by the
dumper as well. 

Using MAPIProperty.createCustom locally does not work; the method
getMessageMAPIAttribute returns null.

There's another change that needs to be done: if the body is an instance of
MAPIStringAttribute (as here) then writing the byte data directly to the file
produces an unreadable file which appears to be in UTF-16LE (no BOM).

Here's a very crude patch that works for me:

### Eclipse Workspace Patch 1.0
#P ApachePOI
Index:
src/scratchpad/src/org/apache/poi/hmef/extractor/HMEFContentsExtractor.java
===
--- src/scratchpad/src/org/apache/poi/hmef/extractor/HMEFContentsExtractor.java
   (revision 1751374)
+++ src/scratchpad/src/org/apache/poi/hmef/extractor/HMEFContentsExtractor.java
   (working copy)
@@ -95,7 +95,12 @@

 OutputStream fout = new FileOutputStream(dest);
 try {
-fout.write(body.getData());
+if (body instanceof MAPIStringAttribute) {
+fout.write(((MAPIStringAttribute)
body).getDataString().getBytes()); // TODO fix the output charset
+} else {
+fout.write(body.getData());
+}
 } finally {
 fout.close();
 }
@@ -104,13 +109,7 @@
 protected MAPIAttribute getBodyAttribute() {
 MAPIAttribute body =
message.getMessageMAPIAttribute(MAPIProperty.RTF_COMPRESSED);
 if (body != null) return body;
-
-// See bug #59786 - we'd really like a test file to confirm if this
-//  is the right properties + if this is truely general or not!
-MAPIProperty uncompressedBody = 
-MAPIProperty.createCustom(0x3fd9, Types.ASCII_STRING,
"Uncompressed Body");
-// Return this uncompressed one, or null if that isn't their either
-return message.getMessageMAPIAttribute(uncompressedBody);
+return message.getMessageMAPIAttribute(MAPIProperty.WINMAILNEW);
 }

 /**


Where the following was added to MAPIProperty.java:

   public static final MAPIProperty WINMAILNEW = // TODO fix the names!
  new MAPIProperty(0x3fd9, Types.UNICODE_STRING, "Uncompressed
Body","WINMAILNEW");

-- 
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 59780] SimpleDateFormat usage incorrect in PackagePropertiesPart class

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59780

Nick Burch  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Nick Burch  ---
We still support Java 6, so we can't sadly use the nice X type

We already have some timezone support, in r1751379 I've expanded it slightly
and added some read and write unit tests

Could you please grab a svn build / nightly build / wait for 3.15 beta 3, and
let us know if that solves it? (It's a slightly different route to what you've
done in your junit)

-- 
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 #1421

2016-07-04 Thread Apache Jenkins Server
See 

Changes:

[nick] Add ignored test for #59780, and specially-crafted test file

[onealj] update changelog for bug 59795 and bug 59796

[onealj] bug 59796: XSSFTable#getRowCount off-by-one error

[onealj] typo

[onealj] mark BitField as internal use only

[onealj] pre for-each iteration over for index iteration

--
[...truncated 11 lines...]
U src/java/org/apache/poi/ss/formula/functions/EDate.java
U src/java/org/apache/poi/ss/formula/FormulaType.java
U src/java/org/apache/poi/ss/formula/EvaluationCell.java
U src/java/org/apache/poi/ss/formula/IStabilityClassifier.java
U src/java/org/apache/poi/ss/format/CellFormat.java
U src/java/org/apache/poi/ss/util/CellRangeAddress.java
U src/java/org/apache/poi/ss/util/SheetUtil.java
U src/java/org/apache/poi/ss/util/cellwalk/CellWalk.java
U src/java/org/apache/poi/ss/usermodel/CellType.java
U src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java
U src/java/org/apache/poi/ss/usermodel/DataFormatter.java
U src/java/org/apache/poi/ss/usermodel/Cell.java
U src/java/org/apache/poi/hssf/record/PasswordRecord.java
U 
src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java
U src/java/org/apache/poi/hssf/record/OldFormulaRecord.java
U src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
U src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java
U src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
U src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java
U src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java
U src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java
U src/java/org/apache/poi/util/BitField.java
U src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlideAtom.java
U 
src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java
U 
src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestFontRendering.java
U 
src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java
U 
src/scratchpad/testcases/org/apache/poi/hssf/usermodel/TestHSSFChart.java
U 
src/scratchpad/testcases/org/apache/poi/hwpf/model/TestTextPieceTable.java
U src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java
U src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBugs.java
U 
src/scratchpad/src/org/apache/poi/hslf/dev/SlideAndNotesAtomListing.java
U src/scratchpad/src/org/apache/poi/hslf/dev/SLWTTextListing.java
U src/scratchpad/src/org/apache/poi/hslf/dev/PPDrawingTextListing.java
U 
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java
U src/scratchpad/src/org/apache/poi/hsmf/datatypes/MAPIProperty.java
U 
src/scratchpad/src/org/apache/poi/hmef/extractor/HMEFContentsExtractor.java
U src/scratchpad/src/org/apache/poi/hwmf/record/HwmfWindowing.java
U src/scratchpad/src/org/apache/poi/hwmf/record/HwmfText.java
U src/scratchpad/src/org/apache/poi/hwmf/record/HwmfDraw.java
U 
src/scratchpad/src/org/apache/poi/hssf/converter/AbstractExcelConverter.java
U 
src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java
U 
src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
U src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
U 
src/scratchpad/src/org/apache/poi/hwpf/model/UnhandledDataStructure.java
U 
src/scratchpad/src/org/apache/poi/hwpf/model/types/GrfhicAbstractType.java
U 
src/examples/src/org/apache/poi/hssf/usermodel/examples/HSSFReadWrite.java
U src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java
U src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java
U src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java
U src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java
U src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java
U src/examples/src/org/apache/poi/ss/examples/ToCSV.java
U src/examples/src/org/apache/poi/xslf/usermodel/Tutorial5.java
U src/ooxml/testcases/org/apache/poi/extractor/TestExtractorFactory.java
U src/ooxml/testcases/org/apache/poi/sl/draw/TestDrawPictureShape.java
U 
src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackageCoreProperties.java
U 
src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFFormulaEvaluation.java
U src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFRow.java
U 
src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java
U 
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java
U 

Build failed in Jenkins: POI-JDK8 #1110

2016-07-04 Thread Apache Jenkins Server
See 

Changes:

[onealj] update changelog for bug 59795 and bug 59796

[onealj] bug 59796: XSSFTable#getRowCount off-by-one error

[onealj] typo

[onealj] mark BitField as internal use only

[onealj] pre for-each iteration over for index iteration

[onealj] bug 59795: add method to synchronize start and stop cell references 
with CTTable

--
[...truncated 1217 lines...]
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.017 sec
[junit] Running org.apache.poi.hslf.model.TestMovieShape
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.01 sec
[junit] Running org.apache.poi.hslf.model.TestOleEmbedding
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.117 sec
[junit] Running org.apache.poi.hslf.model.TestPPFont
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] Running org.apache.poi.hslf.model.TestPPGraphics2D
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.017 sec
[junit] Running org.apache.poi.hslf.model.TestSetBoldItalic
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.276 sec
[junit] Running org.apache.poi.hslf.model.TestShapes
[junit] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.268 sec
[junit] Running org.apache.poi.hslf.model.TestSheet
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.014 sec
[junit] Running org.apache.poi.hslf.model.TestSlideChangeNotes
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.02 sec
[junit] Running org.apache.poi.hslf.model.TestSlideMaster
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.077 sec
[junit] Running org.apache.poi.hslf.model.TestSlides
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.035 sec
[junit] Running org.apache.poi.hslf.model.TestTable
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.047 sec
[junit] Running org.apache.poi.hslf.model.TestTextRunReWrite
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.029 sec
[junit] Running org.apache.poi.hslf.record.TestAnimationInfoAtom
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.016 sec
[junit] Running org.apache.poi.hslf.record.TestCString
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.039 sec
[junit] Running org.apache.poi.hslf.record.TestColorSchemeAtom
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.037 sec
[junit] Running org.apache.poi.hslf.record.TestComment2000
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.063 sec
[junit] Running org.apache.poi.hslf.record.TestComment2000Atom
[junit] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.053 sec
[junit] Running org.apache.poi.hslf.record.TestCurrentUserAtom
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.018 sec
[junit] Running org.apache.poi.hslf.record.TestDocument
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.022 sec
[junit] Running org.apache.poi.hslf.record.TestDocumentAtom
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.06 sec
[junit] Running org.apache.poi.hslf.record.TestDocumentEncryption
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.342 sec
[junit] Running org.apache.poi.hslf.record.TestDocumentEncryptionAtom
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.006 sec
[junit] Running org.apache.poi.hslf.record.TestExControl
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.027 sec
[junit] Running org.apache.poi.hslf.record.TestExHyperlink
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.046 sec
[junit] Running org.apache.poi.hslf.record.TestExHyperlinkAtom
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.057 sec
[junit] Running org.apache.poi.hslf.record.TestExMediaAtom
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.029 sec
[junit] Running org.apache.poi.hslf.record.TestExObjList
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.008 sec
[junit] Running org.apache.poi.hslf.record.TestExObjListAtom
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.047 sec
[junit] Running org.apache.poi.hslf.record.TestExOleObjAtom
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.04 sec
[junit] Running org.apache.poi.hslf.record.TestExOleObjStg
[junit] Tests run: 3, 

[Bug 59795] XSSFTable needs a method to reset start/end Cell References

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59795

--- Comment #4 from Greg Woolsey  ---
(In reply to Javen O'Neal from comment #3)
> (hoping to make getCTTable protected in the future).

That will require some more code.  Right now I'm trying to figure out how to
get the QueryTable related to a Table, so I can get the Connection for the
QueryTable and then eventually have Java perform queries previously done by
ODBC/ADO (that will be custom code, not part of POI, but the document object
links are arcane and not documented).

Learning about the OPCPackage, PackagePart, and POIXMLDocumentPart classes.

-- 
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 59796] XSSFTable.getRowCount off-by-one error

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59796

Javen O'Neal  changed:

   What|Removed |Added

Summary|XSSFTable.getRowCount   |XSSFTable.getRowCount
   ||off-by-one error

-- 
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 59795] XSSFTable needs a method to reset start/end Cell References

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59795

--- Comment #3 from Javen O'Neal  ---
(In reply to Javen O'Neal from comment #1)
> I noticed that getRowCount returns toRow-fromRow. Shouldn't it be
> toRow-fromRow+1?
Spun off getRowCount fix to bug 59796

> (on a US holiday, no less - if that's where you are).
2 hour road trip was a perfect opportunity to get these fixes in. I'm glad to
have an XSSFTable expert to help this class mature (hoping to make getCTTable
protected in the future).

-- 
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 59796] XSSFTable.getRowCount

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59796

Javen O'Neal  changed:

   What|Removed |Added

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

--- Comment #1 from Javen O'Neal  ---
Fixed in r1751373.

-- 
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 59796] New: XSSFTable.getRowCount

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59796

Bug ID: 59796
   Summary: XSSFTable.getRowCount
   Product: POI
   Version: 3.15-dev
  Hardware: PC
OS: All
Status: NEW
  Severity: minor
  Priority: P2
 Component: XSSF
  Assignee: dev@poi.apache.org
  Reporter: one...@apache.org

>From bug 59795 comment 1
> I noticed that getRowCount returns toRow-fromRow. Shouldn't it be 
> toRow-fromRow+1?

>From bug 59795 comment 2
> Good catch, yes, I think it should.

XSSFTable.getRowCount returns 1 less than it should.
Currently returns -1 if ref is not set, otherwise returns to-from
Should be 0 if not set or to-from+1.

-- 
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



Jenkins build is back to normal : POI #1420

2016-07-04 Thread Apache Jenkins Server
See 


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



[Bug 59795] XSSFTable needs a method to reset start/end Cell References

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59795

--- Comment #2 from Greg Woolsey  ---
(In reply to Javen O'Neal from comment #1)
> Applied in r1751368 with a corresponding unit test and updated documentation.
> 
> I noticed that getRowCount returns toRow-fromRow. Shouldn't it be
> toRow-fromRow+1?

Good catch, yes, I think it should.  Thanks for the quick turn around! (on a US
holiday, no less - if that's where you are).

Doesn't look like many people are using Tables yet in XSSF workbooks - maybe
because the formula syntax didn't work until the recent flurry of changes we
made.

-- 
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 59795] XSSFTable needs a method to reset start/end Cell References

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59795

Javen O'Neal  changed:

   What|Removed |Added

   Severity|normal  |enhancement

-- 
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 59795] XSSFTable needs a method to reset start/end Cell References

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59795

Javen O'Neal  changed:

   What|Removed |Added

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

--- Comment #1 from Javen O'Neal  ---
Applied in r1751368 with a corresponding unit test and updated documentation.

I noticed that getRowCount returns toRow-fromRow. Shouldn't it be
toRow-fromRow+1?

-- 
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: BitField#setValue is not a setter

2016-07-04 Thread Nick Burch

On 04/07/16 03:17, Javen O'Neal wrote:

Andi and I noticed a RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT warning
from FindBugs in HWPF. BitField#setValue is not a setter. It returns
the value of the holder if a value was set through the BitMask.

The BitField class should probably probably use a name that doesn't
look like a setter and/or make it extremely clear in the Javadoc that
no state is modified.


I think that the BitField classes are only ever used internally. I can't 
spot any code elsewhere on the internet using it from a google, can't 
spot it used in the usermodel, and I don't recall seeing user code on 
the lists using it.


It's also ancient code IIRC, so don't see why we can't change the name 
or javadocs to something clearer


Nick

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



[Bug 59786] NPE at HMEFContentsExtractor.java:78

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59786

Nick Burch  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #6 from Nick Burch  ---
As best as I can without the file, I've had a go in r1751361 at adding
extraction support for this non-standard uncompressed file. (I tried, but
couldn't get Outlook to generate one like yours for testing). Any chance you
could try with your test file, and report how HMEFContentsExtractor works on
your file with that change in?

-- 
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 59795] New: XSSFTable needs a method to reset start/end Cell References

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59795

Bug ID: 59795
   Summary: XSSFTable needs a method to reset start/end Cell
References
   Product: POI
   Version: 3.15-dev
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: XSSF
  Assignee: dev@poi.apache.org
  Reporter: greg.wool...@gmail.com

There is already a method, updateHeaders(), that resets most of the instance
computed/cached fields, but it doesn't unset the lazily evaluated start and end
cell references for the Table.  If you want to add or remove rows from a table
definition, you need to change the underlying CTTable object, and reset these
cached values in the XSSFTable wrapper.

Currently, the only way to hack this is to use reflection to get at the private
fields, which is not how we want to do it.

The easy fix is to just add:

public void updateReferences() {
startCellReference = null;
endCellReference = null;
}

The next time they are requested, they are re-computed from the underlying
(possibly updated) CTTable.

It is still up to the user to ensure the CTTable references match the data in
the worksheet.

I think this should be its own method, rather than just adding the two lines to
updateHeaders(), as there are distinct use cases for changing the headers of a
table and just adding/removing rows from a table.  No need to incur the
overhead of recomputing one when only the other is changing.

-- 
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 #1419

2016-07-04 Thread Apache Jenkins Server
See <https://builds.apache.org/job/POI/1419/changes>

Changes:

[onealj] bug 59790,59791: add @since javadoc annotation to FormulaType and 
CellType

[onealj] fix gpg --verify asc code; add missing CellType javadocs

[onealj] bug 59794: fix verifying asc signature example. Patch from Sebb

[onealj] bug 59791: CellFormat#ultimateType(Cell) should return an integer for 
backwards compatibility (use ultimateTypeEnum for now for CellType enums); 
re-add SXSSFCell(SXSSFRow, int) for backwards compatibility

[onealj] bug 59791: add @since to Cell, EvaluationCell, and FormulaEvaluator 
CellType getter javadocs

--
[...truncated 9384 lines...]
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] Patched 1 link injection vulnerable javadocs
  [jar] Building jar: 
<https://builds.apache.org/job/POI/ws/build/dist/maven/poi/poi-3.15-beta3-javadoc.jar>
 [echo] Building poi-scratchpad javadocs from 
<https://builds.apache.org/job/POI/ws/src/scratchpad/src>
   [delete] Deleting directory 
<https://builds.apache.org/job/POI/ws/build/tmp/maven-javadocs>
[mkdir] Created dir: 
<https://builds.apache.org/job/POI/ws/build/tmp/maven-javadocs>
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] Patched 1 link injection vulnerable javadocs
  [jar] Building jar: 
<https://builds.apache.org/job/POI/ws/build/dist/maven/poi-scratchpad/poi-scratchpad-3.15-beta3-javadoc.jar>
 [echo] Building poi-ooxml javadocs from 
<https://builds.apache.org/job/POI/ws/src/ooxml/java>
   [delete] Deleting directory 
<https://builds.apache.org/job/POI/ws/build/tmp/maven-javadocs>
[mkdir] Created dir: 
<https://builds.apache.org/job/POI/ws/build/tmp/maven-javadocs>
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] Patched 1 link injection vulnerable javadocs
  [jar] Building jar: 
<https://builds.apache.org/job/POI/ws/build/dist/maven/poi-ooxml/poi-ooxml-3.15-beta3-javadoc.jar>

assemble:
  [zip] Building zip: 
<https://builds.apache.org/job/POI/ws/build/dist/poi-bin-3.15-beta3-20160704.zip>
  [tar] Building tar: 
<https://builds.apache.org/job/POI/1419/artifact/build/dist/poi-bin-3.15-beta3-20160704.tar.gz>
  [zip] Building zip: 
<https://builds.apache.org/job/POI/ws/build/dist/poi-src-3.15-beta3-20160704.zip>
  [tar] Building tar: 
<https://builds.apache.org/job/POI/1419/artifact/build/dist/poi-src-3.15-beta3-20160704.tar.gz>
 [echo] Creating Maven POMs

maven-poms:
 [copy] Copying 6 files to 
<https://builds.apache.org/job/POI/ws/build/dist/maven>
 [echo] Maven POMs are located in 
<https://builds.apache.org/job/POI/ws/build/dist>
 [echo] Use ant dist-nexus to deploy the artifacts in the remote repository
 [echo] Distribution located in 
<https://builds.apache.org/job/POI/ws/build/dist>
 [echo] Use "ant dist-checksum" to create md5/sha1 checksums and GPG 
signatures

findbugs:
  [get] Getting: 
http://prdownloads.sourceforge.net/findbugs/findbugs-noUpdateChecks-2.0.3.zip?download
  [get] To: 
<https://builds.apache.org/job/POI/ws/lib/findbugs-noUpdateChecks-2.0.3.zip>
  [get] 
http://prdownloads.sourceforge.net/findbugs/findbugs-noUpdateChecks-2.0.3.zip?download
 permanently moved to 
http://downloads.sourceforge.net/project/findbugs/findbugs/2.0.3/findbugs-noUpdateChecks-2.0.3.zip?download=
  [get] 
http://downloads.sourceforge.net/project/findbugs/findbugs/2.0.3/findbugs-noUpdateChecks-2.0.3.zip?download=
 moved to 
http://jaist.dl.sourceforge.net/project/findbugs/findbugs/2.0.3/findbugs-noUpdateChecks-2.0.3.zip
[unzip] Expanding: 
<https://builds.apache.org/job/POI/ws/lib/findbugs-noUpdateChecks-2.0.3.zip> 
into <https://builds.apache.org/job/POI/ws/build/findbugs>
 [findbugs] Executing findbugs FindBugsTask from ant task
 [findbugs] Running FindBugs...
 [findbugs] Timeout: killed the sub-process
 [findbugs] Java Result: -1
 [xslt] Transforming into <https://builds.apache.org/job/POI/ws/build>
 [xslt] Processing 
<https://builds.apache.org/job/POI/ws/build/findbugs.xml> to 
<https://builds.apache.org/job/POI/1419/artifact/build/findbugs.html>
 [xslt] Loading stylesheet 
jar:<https://builds.apache.org/job/POI/ws/build/findbugs/lib/findbugs.jar!/fancy-hist.xsl>
 [xslt] : Error! Premature end of file.
 [xslt] : Error! 
com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Premature end of 
file.
 [xslt] Failed to process null

BUILD FAILED
<https://builds.apache.org/job/POI/ws/build.xml>:2132: 
javax.xml.transform.TransformerException: 
javax.xml.transform.TransformerException: 
com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Premature end of 
file.
at 
com.sun.org.apache.xalan.internal.xsltc.trax

[Bug 59791] Convert Cell Type to an enum

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59791

--- Comment #9 from Nick Burch  ---
You could try asking the Commons folks - they're the most likely to have gone
through something similar amongst the Apache Java communities!

-- 
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 59794] Download page incomplete/wrong verification instructions

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59794

Javen O'Neal  changed:

   What|Removed |Added

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

--- Comment #1 from Javen O'Neal  ---
Thanks. Fixed in r1751278.

-- 
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 59791] Convert Cell Type to an enum

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59791

--- Comment #8 from Javen O'Neal  ---
Should we add some kind of warning or decoration to methods that will change
their return value so that users can get a heads up before the signature
changes?
@deprecation implies the method is going away, but has warnings that integrate
well with IDEs and the project can be built to treat deprecation warnings

Searching for all public methods using CellType
setters:
$ grep -nr --exclude-dir=".svn" -P "public [^\(]+\([^\)]*CellType [^\)]+\)" src
getters:
$ grep -nr --exclude-dir=".svn" -P "public [^\(]*CellType [^[(]*\([^\)]*\)" src

With r1751273, I believe I have reverted all public constructors and methods to
be backwards compatible (at the binary level). There were some protected
methods or inner classes that seemed unlikely to be used in projects where
changing the return type would be a concern.

-- 
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



Jenkins build is back to normal : POI-OpenJDK #155

2016-07-04 Thread Apache Jenkins Server
See 


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



[Bug 59791] Convert Cell Type to an enum

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59791

--- Comment #7 from Javen O'Neal  ---
Similar changes to FormulaEvaluator interface for backwards compatibility in
r1751261 and r1751264.

interface FormulaEvaluator {
int evaluateFormulaCell(Cell);

@deprecated will be deleted when we make the CellType enum transition
@Internal
CellType evaluateFormulaCellEnum(Cell);
}

-- 
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 59793] "Rule M2.4 exception : this error should NEVER happen!" error message is still being triggered even with POI v3.14

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59793

--- Comment #3 from Lam  ---
Hi Andreas,

Thank you so much for your prompt reply. I have tried your method as per the
following: 

It seems working now, except for the part in the If condition. I have replace
the method you mentioned, and it's still giving me the RUle M2.4 exception. I
suspect that it could be the closing of the FileOutputstream.

I'll test on it first, and will write again if I face any issues or need your
advice.

Thanks again for all your help !

-- 
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 59791] Convert Cell Type to an enum

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59791

--- Comment #6 from Javen O'Neal  ---
(In reply to Javen O'Neal from comment #4)
> If the user-facing changes are as limited as I think they are, we could
> revert the few public-facing methods to have signatures that operate on
> ints, but use CellType anywhere internally.

Reverted Cell and EvaluationCell in r1751256.

This preserves binary backwards-compatibility with previous versions of POI.
Hopefully by having a few versions where the int getters and setters are
deprecated we can complete the transition before POI 4.0.

Currently the code looks like this:

interface Cell or EvaluationCell {
int getCellType();

@deprecated will be deleted when we make the CellType enum transition
@Internal
CellType getCellTypeEnum();

int getCachedFormulaResultType();

@deprecated will be deleted when we make the CellType enum transition
@Internal
CellType getCachedFormulaResultTypeEnum();

@deprecated
void setCellType(int);

void setCellType(CellType);
}

-- 
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 59794] New: Download page incomplete/wrong verification instructions

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59794

Bug ID: 59794
   Summary: Download page incomplete/wrong verification
instructions
   Product: POI
   Version: 3.15-dev
  Hardware: PC
OS: Mac OS X 10.1
Status: NEW
  Severity: normal
  Priority: P2
 Component: POI Overall
  Assignee: dev@poi.apache.org
  Reporter: s...@apache.org

Just noticed that the gpg verification instructions are incomplete.

gpg --verify poi-X.Y.Z.jar.asc
should be
gpg --verify poi-X.Y.Z.jar.asc poi-X.Y.Z.jar

This is because of an unfortunate design issue with gpg, see:

https://bz.apache.org/bugzilla/show_bug.cgi?id=57103#c1

It might be better to link to the instructions at

http://www.apache.org/info/verification.html

instead

-- 
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 59793] "Rule M2.4 exception : this error should NEVER happen!" error message is still being triggered even with POI v3.14

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59793

Andreas Beeker  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #2 from Andreas Beeker  ---
Can you try to close your FileOutputStream?

so instead of:
  workbook.write(new FileOutputStream("c:\\Test Data\\write.xlsx"));
  workbook.close();

do:
  FileOutputStream fos = new FileOutputStream("c:\\Test Data\\write.xlsx")
  workbook.write(fos);
  fos.close();
  workbook.close();

Of course this assumes, that your initial write.xlsx is valid ...

If this doesn't work, please attach the write.xlsx (if this is the failing 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 59793] "Rule M2.4 exception : this error should NEVER happen!" error message is still being triggered even with POI v3.14

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59793

Lam  changed:

   What|Removed |Added

 CC||lamchiomen...@gmail.com

--- Comment #1 from Lam  ---
Comment on attachment 34004
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34004
This file contains the codes of the two class I run that triggers the Rule M2.4
exception

The excel file was created, but it's corrupted and cannot be opened by Excel

-- 
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 59791] Convert Cell Type to an enum

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59791

Nick Burch  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #5 from Nick Burch  ---
You're not the standard of coder we need to worry about! ;-)

Can we do this in a way where we can use the enums internally in POI, allow
users who want to switch to use enums, but hold-off breaking changes for
everyone else until 4?

(My view is that we're likely to have a 3.x and a 4.x branch in parallel for
some time, as I can't see us being able to make the switch that quickly and we
don't want to stop all other development for many many months!)

-- 
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 59793] New: "Rule M2.4 exception : this error should NEVER happen!" error message is still being triggered even with POI v3.14

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59793

Bug ID: 59793
   Summary: "Rule M2.4 exception : this error should NEVER
happen!" error message is still being triggered even
with POI v3.14
   Product: POI
   Version: 3.14-FINAL
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: critical
  Priority: P2
 Component: POI Overall
  Assignee: dev@poi.apache.org
  Reporter: lamchiomen...@gmail.com

Created attachment 34004
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34004=edit
This file contains the codes of the two class I run that triggers the Rule M2.4
exception

The error message Rule M2.4 exception : this error should NEVER happen! is
still being triggered despite many duplicate reports. This time it's on POI
v3.14.

Kindly run the codes as per attached.

-- 
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 59791] Convert Cell Type to an enum

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59791

--- Comment #4 from Javen O'Neal  ---
(In reply to Nick Burch from comment #2)
> Can we do this in a way that won't break backwards-compatibility?

Most of the changes were internal to POI. The user-facing changes were mostly
limited to
[Cell|HSSFCell|XSSFCell|SXSSFCell|EvaluationCell].[constructor|getCellType|setCellType|getBaseCellType].
There's not much backwards-compatibility breakage as far as the API goes, it's
just likely that these changes will impact nearly every POI user because of
code that looks like:
switch(cell.getCellType()) {
case NUMERIC:
return cell.getNumericCellValue();
case STRING:
return cell.getStringCellValue();
...
}

I'm afraid that we're still a couple years away from seeing POI 4.0 and don't
think this change is worth putting off that long. I'm always cautious to use
literals in my code, and I would hope that most POI users who are interested in
writing forward-compatible code would use the constants we provide rather than
hard-coding literals.

If the user-facing changes are as limited as I think they are, we could revert
the few public-facing methods to have signatures that operate on ints, but use
CellType anywhere internally, then make the final change when we begin work on
POI 4.0.

Perhaps a discussion on the users/dev list would help us figure out whether
moving forward with int->CellTypes is preferred by the community.

-- 
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 59791] Convert Cell Type to an enum

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59791

--- Comment #3 from Javen O'Neal  ---
Replaced all references to Cell#CELL_TYPE_* with CellType.* in r1751240

-- 
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 59791] Convert Cell Type to an enum

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59791

--- Comment #2 from Nick Burch  ---
Can we do this in a way that won't break backwards-compatibility? The use of
those int constants is something that goes back to the very earliest days of
Apache POI, and will be used by a huge number of programs out there. They'll be
used for both getters and setters, and in some cases I've spotted (on the
mailing list and on stackoverflow, amongst others), people have actually
hard-coded the int values like 2 and 3 in their code! :/

If we break source compatibility on this, we risk lots of people not being able
to upgrade. If there's a source-breaking change, I'd suggest we wait for 4.0
when we're breaking CT stuff as well

-- 
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 59791] Convert Cell Type to an enum

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59791

--- Comment #1 from Javen O'Neal  ---
This is a pretty hefty change. It breaks binary compatibility as the
getCellType-like methods return o.a.p.ss.usermodel.CellType enum rather than
int, and I didn't want to bloat the classes with getCellTypeType()-like
methods.
Cell#setCellType(int) is one of the few methods that was able to maintain
backwards compatibility. Nonetheless, if users used Cell.CELL_TYPE_* constants
rather than literals, their code will likely work without modification.

It should be pretty straight-forward to replace all "Cell.CELL_TYPE_" strings
with "CellType." in the user's code.

Applied in r1751237.

-- 
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 59791] New: Convert Cell Type to an enum

2016-07-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59791

Bug ID: 59791
   Summary: Convert Cell Type to an enum
   Product: POI
   Version: 3.15-dev
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: SS Common
  Assignee: dev@poi.apache.org
  Reporter: one...@apache.org

Methods that require a cell type use Cell's CELL_TYPE_* integer constants.
Classes that use these constants are untyped, making it possible to have latent
failures for invalid constants or bloating the code with boilerplate value
checking.

Cell types should be stored in an enum for type safety and make method
signatures more meaningful.

-- 
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