File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
gxoffice/src/main/java/com/genexus/gxoffice/poi Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ public short Open(String fileName)
5050 }
5151 else
5252 {
53- GXFile file = new GXFile (fileName );
53+ boolean isAbsolute = new java .io .File (fileName ).isAbsolute ();
54+ GXFile file = new GXFile (fileName , Constants .EXTERNAL_UPLOAD_ACL , isAbsolute );
5455 if (file .exists ()) {
5556 //System.out.println("Opening..");
5657 POIFSFileSystem poifs = new POIFSFileSystem (file .getStream ());
@@ -90,7 +91,8 @@ public short Save()
9091 workBook .write (fs );
9192 ByteArrayInputStream in = new ByteArrayInputStream (fs .toByteArray ());
9293 fs .close ();
93- GXFile file = new GXFile (xlsFileName , Constants .EXTERNAL_UPLOAD_ACL );
94+ boolean isAbsolute = new java .io .File (xlsFileName ).isAbsolute ();
95+ GXFile file = new GXFile (xlsFileName , Constants .EXTERNAL_UPLOAD_ACL , isAbsolute );
9496 file .create (in , true );
9597 }
9698 catch (Exception e )
Original file line number Diff line number Diff line change 33import org .apache .poi .xssf .streaming .SXSSFWorkbook ;
44import org .apache .poi .xssf .usermodel .XSSFWorkbook ;
55
6+ import com .genexus .gxoffice .Constants ;
67import com .genexus .gxoffice .IExcelCells ;
78import com .genexus .gxoffice .IGxError ;
89import com .genexus .gxoffice .poi .xssf .StylesCache ;
@@ -27,7 +28,8 @@ public short Open(String fileName) {
2728 return errCod ;
2829 }
2930 } else {
30- GXFile file = new GXFile (fileName );
31+ boolean isAbsolute = new java .io .File (fileName ).isAbsolute ();
32+ GXFile file = new GXFile (fileName , Constants .EXTERNAL_UPLOAD_ACL , isAbsolute );
3133 if (file .exists ()) {
3234 // System.out.println("Opening..");
3335 workBook = new SXSSFWorkbook (new XSSFWorkbook (file .getStream ()));
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ public short Open(String fileName) {
3636 return errCod ;
3737 }
3838 } else {
39- GXFile file = new GXFile (fileName , Constants .EXTERNAL_UPLOAD_ACL );
39+ boolean isAbsolute = new java .io .File (fileName ).isAbsolute ();
40+ GXFile file = new GXFile (fileName , Constants .EXTERNAL_UPLOAD_ACL , isAbsolute );
4041 if (file .exists ()) {
4142 // System.out.println("Opening..");
4243 workBook = new XSSFWorkbook (file .getStream ());
@@ -74,7 +75,8 @@ public short Save() {
7475 workBook .write (fs );
7576 ByteArrayInputStream in = new ByteArrayInputStream (fs .toByteArray ());
7677 fs .close ();
77- GXFile file = new GXFile (xlsFileName , Constants .EXTERNAL_UPLOAD_ACL );
78+ boolean isAbsolute = new java .io .File (xlsFileName ).isAbsolute ();
79+ GXFile file = new GXFile (xlsFileName , Constants .EXTERNAL_UPLOAD_ACL , isAbsolute );
7880 file .create (in , true );
7981 saved = true ;
8082 } catch (Exception e ) {
You can’t perform that action at this time.
0 commit comments