[Bug 59733] shiftRows() causes org.apache.xmlbeans.impl.values.XmlValueDisconnectedException

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59733

Dattathreya  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

-- 
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: [Bug 58499] - ZipSecureFile throws zip bomb detected

2016-06-20 Thread Javen O'Neal
On Jun 20, 2016 2:41 PM, "Axel Howind"  wrote:
> How should I submit a patch?

Once there is consensus on how POI should handle this, open a new bug that
"depends on" bug 58499.


[Bug 58499] - ZipSecureFile throws zip bomb detected

2016-06-20 Thread Axel Howind

The main purpose of the zip bomb detection is to safely handle untrusted input.
Since a workbook that has already been fully read into memory has passed the
safety test, I suppose you could consider it quasi-safe with regard to writing
it back out.

If you can't think of a way that a latent zip bomb could unwrap itself while
writing the workbook that wasn't a result of poor (trusted) code, then I would
agree with removing this limit when writing.

Not being a security expert, the safer option is to set different read and
write limits.

Let's continue the discussion on the POI dev mailing...@poi.apache.org 
.



As I wrote in a comment to that bug, I had the same issue today. I looked at
the code, and what happens is that data is written to a temporary file. When
SXSSFWorkbook.write() is called, the header is written, and then the data
from the temporary file is read back in and appended.

This is done in the private method SXSSFWorkbook.injectData().

If we can trust that the temporary data has not been tampered with (and in
which case there'd be a much worse problem), I think we can drop the
heuristic for zip bomb detection when reading the data back in.

If we just replace the first line in injectData():

ZipFile zip = ZipHelper.openZipFile(zipfile);

by

ZipFile zip = new ZipFile(zipfile);

that should do it.

(ZipHelper also checks that zipfile exists, but if it doesn't that leads to
NPE afterwards eich IMHO is not better than IOException in that case.)

I could create a patch for this, but I'd like to discuss this first.

So what are the other devs opinions about this?

PS: Since this bug is marked RESOLVED FIXED, how should I submit a
patch? Reopen the bug and attach the patch or just mail the patch
to this list?



[Bug 59734] Named range creation & lookup are linear in the number of ranges

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59734

--- Comment #1 from Javen O'Neal  ---
Are you planning on writing a CaseInsensitiveMap or importing
https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/CaseInsensitiveMap.html

I guess you would also need a (scope (global or sheet), named range name) tuple
class as your key, so you could hide the canonical case code there.

-- 
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 59736] Incorrect evaluation of SUBTOTAL with composite interval

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59736

Luca Martini  changed:

   What|Removed |Added

   Severity|normal  |major
 OS||All

-- 
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 59736] New: Incorrect evaluation of SUBTOTAL with composite interval

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59736

Bug ID: 59736
   Summary: Incorrect evaluation of SUBTOTAL with composite
interval
   Product: POI
   Version: 3.13-FINAL
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: SS Common
  Assignee: dev@poi.apache.org
  Reporter: lucamart...@tagetik.com

Created attachment 33968
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33968=edit
sample workbook

The SUBTOTAL function is not ignoring nested subtotals when the second argument
is specified as disjoint interval with the semicolon.

Sample case:
Cell | Contents
A1   | 1
A2   | =SUBTOTAL(9;A1)
A3   | =SUBTOTAL(9;A1;A2)


A3 should evaluate to 1, instead the result is 2. If the formula in cell A3 is
written as =SUBTOTAL(9;A1:A2) the evaluation is correct (1).
I attach a simple workbook that reproduces the case.

Best regards,
Luca

-- 
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 59733] shiftRows() causes org.apache.xmlbeans.impl.values.XmlValueDisconnectedException

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59733

--- Comment #6 from Dattathreya  ---
Is there any temporary workarounds available for this problem?

-- 
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 59734] New: Named range creation & lookup are linear in the number of ranges

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59734

Bug ID: 59734
   Summary: Named range creation & lookup are linear in the number
of ranges
   Product: POI
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: XSSF
  Assignee: dev@poi.apache.org
  Reporter: dtn-asfb...@corefiling.co.uk

