"Could not resolve external workbook name" after setupReferencedWorkbooks

2018-09-26 Thread wimgoeman
Hello,

I need to evaluate all the formulas in a workbook which has references to other 
workbooks. Based on my findings I found that I had to use 
FormulaEvaluator#setupReferencedWorkbooks in order to link all the workbooks, 
but that did not work, and still resulted in a RuntimeException saying "Could 
not resolve external workbook name 'file.xlsx'. Workbook environment has not 
been set up."

I managed to work around the problem through some hacks with reflection. 

BaseFormulaEvaluator seems to use static members of 
CollaboratingWorkbooksEnvironment, which creates instances of 
CollaboratingWorkbooksEnvironment. However, these instances seem to be 
constructed but not used (see CollaboratingWorkbooksEnvironment.java:75 -- [new 
CollaboratingWorkbooksEnvironment(evaluatorsByName, evaluators);])

I copied the contents of those methods to create a 
CollaboratingWorkbooksEnvironment, and forced it into the 
_collaboratingWorkbookEnvironment field of my WorkbookEvaluator instance. This 
solved my problem entirely.

Since this solved my issue I suspect this is a bug, so decided to share it here 
in the hopes it may get fixed in the official repository.

Best regards,
Wim 

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



Re: xmlbeans 3.0.2 release?

2018-09-26 Thread Javen O'Neal
+1

On Wed, Sep 26, 2018, 14:53 pj.fanning  wrote:

> Should we do an XMLBeans 3.0.2 release?
>
>
> https://issues.apache.org/jira/browse/XMLBEANS-520?jql=project%20%3D%20XMLBEANS%20AND%20fixVersion%20%3D%20%22Version%203.0.2%22
>
>
>
> --
> Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
> For additional commands, e-mail: dev-h...@poi.apache.org
>
>


xmlbeans 3.0.2 release?

2018-09-26 Thread pj.fanning
Should we do an XMLBeans 3.0.2 release?

https://issues.apache.org/jira/browse/XMLBEANS-520?jql=project%20%3D%20XMLBEANS%20AND%20fixVersion%20%3D%20%22Version%203.0.2%22



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html

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



[Bug 62736] [PATCH] Relations on XSLFPictureShape are removed unconditionally

2018-09-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62736

PJ Fanning  changed:

   What|Removed |Added

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

--- Comment #5 from PJ Fanning  ---
https://svn.apache.org/viewvc?view=revision&revision=1842055

-- 
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 54470] [PATCH] Solution to support Graph in XSSFWorkbook.cloneSheet method

2018-09-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=54470

PJ Fanning  changed:

   What|Removed |Added

 Blocks||60509


Referenced Bugs:

https://bz.apache.org/bugzilla/show_bug.cgi?id=60509
[Bug 60509] XSSFWorkbook.setSheetName() does not update references in charts
-- 
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 60509] XSSFWorkbook.setSheetName() does not update references in charts

2018-09-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60509

PJ Fanning  changed:

   What|Removed |Added

 Depends on||54470


Referenced Bugs:

https://bz.apache.org/bugzilla/show_bug.cgi?id=54470
[Bug 54470] [PATCH] Solution to support Graph in XSSFWorkbook.cloneSheet method
-- 
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 60509] XSSFWorkbook.setSheetName() does not update references in charts

2018-09-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60509

--- Comment #2 from Alain Fagot Bearez  ---
I found valuable code in #54470 that can be applied to fix this issue.

I am working on it.

-- 
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 62763] New: HWPFDocument(POIFSFileSystem pfilesystem) Constructor exception

2018-09-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62763

Bug ID: 62763
   Summary: HWPFDocument(POIFSFileSystem pfilesystem)  Constructor
exception
   Product: POI
   Version: 4.0.0-FINAL
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: HWPF
  Assignee: dev@poi.apache.org
  Reporter: 986619...@qq.com
  Target Milestone: ---

