svn commit: r1809428 - in /poi/trunk/src: java/org/apache/poi/hssf/util/ java/org/apache/poi/ss/formula/ptg/ java/org/apache/poi/ss/util/ ooxml/java/org/apache/poi/xssf/usermodel/ testcases/org/apache
Author: fanningpj Date: Sat Sep 23 14:03:25 2017 New Revision: 1809428 URL: http://svn.apache.org/viewvc?rev=1809428&view=rev Log: Remove more deprecated classes and methods Removed: poi/trunk/src/java/org/apache/poi/hssf/util/AreaReference.java poi/trunk/src/java/org/apache/poi/hssf/util/PaneInformation.java Modified: poi/trunk/src/java/org/apache/poi/hssf/util/HSSFRegionUtil.java poi/trunk/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFShape.java poi/trunk/src/testcases/org/apache/poi/hssf/util/TestAreaReference.java poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/TestAreaEval.java poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/EvalFactory.java poi/trunk/src/testcases/org/apache/poi/ss/formula/ptg/TestAreaPtg.java Modified: poi/trunk/src/java/org/apache/poi/hssf/util/HSSFRegionUtil.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/util/HSSFRegionUtil.java?rev=1809428&r1=1809427&r2=1809428&view=diff == --- poi/trunk/src/java/org/apache/poi/hssf/util/HSSFRegionUtil.java (original) +++ poi/trunk/src/java/org/apache/poi/hssf/util/HSSFRegionUtil.java Sat Sep 23 14:03:25 2017 @@ -26,10 +26,10 @@ import org.apache.poi.util.Removal; /** * Various utility functions that make working with a region of cells easier. - * @deprecated POI 3.18 + * @deprecated POI 4.0.0 * @see RegionUtil */ -@Removal(version="3.20") +@Removal(version="4.2") public final class HSSFRegionUtil { private HSSFRegionUtil() { Modified: poi/trunk/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java?rev=1809428&r1=1809427&r2=1809428&view=diff == --- poi/trunk/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java (original) +++ poi/trunk/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java Sat Sep 23 14:03:25 2017 @@ -17,10 +17,8 @@ package org.apache.poi.ss.formula.ptg; -import org.apache.poi.ss.SpreadsheetVersion; import org.apache.poi.ss.util.AreaReference; import org.apache.poi.util.LittleEndianInput; -import org.apache.poi.util.Removal; /** * Specifies a rectangular area of cells A1:A4 for instance. @@ -36,15 +34,6 @@ public final class AreaPtg extends Area2 public AreaPtg(LittleEndianInput in) { super(in); } - - /** - * @deprecated use {@link #AreaPtg(AreaReference)} instead -*/ - @Deprecated() - @Removal(version="3.19") -public AreaPtg(String arearef) { -this(new AreaReference(arearef, SpreadsheetVersion.EXCEL97)); -} public AreaPtg(AreaReference arearef) { super(arearef); Modified: poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java?rev=1809428&r1=1809427&r2=1809428&view=diff == --- poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java (original) +++ poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java Sat Sep 23 14:03:25 2017 @@ -22,7 +22,6 @@ import java.util.List; import java.util.StringTokenizer; import org.apache.poi.ss.SpreadsheetVersion; -import org.apache.poi.util.Removal; public class AreaReference { @@ -105,16 +104,6 @@ public class AreaReference { } return true; } - -/** - * Creates an area ref from a pair of Cell References. - * @deprecated use {@link #AreaReference(CellReference, CellReference, SpreadsheetVersion)} instead - */ -@Deprecated -@Removal(version="3.19") -public AreaReference(CellReference topLeft, CellReference botRight) { -this(topLeft, botRight, DEFAULT_SPREADSHEET_VERSION); -} /** * Creates an area ref from a pair of Cell References. @@ -218,17 +207,6 @@ public class AreaReference { } /** - * Takes a non-contiguous area reference, and returns an array of contiguous area references - * @return an array of contiguous area references. - * @deprecated use {@link #generateContiguous(SpreadsheetVersion, String)} instead - */ -@Deprecated -@Removal(version="3.19") -public static AreaReference[] generateContiguous(String reference) { -return generateContiguous(DEFAULT_SPREADSHEET_VERSION, reference); -} - -/** * Takes a non-contiguous area reference, and returns an array of contiguous area references * @return an array of contiguous area references. */ Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFShape.java URL: http://svn.apache.org/viewvc/poi/tr
svn commit: r1809388 - in /poi/trunk/src/examples/src/org/apache/poi: hssf/view/SVRowHeader.java ss/examples/ExcelComparator.java xssf/eventusermodel/XLSX2CSV.java xssf/streaming/examples/HybridStream
Author: centic Date: Sat Sep 23 10:26:27 2017 New Revision: 1809388 URL: http://svn.apache.org/viewvc?rev=1809388&view=rev Log: Fix compiling Examples after adding new interface-method, fix compiler warnings and adjust some broken Javadoc Modified: poi/trunk/src/examples/src/org/apache/poi/hssf/view/SVRowHeader.java poi/trunk/src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java poi/trunk/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java Modified: poi/trunk/src/examples/src/org/apache/poi/hssf/view/SVRowHeader.java URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/hssf/view/SVRowHeader.java?rev=1809388&r1=1809387&r2=1809388&view=diff == --- poi/trunk/src/examples/src/org/apache/poi/hssf/view/SVRowHeader.java (original) +++ poi/trunk/src/examples/src/org/apache/poi/hssf/view/SVRowHeader.java Sat Sep 23 10:26:27 2017 @@ -32,12 +32,12 @@ import org.apache.poi.hssf.usermodel.*; * * @author Jason Height */ -public class SVRowHeader extends JList { +public class SVRowHeader extends JList { /** This model simply returns an integer number up to the number of rows * that are present in the sheet. * */ - private class SVRowHeaderModel extends AbstractListModel { + private class SVRowHeaderModel extends AbstractListModel { private HSSFSheet sheet; public SVRowHeaderModel(HSSFSheet sheet) { @@ -55,7 +55,7 @@ public class SVRowHeader extends JList { } /** Renderes the row number*/ - private class RowHeaderRenderer extends JLabel implements ListCellRenderer { + private class RowHeaderRenderer extends JLabel implements ListCellRenderer { private HSSFSheet sheet; private int extraHeight; @@ -90,7 +90,7 @@ public class SVRowHeader extends JList { } public SVRowHeader(HSSFSheet sheet, JTable table, int extraHeight) { -ListModel lm = new SVRowHeaderModel(sheet); +ListModel lm = new SVRowHeaderModel(sheet); this.setModel(lm); setFixedCellWidth(50); Modified: poi/trunk/src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java?rev=1809388&r1=1809387&r2=1809388&view=diff == --- poi/trunk/src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java (original) +++ poi/trunk/src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java Sat Sep 23 10:26:27 2017 @@ -28,6 +28,8 @@ import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.Color; import org.apache.poi.ss.usermodel.DateUtil; +import org.apache.poi.ss.usermodel.FillPatternType; +import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; @@ -109,10 +111,9 @@ public class ExcelComparator { /** * Utility to compare Excel File Contents cell by cell for all sheets. * - * @param workbook1 the workbook1 - * @param workbook2 the workbook2 + * @param wb1 the workbook1 + * @param wb2 the workbook2 * @return the Excel file difference containing a flag and a list of differences - * @throws ExcelCompareException the excel compare exception */ public static List compare(Workbook wb1, Workbook wb2) { Locator loc1 = new Locator(); @@ -130,11 +131,6 @@ public class ExcelComparator { /** * Compare data in all sheets. - * - * @param workbook1 the workbook1 - * @param workbook2 the workbook2 - * @param listOfDifferences the list of differences - * @throws ExcelCompareException the excel compare exception */ private void compareDataInAllSheets(Locator loc1, Locator loc2) { for (int i = 0; i < loc1.workbook.getNumberOfSheets(); i++) { @@ -291,15 +287,6 @@ public class ExcelComparator { /** * Compare sheet data. - * - * @param workbook1 - *the workbook1 - * @param workbook2 - *the workbook2 - * @param listOfDifferences - * - * @throws ExcelCompareException - * the excel compare exception */ private void compareSheetData(Locator loc1, Locator loc2) { compareNumberOfRowsInSheets(loc1, loc2); @@ -343,13 +330,13 @@ public class ExcelComparator { */ private void isCellAlignmentMatches(Locator loc1, Locator loc2) { // TODO: check for NPE -short align1 = loc1.cell.getCellStyle().getAlignment(); -short align2 = loc2.cell.getCellStyle().getAlignment(); +HorizontalAlignment align1 = loc1.cell.getCellStyle().getAlignmentEnum(); +
svn commit: r1809372 - /poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java
Author: centic Date: Sat Sep 23 07:44:09 2017 New Revision: 1809372 URL: http://svn.apache.org/viewvc?rev=1809372&view=rev Log: Tried to enable this test, but it is broken since a long time and I am not sure how this is expected to behave... Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java?rev=1809372&r1=1809371&r2=1809372&view=diff == --- poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java Sat Sep 23 07:44:09 2017 @@ -229,6 +229,7 @@ public final class TestPOIXMLProperties return utcString.equals(dateTimeUtcString); } +//@Test public void testThumbnails() throws Exception { POIXMLProperties noThumbProps = sampleNoThumb.getProperties(); @@ -241,19 +242,23 @@ public final class TestPOIXMLProperties assertNotNull(_props.getThumbnailImage()); assertNull(noThumbProps.getThumbnailImage()); -assertEquals("thumbnail.jpeg", _props.getThumbnailFilename()); +assertEquals("/thumbnail.jpeg", _props.getThumbnailFilename()); // Adding / changing -noThumbProps.setThumbnail("Testing.png", new ByteArrayInputStream(new byte[1])); +ByteArrayInputStream imageData = new ByteArrayInputStream(new byte[1]); +assertEquals(1, imageData.available()); +noThumbProps.setThumbnail("Testing.png", imageData); assertNotNull(noThumbProps.getThumbnailPart()); -assertEquals("Testing.png", noThumbProps.getThumbnailFilename()); +assertEquals("/Testing.png", noThumbProps.getThumbnailFilename()); assertNotNull(noThumbProps.getThumbnailImage()); assertEquals(1, noThumbProps.getThumbnailImage().available()); -noThumbProps.setThumbnail("Testing2.png", new ByteArrayInputStream(new byte[2])); +imageData = new ByteArrayInputStream(new byte[2]); +assertEquals(2, imageData.available()); +noThumbProps.setThumbnail("Testing2.png", imageData); assertNotNull(noThumbProps.getThumbnailPart()); -assertEquals("Testing.png", noThumbProps.getThumbnailFilename()); +assertEquals("/Testing.png", noThumbProps.getThumbnailFilename()); assertNotNull(noThumbProps.getThumbnailImage()); assertEquals(2, noThumbProps.getThumbnailImage().available()); } - To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org For additional commands, e-mail: commits-h...@poi.apache.org
svn commit: r1809371 - in /poi: site/src/documentation/content/xdocs/ trunk/src/java/org/apache/poi/hssf/extractor/ trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/ trunk/src/ooxml/java/org/ap
Author: centic Date: Sat Sep 23 07:41:27 2017 New Revision: 1809371 URL: http://svn.apache.org/viewvc?rev=1809371&view=rev Log: Apply patch to add endSheet() to the XSSFEventBasedExcelExtractor, fixes bug 60737, thanks to user zakim for the patch Modified: poi/site/src/documentation/content/xdocs/status.xml poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java Modified: poi/site/src/documentation/content/xdocs/status.xml URL: http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/status.xml?rev=1809371&r1=1809370&r2=1809371&view=diff == --- poi/site/src/documentation/content/xdocs/status.xml (original) +++ poi/site/src/documentation/content/xdocs/status.xml Sat Sep 23 07:41:27 2017 @@ -65,6 +65,7 @@ Removal of deprecated classes and methods that were marked for removal in v3.18 +Add endSheet() to XSSFEventBasedExcelExtractor Exchange order of writing parts into Zip to allow some tools to handle files better Support matrix functions Deleting a picture that is used twice on a slide corrupt the slide Modified: poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java?rev=1809371&r1=1809370&r2=1809371&view=diff == --- poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java (original) +++ poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java Sat Sep 23 07:41:27 2017 @@ -40,7 +40,6 @@ import org.apache.poi.hssf.record.Number import org.apache.poi.hssf.record.Record; import org.apache.poi.hssf.record.SSTRecord; import org.apache.poi.hssf.record.StringRecord; -import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.poifs.filesystem.DirectoryNode; import org.apache.poi.poifs.filesystem.POIFSFileSystem; @@ -128,7 +127,7 @@ public class EventBasedExcelExtractor ex * Retreives the text contents of the file */ public String getText() { - String text = null; + String text; try { TextListener tl = triggerExtraction(); Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java?rev=1809371&r1=1809370&r2=1809371&view=diff == --- poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java Sat Sep 23 07:41:27 2017 @@ -394,6 +394,9 @@ public class XSSFSheetXMLHandler extends } else if ("sheetData".equals(localName)) { // Handle any "missing" cells which had comments attached checkForEmptyCellComments(EmptyCellCommentsCheckType.END_OF_SHEET_DATA); + + // indicate that this sheet is now done + output.endSheet(); } else if("oddHeader".equals(localName) || "evenHeader".equals(localName) || "firstHeader".equals(localName)) { @@ -502,13 +505,19 @@ public class XSSFSheetXMLHandler extends public interface SheetContentsHandler { /** A row with the (zero based) row number has started */ public void startRow(int rowNum); + /** A row with the (zero based) row number has ended */ public void endRow(int rowNum); - /** + + /** * A cell, with the given formatted value (may be null), * and possibly a comment (may be null), was encountered */ public void cell(String cellReference, String formattedValue, XSSFComment comment); + /** A header or footer has been encountered */ public void headerFooter(String text, boolean isHeader, String tagName); + + /** Signal that the end of a sheet was been reached */ + public void endSheet(); } } Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java?rev=1809371&r1=1809370&r2=1809371&view=diff == --- poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java (original) +++ poi/trunk/src/ooxml/java/org/
svn commit: r1809370 - in /poi/trunk/src: examples/src/org/apache/poi/hpsf/examples/ examples/src/org/apache/poi/hssf/eventusermodel/examples/ examples/src/org/apache/poi/hssf/usermodel/examples/ exam
Author: centic Date: Sat Sep 23 07:38:01 2017 New Revision: 1809370 URL: http://svn.apache.org/viewvc?rev=1809370&view=rev Log: More IntelliJ warnings fixes Modified: poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/ModifyDocumentSummaryInformation.java poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/BigExample.java poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/InCellLists.java poi/trunk/src/examples/src/org/apache/poi/hssf/view/SVBorder.java poi/trunk/src/examples/src/org/apache/poi/poifs/poibrowser/DocumentDescriptorRenderer.java poi/trunk/src/examples/src/org/apache/poi/poifs/poibrowser/POIBrowser.java poi/trunk/src/examples/src/org/apache/poi/ss/examples/AddDimensionedImage.java poi/trunk/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java poi/trunk/src/examples/src/org/apache/poi/ss/examples/ToCSV.java poi/trunk/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/LoadPasswordProtectedXlsxStreaming.java poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFImportFromXML.java poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java Modified: poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java?rev=1809370&r1=1809369&r2=1809370&view=diff == --- poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java (original) +++ poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java Sat Sep 23 07:38:01 2017 @@ -169,7 +169,6 @@ public class CopyCompare * @exception NoPropertySetStreamException if the application tries to * create a property set from a POI document stream that is not a property * set stream. - * @throws UnsupportedEncodingException * @exception IOException if any I/O exception occurs. */ private static boolean equal(final DirectoryEntry d1, @@ -233,7 +232,6 @@ public class CopyCompare * @exception NoPropertySetStreamException if the application tries to * create a property set from a POI document stream that is not a property * set stream. - * @throws UnsupportedEncodingException * @exception IOException if any I/O exception occurs. */ private static boolean equal(final DocumentEntry d1, final DocumentEntry d2, @@ -355,8 +353,6 @@ public class CopyCompare * @param path The file's path in the POI filesystem. * @param name The file's name in the POI filesystem. * @param ps The property set to write. - * @throws WritingNotSupportedException - * @throws IOException */ public void copy(final POIFSFileSystem poiFs, final POIFSDocumentPath path, @@ -378,7 +374,6 @@ public class CopyCompare * @param path The source document's path. * @param name The source document's name. * @param stream The stream containing the source document. - * @throws IOException */ public void copy(final POIFSFileSystem poiFs, final POIFSDocumentPath path, @@ -407,9 +402,6 @@ public class CopyCompare /** * Writes the POI file system to a disk file. - * - * @throws FileNotFoundException - * @throws IOException */ public void close() throws FileNotFoundException, IOException { out = new FileOutputStream(dstName); Modified: poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/ModifyDocumentSummaryInformation.java URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/ModifyDocumentSummaryInformation.java?rev=1809370&r1=1809369&r2=1809370&view=diff == --- poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/ModifyDocumentSummaryInformation.java (original) +++ poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/ModifyDocumentSummaryInformation.java Sat Sep 23 07:38:01 2017 @@ -19,17 +19,12 @@ package org.apache.poi.hpsf.examples; import java.io.File; import java.io.FileNotFoundException; -import java.io.IOException; import java.util.Date; import org.apache.poi.hpsf.CustomProperties; import org.apache.poi.hpsf.DocumentSummaryInformation; -import org.apache.poi.hpsf.