XSSFName.setNameName and XSSFWorkbook.getName both involve a linear iteration
through all names already in the workbook. This is a major performance
bottleneck for an application creating lots of named ranges.

I'll shortly attach a suggested patch which does the obvious thing and adds a
map to do fast lookup.

I'll also propose deprecating the methods on Workbook which operate in an
index-based manner and replacing them with ones based on names.

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

2016-06-20 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 59733] shiftRows() causes org.apache.xmlbeans.impl.values.XmlValueDisconnectedException

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59733

--- Comment #5 from Javen O'Neal  ---
(In reply to Dattathreya from comment #4)
> Will it be fixed in 3.15?
It depends on if someone contributes a patch that fixes the bug. Those who are
not affected by the bug are less likely to spend time fixing the 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 56781] XSSFName.validateName(String) Only Checks for the First Character's Validity and Presence of Spaces

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=56781

--- Comment #4 from Javen O'Neal  ---
Reverted back to using Character.isLetter in r1749305 because Regular
Expressions \p{IsAlphabetic} metaclass is not supported in Java 6.

-- 
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 59733] shiftRows() causes org.apache.xmlbeans.impl.values.XmlValueDisconnectedException

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59733

--- Comment #4 from Dattathreya  ---
Will it be fixed in 3.15?

-- 
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: 3.15 beta 2 soon?

2016-06-20 Thread Dominik Stadler
Ok,

No problem, the regression testing is running fairly stable now and most of
the steps are automated already, so I mostly just need to push the button
and wait one or two days... :)

Javen, I will change the exception that you introduced on the
version-switch in FileInformationBlock to a POILogger-output as it seems
that there are quite a number of documents out there which use unknown
version-ids but work fine nevertheless.

Dominik.

On Mon, Jun 20, 2016 at 1:00 AM, Andreas Beeker 
wrote:

> On 19.06.2016 10:35, Dominik Stadler wrote:
> > here my results from the regression-tests for 3.15-beta2, I see two newly
> > introduced issues that we should take a look at.
>
> I've fixed the mentioned PPT issue already via #59702, but that commit was
> after you've started
> the integration test. As this change affects quite a few methods, please
> run another test
> for me ... maybe limit it to the PPT/X files.
>
> Apart of that I've fixed another two issues just by now via r1749224.
>
> Andi
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
> For additional commands, e-mail: dev-h...@poi.apache.org
>
>


[Bug 59733] shiftRows() causes org.apache.xmlbeans.impl.values.XmlValueDisconnectedException

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59733

--- Comment #3 from Javen O'Neal  ---
I simplified this to creating empty rows, and the exception was still thrown by
the second shiftRows call. r1749300.
This isolates the problem to the CTRows causing the disconnected XML value.

Workbook workbook = new XSSFWorkbook();
Sheet sheet = workbook.createSheet();
for (int r=0; r<=4; r++) {
sheet.createRow(r);
}

// Shift the 2nd row on top of the 0th row
sheet.shiftRows(2, 2, -2);
sheet.shiftRows(3, 3, -3);

-- 
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 59733] shiftRows() causes org.apache.xmlbeans.impl.values.XmlValueDisconnectedException

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59733

--- Comment #2 from Dominik Stadler  ---
Probably a duplicate of bug 58221

-- 
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 59733] shiftRows() causes org.apache.xmlbeans.impl.values.XmlValueDisconnectedException

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59733

Javen O'Neal  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Javen O'Neal  ---
Verified this affects the current trunk (pre-3.15-beta2). Added a disabled unit
test in r1749295.

XmlValueDisconnectedExceptions occur because the links between nodes in the DOM
(XML tree) are broken. This can happen when a node is freed by one node but
still weakly linked to by another node. This only causes problems when the
second node tries to traverse the broken link.

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

2016-06-20 Thread Apache Jenkins Server
See 

Changes:

[onealj] remove commented out @Ignore

[onealj] bug 56781: disallow names with symbols, except underscore, period, and 
backslash

