Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cfsimplicity committed Nov 21, 2019
2 parents 29e35ab + 8ec802a commit cf61a9d
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.5.0 - 21 November 2019

- \#170 Upgrade POI to 4.1.1
- \#169 Improve handling of clearly non-date values which Lucee will parse as dates far in the future

## 2.4.0 - 11 August 2019

- \#168 Allow the active sheet's "fit to page" print options to be controlled
Expand Down
2 changes: 1 addition & 1 deletion ModuleConfig.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ component{
this.author = "Julian Halliwell";
this.webURL = "https://github.com/cfsimplicity/lucee-spreadsheet";
this.description = "Spreadsheet Library for Lucee";
this.version = "2.4.0";
this.version = "2.5.0";
this.autoMapModels = false;

function configure(){
Expand Down
7 changes: 4 additions & 3 deletions Spreadsheet.cfc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
component{

variables.version = "2.4.0";
variables.version = "2.5.0";
variables.javaLoaderName = "spreadsheetLibraryClassLoader-#variables.version#-#Hash( GetCurrentTemplatePath() )#";
variables.javaLoaderDotPath = "javaLoader.JavaLoader";
variables.dateFormats = {
Expand Down Expand Up @@ -3041,8 +3041,8 @@ component{
private boolean function _isDate( required value ){
if( !IsDate( arguments.value ) )
return false;
// Lucee will treat 01-23112 as a date!
if( REFind( "\d\d[[:punct:]]\d{5,}", arguments.value ) ) // NB: member function doesn't work on dates in Lucee
// Lucee will treat 01-23112 or 23112-01 as a date!
if( ParseDateTime( arguments.value ).Year() > 9999 ) //ACF future limit
return false;
return true;
}
Expand Down Expand Up @@ -3090,6 +3090,7 @@ component{
tempColumnNames[ i ] = "column#i#";
var q = QueryNew( tempColumnNames.ToList(), arguments.columnTypeList, arguments.data );
// restore the real names without ACF barfing on them
// 20191121: Note ACF2018 HotFix 5 introduced a bug with setColumnNames(): https://tracker.adobe.com/#/view/CF-4205435
q.setColumnNames( arguments.columnNames );
return q;
}
Expand Down
2 changes: 1 addition & 1 deletion box.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name" : "LuceeSpreadsheet",
"slug" : "lucee-spreadsheet",
"version" : "2.4.0",
"version" : "2.5.0",
"shortDescription" : "Spreadsheet Library for Lucee",
"author" : "Julian Halliwell",
"location" : "https://github.com/cfsimplicity/lucee-spreadsheet",
Expand Down
Binary file removed lib/commons-codec-1.12.jar
Binary file not shown.
Binary file added lib/commons-codec-1.13.jar
Binary file not shown.
Binary file removed lib/commons-collections4-4.3.jar
Binary file not shown.
Binary file added lib/commons-collections4-4.4.jar
Binary file not shown.
Binary file removed lib/commons-compress-1.18.jar
Binary file not shown.
Binary file added lib/commons-compress-1.19.jar
Binary file not shown.
Binary file renamed lib/poi-4.1.0.jar → lib/poi-4.1.1.jar
Binary file not shown.
Binary file renamed lib/poi-ooxml-4.1.0.jar → lib/poi-ooxml-4.1.1.jar
Binary file not shown.
Binary file not shown.
8 changes: 7 additions & 1 deletion test/specs/cellValue.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,19 @@ describe( "cellValue", function(){
expect( s.getCellType( workbook, 1, 1 ) ).toBe( "string" );
});
it( "handles non-date values correctly that Lucee incorrectly treats as dates", function(){
it( "handles non-date values correctly that Lucee parses as partial dates far in the future", function(){
value = "01-23112";
s.setCellValue( workbook, value, 1, 1 );
expected = "01-23112";
actual = s.getCellValue( workbook, 1, 1 );
expect( actual ).toBe( expected );
expect( s.getCellType( workbook, 1, 1 ) ).toBe( "string" );
value = "23112-01";
s.setCellValue( workbook, value, 1, 1 );
expected = "23112-01";
actual = s.getCellValue( workbook, 1, 1 );
expect( actual ).toBe( expected );
expect( s.getCellType( workbook, 1, 1 ) ).toBe( "string" );
});
describe( "allows the auto data type detection to be overridden", function(){
Expand Down

0 comments on commit cf61a9d

Please sign in to comment.