my code:
content = "";
ByteArrayInputStream byteArrayInputStream = new
ByteArrayInputStream(content.getBytes());
String realPathFile = DIR_IN + "empty.doc";
POIFSFileSystem poifsFileSystem = new POIFSFileSystem(new
FileInputStream(realPathFile));
poifsFileSystem.createOrUpdateDocument(byteArrayInputStream,
"WordDocument");
HWPFDocument hwpfDocument = new HWPFDocument(poifsFileSystem);
hwpfDocument.write(new FileOutputStream(DIR_OUT + outFileName));
hwpfDocument.close();
poifsFileSystem.close();
byteArrayInputStream.close();
console exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 11
at org.apache.poi.util.LittleEndian.getShort(LittleEndian.java:253)
at
org.apache.poi.hwpf.model.types.FibBaseAbstractType.fillFields(FibBaseAbstractType.java:95)
at org.apache.poi.hwpf.model.FibBase.(FibBase.java:43)
at
org.apache.poi.hwpf.HWPFDocumentCore.getEncryptionInfo(HWPFDocumentCore.java:255)
at
org.apache.poi.hwpf.HWPFDocumentCore.getDocumentEntryBytes(HWPFDocumentCore.java:327)
at
org.apache.poi.hwpf.HWPFDocumentCore.(HWPFDocumentCore.java:169)
at org.apache.poi.hwpf.HWPFDocument.(HWPFDocument.java:193)
at org.apache.poi.hwpf.HWPFDocument.(HWPFDocument.java:177)
at com.snoopy.poi.HTML2doc.main(HTML2doc.java:55)

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



Release Announcement: General Availability of JDK 11

2018-09-26 Thread Rory O'Donnell

Hi Dominik,

*1) Release Announcement: General Availability of JDK 11 *

 * JDK 11, the reference implementation of Java 11 and the first
   long-term support release produced under the six-month rapid-cadence
   release model [1][2], is now Generally Available.
 * GPL-licensed OpenJDK builds from Oracle are available here:
   https://jdk.java.net/11

This release includes seventeen features:

 * 181: Nest-Based Access Control 
 * 309: Dynamic Class-File Constants 
 * 315: Improve Aarch64 Intrinsics 
 * 318: Epsilon: A No-Op Garbage Collector
   
 * 320: Remove the Java EE and CORBA Modules
   
 * 321: HTTP Client (Standard) 
 * 323: Local-Variable Syntax for Lambda Parameters
   
 * 324: Key Agreement with Curve25519 and Curve448
   
 * 327: Unicode 10 
 * 328: Flight Recorder 
 * 329: ChaCha20 and Poly1305 Cryptographic Algorithms
   
 * 330: Launch Single-File Source-Code Programs
   
 * 331: Low-Overhead Heap Profiling 
 * 332: Transport Layer Security (TLS) 1.3
   
 * 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
   
 * 335: Deprecate the Nashorn JavaScript Engine
   
 * 336: Deprecate the Pack200 Tools and API
   


2) Quality Outreach Report for September 2018 is available*
*

 * Quality Outreach report September 2018

*Thanks to everyone who contributed to JDK 11 by downloading and testing 
the early-access builds.
In particular the following developers who logged **18 issues in the JDK 
Bug System.*


 * Netty
 * Eclipse Jetty
 * Apache Lucene
 * JUnit5
 * Apache Tomcat
 * Apache Ant
 * Apache POI
 * AssertJ
 * Eclipse Collections
 * Byte Buddy
 * RxJava

3) JDK 12 EA build 12, under both the GPL and Oracle EA licenses, are 
now available at http://jdk.java.net/11 .


 * Schedule , Status & Features
 o http://openjdk.java.net/projects/jdk/12/
 * Release Notes:
 o http://jdk.java.net/12/release-notes

**

Rgds,Rory

--
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA, Dublin,Ireland