[onealj] add comments, adjust whitespace

--
[...truncated 3813 lines...]
 [java] at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
 [java] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
 [java] at 
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
 [java] at 
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
 [java] at 
org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
 [java] at 
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
 [java] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
 [java] at org.junit.runners.Suite.runChild(Suite.java:128)
 [java] at org.junit.runners.Suite.runChild(Suite.java:27)
 [java] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
 [java] at 
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
 [java] at 
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
 [java] at 
org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
 [java] at 
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
 [java] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
 [java] at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
 [java] at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
 [java] at org.junit.runner.JUnitCore.run(JUnitCore.java:105)
 [java] at org.junit.runner.JUnitCore.run(JUnitCore.java:94)
 [java] at org.apache.poi.util.OOXMLLite.build(OOXMLLite.java:129)
 [java] at org.apache.poi.util.OOXMLLite.main(OOXMLLite.java:88)
 [java] 96) 
testListOfCustomProperties(org.apache.poi.openxml4j.opc.TestPackageCoreProperties)
 [java] java.lang.NoClassDefFoundError: Could not initialize class 
org.apache.poi.xssf.usermodel.XSSFName
 [java] at 
org.apache.poi.xssf.usermodel.XSSFWorkbook.reprocessNamedRanges(XSSFWorkbook.java:1664)
 [java] at 
org.apache.poi.xssf.usermodel.XSSFWorkbook.onDocumentRead(XSSFWorkbook.java:401)
 [java] at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:189)
 [java] at 
org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:250)
 [java] at 
org.apache.poi.openxml4j.opc.TestPackageCoreProperties.testListOfCustomProperties(TestPackageCoreProperties.java:262)
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 [java] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 [java] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 [java] at java.lang.reflect.Method.invoke(Method.java:597)
 [java] at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
 [java] at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
 [java] at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
 [java] at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
 [java] at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
 [java] at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
 [java] at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
 [java] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
 [java] at 
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
 [java] at 
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
 [java] at 
org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
 [java] at 
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
 [java] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
 [java] at org.junit.runners.Suite.runChild(Suite.java:128)
 [java] at org.junit.runners.Suite.runChild(Suite.java:27)
 [java] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
 [java] at 
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
 [java] at 
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
 [java] at 
org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
 [java] at 
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
 [java] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
 [java] at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
 [java] at 

[Bug 56781] XSSFName.validateName(String) Only Checks for the First Character's Validity and Presence of Spaces

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=56781

Javen O'Neal  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #3 from Javen O'Neal  ---
That Excel help forum may not be reputable (for example, unicode characters are
allowed, allowing backslash as the first character but not subsequent
characters raises flags).

Better would be documentation from Microsoft on allowed names in Excel 97-2003
and 2007+. This would need to be verified using Excel (preferably these files
could be used for POI unit tests).

I made up a regular expression that validates the entire string in r1749293.
This regular expression will likely need tweaking to match Excel's rules.

-- 
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 58499] ZipSecureFile throws zip bomb detected

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58499

--- Comment #6 from Javen O'Neal  ---
The main purpose of the zip bomb detection is to safely handle untrusted input.
Since a workbook that has already been fully read into memory has passed the
safety test, I suppose you could consider it quasi-safe with regard to writing
it back out.

If you can't think of a way that a latent zip bomb could unwrap itself while
writing the workbook that wasn't a result of poor (trusted) code, then I would
agree with removing this limit when writing.

Not being a security expert, the safer option is to set different read and
write limits.

Let's continue the discussion on the POI dev mailing dev@poi.apache.org.

-- 
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 58499] ZipSecureFile throws zip bomb detected

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58499

--- Comment #5 from Axel Howind  ---
I think the check should only be done when reading a workbook but never when
writing. Since in the example code no workbook is read, the problem seems to be
that the streaming API writes to a temp file and reads that back in again.

I just got hot by this problem, and the suggested fix to adjust the limit by
calling ZipSecureFile.setMinInflateRation() does not seem appropriate since it
is a global setting and thus would make applications that both read and write
workbooks less secure.

