]> source.dussan.org Git - poi.git/commitdiff
[bug-66215] add test case (that shows we have issues and need fixes)
authorPJ Fanning <fanningpj@apache.org>
Tue, 16 Aug 2022 13:14:57 +0000 (13:14 +0000)
committerPJ Fanning <fanningpj@apache.org>
Tue, 16 Aug 2022 13:14:57 +0000 (13:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903459 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/TestStructuredReferences.java

index 39c20881a3674aec7fa7c86c4ee1ff2c0ac201bf..03510d5b9d7791c436d661a43fd4b6865c536169 100644 (file)
@@ -182,7 +182,7 @@ class TestStructuredReferences {
             //correct all sheet table-reference-formulas which probably got damaged after shift rows
             for (CTTableColumn tableCol : table.getCTTable().getTableColumns().getTableColumnList()) {
                 if (tableCol.getCalculatedColumnFormula() != null) {
-                    int id = (int) tableCol.getId();
+                    int id = Math.toIntExact(tableCol.getId());
                     String formula = tableCol.getCalculatedColumnFormula().getStringValue();
                     int rFirst = table.getStartCellReference().getRow() + table.getHeaderRowCount();
                     int rLast = table.getEndCellReference().getRow() - table.getTotalsRowCount();