I have not checked the POI code yet, but I'd suggest better not using
ZipSecureFile when *writing* workbooks (or in this case: reading back the
temporary files created when writing an instance of SXSSFWorkbook).

Would such a patch be accepted?

-- 
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 55214] Formula name length limit when setting an external API formula in a cell

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=55214

Javen O'Neal  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

-- 
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 54751] Add levels to groupRow

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=54751

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 45557] poi-3.5-beta1-20080718.jar - The name of a document (docx, xlsx, or pptx) linked to a 2007 docx document is not extracted.

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=45557

Javen O'Neal  changed:

   What|Removed |Added

  Attachment #22380|0   |1
is obsolete||

--- Comment #2 from Javen O'Neal  ---
Created attachment 33967
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33967=edit
junit test case

POI text extraction does not identify the name of linked documents via
POITextExtractor.getText() as of POI 3.15 beta 2.

A similarly named test, "ExtractorFactory.getEmbeddedDocsTextExtractors", is
currently not implemented.

-- 
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 59732] File Excel Created From Apache POI Can't Open by Ms Excel (file corrupt)

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59732

--- Comment #4 from Stefano Toma  ---
So what you're saying is that if you start with a non-corrupt workbook and run
it through the following code, you get a corrupt (according to Excel) workbook?
Yes

Does this happen using other workbooks?
With other workbooks it works

What version of POI are you using?
3.10 Final and 3.14

Does Excel 2010 give any more detail on the error?
No

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

2016-06-20 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 45564] poi-3.5-beta1-20080718.jar - The name of a document (docx, xlsx, or pptx) linked to a 2007 xlsx document is not extracted.

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=45564

Javen O'Neal  changed:

   What|Removed |Added

 Resolution|INVALID |DUPLICATE

--- Comment #2 from Javen O'Neal  ---


*** This bug has been marked as a duplicate of bug 45557 ***

-- 
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 45557] poi-3.5-beta1-20080718.jar - The name of a document (docx, xlsx, or pptx) linked to a 2007 docx document is not extracted.

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=45557

--- Comment #1 from Javen O'Neal  ---
*** Bug 45564 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 45564] poi-3.5-beta1-20080718.jar - The name of a document (docx, xlsx, or pptx) linked to a 2007 xlsx document is not extracted.

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=45564

Javen O'Neal  changed:

   What|Removed |Added

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

--- Comment #1 from Javen O'Neal  ---
There isn't enough information in this bug to figure out what's wrong. Closing
this 8 year old 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 59732] File Excel Created From Apache POI Can't Open by Ms Excel (file corrupt)

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59732

--- Comment #3 from Javen O'Neal  ---
So what you're saying is that if you start with a non-corrupt workbook and run
it through the following code, you get a corrupt (according to Excel) workbook?

> @Test
> public void test59732() {
> File f = new File("in.xls");
> Workbook wb = WorkbookFactory.create(f);
> OutputStream fos = new FileOutputStream("out.xls");
> wb.write(fos);
> fos.close();
> wb.close();
> }

Does this happen using other workbooks?
What version of POI are you using?
Does Excel 2010 give any more detail on the 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 57929] Why HSSFWorkbook.removePrintArea(index) invalid?

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57929

Javen O'Neal  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Javen O'Neal  ---
Thanks for the simple test case. I added this to our test suite in r

I have verified the behavior your observed using an HSSFWorkbook. This problem
does not occur on XSSFWorkbooks or SXSSFWorkbooks.

If this bug is still relevant to you, you could try to dive through the code in
HSSFWorkbook/InternalWorkbook to figure out what's going on. It is possible
that the Excel 97-2003 format doesn't allow null print areas, instead using
some default print area.

Here's what I tried:

HSSFWorkbook:
>  public void removePrintArea(int sheetIndex) {
>+ // Clear out the formula tokens (equivalent to making this reference 
>null)
>+ NameRecord name = 
>workbook.getSpecificBuiltinRecord(NameRecord.BUILTIN_PRINT_AREA, sheetIndex+1);
>+ name.setNameDefinition(new Ptg[] {});
>+ 
>  getWorkbook().removeBuiltinRecord(NameRecord.BUILTIN_PRINT_AREA, 
> sheetIndex+1);
>  }
got:
> ptgs must not be null
> java.lang.IllegalArgumentException: ptgs must not be null
>   at 
> org.apache.poi.ss.formula.FormulaRenderer.toFormulaString(FormulaRenderer.java:48)
>   at 
> org.apache.poi.hssf.model.HSSFFormulaParser.toFormulaString(HSSFFormulaParser.java:81)
>   at 
> org.apache.poi.hssf.usermodel.HSSFWorkbook.getPrintArea(HSSFWorkbook.java:1547)
>   at 
> org.apache.poi.ss.usermodel.BaseTestBugzillaIssues.test57929(BaseTestBugzillaIssues.java:1605)

HSSFWorkbook:
> ...
>+ name.setNameDefinition(HSSFFormulaParser.parse("", this, 
>FormulaType.NAMEDRANGE, sheetIndex));
> ...
got:
> Parse error near char 0 '' in specified formula ''. Expected cell ref or 
> constant literal
> org.apache.poi.ss.formula.FormulaParseException: Parse error near char 0 '' 
> in specified formula ''. Expected cell ref or constant literal

HSSFWorkbook:
> ...
>+ 
>name.setNameDefinition(HSSFFormulaParser.parse("'"+getSheetName(0)+"'!$A$1:$A$1",
> this, FormulaType.NAMEDRANGE, sheetIndex));
> ...
got:
> Sheet0 after write expected null, but was:
> junit.framework.AssertionFailedError: Sheet0 after write expected null, but 
> was:
>   at 
> org.apache.poi.ss.usermodel.BaseTestBugzillaIssues.test57929(BaseTestBugzillaIssues.java:1605

HSSFWorkbook
> ...
>+ name.setNameDefinition(new Ptg[] { new Area3DPtg(-1, -1, -1, -1, false, 
>false, false, false, sheetIndex) });
> ...
got:
> Sheet0 after write expected null, but was:
> junit.framework.AssertionFailedError: Sheet0 after write expected null, but 
> was:

To fix this, someone needs to figure out how Excel stores records in the binary
format to indicate no print area has been set, if it falls back to something
like A1:lastCol/lastRow), or picks a print area based on the current page size
and the width of the columns/height of the rows.

-- 
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 59732] File Excel Created From Apache POI Can't Open by Ms Excel (file corrupt)

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59732

--- Comment #2 from Stefano Toma  ---
I've tried all the solutions , but without success. to open the file I used ms
excel 2010.
The error message is:
Excel found unreadable content

-- 
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 59732] File Excel Created From Apache POI Can't Open by Ms Excel (file corrupt)

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59732

Javen O'Neal  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Javen O'Neal  ---
LibreOffice can read
schemi_di_bilancio_armonizzato_2015_ens_art_1_delibera_12_2016_sezaut_inpr.xls
and doesn't report any errors.

Does Excel give you any meaningful errors?

Also, could you try the following:

1. Without modifying the cells
> String nomeFileArt1 = "in.xls";
> NPOIFSFileSystem fs = new NPOIFSFileSystem(new 
> File(System.getProperty("java.io.tmpdir") + nomeFileArt1));
> HSSFWorkbook wb = new HSSFWorkbook(fs.getRoot(), true);
> FileOutputStream stream = new 
> FileOutputStream(System.getProperty("java.io.tmpdir") + "out.xls");
> wb.write(stream);
> stream.close();

2. Opening the workbook with preserveNodes=false (both with and without
modifying the file)
> ...
> HSSFWorkbook wb = new HSSFWorkbook(fs.getRoot(), true);
> ...

3. Opening the workbook through more common methods
> WorkbookFactory.create(new File("in.xls"));
or
> WorkbookFactory.create(new FileInputStream("in.xls"));

-- 
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 59732] New: File Excel Created From Apache POI Can't Open by Ms Excel (file corrupt)

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=59732

Bug ID: 59732
   Summary: File Excel Created From Apache POI Can't Open by Ms
Excel (file corrupt)
   Product: POI
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: critical
  Priority: P2
 Component: HSSF
  Assignee: dev@poi.apache.org
  Reporter: stefan...@gmail.com

I don't know why the file I write using POI cant be opened by Ms Excel , but
the file is still readable by POI. (cell value can be changed) 

Link file:
http://www.corteconti.it/export/sites/portalecdc/_documenti/controllo/sez_autonomie/2016/schemi_di_bilancio_armonizzato_2015_ens_art_1_delibera_12_2016_sezaut_inpr.xls

here is the code

String nomeFileArt1 =
"schemi_di_bilancio_armonizzato_2015_ens_art_1_delibera_12_2016_sezaut_inpr.xls";
NPOIFSFileSystem fs = new NPOIFSFileSystem(new
File(System.getProperty("java.io.tmpdir") + nomeFileArt1));
HSSFWorkbook wb = new HSSFWorkbook(fs.getRoot(), true);

FileOutputStream stream = new
FileOutputStream(System.getProperty("java.io.tmpdir") +
"schemi_di_bilancio_armonizzato.xls");
HSSFSheet sheet = wb.getSheet("Dati_Anagrafici");
HSSFRow sheetrow = sheet.getRow(10);
if (sheetrow == null) {
sheetrow = sheet.createRow(10);
}
HSSFCell cell = sheetrow.getCell(0);
if (cell == null) {
cell = sheetrow.createCell(0);
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
}
cell.setCellValue("test");
wb.write(stream);
stream.close();

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

2016-06-20 Thread Apache Jenkins Server
See 

Changes:

[onealj] bug 57523: add unit test written by Dominik Stadler

[onealj] fix bug number typo for bug 59719

[onealj] bug 59719: add unit test and comments/javadocs from Greg Woolsey for 
XSSFDataVAlidationConstraint

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on ubuntu-2 (docker Ubuntu ubuntu yahoo-not-h2) in workspace 

Updating http://svn.apache.org/repos/asf/poi/trunk at revision 
'2016-06-20T06:34:18.550 +'
AUtest-data/spreadsheet/57523.xlsx
U 
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDataValidationConstraint.java
U 
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataValidationConstraint.java
U src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
Fetching 'https://svn.apache.org/repos/asf/poi/site/forrest.properties' at -1 
into '
At revision 1749268

Fetching 'https://svn.apache.org/repos/asf/poi/site/src/documentation' at -1 
into '
U src/documentation/content/xdocs/status.xml
At revision 1749268

At revision 1749268

WARNING: clock of the subversion server appears to be out of sync. This can 
result in inconsistent check out behavior.
No changes for http://svn.apache.org/repos/asf/poi/site/forrest.properties 
since the previous build
[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] $ /bin/bash -xe /tmp/hudson2499438294606135059.sh
+ svn status
X   forrest.properties
X   src/documentation

Performing status on external item at 'src/documentation':
+ exit 0
[POI] $ /home/jenkins/tools/ant/latest/bin/ant -Dcoverage.enabled=true clean 
jenkins
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_45/1.6.0_45-b06/20.45-b01/Java HotSpot(TM) 64-Bit 
Server VM from Sun Microsystems Inc. on Linux: 3.13.0-36-lowlatency

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

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

 uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] Compiling 527 source files to 

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

 uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
 

[Bug 57523] Some cells reporting as blank when they aren't

2016-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57523

Javen O'Neal  changed:

   What|Removed |Added

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

--- Comment #5 from Javen O'Neal  ---
Moving back to WORKSFORME. See Dominik's unit test in r1749267.

Please reopen if you provide a simplified test-case that could allow us to
reproduce a problem. The while loop and two rowIterator consumers are likely to
cause an indexing problem. You should try rewriting your code using the
for-each row iterator "for (Row row : sheet) { }" for simpler code.

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