From c0f99416047be7c3b7e5413d7a0187a21022a02b Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Wed, 22 Jul 2020 22:08:33 +0000 Subject: [PATCH] #64411 - Provide JigSaw modules - use classpath-build for Java 8, otherwise use modulepath - save module-info classes to source, when using Java 9+ environment - rename example packages - otherwise package clashes occured in the tests - move agile encryption from ooxml to main. remove EncryptionInfo XmlBeans and schema and use custom xml marshalling - move ooxml test classes which reside in the same package as their tested main class - rename base test classes to "BaseTest..." - temporarily I've used a light version of the main test classes to test scratchpad / ooxml - build.xml - fixed the Rhino javascript errors of the dependency-macros - DrawTextParagraph - fixed StringIndexOutOfBounds when logging set to debug level - use JigSaw provider interface (= Java ServiceLoader), i.e. it wasn't possible (without openening everything), to access ooxml factory classes from main factory stub git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880164 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 1272 +++++++++-------- .../crypt}/OOXMLPasswordsTry.java | 2 +- .../hpsf}/CopyCompare.java | 2 +- .../ModifyDocumentSummaryInformation.java | 2 +- .../hpsf}/ReadCustomPropertySets.java | 2 +- .../examples => examples/hpsf}/ReadTitle.java | 2 +- .../hpsf}/WriteAuthorAndTitle.java | 2 +- .../hpsf}/WriteTitle.java | 2 +- .../hslf}/ApacheconEU08.java | 2 +- .../hslf}/BulletsDemo.java | 2 +- .../hslf}/CreateHyperlink.java | 2 +- .../hslf}/DataExtraction.java | 2 +- .../hslf}/Graphics2DDemo.java | 2 +- .../hslf}/HeadersFootersDemo.java | 2 +- .../hslf}/Hyperlinks.java | 2 +- .../hslf}/SoundFinder.java | 2 +- .../examples => examples/hslf}/TableDemo.java | 4 +- .../examples => examples/hsmf}/Msg2txt.java | 2 +- .../hssf/eventusermodel}/XLS2CSVmra.java | 2 +- .../hssf/usermodel}/AddDimensionedImage.java | 4 +- .../hssf/usermodel}/Alignment.java | 4 +- .../hssf/usermodel}/BigExample.java | 2 +- .../hssf/usermodel}/Borders.java | 2 +- .../hssf/usermodel}/CellComments.java | 8 +- .../hssf/usermodel}/CellTypes.java | 2 +- .../hssf/usermodel}/CreateCells.java | 12 +- .../hssf/usermodel}/CreateDateCells.java | 2 +- .../hssf/usermodel}/EmbeddedObjects.java | 2 +- .../hssf/usermodel}/EventExample.java | 2 +- .../hssf/usermodel}/FrillsAndFills.java | 2 +- .../hssf/usermodel}/HSSFReadWrite.java | 2 +- .../hssf/usermodel}/HyperlinkFormula.java | 2 +- .../hssf/usermodel}/Hyperlinks.java | 2 +- .../hssf/usermodel}/InCellLists.java | 2 +- .../hssf/usermodel}/MergedCells.java | 2 +- .../hssf/usermodel}/NewLinesInCells.java | 2 +- .../hssf/usermodel}/NewSheet.java | 2 +- .../hssf/usermodel}/NewWorkbook.java | 4 +- .../hssf/usermodel}/OfficeDrawing.java | 2 +- .../usermodel}/OfficeDrawingWithGraphics.java | 18 +- .../hssf/usermodel}/Outlines.java | 4 +- .../hssf/usermodel}/ReadWriteWorkbook.java | 2 +- .../usermodel}/RepeatingRowsAndColumns.java | 2 +- .../hssf/usermodel}/SplitAndFreezePanes.java | 4 +- .../hssf/usermodel}/WorkingWithFonts.java | 2 +- .../hssf/usermodel}/ZoomSheet.java | 10 +- .../poi/{ => examples}/hwpf/Word2Forrest.java | 3 +- .../ss}/AddDimensionedImage.java | 2 +- .../ss}/AligningCells.java | 11 +- .../ss}/BusinessPlan.java | 2 +- .../ss}/CalendarDemo.java | 2 +- .../ss}/CellStyleDetails.java | 2 +- .../ss}/ConditionalFormats.java | 2 +- .../ss}/DrawingBorders.java | 2 +- .../ss}/ExcelComparator.java | 2 +- .../ss}/LinkedDropDownLists.java | 16 +- .../ss}/LoadEmbedded.java | 2 +- .../ss}/LoanCalculator.java | 2 +- .../ss}/SSPerformanceTest.java | 2 +- .../ss}/TimesheetDemo.java | 2 +- .../{ss/examples => examples/ss}/ToCSV.java | 2 +- .../ss}/formula/CalculateMortgage.java | 44 +- .../ss}/formula/CheckFunctionsSupported.java | 2 +- .../ss}/formula/SettingExternalFunction.java | 2 +- .../formula/UserDefinedFunctionExample.java | 2 +- .../ss}/formula/mortgage-calculation.xls | Bin .../ss}/html/HSSFHtmlHelper.java | 2 +- .../ss}/html/HtmlHelper.java | 6 +- .../examples => examples/ss}/html/ToHtml.java | 2 +- .../ss}/html/XSSFHtmlHelper.java | 2 +- .../ss}/html/excelStyle.css | 0 .../ss}/html/package-info.java | 2 +- .../poi/examples/util/TempFileUtils.java | 46 - .../xslf}/AddVideoToPptx.java.txt | 0 .../xslf}/BarChartDemo.java | 5 +- .../xslf}/ChartFromScratch.java | 7 +- .../xslf}/DataExtraction.java | 8 +- .../xslf}/MergePresentations.java | 5 +- .../usermodel => examples/xslf}/PPTX2SVG.txt | 0 .../xslf}/PieChartDemo.java | 5 +- .../xslf}/Tutorial1.java | 12 +- .../xslf}/Tutorial2.java | 10 +- .../xslf}/Tutorial3.java | 7 +- .../xslf}/Tutorial4.java | 11 +- .../xslf}/Tutorial5.java | 7 +- .../xslf}/Tutorial6.java | 8 +- .../xslf}/Tutorial7.java | 9 +- .../xslf}/bar-chart-data.txt | 0 .../xslf}/bar-chart-template.pptx | Bin .../xslf}/pie-chart-data.txt | 0 .../xslf}/pie-chart-template.pptx | Bin .../xslf}/tutorial/Step1.java | 2 +- .../xslf}/tutorial/Step2.java | 6 +- .../xssf/eventusermodel}/FromHowTo.java | 7 +- .../LoadPasswordProtectedXlsxStreaming.java | 4 +- .../xssf/eventusermodel/XLSX2CSV.java | 7 +- .../xssf/streaming}/HybridStreaming.java | 12 +- .../xssf/streaming}/Outlining.java | 2 +- .../streaming}/SavePasswordProtectedXlsx.java | 2 +- .../xssf/usermodel}/AligningCells.java | 4 +- .../xssf/usermodel}/BarAndLineChart.java | 2 +- .../xssf/usermodel}/BarChart.java | 2 +- .../xssf/usermodel}/BigGridDemo.java | 2 +- .../xssf/usermodel}/CalendarDemo.java | 23 +- .../xssf/usermodel}/CellComments.java | 2 +- .../xssf/usermodel}/CreateCell.java | 2 +- .../xssf/usermodel}/CreatePivotTable.java | 2 +- .../xssf/usermodel}/CreatePivotTable2.java | 4 +- .../xssf/usermodel}/CreateTable.java | 2 +- .../CreateUserDefinedDataFormats.java | 2 +- .../xssf/usermodel}/CustomXMLMapping.java | 2 +- .../xssf/usermodel}/EmbeddedObjects.java | 2 +- .../usermodel}/ExcelChartWithTargetLine.java | 2 +- .../xssf/usermodel}/FillsAndColors.java | 2 +- .../xssf/usermodel}/FitSheetToOnePage.java | 2 +- .../xssf/usermodel}/HeadersAndFooters.java | 2 +- .../xssf/usermodel}/HyperlinkExample.java | 2 +- .../xssf/usermodel}/IterateCells.java | 2 +- .../xssf/usermodel}/LineChart.java | 2 +- .../usermodel}/LoadPasswordProtectedXlsx.java | 2 +- .../xssf/usermodel}/MergingCells.java | 2 +- .../xssf/usermodel}/NewLinesInCells.java | 2 +- .../xssf/usermodel}/Outlining.java | 2 +- .../xssf/usermodel}/ScatterChart.java | 2 +- .../xssf/usermodel}/SelectedSheet.java | 4 +- .../xssf/usermodel}/ShiftRows.java | 4 +- .../xssf/usermodel}/SplitAndFreezePanes.java | 2 +- .../xssf/usermodel}/WorkbookProperties.java | 2 +- .../xssf/usermodel}/WorkingWithBorders.java | 2 +- .../xssf/usermodel}/WorkingWithFonts.java | 2 +- .../xssf/usermodel}/WorkingWithPageSetup.java | 4 +- .../xssf/usermodel}/WorkingWithPictures.java | 2 +- .../xssf/usermodel}/WorkingWithRichText.java | 2 +- .../xwpf/usermodel}/BarChartExample.java | 2 +- .../usermodel}/BetterHeaderFooterExample.java | 2 +- .../xwpf/usermodel}/ChartFromScratch.java | 2 +- .../xwpf/usermodel}/HeaderFooterTable.java | 4 +- .../xwpf/usermodel}/SimpleDocument.java | 2 +- .../usermodel}/SimpleDocumentWithHeader.java | 4 +- .../xwpf/usermodel}/SimpleImages.java | 2 +- .../xwpf/usermodel}/SimpleTable.java | 2 +- .../xwpf/usermodel}/UpdateEmbeddedDoc.java | 2 +- .../xwpf/usermodel}/bar-chart-data.txt | 0 .../xwpf/usermodel}/bar-chart-template.docx | Bin .../examples/DeferredGeneration.java | 63 - .../CalculateMortgageFunction.java | 44 +- ...ExcelAntUserDefinedFunctionTestHelper.java | 4 +- .../TestExcelAntUserDefinedFunction.java | 2 +- .../org/apache/poi/ss/excelant/tests.xml | 4 +- .../util/TestExcelAntWorkbookUtil.java | 2 +- .../poi/{ => stress}/BaseIntegrationTest.java | 17 +- .../apache/poi/stress/HPSFFileHandler.java | 2 +- .../HSSFRecordsStresser.java} | 5 +- .../org/apache/poi/{ => stress}/HeapDump.java | 6 +- .../poi/{ => stress}/POIFileScanner.java | 30 +- .../apache/poi/{ => stress}/TestAllFiles.java | 20 +- .../apache/poi/stress/XSSFFileHandler.java | 26 +- src/java/org/apache/poi/POIDocument.java | 94 +- .../poi/hssf/usermodel/HSSFWorkbook.java | 3 +- .../hssf/usermodel/HSSFWorkbookFactory.java | 62 +- .../apache/poi/poifs/crypt/ChainingMode.java | 20 +- .../poi/poifs/crypt/EncryptionHeader.java | 18 +- .../poi/poifs/crypt/EncryptionInfo.java | 25 +- .../poi/poifs/crypt/EncryptionVerifier.java | 16 +- .../poi/poifs/crypt/agile/AgileDecryptor.java | 0 .../crypt/agile/AgileEncryptionHeader.java | 29 +- .../agile/AgileEncryptionInfoBuilder.java | 30 +- .../crypt/agile/AgileEncryptionVerifier.java | 56 +- .../poi/poifs/crypt/agile/AgileEncryptor.java | 110 +- .../crypt/agile/CertificateKeyEncryptor.java | 95 ++ .../poi/poifs/crypt/agile/DataIntegrity.java | 82 ++ .../poifs/crypt/agile/EncryptionDocument.java | 150 ++ .../apache/poi/poifs/crypt/agile/KeyData.java | 148 ++ .../poi/poifs/crypt/agile/KeyEncryptor.java | 81 ++ .../crypt/agile/PasswordKeyEncryptor.java | 241 ++++ .../BinaryRC4EncryptionVerifier.java | 6 +- .../CryptoAPIEncryptionVerifier.java | 6 +- .../standard/StandardEncryptionVerifier.java | 8 +- .../crypt/xor/XOREncryptionVerifier.java | 4 +- .../apache/poi/sl/draw/DrawTextParagraph.java | 4 +- .../poi/ss/usermodel/WorkbookFactory.java | 195 +-- .../poi/ss/usermodel/WorkbookProvider.java | 39 + .../util/DefaultTempFileCreationStrategy.java | 40 +- .../examples/java9/module-info.class | Bin 0 -> 929 bytes .../examples/java9/module-info.java | 40 + .../excelant/java9/module-info.class | Bin 0 -> 293 bytes .../excelant/java9/module-info.java} | 26 +- .../excelant/test9/module-info.class | Bin 0 -> 293 bytes .../java9 => excelant/test9}/module-info.java | 22 +- .../integration/java9/module-info.java | 27 + .../ooxml-lite-agent/java9/module-info.class | Bin 0 -> 188 bytes .../ooxml-lite-agent/java9/module-info.java | 22 + .../ooxml-lite/java9/module-info.class | Bin 0 -> 1483 bytes .../ooxml-lite/java9/module-info.java | 47 + .../ooxml-schemas/java9/module-info.class | Bin 1928 -> 2235 bytes .../ooxml-schemas/java9/module-info.java | 12 +- .../ooxml-security/java9/module-info.class | Bin 660 -> 0 bytes src/multimodule/ooxml/java9/module-info.class | Bin 0 -> 2602 bytes src/multimodule/ooxml/java9/module-info.java | 87 ++ src/multimodule/ooxml/test9/module-info.class | Bin 0 -> 3471 bytes src/multimodule/ooxml/test9/module-info.java | 114 ++ src/multimodule/poi/java9/module-info.class | Bin 0 -> 3035 bytes src/multimodule/poi/java9/module-info.java | 9 + src/multimodule/poi/test9/module-info.class | Bin 0 -> 3162 bytes src/multimodule/poi/test9/module-info.java | 101 ++ .../scratchpad/java9/module-info.class | Bin 0 -> 2099 bytes .../scratchpad/java9/module-info.java | 79 + .../scratchpad/test9/module-info.class | Bin 0 -> 2273 bytes .../scratchpad/test9/module-info.java | 84 ++ .../xssf/usermodel/XSSFWorkbookFactory.java | 122 +- .../poi/{ => ooxml}/TestDetectAsOOXML.java | 12 +- .../apache/poi/{ => ooxml}/TestEmbedded.java | 4 +- .../TestXMLPropertiesTextExtractor.java | 3 +- .../ooxml/{util => lite}/OOXMLLiteAgent.java | 2 +- .../crypt/{ => dsig}/TestSignatureInfo.java | 7 +- .../{ => tests}/AllPOIFSCryptoTests.java | 2 +- .../TestAgileEncryptionParameters.java | 21 +- .../crypt/{ => tests}/TestDecryptor.java | 6 +- .../crypt/{ => tests}/TestEncryptionInfo.java | 21 +- .../crypt/{ => tests}/TestEncryptor.java | 9 +- .../crypt/{ => tests}/TestHxxFEncryption.java | 9 +- .../crypt/{ => tests}/TestSecureTempZip.java | 17 +- .../poi/sl/{ => tests}/SLCommonUtils.java | 8 +- .../apache/poi/sl/{ => tests}/TestFonts.java | 4 +- .../sl/{ => tests}/TestHeadersFooters.java | 8 +- .../poi/sl/{ => tests}/TestOleShape.java | 20 +- .../apache/poi/sl/{ => tests}/TestSlide.java | 16 +- .../apache/poi/sl/{ => tests}/TestTable.java | 40 +- .../draw/TestDrawPictureShape.java | 3 +- .../ss/{ => tests}/TestWorkbookFactory.java | 30 +- .../extractor/TestEmbeddedExtractor.java | 4 +- .../format/TestCellFormatPart.java | 16 +- .../formula/TestFormulaParser.java | 26 +- .../formula/TestStructuredReferences.java | 7 +- .../eval/TestXSSFCircularReferences.java | 3 +- .../formula/functions/CountifsTests.java | 10 +- .../formula/functions/TestProper.java | 3 +- .../formula/functions/TestSumifsXSSF.java | 6 +- .../formula/functions/TestVlookup.java | 12 +- .../{ => tests}/usermodel/BaseTestXCell.java | 7 +- .../{ => tests}/usermodel/BaseTestXRow.java | 7 +- .../{ => tests}/usermodel/BaseTestXSheet.java | 7 +- .../usermodel/BaseTestXWorkbook.java | 7 +- .../ConditionalFormattingEvalTest.java | 56 +- .../usermodel/TestEmbedOLEPackage.java | 10 +- .../usermodel/TestXSSFBorderStyle.java | 5 +- .../usermodel/TestXSSFRangeCopier.java | 11 +- .../{ => tests}/util/TestSXSSFCellUtil.java | 7 +- .../ss/{ => tests}/util/TestXSSFCellUtil.java | 7 +- .../util/TestXSSFPropertyTemplate.java | 26 +- .../{ => tests}/TestIdentifierManager.java | 2 +- .../{ => tests}/TestTempFileThreaded.java | 24 +- .../poi/xslf/usermodel/TestXSLFSlide.java | 2 +- .../xslf/usermodel/TestXSLFTextParagraph.java | 2 +- .../poi/xslf/usermodel/TestXSLFTextRun.java | 3 +- .../poi/xslf/usermodel/TestXSLFTextShape.java | 2 +- .../poi/xslf/usermodel/TestXSLFTheme.java | 2 +- .../org/apache/poi/xssf/AllXSSFTests.java | 4 +- .../streaming/TestDeferredSXSSFWorkbook.java | 65 +- .../poi/xssf/streaming/TestSXSSFCell.java | 6 +- .../poi/xssf/streaming/TestSXSSFRow.java | 6 +- .../poi/xssf/streaming/TestSXSSFSheet.java | 16 +- .../poi/xssf/streaming/TestSXSSFWorkbook.java | 35 +- .../xssf/usermodel/AllXSSFUsermodelTests.java | 4 +- .../usermodel/TestFormulaEvaluatorOnXSSF.java | 50 +- .../TestMatrixFormulasFromXMLSpreadsheet.java | 4 +- .../usermodel/TestMissingWorkbookOnXSSF.java | 8 +- .../TestMultiSheetFormulaEvaluatorOnXSSF.java | 7 +- .../poi/xssf/usermodel/TestXSSFBugs.java | 2 +- .../poi/xssf/usermodel/TestXSSFCell.java | 13 +- .../usermodel/TestXSSFForkedEvaluator.java | 6 +- .../poi/xssf/usermodel/TestXSSFRow.java | 64 +- .../poi/xssf/usermodel/TestXSSFSheet.java | 10 +- .../poi/xssf/usermodel/TestXSSFWorkbook.java | 12 +- ...g.apache.poi.ss.usermodel.WorkbookProvider | 18 + ...g.apache.poi.ss.usermodel.WorkbookProvider | 18 + .../{ => hslf}/TestPOIDocumentScratchpad.java | 8 +- .../org/apache/poi/hslf/model/TestShapes.java | 2 +- .../poi/hslf/record/TestExObjListAtom.java | 2 +- .../poi/hslf/usermodel/TestTextRun.java | 2 +- .../testcases/org/apache/poi/TestJDK12.java | 4 +- ...ingTest.java => BaseTestIteratingXLS.java} | 22 +- .../poi/hssf/dev/TestBiffDrawingToXml.java | 2 +- .../apache/poi/hssf/dev/TestBiffViewer.java | 2 +- .../apache/poi/hssf/dev/TestEFBiffViewer.java | 2 +- .../poi/hssf/dev/TestFormulaViewer.java | 2 +- .../org/apache/poi/hssf/dev/TestReSave.java | 2 +- .../apache/poi/hssf/dev/TestRecordLister.java | 4 +- .../poi/hssf/usermodel/TestHSSFChart.java | 0 .../hssf/usermodel/TestHSSFRangeCopier.java | 4 +- .../poi/sl/draw}/geom/TestFormulaParser.java | 6 +- .../poi/sl/usermodel/BaseTestSlideShow.java | 42 +- .../apache/poi/ss/format/TestCellFormat.java | 15 +- .../poi/ss/formula/AllSSFormulaTests.java | 4 +- ...book.java => BaseTestMissingWorkbook.java} | 48 +- ...ator.java => BaseTestForkedEvaluator.java} | 10 +- ...ericTestCase.java => BaseTestNumeric.java} | 2 +- .../ss/formula/functions/TestFinanceLib.java | 2 +- .../poi/ss/formula/functions/TestMathX.java | 2 +- .../ss/formula/functions/TestStatsLib.java | 2 +- .../poi/ss/formula/functions/TestTrunc.java | 2 +- ...tractPtgTestCase.java => BaseTestPtg.java} | 2 +- .../poi/ss/formula/ptg/TestArea3DPtg.java | 2 +- .../poi/ss/formula/ptg/TestAreaErrPtg.java | 2 +- .../poi/ss/formula/ptg/TestAttrPtg.java | 2 +- .../apache/poi/ss/formula/ptg/TestErrPtg.java | 2 +- .../ss/formula/ptg/TestIntersectionPtg.java | 2 +- .../poi/ss/formula/ptg/TestPercentPtg.java | 2 +- .../poi/ss/formula/ptg/TestRangePtg.java | 2 +- .../poi/ss/formula/ptg/TestRef3DPtg.java | 2 +- .../poi/ss/formula/ptg/TestUnionPtg.java | 2 +- ...geCopier.java => BaseTestRangeCopier.java} | 12 +- 312 files changed, 3540 insertions(+), 1963 deletions(-) rename src/examples/src/org/apache/poi/{crypt/examples => examples/crypt}/OOXMLPasswordsTry.java (98%) rename src/examples/src/org/apache/poi/{hpsf/examples => examples/hpsf}/CopyCompare.java (99%) rename src/examples/src/org/apache/poi/{hpsf/examples => examples/hpsf}/ModifyDocumentSummaryInformation.java (99%) rename src/examples/src/org/apache/poi/{hpsf/examples => examples/hpsf}/ReadCustomPropertySets.java (99%) rename src/examples/src/org/apache/poi/{hpsf/examples => examples/hpsf}/ReadTitle.java (98%) rename src/examples/src/org/apache/poi/{hpsf/examples => examples/hpsf}/WriteAuthorAndTitle.java (99%) rename src/examples/src/org/apache/poi/{hpsf/examples => examples/hpsf}/WriteTitle.java (99%) rename src/examples/src/org/apache/poi/{hslf/examples => examples/hslf}/ApacheconEU08.java (99%) rename src/examples/src/org/apache/poi/{hslf/examples => examples/hslf}/BulletsDemo.java (98%) rename src/examples/src/org/apache/poi/{hslf/examples => examples/hslf}/CreateHyperlink.java (98%) rename src/examples/src/org/apache/poi/{hslf/examples => examples/hslf}/DataExtraction.java (99%) rename src/examples/src/org/apache/poi/{hslf/examples => examples/hslf}/Graphics2DDemo.java (98%) rename src/examples/src/org/apache/poi/{hslf/examples => examples/hslf}/HeadersFootersDemo.java (98%) rename src/examples/src/org/apache/poi/{hslf/examples => examples/hslf}/Hyperlinks.java (98%) rename src/examples/src/org/apache/poi/{hslf/examples => examples/hslf}/SoundFinder.java (98%) rename src/examples/src/org/apache/poi/{hslf/examples => examples/hslf}/TableDemo.java (99%) rename src/examples/src/org/apache/poi/{hsmf/examples => examples/hsmf}/Msg2txt.java (99%) rename src/examples/src/org/apache/poi/{hssf/eventusermodel/examples => examples/hssf/eventusermodel}/XLS2CSVmra.java (99%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/AddDimensionedImage.java (87%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/Alignment.java (98%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/BigExample.java (99%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/Borders.java (98%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/CellComments.java (99%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/CellTypes.java (97%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/CreateCells.java (97%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/CreateDateCells.java (98%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/EmbeddedObjects.java (98%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/EventExample.java (99%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/FrillsAndFills.java (98%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/HSSFReadWrite.java (99%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/HyperlinkFormula.java (97%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/Hyperlinks.java (98%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/InCellLists.java (99%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/MergedCells.java (97%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/NewLinesInCells.java (97%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/NewSheet.java (97%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/NewWorkbook.java (96%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/OfficeDrawing.java (99%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/OfficeDrawingWithGraphics.java (89%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/Outlines.java (99%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/ReadWriteWorkbook.java (97%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/RepeatingRowsAndColumns.java (98%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/SplitAndFreezePanes.java (97%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/WorkingWithFonts.java (98%) rename src/examples/src/org/apache/poi/{hssf/usermodel/examples => examples/hssf/usermodel}/ZoomSheet.java (96%) rename src/examples/src/org/apache/poi/{ => examples}/hwpf/Word2Forrest.java (98%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/AddDimensionedImage.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/AligningCells.java (88%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/BusinessPlan.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/CalendarDemo.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/CellStyleDetails.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/ConditionalFormats.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/DrawingBorders.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/ExcelComparator.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/LinkedDropDownLists.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/LoadEmbedded.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/LoanCalculator.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/SSPerformanceTest.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/TimesheetDemo.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/ToCSV.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/formula/CalculateMortgage.java (85%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/formula/CheckFunctionsSupported.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/formula/SettingExternalFunction.java (98%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/formula/UserDefinedFunctionExample.java (98%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/formula/mortgage-calculation.xls (100%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/html/HSSFHtmlHelper.java (98%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/html/HtmlHelper.java (97%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/html/ToHtml.java (99%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/html/XSSFHtmlHelper.java (98%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/html/excelStyle.css (100%) rename src/examples/src/org/apache/poi/{ss/examples => examples/ss}/html/package-info.java (96%) delete mode 100644 src/examples/src/org/apache/poi/examples/util/TempFileUtils.java rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/AddVideoToPptx.java.txt (100%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/BarChartDemo.java (97%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/ChartFromScratch.java (96%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/DataExtraction.java (91%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/MergePresentations.java (93%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/PPTX2SVG.txt (100%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/PieChartDemo.java (96%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/Tutorial1.java (88%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/Tutorial2.java (92%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/Tutorial3.java (89%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/Tutorial4.java (89%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/Tutorial5.java (89%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/Tutorial6.java (88%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/Tutorial7.java (91%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/bar-chart-data.txt (100%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/bar-chart-template.pptx (100%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/pie-chart-data.txt (100%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/pie-chart-template.pptx (100%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/tutorial/Step1.java (98%) rename src/examples/src/org/apache/poi/{xslf/usermodel => examples/xslf}/tutorial/Step2.java (98%) rename src/examples/src/org/apache/poi/{xssf/eventusermodel/examples => examples/xssf/eventusermodel}/FromHowTo.java (96%) rename src/examples/src/org/apache/poi/{xssf/eventusermodel/examples => examples/xssf/eventusermodel}/LoadPasswordProtectedXlsxStreaming.java (95%) rename src/examples/src/org/apache/poi/{ => examples}/xssf/eventusermodel/XLSX2CSV.java (97%) rename src/examples/src/org/apache/poi/{xssf/streaming/examples => examples/xssf/streaming}/HybridStreaming.java (96%) rename src/examples/src/org/apache/poi/{xssf/streaming/examples => examples/xssf/streaming}/Outlining.java (97%) rename src/examples/src/org/apache/poi/{xssf/streaming/examples => examples/xssf/streaming}/SavePasswordProtectedXlsx.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/AligningCells.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/BarAndLineChart.java (99%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/BarChart.java (99%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/BigGridDemo.java (99%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/CalendarDemo.java (94%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/CellComments.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/CreateCell.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/CreatePivotTable.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/CreatePivotTable2.java (99%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/CreateTable.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/CreateUserDefinedDataFormats.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/CustomXMLMapping.java (97%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/EmbeddedObjects.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/ExcelChartWithTargetLine.java (99%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/FillsAndColors.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/FitSheetToOnePage.java (97%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/HeadersAndFooters.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/HyperlinkExample.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/IterateCells.java (97%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/LineChart.java (99%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/LoadPasswordProtectedXlsx.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/MergingCells.java (97%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/NewLinesInCells.java (97%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/Outlining.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/ScatterChart.java (99%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/SelectedSheet.java (97%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/ShiftRows.java (96%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/SplitAndFreezePanes.java (97%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/WorkbookProperties.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/WorkingWithBorders.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/WorkingWithFonts.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/WorkingWithPageSetup.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/WorkingWithPictures.java (98%) rename src/examples/src/org/apache/poi/{xssf/usermodel/examples => examples/xssf/usermodel}/WorkingWithRichText.java (98%) rename src/examples/src/org/apache/poi/{xwpf/usermodel/examples => examples/xwpf/usermodel}/BarChartExample.java (99%) rename src/examples/src/org/apache/poi/{xwpf/usermodel/examples => examples/xwpf/usermodel}/BetterHeaderFooterExample.java (97%) rename src/examples/src/org/apache/poi/{xwpf/usermodel/examples => examples/xwpf/usermodel}/ChartFromScratch.java (99%) rename src/examples/src/org/apache/poi/{xwpf/usermodel/examples => examples/xwpf/usermodel}/HeaderFooterTable.java (97%) rename src/examples/src/org/apache/poi/{xwpf/usermodel/examples => examples/xwpf/usermodel}/SimpleDocument.java (99%) rename src/examples/src/org/apache/poi/{xwpf/usermodel/examples => examples/xwpf/usermodel}/SimpleDocumentWithHeader.java (97%) rename src/examples/src/org/apache/poi/{xwpf/usermodel/examples => examples/xwpf/usermodel}/SimpleImages.java (98%) rename src/examples/src/org/apache/poi/{xwpf/usermodel/examples => examples/xwpf/usermodel}/SimpleTable.java (99%) rename src/examples/src/org/apache/poi/{xwpf/usermodel/examples => examples/xwpf/usermodel}/UpdateEmbeddedDoc.java (99%) rename src/examples/src/org/apache/poi/{xwpf/usermodel/examples => examples/xwpf/usermodel}/bar-chart-data.txt (100%) rename src/examples/src/org/apache/poi/{xwpf/usermodel/examples => examples/xwpf/usermodel}/bar-chart-template.docx (100%) delete mode 100644 src/examples/src/org/apache/poi/xssf/streaming/examples/DeferredGeneration.java rename src/excelant/testcases/org/apache/poi/ss/{examples/formula => excelant}/CalculateMortgageFunction.java (85%) rename src/excelant/testcases/org/apache/poi/ss/{examples/formula => excelant}/ExcelAntUserDefinedFunctionTestHelper.java (92%) rename src/excelant/testcases/org/apache/poi/ss/{examples/formula => excelant}/TestExcelAntUserDefinedFunction.java (97%) rename src/integrationtest/org/apache/poi/{ => stress}/BaseIntegrationTest.java (95%) rename src/integrationtest/org/apache/poi/{hssf/usermodel/RecordsStresser.java => stress/HSSFRecordsStresser.java} (96%) rename src/integrationtest/org/apache/poi/{ => stress}/HeapDump.java (98%) rename src/integrationtest/org/apache/poi/{ => stress}/POIFileScanner.java (96%) rename src/integrationtest/org/apache/poi/{ => stress}/TestAllFiles.java (96%) rename src/{ooxml => }/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java (100%) rename src/{ooxml => }/java/org/apache/poi/poifs/crypt/agile/AgileEncryptionHeader.java (82%) rename src/{ooxml => }/java/org/apache/poi/poifs/crypt/agile/AgileEncryptionInfoBuilder.java (88%) rename src/{ooxml => }/java/org/apache/poi/poifs/crypt/agile/AgileEncryptionVerifier.java (73%) rename src/{ooxml => }/java/org/apache/poi/poifs/crypt/agile/AgileEncryptor.java (82%) create mode 100644 src/java/org/apache/poi/poifs/crypt/agile/CertificateKeyEncryptor.java create mode 100644 src/java/org/apache/poi/poifs/crypt/agile/DataIntegrity.java create mode 100644 src/java/org/apache/poi/poifs/crypt/agile/EncryptionDocument.java create mode 100644 src/java/org/apache/poi/poifs/crypt/agile/KeyData.java create mode 100644 src/java/org/apache/poi/poifs/crypt/agile/KeyEncryptor.java create mode 100644 src/java/org/apache/poi/poifs/crypt/agile/PasswordKeyEncryptor.java create mode 100644 src/java/org/apache/poi/ss/usermodel/WorkbookProvider.java create mode 100644 src/multimodule/examples/java9/module-info.class create mode 100644 src/multimodule/examples/java9/module-info.java create mode 100644 src/multimodule/excelant/java9/module-info.class rename src/{testcases/org/apache/poi/sl/TestCommonSL.java => multimodule/excelant/java9/module-info.java} (63%) create mode 100644 src/multimodule/excelant/test9/module-info.class rename src/multimodule/{ooxml-security/java9 => excelant/test9}/module-info.java (57%) create mode 100644 src/multimodule/integration/java9/module-info.java create mode 100644 src/multimodule/ooxml-lite-agent/java9/module-info.class create mode 100644 src/multimodule/ooxml-lite-agent/java9/module-info.java create mode 100644 src/multimodule/ooxml-lite/java9/module-info.class create mode 100644 src/multimodule/ooxml-lite/java9/module-info.java delete mode 100644 src/multimodule/ooxml-security/java9/module-info.class create mode 100644 src/multimodule/ooxml/java9/module-info.class create mode 100644 src/multimodule/ooxml/java9/module-info.java create mode 100644 src/multimodule/ooxml/test9/module-info.class create mode 100644 src/multimodule/ooxml/test9/module-info.java create mode 100644 src/multimodule/poi/java9/module-info.class create mode 100644 src/multimodule/poi/test9/module-info.class create mode 100644 src/multimodule/poi/test9/module-info.java create mode 100644 src/multimodule/scratchpad/java9/module-info.class create mode 100644 src/multimodule/scratchpad/java9/module-info.java create mode 100644 src/multimodule/scratchpad/test9/module-info.class create mode 100644 src/multimodule/scratchpad/test9/module-info.java rename src/ooxml/testcases/org/apache/poi/{ => ooxml}/TestDetectAsOOXML.java (98%) rename src/ooxml/testcases/org/apache/poi/{ => ooxml}/TestEmbedded.java (97%) rename src/ooxml/testcases/org/apache/poi/{ => ooxml}/TestXMLPropertiesTextExtractor.java (98%) rename src/ooxml/testcases/org/apache/poi/ooxml/{util => lite}/OOXMLLiteAgent.java (98%) rename src/ooxml/testcases/org/apache/poi/poifs/crypt/{ => dsig}/TestSignatureInfo.java (99%) rename src/ooxml/testcases/org/apache/poi/poifs/crypt/{ => tests}/AllPOIFSCryptoTests.java (96%) rename src/ooxml/testcases/org/apache/poi/poifs/crypt/{ => tests}/TestAgileEncryptionParameters.java (91%) rename src/ooxml/testcases/org/apache/poi/poifs/crypt/{ => tests}/TestDecryptor.java (98%) rename src/ooxml/testcases/org/apache/poi/poifs/crypt/{ => tests}/TestEncryptionInfo.java (82%) rename src/ooxml/testcases/org/apache/poi/poifs/crypt/{ => tests}/TestEncryptor.java (98%) rename src/ooxml/testcases/org/apache/poi/poifs/crypt/{ => tests}/TestHxxFEncryption.java (98%) rename src/ooxml/testcases/org/apache/poi/poifs/crypt/{ => tests}/TestSecureTempZip.java (97%) rename src/ooxml/testcases/org/apache/poi/sl/{ => tests}/SLCommonUtils.java (95%) rename src/ooxml/testcases/org/apache/poi/sl/{ => tests}/TestFonts.java (98%) rename src/ooxml/testcases/org/apache/poi/sl/{ => tests}/TestHeadersFooters.java (95%) rename src/ooxml/testcases/org/apache/poi/sl/{ => tests}/TestOleShape.java (98%) rename src/ooxml/testcases/org/apache/poi/sl/{ => tests}/TestSlide.java (95%) rename src/ooxml/testcases/org/apache/poi/sl/{ => tests}/TestTable.java (96%) rename src/ooxml/testcases/org/apache/poi/sl/{ => tests}/draw/TestDrawPictureShape.java (98%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/TestWorkbookFactory.java (96%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/extractor/TestEmbeddedExtractor.java (97%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/format/TestCellFormatPart.java (93%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/formula/TestFormulaParser.java (97%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/formula/TestStructuredReferences.java (98%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/formula/eval/TestXSSFCircularReferences.java (91%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/formula/functions/CountifsTests.java (98%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/formula/functions/TestProper.java (98%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/formula/functions/TestSumifsXSSF.java (97%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/formula/functions/TestVlookup.java (98%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/usermodel/BaseTestXCell.java (89%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/usermodel/BaseTestXRow.java (92%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/usermodel/BaseTestXSheet.java (90%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/usermodel/BaseTestXWorkbook.java (90%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/usermodel/ConditionalFormattingEvalTest.java (96%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/usermodel/TestEmbedOLEPackage.java (96%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/usermodel/TestXSSFBorderStyle.java (91%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/usermodel/TestXSSFRangeCopier.java (90%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/util/TestSXSSFCellUtil.java (92%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/util/TestXSSFCellUtil.java (92%) rename src/ooxml/testcases/org/apache/poi/ss/{ => tests}/util/TestXSSFPropertyTemplate.java (97%) rename src/ooxml/testcases/org/apache/poi/util/{ => tests}/TestIdentifierManager.java (99%) rename src/ooxml/testcases/org/apache/poi/util/{ => tests}/TestTempFileThreaded.java (98%) create mode 100644 src/resources/main/META-INF/services/org.apache.poi.ss.usermodel.WorkbookProvider create mode 100644 src/resources/ooxml/META-INF/services/org.apache.poi.ss.usermodel.WorkbookProvider rename src/scratchpad/testcases/org/apache/poi/{ => hslf}/TestPOIDocumentScratchpad.java (97%) rename src/{scratchpad => }/testcases/org/apache/poi/TestJDK12.java (100%) rename src/testcases/org/apache/poi/hssf/dev/{BaseXLSIteratingTest.java => BaseTestIteratingXLS.java} (97%) rename src/{scratchpad => }/testcases/org/apache/poi/hssf/usermodel/TestHSSFChart.java (100%) rename src/{ooxml/testcases/org/apache/poi/xslf => testcases/org/apache/poi/sl/draw}/geom/TestFormulaParser.java (91%) rename src/testcases/org/apache/poi/ss/formula/{TestMissingWorkbook.java => BaseTestMissingWorkbook.java} (94%) rename src/testcases/org/apache/poi/ss/formula/eval/forked/{TestForkedEvaluator.java => BaseTestForkedEvaluator.java} (98%) rename src/testcases/org/apache/poi/ss/formula/functions/{AbstractNumericTestCase.java => BaseTestNumeric.java} (98%) rename src/testcases/org/apache/poi/ss/formula/ptg/{AbstractPtgTestCase.java => BaseTestPtg.java} (97%) rename src/testcases/org/apache/poi/ss/usermodel/{TestRangeCopier.java => BaseTestRangeCopier.java} (97%) diff --git a/build.xml b/build.xml index 41fc1eae7c..5c107c47af 100644 --- a/build.xml +++ b/build.xml @@ -54,6 +54,7 @@ under the License. + @@ -153,9 +154,9 @@ under the License. - + - + @@ -174,37 +175,70 @@ under the License. - - + - - - - - - - - - + + + + + + + + + + + @{artifact} + + + + + + + + + @{artifact} + + + + + + + + @{artifact} + + + + + + + + + + + + @{usage} + + + + + + + + + + + + + + + + + + + + @@ -225,13 +259,13 @@ under the License. - - + + - - + + @@ -249,7 +283,7 @@ under the License. - + @@ -262,21 +296,19 @@ under the License. - + - - + + - - @@ -375,7 +407,6 @@ under the License. - @@ -389,18 +420,8 @@ under the License. - - - - - - - - - - - + @@ -410,38 +431,12 @@ under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -452,17 +447,6 @@ under the License. - - - - - - - - - - - @@ -475,16 +459,6 @@ under the License. - - - - - - - - - - @@ -494,26 +468,6 @@ under the License. - - - - - - - - - - - - - - - - - - - - @@ -531,7 +485,6 @@ under the License. - compile Compile all files from main, ooxml and scratchpad - test Run all unit tests from main, ooxml and scratchpad - jar Produce jar files - - jar-src Produce source-jar files - assemble Produce the zipped distribution files - site Generate all documentation (Requires Apache Forrest) - dist Create a distribution (Requires Apache Forrest) @@ -610,14 +563,17 @@ under the License. - - + + - - + + + + + @@ -719,6 +675,7 @@ under the License. + @@ -760,296 +717,358 @@ under the License. - - - - - - - - - - - - - - - - - + - + - - - + + + + + + - - - - - - + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Forking javac with max heap size ${ooxml.memory} + + + + + + + + + + + + + + + + - + + @{module} + + + + + + + + - + + + - - - - - - - - - - + - + + + + - - + - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + @@ -1057,103 +1076,82 @@ under the License. + - - sun/java2d/pipe/AAShapePipe.renderTiles(Lsun/java2d/SunGraphics2D;Ljava/awt/Shape;Lsun/java2d/pipe/AATileGenerator;[I)V - sun/java2d/pipe/AlphaPaintPipe.renderPathTile(Ljava/lang/Object;[BIIIIII)V - java/awt/TexturePaintContext.getRaster(IIII)Ljava/awt/image/Raster; - - + + + sun/java2d/pipe/AAShapePipe.renderTiles(Lsun/java2d/SunGraphics2D;Ljava/awt/Shape;Lsun/java2d/pipe/AATileGenerator;[I)V + sun/java2d/pipe/AlphaPaintPipe.renderPathTile(Ljava/lang/Object;[BIIIIII)V + java/awt/TexturePaintContext.getRaster(IIII)Ljava/awt/image/Raster; + + + + + + + + + + + + + + + + failureproperty="@{failureproperty}" showoutput="@{showoutput}" filtertrace="off"> - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - + + + @@ -1168,40 +1166,26 @@ under the License. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -1264,7 +1276,12 @@ under the License. - + + + + + + @@ -1361,11 +1378,17 @@ under the License. - - - - - + + + + + + + + + + @@ -1377,6 +1400,7 @@ under the License. + @@ -1409,14 +1433,22 @@ under the License. - - - - - - + + + + + + + + + + + @@ -1443,44 +1475,43 @@ under the License. - + - - - - - + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -1496,12 +1527,28 @@ under the License. - - - + + + + + + + + + + + + + + + + + @@ -1520,41 +1567,97 @@ under the License. - + + + + + + + + + + + + + + + + - - + + + + + + + + + + - - - - - + ${full.schema}${lite.exports}} + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + - + - - - - - - - - - + + + + + + + + + + + + + + + @@ -1569,10 +1672,27 @@ under the License. - - - + + + + + + + + + + + + + + + + + + @@ -1768,6 +1888,7 @@ under the License. + @@ -1781,6 +1902,9 @@ under the License. + + + @@ -1799,35 +1923,46 @@ under the License. + - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + @@ -1893,7 +2028,7 @@ under the License. - + @@ -2096,6 +2231,19 @@ under the License. classname="de.thetaphi.forbiddenapis.ant.AntTask" classpath="${forbidden.jar}"/> + + + + + + + + + + + + + - - - - + + + + - - - + + + - - - - - + + + + + + @@ -2238,7 +2387,6 @@ under the License. - diff --git a/src/examples/src/org/apache/poi/crypt/examples/OOXMLPasswordsTry.java b/src/examples/src/org/apache/poi/examples/crypt/OOXMLPasswordsTry.java similarity index 98% rename from src/examples/src/org/apache/poi/crypt/examples/OOXMLPasswordsTry.java rename to src/examples/src/org/apache/poi/examples/crypt/OOXMLPasswordsTry.java index 261020fc79..406d6dc335 100644 --- a/src/examples/src/org/apache/poi/crypt/examples/OOXMLPasswordsTry.java +++ b/src/examples/src/org/apache/poi/examples/crypt/OOXMLPasswordsTry.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.crypt.examples; +package org.apache.poi.examples.crypt; import java.io.File; import java.nio.file.Files; diff --git a/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java b/src/examples/src/org/apache/poi/examples/hpsf/CopyCompare.java similarity index 99% rename from src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java rename to src/examples/src/org/apache/poi/examples/hpsf/CopyCompare.java index 567323d514..6c1189e375 100644 --- a/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java +++ b/src/examples/src/org/apache/poi/examples/hpsf/CopyCompare.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hpsf.examples; +package org.apache.poi.examples.hpsf; import java.io.File; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/hpsf/examples/ModifyDocumentSummaryInformation.java b/src/examples/src/org/apache/poi/examples/hpsf/ModifyDocumentSummaryInformation.java similarity index 99% rename from src/examples/src/org/apache/poi/hpsf/examples/ModifyDocumentSummaryInformation.java rename to src/examples/src/org/apache/poi/examples/hpsf/ModifyDocumentSummaryInformation.java index 41711061fa..cf26fee949 100644 --- a/src/examples/src/org/apache/poi/hpsf/examples/ModifyDocumentSummaryInformation.java +++ b/src/examples/src/org/apache/poi/examples/hpsf/ModifyDocumentSummaryInformation.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hpsf.examples; +package org.apache.poi.examples.hpsf; import java.io.File; import java.io.FileNotFoundException; diff --git a/src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java b/src/examples/src/org/apache/poi/examples/hpsf/ReadCustomPropertySets.java similarity index 99% rename from src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java rename to src/examples/src/org/apache/poi/examples/hpsf/ReadCustomPropertySets.java index fc8751bda6..ca8cba1ce9 100644 --- a/src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java +++ b/src/examples/src/org/apache/poi/examples/hpsf/ReadCustomPropertySets.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hpsf.examples; +package org.apache.poi.examples.hpsf; import java.io.File; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hpsf/examples/ReadTitle.java b/src/examples/src/org/apache/poi/examples/hpsf/ReadTitle.java similarity index 98% rename from src/examples/src/org/apache/poi/hpsf/examples/ReadTitle.java rename to src/examples/src/org/apache/poi/examples/hpsf/ReadTitle.java index 1072064998..b901a89a3d 100644 --- a/src/examples/src/org/apache/poi/hpsf/examples/ReadTitle.java +++ b/src/examples/src/org/apache/poi/examples/hpsf/ReadTitle.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hpsf.examples; +package org.apache.poi.examples.hpsf; import java.io.File; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java b/src/examples/src/org/apache/poi/examples/hpsf/WriteAuthorAndTitle.java similarity index 99% rename from src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java rename to src/examples/src/org/apache/poi/examples/hpsf/WriteAuthorAndTitle.java index ce51773a25..94ceaf6c03 100644 --- a/src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java +++ b/src/examples/src/org/apache/poi/examples/hpsf/WriteAuthorAndTitle.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hpsf.examples; +package org.apache.poi.examples.hpsf; import java.io.File; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/hpsf/examples/WriteTitle.java b/src/examples/src/org/apache/poi/examples/hpsf/WriteTitle.java similarity index 99% rename from src/examples/src/org/apache/poi/hpsf/examples/WriteTitle.java rename to src/examples/src/org/apache/poi/examples/hpsf/WriteTitle.java index 8fd505f27d..a9a50cf8e4 100644 --- a/src/examples/src/org/apache/poi/hpsf/examples/WriteTitle.java +++ b/src/examples/src/org/apache/poi/examples/hpsf/WriteTitle.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hpsf.examples; +package org.apache.poi.examples.hpsf; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hslf/examples/ApacheconEU08.java b/src/examples/src/org/apache/poi/examples/hslf/ApacheconEU08.java similarity index 99% rename from src/examples/src/org/apache/poi/hslf/examples/ApacheconEU08.java rename to src/examples/src/org/apache/poi/examples/hslf/ApacheconEU08.java index 73871cb335..53d3c46077 100644 --- a/src/examples/src/org/apache/poi/hslf/examples/ApacheconEU08.java +++ b/src/examples/src/org/apache/poi/examples/hslf/ApacheconEU08.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hslf.examples; +package org.apache.poi.examples.hslf; import java.awt.Color; import java.awt.Dimension; diff --git a/src/examples/src/org/apache/poi/hslf/examples/BulletsDemo.java b/src/examples/src/org/apache/poi/examples/hslf/BulletsDemo.java similarity index 98% rename from src/examples/src/org/apache/poi/hslf/examples/BulletsDemo.java rename to src/examples/src/org/apache/poi/examples/hslf/BulletsDemo.java index dc814f35b5..5ab8b86a39 100644 --- a/src/examples/src/org/apache/poi/hslf/examples/BulletsDemo.java +++ b/src/examples/src/org/apache/poi/examples/hslf/BulletsDemo.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hslf.examples; +package org.apache.poi.examples.hslf; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hslf/examples/CreateHyperlink.java b/src/examples/src/org/apache/poi/examples/hslf/CreateHyperlink.java similarity index 98% rename from src/examples/src/org/apache/poi/hslf/examples/CreateHyperlink.java rename to src/examples/src/org/apache/poi/examples/hslf/CreateHyperlink.java index 65fb0b9876..be8a227d1a 100644 --- a/src/examples/src/org/apache/poi/hslf/examples/CreateHyperlink.java +++ b/src/examples/src/org/apache/poi/examples/hslf/CreateHyperlink.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hslf.examples; +package org.apache.poi.examples.hslf; import java.awt.Rectangle; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/hslf/examples/DataExtraction.java b/src/examples/src/org/apache/poi/examples/hslf/DataExtraction.java similarity index 99% rename from src/examples/src/org/apache/poi/hslf/examples/DataExtraction.java rename to src/examples/src/org/apache/poi/examples/hslf/DataExtraction.java index e73b8971e6..6996dc8751 100644 --- a/src/examples/src/org/apache/poi/hslf/examples/DataExtraction.java +++ b/src/examples/src/org/apache/poi/examples/hslf/DataExtraction.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hslf.examples; +package org.apache.poi.examples.hslf; import java.io.FileInputStream; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/hslf/examples/Graphics2DDemo.java b/src/examples/src/org/apache/poi/examples/hslf/Graphics2DDemo.java similarity index 98% rename from src/examples/src/org/apache/poi/hslf/examples/Graphics2DDemo.java rename to src/examples/src/org/apache/poi/examples/hslf/Graphics2DDemo.java index 75ccf0121e..938b52e6d2 100644 --- a/src/examples/src/org/apache/poi/hslf/examples/Graphics2DDemo.java +++ b/src/examples/src/org/apache/poi/examples/hslf/Graphics2DDemo.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hslf.examples; +package org.apache.poi.examples.hslf; import java.awt.Color; import java.awt.Font; diff --git a/src/examples/src/org/apache/poi/hslf/examples/HeadersFootersDemo.java b/src/examples/src/org/apache/poi/examples/hslf/HeadersFootersDemo.java similarity index 98% rename from src/examples/src/org/apache/poi/hslf/examples/HeadersFootersDemo.java rename to src/examples/src/org/apache/poi/examples/hslf/HeadersFootersDemo.java index 28fc8b1343..4dd4349df5 100644 --- a/src/examples/src/org/apache/poi/hslf/examples/HeadersFootersDemo.java +++ b/src/examples/src/org/apache/poi/examples/hslf/HeadersFootersDemo.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.hslf.examples; +package org.apache.poi.examples.hslf; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hslf/examples/Hyperlinks.java b/src/examples/src/org/apache/poi/examples/hslf/Hyperlinks.java similarity index 98% rename from src/examples/src/org/apache/poi/hslf/examples/Hyperlinks.java rename to src/examples/src/org/apache/poi/examples/hslf/Hyperlinks.java index f63afb44d2..307178d0e0 100644 --- a/src/examples/src/org/apache/poi/hslf/examples/Hyperlinks.java +++ b/src/examples/src/org/apache/poi/examples/hslf/Hyperlinks.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hslf.examples; +package org.apache.poi.examples.hslf; import java.io.FileInputStream; import java.util.List; diff --git a/src/examples/src/org/apache/poi/hslf/examples/SoundFinder.java b/src/examples/src/org/apache/poi/examples/hslf/SoundFinder.java similarity index 98% rename from src/examples/src/org/apache/poi/hslf/examples/SoundFinder.java rename to src/examples/src/org/apache/poi/examples/hslf/SoundFinder.java index 49ca94be9b..0f6929fee7 100644 --- a/src/examples/src/org/apache/poi/hslf/examples/SoundFinder.java +++ b/src/examples/src/org/apache/poi/examples/hslf/SoundFinder.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.hslf.examples; +package org.apache.poi.examples.hslf; import java.io.FileInputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hslf/examples/TableDemo.java b/src/examples/src/org/apache/poi/examples/hslf/TableDemo.java similarity index 99% rename from src/examples/src/org/apache/poi/hslf/examples/TableDemo.java rename to src/examples/src/org/apache/poi/examples/hslf/TableDemo.java index da8464f586..561ec717ab 100644 --- a/src/examples/src/org/apache/poi/hslf/examples/TableDemo.java +++ b/src/examples/src/org/apache/poi/examples/hslf/TableDemo.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hslf.examples; +package org.apache.poi.examples.hslf; import java.awt.Color; import java.io.FileOutputStream; @@ -64,7 +64,7 @@ public final class TableDemo { } } } - + static void create1stTable(HSLFSlide slide) { //six rows, two columns HSLFTable table1 = slide.createTable(6, 2); diff --git a/src/examples/src/org/apache/poi/hsmf/examples/Msg2txt.java b/src/examples/src/org/apache/poi/examples/hsmf/Msg2txt.java similarity index 99% rename from src/examples/src/org/apache/poi/hsmf/examples/Msg2txt.java rename to src/examples/src/org/apache/poi/examples/hsmf/Msg2txt.java index 010e711557..a4756a27d5 100644 --- a/src/examples/src/org/apache/poi/hsmf/examples/Msg2txt.java +++ b/src/examples/src/org/apache/poi/examples/hsmf/Msg2txt.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hsmf.examples; +package org.apache.poi.examples.hsmf; import java.io.File; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java b/src/examples/src/org/apache/poi/examples/hssf/eventusermodel/XLS2CSVmra.java similarity index 99% rename from src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java rename to src/examples/src/org/apache/poi/examples/hssf/eventusermodel/XLS2CSVmra.java index da06079c32..42056d0716 100644 --- a/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java +++ b/src/examples/src/org/apache/poi/examples/hssf/eventusermodel/XLS2CSVmra.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.eventusermodel.examples; +package org.apache.poi.examples.hssf.eventusermodel; import java.io.FileInputStream; import java.io.FileNotFoundException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/AddDimensionedImage.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/AddDimensionedImage.java similarity index 87% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/AddDimensionedImage.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/AddDimensionedImage.java index 38e2fe6f51..129f9327da 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/AddDimensionedImage.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/AddDimensionedImage.java @@ -16,8 +16,8 @@ ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; /* Placeholder - this is now handled in the Common SS example **/ -public class AddDimensionedImage extends org.apache.poi.ss.examples.AddDimensionedImage { +public class AddDimensionedImage extends org.apache.poi.examples.ss.AddDimensionedImage { } \ No newline at end of file diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/Alignment.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/Alignment.java similarity index 98% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/Alignment.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/Alignment.java index 57395b1c46..25affcb0f8 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/Alignment.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/Alignment.java @@ -15,9 +15,9 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - -package org.apache.poi.hssf.usermodel.examples; + +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/BigExample.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/BigExample.java similarity index 99% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/BigExample.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/BigExample.java index ef1a06b3bf..f50391ade8 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/BigExample.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/BigExample.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/Borders.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/Borders.java similarity index 98% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/Borders.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/Borders.java index 9509619cc6..fba3b33214 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/Borders.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/Borders.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/CellComments.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/CellComments.java similarity index 99% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/CellComments.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/CellComments.java index 877708bde8..6b6434b3e1 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/CellComments.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/CellComments.java @@ -15,7 +15,10 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; + +import java.io.FileOutputStream; +import java.io.IOException; import org.apache.poi.hssf.usermodel.HSSFComment; import org.apache.poi.hssf.usermodel.HSSFWorkbook; @@ -31,9 +34,6 @@ import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.WorkbookFactory; -import java.io.FileOutputStream; -import java.io.IOException; - /** * Demonstrates how to work with excel cell comments.

* diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/CellTypes.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/CellTypes.java similarity index 97% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/CellTypes.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/CellTypes.java index f589bc6ad0..5ba1656ff1 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/CellTypes.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/CellTypes.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/CreateCells.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/CreateCells.java similarity index 97% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/CreateCells.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/CreateCells.java index b2b803f111..8994d6f17e 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/CreateCells.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/CreateCells.java @@ -15,16 +15,16 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; - -import org.apache.poi.hssf.usermodel.HSSFWorkbook; -import org.apache.poi.hssf.usermodel.HSSFSheet; -import org.apache.poi.hssf.usermodel.HSSFRow; -import org.apache.poi.hssf.usermodel.HSSFCell; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; + /** * Illustrates how to create cell values. * diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/CreateDateCells.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/CreateDateCells.java similarity index 98% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/CreateDateCells.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/CreateDateCells.java index 9fea613aad..b77e0d1474 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/CreateDateCells.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/CreateDateCells.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/EmbeddedObjects.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/EmbeddedObjects.java similarity index 98% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/EmbeddedObjects.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/EmbeddedObjects.java index 9c9d0bce6f..149c908fac 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/EmbeddedObjects.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/EmbeddedObjects.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.Closeable; import java.io.FileInputStream; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/EventExample.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/EventExample.java similarity index 99% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/EventExample.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/EventExample.java index 9d3ba51bef..0e71406b58 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/EventExample.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/EventExample.java @@ -16,7 +16,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileInputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/FrillsAndFills.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/FrillsAndFills.java similarity index 98% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/FrillsAndFills.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/FrillsAndFills.java index 9627780e1f..ca2a61e41e 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/FrillsAndFills.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/FrillsAndFills.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/HSSFReadWrite.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/HSSFReadWrite.java similarity index 99% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/HSSFReadWrite.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/HSSFReadWrite.java index 52667d1c65..f53065de94 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/HSSFReadWrite.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/HSSFReadWrite.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileInputStream; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/HyperlinkFormula.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/HyperlinkFormula.java similarity index 97% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/HyperlinkFormula.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/HyperlinkFormula.java index 52294360c6..96fa30a90f 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/HyperlinkFormula.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/HyperlinkFormula.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/Hyperlinks.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/Hyperlinks.java similarity index 98% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/Hyperlinks.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/Hyperlinks.java index 9189f15375..ae4a37ea13 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/Hyperlinks.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/Hyperlinks.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/InCellLists.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/InCellLists.java similarity index 99% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/InCellLists.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/InCellLists.java index b8d19039c1..76d0172f82 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/InCellLists.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/InCellLists.java @@ -16,7 +16,7 @@ ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.File; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/MergedCells.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/MergedCells.java similarity index 97% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/MergedCells.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/MergedCells.java index af1d8dd98a..16114b2d63 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/MergedCells.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/MergedCells.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/NewLinesInCells.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/NewLinesInCells.java similarity index 97% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/NewLinesInCells.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/NewLinesInCells.java index 2b7ce2d96d..487668da10 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/NewLinesInCells.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/NewLinesInCells.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/NewSheet.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/NewSheet.java similarity index 97% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/NewSheet.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/NewSheet.java index 225425445d..d2d8f31d0a 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/NewSheet.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/NewSheet.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/NewWorkbook.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/NewWorkbook.java similarity index 96% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/NewWorkbook.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/NewWorkbook.java index 3e61aaf342..16c0e04de1 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/NewWorkbook.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/NewWorkbook.java @@ -15,9 +15,9 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - -package org.apache.poi.hssf.usermodel.examples; + +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/OfficeDrawing.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/OfficeDrawing.java similarity index 99% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/OfficeDrawing.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/OfficeDrawing.java index 7e703c5867..4603864d86 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/OfficeDrawing.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/OfficeDrawing.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.ByteArrayOutputStream; import java.io.FileInputStream; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/OfficeDrawingWithGraphics.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/OfficeDrawingWithGraphics.java similarity index 89% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/OfficeDrawingWithGraphics.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/OfficeDrawingWithGraphics.java index b437371ac1..eca55d4378 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/OfficeDrawingWithGraphics.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/OfficeDrawingWithGraphics.java @@ -15,14 +15,24 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; -import org.apache.poi.hssf.usermodel.*; - -import java.awt.*; +import java.awt.BasicStroke; +import java.awt.Color; +import java.awt.Font; +import java.awt.RenderingHints; import java.io.FileOutputStream; import java.io.IOException; +import org.apache.poi.hssf.usermodel.EscherGraphics; +import org.apache.poi.hssf.usermodel.EscherGraphics2d; +import org.apache.poi.hssf.usermodel.HSSFClientAnchor; +import org.apache.poi.hssf.usermodel.HSSFPatriarch; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFShapeGroup; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; + /** * Demonstrates the use of the EscherGraphics2d library. * diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/Outlines.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/Outlines.java similarity index 99% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/Outlines.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/Outlines.java index 9630957232..d059a3d392 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/Outlines.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/Outlines.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.Closeable; import java.io.FileOutputStream; @@ -54,7 +54,7 @@ public class Outlines implements Closeable { wb.write(fileOut); } } - + @Override public void close() throws IOException { wb.close(); diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/ReadWriteWorkbook.java similarity index 97% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/ReadWriteWorkbook.java index 9b856f99b8..e36b7ad26c 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/ReadWriteWorkbook.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileInputStream; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/RepeatingRowsAndColumns.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/RepeatingRowsAndColumns.java similarity index 98% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/RepeatingRowsAndColumns.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/RepeatingRowsAndColumns.java index 5d6b4d5f90..db737cd5bb 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/RepeatingRowsAndColumns.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/RepeatingRowsAndColumns.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/SplitAndFreezePanes.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/SplitAndFreezePanes.java similarity index 97% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/SplitAndFreezePanes.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/SplitAndFreezePanes.java index a76864094b..54c3879e41 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/SplitAndFreezePanes.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/SplitAndFreezePanes.java @@ -15,9 +15,9 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - -package org.apache.poi.hssf.usermodel.examples; + +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/WorkingWithFonts.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/WorkingWithFonts.java similarity index 98% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/WorkingWithFonts.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/WorkingWithFonts.java index f0e114a1a0..0c87a335b3 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/WorkingWithFonts.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/WorkingWithFonts.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel.examples; +package org.apache.poi.examples.hssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/ZoomSheet.java b/src/examples/src/org/apache/poi/examples/hssf/usermodel/ZoomSheet.java similarity index 96% rename from src/examples/src/org/apache/poi/hssf/usermodel/examples/ZoomSheet.java rename to src/examples/src/org/apache/poi/examples/hssf/usermodel/ZoomSheet.java index 600041fc29..e958489cf7 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/ZoomSheet.java +++ b/src/examples/src/org/apache/poi/examples/hssf/usermodel/ZoomSheet.java @@ -15,15 +15,15 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - -package org.apache.poi.hssf.usermodel.examples; -import org.apache.poi.hssf.usermodel.HSSFWorkbook; -import org.apache.poi.hssf.usermodel.HSSFSheet; +package org.apache.poi.examples.hssf.usermodel; -import java.io.IOException; import java.io.FileOutputStream; +import java.io.IOException; + +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; /** * Sets the zoom magnication for a sheet. diff --git a/src/examples/src/org/apache/poi/hwpf/Word2Forrest.java b/src/examples/src/org/apache/poi/examples/hwpf/Word2Forrest.java similarity index 98% rename from src/examples/src/org/apache/poi/hwpf/Word2Forrest.java rename to src/examples/src/org/apache/poi/examples/hwpf/Word2Forrest.java index b26f3c1675..937da16a33 100644 --- a/src/examples/src/org/apache/poi/hwpf/Word2Forrest.java +++ b/src/examples/src/org/apache/poi/examples/hwpf/Word2Forrest.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.hwpf; +package org.apache.poi.examples.hwpf; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -26,6 +26,7 @@ import java.io.OutputStreamWriter; import java.io.Writer; import java.nio.charset.StandardCharsets; +import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.model.StyleDescription; import org.apache.poi.hwpf.model.StyleSheet; import org.apache.poi.hwpf.usermodel.CharacterRun; diff --git a/src/examples/src/org/apache/poi/ss/examples/AddDimensionedImage.java b/src/examples/src/org/apache/poi/examples/ss/AddDimensionedImage.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/AddDimensionedImage.java rename to src/examples/src/org/apache/poi/examples/ss/AddDimensionedImage.java index 05a8a78121..6e102038b6 100644 --- a/src/examples/src/org/apache/poi/ss/examples/AddDimensionedImage.java +++ b/src/examples/src/org/apache/poi/examples/ss/AddDimensionedImage.java @@ -16,7 +16,7 @@ ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.File; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/ss/examples/AligningCells.java b/src/examples/src/org/apache/poi/examples/ss/AligningCells.java similarity index 88% rename from src/examples/src/org/apache/poi/ss/examples/AligningCells.java rename to src/examples/src/org/apache/poi/examples/ss/AligningCells.java index cdd2bbc4c0..af86efc724 100644 --- a/src/examples/src/org/apache/poi/ss/examples/AligningCells.java +++ b/src/examples/src/org/apache/poi/examples/ss/AligningCells.java @@ -14,13 +14,20 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; -import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellStyle; +import org.apache.poi.ss.usermodel.CreationHelper; +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.VerticalAlignment; +import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook; /** diff --git a/src/examples/src/org/apache/poi/ss/examples/BusinessPlan.java b/src/examples/src/org/apache/poi/examples/ss/BusinessPlan.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/BusinessPlan.java rename to src/examples/src/org/apache/poi/examples/ss/BusinessPlan.java index 0e35509e28..59ccc6f337 100644 --- a/src/examples/src/org/apache/poi/ss/examples/BusinessPlan.java +++ b/src/examples/src/org/apache/poi/examples/ss/BusinessPlan.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.FileOutputStream; import java.text.SimpleDateFormat; diff --git a/src/examples/src/org/apache/poi/ss/examples/CalendarDemo.java b/src/examples/src/org/apache/poi/examples/ss/CalendarDemo.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/CalendarDemo.java rename to src/examples/src/org/apache/poi/examples/ss/CalendarDemo.java index 108cc25962..f11c1e0227 100644 --- a/src/examples/src/org/apache/poi/ss/examples/CalendarDemo.java +++ b/src/examples/src/org/apache/poi/examples/ss/CalendarDemo.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.FileOutputStream; import java.util.Calendar; diff --git a/src/examples/src/org/apache/poi/ss/examples/CellStyleDetails.java b/src/examples/src/org/apache/poi/examples/ss/CellStyleDetails.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/CellStyleDetails.java rename to src/examples/src/org/apache/poi/examples/ss/CellStyleDetails.java index 4729c9fb53..5081bfcd52 100644 --- a/src/examples/src/org/apache/poi/ss/examples/CellStyleDetails.java +++ b/src/examples/src/org/apache/poi/examples/ss/CellStyleDetails.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.File; diff --git a/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java b/src/examples/src/org/apache/poi/examples/ss/ConditionalFormats.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java rename to src/examples/src/org/apache/poi/examples/ss/ConditionalFormats.java index ff26f9d17d..22eec9633a 100644 --- a/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java +++ b/src/examples/src/org/apache/poi/examples/ss/ConditionalFormats.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/ss/examples/DrawingBorders.java b/src/examples/src/org/apache/poi/examples/ss/DrawingBorders.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/DrawingBorders.java rename to src/examples/src/org/apache/poi/examples/ss/DrawingBorders.java index 8a4ad94e1e..f98d64b2c6 100644 --- a/src/examples/src/org/apache/poi/ss/examples/DrawingBorders.java +++ b/src/examples/src/org/apache/poi/examples/ss/DrawingBorders.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java b/src/examples/src/org/apache/poi/examples/ss/ExcelComparator.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java rename to src/examples/src/org/apache/poi/examples/ss/ExcelComparator.java index f2cd249ef4..825b72b0c2 100644 --- a/src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java +++ b/src/examples/src/org/apache/poi/examples/ss/ExcelComparator.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.File; import java.util.ArrayList; diff --git a/src/examples/src/org/apache/poi/ss/examples/LinkedDropDownLists.java b/src/examples/src/org/apache/poi/examples/ss/LinkedDropDownLists.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/LinkedDropDownLists.java rename to src/examples/src/org/apache/poi/examples/ss/LinkedDropDownLists.java index c98c87ad79..5cbc63be60 100644 --- a/src/examples/src/org/apache/poi/ss/examples/LinkedDropDownLists.java +++ b/src/examples/src/org/apache/poi/examples/ss/LinkedDropDownLists.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.FileOutputStream; import java.io.IOException; @@ -42,12 +42,12 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; * case; the data could appear on a separate sheet. If this were done, then the * names for the regions would have to be different, they would have to include * the name of the sheet. - * - * There are two keys to this technique. The first is the use of named area or + * + * There are two keys to this technique. The first is the use of named area or * regions of cells to hold the data for the drop down lists and the second is * making use of the INDIRECT() function to convert a name into the addresses * of the cells it refers to. - * + * * Note that whilst this class builds just two linked drop down lists, there is * nothing to prevent more being created. Quite simply, use the value selected * by the user in one drop down list to determine what is shown in another and the @@ -114,16 +114,16 @@ public class LinkedDropDownLists { * the cells on rows two, three and four will be used to populate the second * drop down list, just which row will be determined by the choice the user * makes in the first drop down list. - * + * * In all cases, the approach is to create a row, create and populate cells * with data and then specify a name that identifies those cells. With the * exception of the first range, the names that are chosen for each range - * of cells are quite important. In short, each of the options the user + * of cells are quite important. In short, each of the options the user * could select in the first drop down list is used as the name for another - * range of cells. Thus, in this example, the user can select either + * range of cells. Thus, in this example, the user can select either * 'Animal', 'Vegetable' or 'Mineral' in the first drop down and so the * sheet contains ranges named 'ANIMAL', 'VEGETABLE' and 'MINERAL'. - * + * * @param dataSheet An instance of a class that implements the Sheet Sheet * interface (HSSFSheet or XSSFSheet). */ diff --git a/src/examples/src/org/apache/poi/ss/examples/LoadEmbedded.java b/src/examples/src/org/apache/poi/examples/ss/LoadEmbedded.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/LoadEmbedded.java rename to src/examples/src/org/apache/poi/examples/ss/LoadEmbedded.java index 34313b07b9..3c52ecf253 100644 --- a/src/examples/src/org/apache/poi/ss/examples/LoadEmbedded.java +++ b/src/examples/src/org/apache/poi/examples/ss/LoadEmbedded.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.File; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/ss/examples/LoanCalculator.java b/src/examples/src/org/apache/poi/examples/ss/LoanCalculator.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/LoanCalculator.java rename to src/examples/src/org/apache/poi/examples/ss/LoanCalculator.java index 079b782b14..28d1c648f0 100644 --- a/src/examples/src/org/apache/poi/ss/examples/LoanCalculator.java +++ b/src/examples/src/org/apache/poi/examples/ss/LoanCalculator.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.FileOutputStream; import java.util.HashMap; diff --git a/src/examples/src/org/apache/poi/ss/examples/SSPerformanceTest.java b/src/examples/src/org/apache/poi/examples/ss/SSPerformanceTest.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/SSPerformanceTest.java rename to src/examples/src/org/apache/poi/examples/ss/SSPerformanceTest.java index 05776bee3e..a5b7eb7170 100644 --- a/src/examples/src/org/apache/poi/ss/examples/SSPerformanceTest.java +++ b/src/examples/src/org/apache/poi/examples/ss/SSPerformanceTest.java @@ -16,7 +16,7 @@ * limitations under the License. * ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/ss/examples/TimesheetDemo.java b/src/examples/src/org/apache/poi/examples/ss/TimesheetDemo.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/TimesheetDemo.java rename to src/examples/src/org/apache/poi/examples/ss/TimesheetDemo.java index 5829454ec2..77b55c826d 100644 --- a/src/examples/src/org/apache/poi/ss/examples/TimesheetDemo.java +++ b/src/examples/src/org/apache/poi/examples/ss/TimesheetDemo.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.FileOutputStream; import java.util.HashMap; diff --git a/src/examples/src/org/apache/poi/ss/examples/ToCSV.java b/src/examples/src/org/apache/poi/examples/ss/ToCSV.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/ToCSV.java rename to src/examples/src/org/apache/poi/examples/ss/ToCSV.java index a7a806d388..f334667505 100644 --- a/src/examples/src/org/apache/poi/ss/examples/ToCSV.java +++ b/src/examples/src/org/apache/poi/examples/ss/ToCSV.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples; +package org.apache.poi.examples.ss; import java.io.BufferedWriter; diff --git a/src/examples/src/org/apache/poi/ss/examples/formula/CalculateMortgage.java b/src/examples/src/org/apache/poi/examples/ss/formula/CalculateMortgage.java similarity index 85% rename from src/examples/src/org/apache/poi/ss/examples/formula/CalculateMortgage.java rename to src/examples/src/org/apache/poi/examples/ss/formula/CalculateMortgage.java index 678776c060..2675df181b 100644 --- a/src/examples/src/org/apache/poi/ss/examples/formula/CalculateMortgage.java +++ b/src/examples/src/org/apache/poi/examples/ss/formula/CalculateMortgage.java @@ -14,19 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples.formula; +package org.apache.poi.examples.ss.formula; -import org.apache.poi.ss.formula.OperationEvaluationContext ; -import org.apache.poi.ss.formula.eval.ErrorEval ; -import org.apache.poi.ss.formula.eval.EvaluationException ; -import org.apache.poi.ss.formula.eval.NumberEval ; -import org.apache.poi.ss.formula.eval.OperandResolver ; -import org.apache.poi.ss.formula.eval.ValueEval ; -import org.apache.poi.ss.formula.functions.FreeRefFunction ; +import org.apache.poi.ss.formula.OperationEvaluationContext; +import org.apache.poi.ss.formula.eval.ErrorEval; +import org.apache.poi.ss.formula.eval.EvaluationException; +import org.apache.poi.ss.formula.eval.NumberEval; +import org.apache.poi.ss.formula.eval.OperandResolver; +import org.apache.poi.ss.formula.eval.ValueEval; +import org.apache.poi.ss.formula.functions.FreeRefFunction; /** * A simple user-defined function to calculate principal and interest. - * + * * @author Jon Svede ( jon [at] loquatic [dot] com ) * @author Brian Bush ( brian [dot] bush [at] nrel [dot] gov ) * @@ -35,9 +35,9 @@ public class CalculateMortgage implements FreeRefFunction { @Override public ValueEval evaluate( ValueEval[] args, OperationEvaluationContext ec ) { - + // verify that we have enough data - if (args.length != 3) { + if (args.length != 3) { return ErrorEval.VALUE_INVALID; } @@ -45,33 +45,33 @@ public class CalculateMortgage implements FreeRefFunction { double principal, rate, years, result; try { // extract values as ValueEval - ValueEval v1 = OperandResolver.getSingleValue( args[0], - ec.getRowIndex(), + ValueEval v1 = OperandResolver.getSingleValue( args[0], + ec.getRowIndex(), ec.getColumnIndex() ) ; - ValueEval v2 = OperandResolver.getSingleValue( args[1], - ec.getRowIndex(), + ValueEval v2 = OperandResolver.getSingleValue( args[1], + ec.getRowIndex(), ec.getColumnIndex() ) ; - ValueEval v3 = OperandResolver.getSingleValue( args[2], - ec.getRowIndex(), + ValueEval v3 = OperandResolver.getSingleValue( args[2], + ec.getRowIndex(), ec.getColumnIndex() ) ; // get data as doubles - principal = OperandResolver.coerceValueToDouble( v1 ) ; + principal = OperandResolver.coerceValueToDouble( v1 ) ; rate = OperandResolver.coerceValueToDouble( v2 ) ; years = OperandResolver.coerceValueToDouble( v3 ) ; - + result = calculateMortgagePayment( principal, rate, years ) ; System.out.println( "Result = " + result ) ; checkValue(result); - + } catch (EvaluationException e) { return e.getErrorEval(); } return new NumberEval( result ) ; } - + public double calculateMortgagePayment( double p, double r, double y ) { double i = r / 12 ; double n = y * 12 ; @@ -87,5 +87,5 @@ public class CalculateMortgage implements FreeRefFunction { if (Double.isNaN(result) || Double.isInfinite(result)) { throw new EvaluationException(ErrorEval.NUM_ERROR); } - } + } } diff --git a/src/examples/src/org/apache/poi/ss/examples/formula/CheckFunctionsSupported.java b/src/examples/src/org/apache/poi/examples/ss/formula/CheckFunctionsSupported.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/formula/CheckFunctionsSupported.java rename to src/examples/src/org/apache/poi/examples/ss/formula/CheckFunctionsSupported.java index d2291f009d..4135c80904 100644 --- a/src/examples/src/org/apache/poi/ss/examples/formula/CheckFunctionsSupported.java +++ b/src/examples/src/org/apache/poi/examples/ss/formula/CheckFunctionsSupported.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples.formula; +package org.apache.poi.examples.ss.formula; import java.io.File; import java.util.ArrayList; diff --git a/src/examples/src/org/apache/poi/ss/examples/formula/SettingExternalFunction.java b/src/examples/src/org/apache/poi/examples/ss/formula/SettingExternalFunction.java similarity index 98% rename from src/examples/src/org/apache/poi/ss/examples/formula/SettingExternalFunction.java rename to src/examples/src/org/apache/poi/examples/ss/formula/SettingExternalFunction.java index 992d0f0552..49feb3f7aa 100644 --- a/src/examples/src/org/apache/poi/ss/examples/formula/SettingExternalFunction.java +++ b/src/examples/src/org/apache/poi/examples/ss/formula/SettingExternalFunction.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.ss.examples.formula; +package org.apache.poi.examples.ss.formula; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/ss/examples/formula/UserDefinedFunctionExample.java b/src/examples/src/org/apache/poi/examples/ss/formula/UserDefinedFunctionExample.java similarity index 98% rename from src/examples/src/org/apache/poi/ss/examples/formula/UserDefinedFunctionExample.java rename to src/examples/src/org/apache/poi/examples/ss/formula/UserDefinedFunctionExample.java index 7f5922b02a..939fd9ab9d 100644 --- a/src/examples/src/org/apache/poi/ss/examples/formula/UserDefinedFunctionExample.java +++ b/src/examples/src/org/apache/poi/examples/ss/formula/UserDefinedFunctionExample.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples.formula; +package org.apache.poi.examples.ss.formula; import java.io.File; diff --git a/src/examples/src/org/apache/poi/ss/examples/formula/mortgage-calculation.xls b/src/examples/src/org/apache/poi/examples/ss/formula/mortgage-calculation.xls similarity index 100% rename from src/examples/src/org/apache/poi/ss/examples/formula/mortgage-calculation.xls rename to src/examples/src/org/apache/poi/examples/ss/formula/mortgage-calculation.xls diff --git a/src/examples/src/org/apache/poi/ss/examples/html/HSSFHtmlHelper.java b/src/examples/src/org/apache/poi/examples/ss/html/HSSFHtmlHelper.java similarity index 98% rename from src/examples/src/org/apache/poi/ss/examples/html/HSSFHtmlHelper.java rename to src/examples/src/org/apache/poi/examples/ss/html/HSSFHtmlHelper.java index e7c4ea6f02..4614a31031 100644 --- a/src/examples/src/org/apache/poi/ss/examples/html/HSSFHtmlHelper.java +++ b/src/examples/src/org/apache/poi/examples/ss/html/HSSFHtmlHelper.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples.html; +package org.apache.poi.examples.ss.html; import java.util.Formatter; diff --git a/src/examples/src/org/apache/poi/ss/examples/html/HtmlHelper.java b/src/examples/src/org/apache/poi/examples/ss/html/HtmlHelper.java similarity index 97% rename from src/examples/src/org/apache/poi/ss/examples/html/HtmlHelper.java rename to src/examples/src/org/apache/poi/examples/ss/html/HtmlHelper.java index 2cb1a91734..8747ad4c9d 100644 --- a/src/examples/src/org/apache/poi/ss/examples/html/HtmlHelper.java +++ b/src/examples/src/org/apache/poi/examples/ss/html/HtmlHelper.java @@ -15,12 +15,12 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples.html; - -import org.apache.poi.ss.usermodel.CellStyle; +package org.apache.poi.examples.ss.html; import java.util.Formatter; +import org.apache.poi.ss.usermodel.CellStyle; + /** * This interface is used where code wants to be independent of the workbook * formats. If you are writing such code, you can add a method to this diff --git a/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java b/src/examples/src/org/apache/poi/examples/ss/html/ToHtml.java similarity index 99% rename from src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java rename to src/examples/src/org/apache/poi/examples/ss/html/ToHtml.java index 15fdc2af58..930de56a29 100644 --- a/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java +++ b/src/examples/src/org/apache/poi/examples/ss/html/ToHtml.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples.html; +package org.apache.poi.examples.ss.html; import java.io.BufferedReader; import java.io.Closeable; diff --git a/src/examples/src/org/apache/poi/ss/examples/html/XSSFHtmlHelper.java b/src/examples/src/org/apache/poi/examples/ss/html/XSSFHtmlHelper.java similarity index 98% rename from src/examples/src/org/apache/poi/ss/examples/html/XSSFHtmlHelper.java rename to src/examples/src/org/apache/poi/examples/ss/html/XSSFHtmlHelper.java index 20a30ed2eb..40bd504818 100644 --- a/src/examples/src/org/apache/poi/ss/examples/html/XSSFHtmlHelper.java +++ b/src/examples/src/org/apache/poi/examples/ss/html/XSSFHtmlHelper.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples.html; +package org.apache.poi.examples.ss.html; import java.util.Formatter; diff --git a/src/examples/src/org/apache/poi/ss/examples/html/excelStyle.css b/src/examples/src/org/apache/poi/examples/ss/html/excelStyle.css similarity index 100% rename from src/examples/src/org/apache/poi/ss/examples/html/excelStyle.css rename to src/examples/src/org/apache/poi/examples/ss/html/excelStyle.css diff --git a/src/examples/src/org/apache/poi/ss/examples/html/package-info.java b/src/examples/src/org/apache/poi/examples/ss/html/package-info.java similarity index 96% rename from src/examples/src/org/apache/poi/ss/examples/html/package-info.java rename to src/examples/src/org/apache/poi/examples/ss/html/package-info.java index 11b5fd5914..1b41376632 100644 --- a/src/examples/src/org/apache/poi/ss/examples/html/package-info.java +++ b/src/examples/src/org/apache/poi/examples/ss/html/package-info.java @@ -19,4 +19,4 @@ * This package contains an example that uses POI to convert a workbook into * an HTML representation of the data. It can use both XSSF and HSSF workbooks. */ -package org.apache.poi.ss.examples.html; \ No newline at end of file +package org.apache.poi.examples.ss.html; \ No newline at end of file diff --git a/src/examples/src/org/apache/poi/examples/util/TempFileUtils.java b/src/examples/src/org/apache/poi/examples/util/TempFileUtils.java deleted file mode 100644 index b5ad6ea9f1..0000000000 --- a/src/examples/src/org/apache/poi/examples/util/TempFileUtils.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ - -package org.apache.poi.examples.util; - -import java.io.File; - -import org.apache.poi.util.TempFile; - -public final class TempFileUtils { - private TempFileUtils() { - } - - @SuppressWarnings("java:S106") - public static void checkTempFiles() { - String tmpDir = System.getProperty(TempFile.JAVA_IO_TMPDIR) + "/poifiles"; - File tempDir = new File(tmpDir); - if(tempDir.exists()) { - String[] tempFiles = tempDir.list(); - if(tempFiles != null && tempFiles.length > 0) { - System.out.println("found files in poi temp dir " + tempDir.getAbsolutePath()); - for(String filename : tempFiles) { - System.out.println("file: " + filename); - } - } - } else { - System.out.println("unable to find poi temp dir"); - } - } -} diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/AddVideoToPptx.java.txt b/src/examples/src/org/apache/poi/examples/xslf/AddVideoToPptx.java.txt similarity index 100% rename from src/examples/src/org/apache/poi/xslf/usermodel/AddVideoToPptx.java.txt rename to src/examples/src/org/apache/poi/examples/xslf/AddVideoToPptx.java.txt diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/BarChartDemo.java b/src/examples/src/org/apache/poi/examples/xslf/BarChartDemo.java similarity index 97% rename from src/examples/src/org/apache/poi/xslf/usermodel/BarChartDemo.java rename to src/examples/src/org/apache/poi/examples/xslf/BarChartDemo.java index d717e37ab0..6864c69810 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/BarChartDemo.java +++ b/src/examples/src/org/apache/poi/examples/xslf/BarChartDemo.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.xslf.usermodel; +package org.apache.poi.examples.xslf; import java.io.BufferedReader; import java.io.FileInputStream; @@ -37,6 +37,9 @@ import org.apache.poi.xddf.usermodel.chart.XDDFChartData; import org.apache.poi.xddf.usermodel.chart.XDDFDataSource; import org.apache.poi.xddf.usermodel.chart.XDDFDataSourcesFactory; import org.apache.poi.xddf.usermodel.chart.XDDFNumericalDataSource; +import org.apache.poi.xslf.usermodel.XMLSlideShow; +import org.apache.poi.xslf.usermodel.XSLFChart; +import org.apache.poi.xslf.usermodel.XSLFSlide; /** * Build a bar chart from a template pptx diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/ChartFromScratch.java b/src/examples/src/org/apache/poi/examples/xslf/ChartFromScratch.java similarity index 96% rename from src/examples/src/org/apache/poi/xslf/usermodel/ChartFromScratch.java rename to src/examples/src/org/apache/poi/examples/xslf/ChartFromScratch.java index eb007fc09b..d012744deb 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/ChartFromScratch.java +++ b/src/examples/src/org/apache/poi/examples/xslf/ChartFromScratch.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.xslf.usermodel; +package org.apache.poi.examples.xslf; import java.awt.geom.Rectangle2D; import java.io.BufferedReader; @@ -45,6 +45,11 @@ import org.apache.poi.xddf.usermodel.chart.XDDFDataSource; import org.apache.poi.xddf.usermodel.chart.XDDFDataSourcesFactory; import org.apache.poi.xddf.usermodel.chart.XDDFNumericalDataSource; import org.apache.poi.xddf.usermodel.chart.XDDFValueAxis; +import org.apache.poi.xslf.usermodel.XMLSlideShow; +import org.apache.poi.xslf.usermodel.XSLFChart; +import org.apache.poi.xslf.usermodel.XSLFGraphicFrame; +import org.apache.poi.xslf.usermodel.XSLFShape; +import org.apache.poi.xslf.usermodel.XSLFSlide; /** * Build a chart without reading template file diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/DataExtraction.java b/src/examples/src/org/apache/poi/examples/xslf/DataExtraction.java similarity index 91% rename from src/examples/src/org/apache/poi/xslf/usermodel/DataExtraction.java rename to src/examples/src/org/apache/poi/examples/xslf/DataExtraction.java index 543726a48b..40a7c7f0d9 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/DataExtraction.java +++ b/src/examples/src/org/apache/poi/examples/xslf/DataExtraction.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.xslf.usermodel; +package org.apache.poi.examples.xslf; import java.awt.Dimension; import java.io.FileInputStream; @@ -26,6 +26,12 @@ import java.io.InputStream; import java.io.PrintStream; import org.apache.poi.openxml4j.opc.PackagePart; +import org.apache.poi.xslf.usermodel.XMLSlideShow; +import org.apache.poi.xslf.usermodel.XSLFPictureData; +import org.apache.poi.xslf.usermodel.XSLFPictureShape; +import org.apache.poi.xslf.usermodel.XSLFShape; +import org.apache.poi.xslf.usermodel.XSLFSlide; +import org.apache.poi.xslf.usermodel.XSLFTextShape; /** * Demonstrates how you can extract data from a .pptx file diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/MergePresentations.java b/src/examples/src/org/apache/poi/examples/xslf/MergePresentations.java similarity index 93% rename from src/examples/src/org/apache/poi/xslf/usermodel/MergePresentations.java rename to src/examples/src/org/apache/poi/examples/xslf/MergePresentations.java index e295ffd1ee..89ae0b1aa9 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/MergePresentations.java +++ b/src/examples/src/org/apache/poi/examples/xslf/MergePresentations.java @@ -17,11 +17,14 @@ * ==================================================================== */ -package org.apache.poi.xslf.usermodel; +package org.apache.poi.examples.xslf; import java.io.FileInputStream; import java.io.FileOutputStream; +import org.apache.poi.xslf.usermodel.XMLSlideShow; +import org.apache.poi.xslf.usermodel.XSLFSlide; + /** * Merge multiple pptx presentations together */ diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/PPTX2SVG.txt b/src/examples/src/org/apache/poi/examples/xslf/PPTX2SVG.txt similarity index 100% rename from src/examples/src/org/apache/poi/xslf/usermodel/PPTX2SVG.txt rename to src/examples/src/org/apache/poi/examples/xslf/PPTX2SVG.txt diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/PieChartDemo.java b/src/examples/src/org/apache/poi/examples/xslf/PieChartDemo.java similarity index 96% rename from src/examples/src/org/apache/poi/xslf/usermodel/PieChartDemo.java rename to src/examples/src/org/apache/poi/examples/xslf/PieChartDemo.java index 15036a874f..9f0ca73fb6 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/PieChartDemo.java +++ b/src/examples/src/org/apache/poi/examples/xslf/PieChartDemo.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.xslf.usermodel; +package org.apache.poi.examples.xslf; import java.io.BufferedReader; import java.io.FileInputStream; @@ -34,6 +34,9 @@ import org.apache.poi.xddf.usermodel.chart.XDDFDataSource; import org.apache.poi.xddf.usermodel.chart.XDDFDataSourcesFactory; import org.apache.poi.xddf.usermodel.chart.XDDFNumericalDataSource; import org.apache.poi.xddf.usermodel.chart.XDDFPieChartData; +import org.apache.poi.xslf.usermodel.XMLSlideShow; +import org.apache.poi.xslf.usermodel.XSLFChart; +import org.apache.poi.xslf.usermodel.XSLFSlide; /** * Build a pie chart from a template pptx diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial1.java b/src/examples/src/org/apache/poi/examples/xslf/Tutorial1.java similarity index 88% rename from src/examples/src/org/apache/poi/xslf/usermodel/Tutorial1.java rename to src/examples/src/org/apache/poi/examples/xslf/Tutorial1.java index 34a33f74e5..d1b4768a1c 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial1.java +++ b/src/examples/src/org/apache/poi/examples/xslf/Tutorial1.java @@ -14,14 +14,22 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ==================================================================== + * ==================================================================== */ -package org.apache.poi.xslf.usermodel; +package org.apache.poi.examples.xslf; import java.io.FileOutputStream; import java.io.IOException; +import org.apache.poi.xslf.usermodel.SlideLayout; +import org.apache.poi.xslf.usermodel.XMLSlideShow; +import org.apache.poi.xslf.usermodel.XSLFSlide; +import org.apache.poi.xslf.usermodel.XSLFSlideLayout; +import org.apache.poi.xslf.usermodel.XSLFSlideMaster; +import org.apache.poi.xslf.usermodel.XSLFTextParagraph; +import org.apache.poi.xslf.usermodel.XSLFTextShape; + /** * Demonstrates how to create slides with predefined layout * and fill the placeholder shapes diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial2.java b/src/examples/src/org/apache/poi/examples/xslf/Tutorial2.java similarity index 92% rename from src/examples/src/org/apache/poi/xslf/usermodel/Tutorial2.java rename to src/examples/src/org/apache/poi/examples/xslf/Tutorial2.java index b1c1e1eb6c..78afd7015f 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial2.java +++ b/src/examples/src/org/apache/poi/examples/xslf/Tutorial2.java @@ -14,16 +14,22 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ==================================================================== + * ==================================================================== */ -package org.apache.poi.xslf.usermodel; +package org.apache.poi.examples.xslf; import java.awt.Color; import java.awt.Rectangle; import java.io.FileOutputStream; import java.io.IOException; +import org.apache.poi.xslf.usermodel.XMLSlideShow; +import org.apache.poi.xslf.usermodel.XSLFSlide; +import org.apache.poi.xslf.usermodel.XSLFTextBox; +import org.apache.poi.xslf.usermodel.XSLFTextParagraph; +import org.apache.poi.xslf.usermodel.XSLFTextRun; + /** * Basic paragraph and text formatting */ diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial3.java b/src/examples/src/org/apache/poi/examples/xslf/Tutorial3.java similarity index 89% rename from src/examples/src/org/apache/poi/xslf/usermodel/Tutorial3.java rename to src/examples/src/org/apache/poi/examples/xslf/Tutorial3.java index 15b8660b9b..420605ee75 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial3.java +++ b/src/examples/src/org/apache/poi/examples/xslf/Tutorial3.java @@ -14,16 +14,19 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ==================================================================== + * ==================================================================== */ -package org.apache.poi.xslf.usermodel; +package org.apache.poi.examples.xslf; import java.awt.Rectangle; import java.io.FileOutputStream; import java.io.IOException; import org.apache.poi.sl.usermodel.Placeholder; +import org.apache.poi.xslf.usermodel.XMLSlideShow; +import org.apache.poi.xslf.usermodel.XSLFSlide; +import org.apache.poi.xslf.usermodel.XSLFTextShape; /** * How to set slide title diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial4.java b/src/examples/src/org/apache/poi/examples/xslf/Tutorial4.java similarity index 89% rename from src/examples/src/org/apache/poi/xslf/usermodel/Tutorial4.java rename to src/examples/src/org/apache/poi/examples/xslf/Tutorial4.java index 68648ab823..a39e9030d8 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial4.java +++ b/src/examples/src/org/apache/poi/examples/xslf/Tutorial4.java @@ -14,10 +14,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ==================================================================== + * ==================================================================== */ -package org.apache.poi.xslf.usermodel; +package org.apache.poi.examples.xslf; import java.awt.Color; import java.awt.Rectangle; @@ -26,6 +26,13 @@ import java.io.IOException; import org.apache.poi.sl.usermodel.TableCell.BorderEdge; import org.apache.poi.sl.usermodel.TextParagraph.TextAlign; +import org.apache.poi.xslf.usermodel.XMLSlideShow; +import org.apache.poi.xslf.usermodel.XSLFSlide; +import org.apache.poi.xslf.usermodel.XSLFTable; +import org.apache.poi.xslf.usermodel.XSLFTableCell; +import org.apache.poi.xslf.usermodel.XSLFTableRow; +import org.apache.poi.xslf.usermodel.XSLFTextParagraph; +import org.apache.poi.xslf.usermodel.XSLFTextRun; /** * PPTX Tables diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial5.java b/src/examples/src/org/apache/poi/examples/xslf/Tutorial5.java similarity index 89% rename from src/examples/src/org/apache/poi/xslf/usermodel/Tutorial5.java rename to src/examples/src/org/apache/poi/examples/xslf/Tutorial5.java index 4230cc265d..cc459a17bb 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial5.java +++ b/src/examples/src/org/apache/poi/examples/xslf/Tutorial5.java @@ -14,16 +14,19 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ==================================================================== + * ==================================================================== */ -package org.apache.poi.xslf.usermodel; +package org.apache.poi.examples.xslf; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import org.apache.poi.sl.usermodel.PictureData.PictureType; +import org.apache.poi.xslf.usermodel.XMLSlideShow; +import org.apache.poi.xslf.usermodel.XSLFPictureData; +import org.apache.poi.xslf.usermodel.XSLFSlide; /** * Images diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial6.java b/src/examples/src/org/apache/poi/examples/xslf/Tutorial6.java similarity index 88% rename from src/examples/src/org/apache/poi/xslf/usermodel/Tutorial6.java rename to src/examples/src/org/apache/poi/examples/xslf/Tutorial6.java index 8ddd6ce3fa..1648e21acf 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial6.java +++ b/src/examples/src/org/apache/poi/examples/xslf/Tutorial6.java @@ -17,12 +17,18 @@ * ==================================================================== */ -package org.apache.poi.xslf.usermodel; +package org.apache.poi.examples.xslf; import java.awt.Rectangle; import java.io.FileOutputStream; import java.io.IOException; +import org.apache.poi.xslf.usermodel.XMLSlideShow; +import org.apache.poi.xslf.usermodel.XSLFHyperlink; +import org.apache.poi.xslf.usermodel.XSLFSlide; +import org.apache.poi.xslf.usermodel.XSLFTextBox; +import org.apache.poi.xslf.usermodel.XSLFTextRun; + /** * Hyperlinks */ diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial7.java b/src/examples/src/org/apache/poi/examples/xslf/Tutorial7.java similarity index 91% rename from src/examples/src/org/apache/poi/xslf/usermodel/Tutorial7.java rename to src/examples/src/org/apache/poi/examples/xslf/Tutorial7.java index 2fcd9c3250..d617de8dbc 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial7.java +++ b/src/examples/src/org/apache/poi/examples/xslf/Tutorial7.java @@ -14,10 +14,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ==================================================================== + * ==================================================================== */ -package org.apache.poi.xslf.usermodel; +package org.apache.poi.examples.xslf; import java.awt.Color; import java.awt.Rectangle; @@ -25,6 +25,11 @@ import java.io.FileOutputStream; import java.io.IOException; import org.apache.poi.sl.usermodel.AutoNumberingScheme; +import org.apache.poi.xslf.usermodel.XMLSlideShow; +import org.apache.poi.xslf.usermodel.XSLFSlide; +import org.apache.poi.xslf.usermodel.XSLFTextBox; +import org.apache.poi.xslf.usermodel.XSLFTextParagraph; +import org.apache.poi.xslf.usermodel.XSLFTextRun; /** * Bullets and numbering diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/bar-chart-data.txt b/src/examples/src/org/apache/poi/examples/xslf/bar-chart-data.txt similarity index 100% rename from src/examples/src/org/apache/poi/xslf/usermodel/bar-chart-data.txt rename to src/examples/src/org/apache/poi/examples/xslf/bar-chart-data.txt diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/bar-chart-template.pptx b/src/examples/src/org/apache/poi/examples/xslf/bar-chart-template.pptx similarity index 100% rename from src/examples/src/org/apache/poi/xslf/usermodel/bar-chart-template.pptx rename to src/examples/src/org/apache/poi/examples/xslf/bar-chart-template.pptx diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/pie-chart-data.txt b/src/examples/src/org/apache/poi/examples/xslf/pie-chart-data.txt similarity index 100% rename from src/examples/src/org/apache/poi/xslf/usermodel/pie-chart-data.txt rename to src/examples/src/org/apache/poi/examples/xslf/pie-chart-data.txt diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/pie-chart-template.pptx b/src/examples/src/org/apache/poi/examples/xslf/pie-chart-template.pptx similarity index 100% rename from src/examples/src/org/apache/poi/xslf/usermodel/pie-chart-template.pptx rename to src/examples/src/org/apache/poi/examples/xslf/pie-chart-template.pptx diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/tutorial/Step1.java b/src/examples/src/org/apache/poi/examples/xslf/tutorial/Step1.java similarity index 98% rename from src/examples/src/org/apache/poi/xslf/usermodel/tutorial/Step1.java rename to src/examples/src/org/apache/poi/examples/xslf/tutorial/Step1.java index 6651bcc4f8..2d384a8389 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/tutorial/Step1.java +++ b/src/examples/src/org/apache/poi/examples/xslf/tutorial/Step1.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.xslf.usermodel.tutorial; +package org.apache.poi.examples.xslf.tutorial; import java.io.FileInputStream; diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/tutorial/Step2.java b/src/examples/src/org/apache/poi/examples/xslf/tutorial/Step2.java similarity index 98% rename from src/examples/src/org/apache/poi/xslf/usermodel/tutorial/Step2.java rename to src/examples/src/org/apache/poi/examples/xslf/tutorial/Step2.java index 03fd4f6abb..68fcf14f5c 100644 --- a/src/examples/src/org/apache/poi/xslf/usermodel/tutorial/Step2.java +++ b/src/examples/src/org/apache/poi/examples/xslf/tutorial/Step2.java @@ -17,7 +17,9 @@ * ==================================================================== */ -package org.apache.poi.xslf.usermodel.tutorial; +package org.apache.poi.examples.xslf.tutorial; + +import java.io.FileOutputStream; import org.apache.poi.xslf.usermodel.SlideLayout; import org.apache.poi.xslf.usermodel.XMLSlideShow; @@ -26,8 +28,6 @@ import org.apache.poi.xslf.usermodel.XSLFSlideLayout; import org.apache.poi.xslf.usermodel.XSLFSlideMaster; import org.apache.poi.xslf.usermodel.XSLFTextShape; -import java.io.FileOutputStream; - /** * Create slides from pre-defined slide layouts */ diff --git a/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java b/src/examples/src/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java similarity index 96% rename from src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java rename to src/examples/src/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java index 3c79e1c4fa..4b376a979d 100644 --- a/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java +++ b/src/examples/src/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.eventusermodel.examples; +package org.apache.poi.examples.xssf.eventusermodel; import java.io.InputStream; import java.util.Iterator; @@ -26,7 +26,6 @@ import javax.xml.parsers.ParserConfigurationException; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.PackageAccess; import org.apache.poi.util.XMLHelper; -import org.apache.poi.xssf.eventusermodel.XLSX2CSV; import org.apache.poi.xssf.eventusermodel.XSSFReader; import org.apache.poi.xssf.model.SharedStringsTable; import org.xml.sax.Attributes; @@ -133,11 +132,11 @@ public class FromHowTo { throws SAXException { // Process the last contents as required. // Do now, as characters() may be called more than once - if(nextIsString && !lastContents.trim().isEmpty()) { + if(nextIsString) { Integer idx = Integer.valueOf(lastContents); lastContents = lruCache.get(idx); if (lastContents == null && !lruCache.containsKey(idx)) { - lastContents = sst.getItemAt(idx).toString(); + lastContents = sst.getItemAt(idx).getString(); lruCache.put(idx, lastContents); } nextIsString = false; diff --git a/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/LoadPasswordProtectedXlsxStreaming.java b/src/examples/src/org/apache/poi/examples/xssf/eventusermodel/LoadPasswordProtectedXlsxStreaming.java similarity index 95% rename from src/examples/src/org/apache/poi/xssf/eventusermodel/examples/LoadPasswordProtectedXlsxStreaming.java rename to src/examples/src/org/apache/poi/examples/xssf/eventusermodel/LoadPasswordProtectedXlsxStreaming.java index 7a3ad6b022..96ba25e396 100644 --- a/src/examples/src/org/apache/poi/xssf/eventusermodel/examples/LoadPasswordProtectedXlsxStreaming.java +++ b/src/examples/src/org/apache/poi/examples/xssf/eventusermodel/LoadPasswordProtectedXlsxStreaming.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.apache.poi.xssf.eventusermodel.examples; +package org.apache.poi.examples.xssf.eventusermodel; import java.io.InputStream; +import org.apache.poi.examples.xssf.usermodel.LoadPasswordProtectedXlsx; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.poifs.crypt.temp.AesZipFileZipEntrySource; import org.apache.poi.xssf.eventusermodel.XSSFReader; import org.apache.poi.xssf.eventusermodel.XSSFReader.SheetIterator; -import org.apache.poi.xssf.usermodel.examples.LoadPasswordProtectedXlsx; /** * An example that loads a password protected workbook and counts the sheets. diff --git a/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java b/src/examples/src/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java similarity index 97% rename from src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java rename to src/examples/src/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java index 5b9a519b28..1786538366 100644 --- a/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java +++ b/src/examples/src/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.eventusermodel; +package org.apache.poi.examples.xssf.eventusermodel; import java.io.File; import java.io.IOException; @@ -31,6 +31,9 @@ import org.apache.poi.ss.usermodel.DataFormatter; import org.apache.poi.ss.util.CellAddress; import org.apache.poi.ss.util.CellReference; import org.apache.poi.util.XMLHelper; +import org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable; +import org.apache.poi.xssf.eventusermodel.XSSFReader; +import org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler; import org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler; import org.apache.poi.xssf.extractor.XSSFEventBasedExcelExtractor; import org.apache.poi.xssf.model.SharedStrings; @@ -132,7 +135,7 @@ public class XLSX2CSV { //noinspection ResultOfMethodCallIgnored Double.parseDouble(formattedValue); output.append(formattedValue); - } catch (Exception e) { + } catch (NumberFormatException e) { output.append('"'); output.append(formattedValue); output.append('"'); diff --git a/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java b/src/examples/src/org/apache/poi/examples/xssf/streaming/HybridStreaming.java similarity index 96% rename from src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java rename to src/examples/src/org/apache/poi/examples/xssf/streaming/HybridStreaming.java index 2092475c55..f131e5b6e8 100644 --- a/src/examples/src/org/apache/poi/xssf/streaming/examples/HybridStreaming.java +++ b/src/examples/src/org/apache/poi/examples/xssf/streaming/HybridStreaming.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.streaming.examples; +package org.apache.poi.examples.xssf.streaming; import java.io.FileInputStream; import java.io.IOException; @@ -30,12 +30,12 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheet; import org.xml.sax.SAXException; /** - * This demonstrates how a hybrid approach to workbook read can be taken, using + * This demonstrates how a hybrid approach to workbook read can be taken, using * a mix of traditional XSSF and streaming one particular worksheet (perhaps one * which is too big for the ordinary DOM parse). */ public class HybridStreaming { - + private static final String SHEET_TO_STREAM = "large sheet"; public static void main(String[] args) throws IOException, SAXException { @@ -61,15 +61,15 @@ public class HybridStreaming { private static SheetContentsHandler createSheetContentsHandler() { return new SheetContentsHandler() { - + @Override public void startRow(int rowNum) { } - + @Override public void endRow(int rowNum) { } - + @Override public void cell(String cellReference, String formattedValue, XSSFComment comment) { } diff --git a/src/examples/src/org/apache/poi/xssf/streaming/examples/Outlining.java b/src/examples/src/org/apache/poi/examples/xssf/streaming/Outlining.java similarity index 97% rename from src/examples/src/org/apache/poi/xssf/streaming/examples/Outlining.java rename to src/examples/src/org/apache/poi/examples/xssf/streaming/Outlining.java index 7c892a89a8..bd558e9743 100644 --- a/src/examples/src/org/apache/poi/xssf/streaming/examples/Outlining.java +++ b/src/examples/src/org/apache/poi/examples/xssf/streaming/Outlining.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.streaming.examples; +package org.apache.poi.examples.xssf.streaming; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/streaming/examples/SavePasswordProtectedXlsx.java b/src/examples/src/org/apache/poi/examples/xssf/streaming/SavePasswordProtectedXlsx.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/streaming/examples/SavePasswordProtectedXlsx.java rename to src/examples/src/org/apache/poi/examples/xssf/streaming/SavePasswordProtectedXlsx.java index a20c87e825..f991047db7 100644 --- a/src/examples/src/org/apache/poi/xssf/streaming/examples/SavePasswordProtectedXlsx.java +++ b/src/examples/src/org/apache/poi/examples/xssf/streaming/SavePasswordProtectedXlsx.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.xssf.streaming.examples; +package org.apache.poi.examples.xssf.streaming; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/AligningCells.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/AligningCells.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/AligningCells.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/AligningCells.java index bee89d1dfb..17a92d3d8c 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/AligningCells.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/AligningCells.java @@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; @@ -37,7 +37,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.impl.CTRowImpl; * Shows how various alignment options work. * * Modified by Cristian Petrula, Romania on May 26, 2010 - * New method was added centerAcrossSelection to center a column content over + * New method was added centerAcrossSelection to center a column content over * one selection using {@link HorizontalAlignment#CENTER_SELECTION} * To create this method example was change for XSSF only and the previous * AligningCells.java example has been moved into the SS examples folder. diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/BarAndLineChart.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/BarAndLineChart.java similarity index 99% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/BarAndLineChart.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/BarAndLineChart.java index 2ad12a3683..e5cf0542b0 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/BarAndLineChart.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/BarAndLineChart.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.util.Random; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/BarChart.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/BarChart.java similarity index 99% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/BarChart.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/BarChart.java index 0cd57fc70e..2a3c6a761b 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/BarChart.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/BarChart.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java similarity index 99% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java index 8aaecb4f1a..2afc73a6ab 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.File; import java.io.FileInputStream; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CalendarDemo.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CalendarDemo.java similarity index 94% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/CalendarDemo.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/CalendarDemo.java index 11ffafc63e..b97ef1a8b9 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CalendarDemo.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CalendarDemo.java @@ -15,16 +15,27 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; - -import org.apache.poi.xssf.usermodel.*; -import org.apache.poi.ss.util.CellRangeAddress; -import org.apache.poi.ss.usermodel.*; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.util.Calendar; -import java.util.Map; import java.util.HashMap; +import java.util.Map; + +import org.apache.poi.ss.usermodel.BorderStyle; +import org.apache.poi.ss.usermodel.FillPatternType; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.PrintOrientation; +import org.apache.poi.ss.usermodel.VerticalAlignment; +import org.apache.poi.ss.util.CellRangeAddress; +import org.apache.poi.xssf.usermodel.XSSFCell; +import org.apache.poi.xssf.usermodel.XSSFCellStyle; +import org.apache.poi.xssf.usermodel.XSSFColor; +import org.apache.poi.xssf.usermodel.XSSFFont; +import org.apache.poi.xssf.usermodel.XSSFPrintSetup; +import org.apache.poi.xssf.usermodel.XSSFRow; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; /** * A monthly calendar created using Apache POI. Each month is on a separate sheet. diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CellComments.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CellComments.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/CellComments.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/CellComments.java index 40f490520b..eb5757779c 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CellComments.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CellComments.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateCell.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CreateCell.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateCell.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/CreateCell.java index 27bc0601f1..36e93dec2f 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateCell.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CreateCell.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CreatePivotTable.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/CreatePivotTable.java index a048ae4014..991dd2f71a 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CreatePivotTable.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileNotFoundException; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable2.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CreatePivotTable2.java similarity index 99% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable2.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/CreatePivotTable2.java index 27ff990c37..7ba0c78bdf 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreatePivotTable2.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CreatePivotTable2.java @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; -import java.util.Date; import java.util.Calendar; +import java.util.Date; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.ss.SpreadsheetVersion; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateTable.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CreateTable.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateTable.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/CreateTable.java index ad2b6adcdd..7e1d56ad00 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateTable.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CreateTable.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateUserDefinedDataFormats.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CreateUserDefinedDataFormats.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateUserDefinedDataFormats.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/CreateUserDefinedDataFormats.java index 134560b45c..03d88d67ef 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateUserDefinedDataFormats.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CreateUserDefinedDataFormats.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CustomXMLMapping.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CustomXMLMapping.java similarity index 97% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/CustomXMLMapping.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/CustomXMLMapping.java index 9f2ab3d4b7..ebc04a4d33 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/CustomXMLMapping.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/CustomXMLMapping.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.ByteArrayOutputStream; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/EmbeddedObjects.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/EmbeddedObjects.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/EmbeddedObjects.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/EmbeddedObjects.java index 1931af7557..b4af95c5ae 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/EmbeddedObjects.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/EmbeddedObjects.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.Closeable; import java.io.InputStream; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/ExcelChartWithTargetLine.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java similarity index 99% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/ExcelChartWithTargetLine.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java index c5a4f8dee8..01cdaf5def 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/ExcelChartWithTargetLine.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/FillsAndColors.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/FillsAndColors.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/FillsAndColors.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/FillsAndColors.java index f7ffcf5d42..baf462ce32 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/FillsAndColors.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/FillsAndColors.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/FitSheetToOnePage.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/FitSheetToOnePage.java similarity index 97% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/FitSheetToOnePage.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/FitSheetToOnePage.java index 398b8de8fd..389e87fd0b 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/FitSheetToOnePage.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/FitSheetToOnePage.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/HeadersAndFooters.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/HeadersAndFooters.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/HeadersAndFooters.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/HeadersAndFooters.java index fc9860dec0..946ae50fd4 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/HeadersAndFooters.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/HeadersAndFooters.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/HyperlinkExample.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/HyperlinkExample.java index e5663ecf42..519631960e 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/HyperlinkExample.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/IterateCells.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/IterateCells.java similarity index 97% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/IterateCells.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/IterateCells.java index b7f2930ffc..0b49927977 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/IterateCells.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/IterateCells.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileInputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/LineChart.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/LineChart.java similarity index 99% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/LineChart.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/LineChart.java index 0141e17573..268d632a04 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/LineChart.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/LineChart.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/LoadPasswordProtectedXlsx.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/LoadPasswordProtectedXlsx.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/LoadPasswordProtectedXlsx.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/LoadPasswordProtectedXlsx.java index 7afe88f00e..6e376f0f56 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/LoadPasswordProtectedXlsx.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/LoadPasswordProtectedXlsx.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileInputStream; import java.io.InputStream; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/MergingCells.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/MergingCells.java similarity index 97% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/MergingCells.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/MergingCells.java index f9abb80005..22695c53fe 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/MergingCells.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/MergingCells.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/NewLinesInCells.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/NewLinesInCells.java similarity index 97% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/NewLinesInCells.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/NewLinesInCells.java index c3b4c1c0a0..8064260dd8 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/NewLinesInCells.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/NewLinesInCells.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/Outlining.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/Outlining.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/Outlining.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/Outlining.java index b00b59a308..09f87cd5fa 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/Outlining.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/Outlining.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/ScatterChart.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/ScatterChart.java similarity index 99% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/ScatterChart.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/ScatterChart.java index 5e10db8591..6946126a39 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/ScatterChart.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/ScatterChart.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/SelectedSheet.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/SelectedSheet.java similarity index 97% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/SelectedSheet.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/SelectedSheet.java index ffe384f828..ef6d9470c7 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/SelectedSheet.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/SelectedSheet.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; @@ -24,7 +24,7 @@ import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook; public abstract class SelectedSheet { - + public static void main(String[]args) throws IOException { try (Workbook wb = new XSSFWorkbook()) { //or new HSSFWorkbook(); diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/ShiftRows.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/ShiftRows.java similarity index 96% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/ShiftRows.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/ShiftRows.java index 48ab3bf4fd..92d1f4ce6d 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/ShiftRows.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/ShiftRows.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; @@ -26,7 +26,7 @@ import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook; /** - * How to shift rows up or down + * How to shift rows up or down */ public class ShiftRows { diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/SplitAndFreezePanes.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/SplitAndFreezePanes.java similarity index 97% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/SplitAndFreezePanes.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/SplitAndFreezePanes.java index dfee2473d9..4a8afee879 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/SplitAndFreezePanes.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/SplitAndFreezePanes.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkbookProperties.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkbookProperties.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkbookProperties.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkbookProperties.java index 4e28e9da3a..9bb43f96fc 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkbookProperties.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkbookProperties.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithBorders.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithBorders.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithBorders.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithBorders.java index bdf856fa99..5ffa54aab8 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithBorders.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithBorders.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithFonts.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithFonts.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithFonts.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithFonts.java index b2fa5993b1..a40ae57f42 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithFonts.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithFonts.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithPageSetup.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithPageSetup.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithPageSetup.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithPageSetup.java index 7da2d53a37..a43c5125a3 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithPageSetup.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithPageSetup.java @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; +import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.util.CellRangeAddress; -import org.apache.poi.ss.usermodel.Row; import org.apache.poi.xssf.usermodel.XSSFWorkbook; /** diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithPictures.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithPictures.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithPictures.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithPictures.java index 0bee5e73e9..555bc513d8 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithPictures.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithPictures.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileInputStream; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithRichText.java b/src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithRichText.java similarity index 98% rename from src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithRichText.java rename to src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithRichText.java index 9fdda45c2c..43376fa1f6 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithRichText.java +++ b/src/examples/src/org/apache/poi/examples/xssf/usermodel/WorkingWithRichText.java @@ -15,7 +15,7 @@ limitations under the License. ==================================================================== */ -package org.apache.poi.xssf.usermodel.examples; +package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.OutputStream; diff --git a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/BarChartExample.java b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java similarity index 99% rename from src/examples/src/org/apache/poi/xwpf/usermodel/examples/BarChartExample.java rename to src/examples/src/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java index 2301687c47..89bd260505 100644 --- a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/BarChartExample.java +++ b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java @@ -18,7 +18,7 @@ * ==================================================================== */ -package org.apache.poi.xwpf.usermodel.examples; +package org.apache.poi.examples.xwpf.usermodel; import java.io.BufferedReader; import java.io.FileInputStream; diff --git a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/BetterHeaderFooterExample.java b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/BetterHeaderFooterExample.java similarity index 97% rename from src/examples/src/org/apache/poi/xwpf/usermodel/examples/BetterHeaderFooterExample.java rename to src/examples/src/org/apache/poi/examples/xwpf/usermodel/BetterHeaderFooterExample.java index 6cd7cfa9e6..39c9d0812e 100644 --- a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/BetterHeaderFooterExample.java +++ b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/BetterHeaderFooterExample.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xwpf.usermodel.examples; +package org.apache.poi.examples.xwpf.usermodel; import java.io.File; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/ChartFromScratch.java b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/ChartFromScratch.java similarity index 99% rename from src/examples/src/org/apache/poi/xwpf/usermodel/examples/ChartFromScratch.java rename to src/examples/src/org/apache/poi/examples/xwpf/usermodel/ChartFromScratch.java index 266466c141..9eb0e2dd3f 100644 --- a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/ChartFromScratch.java +++ b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/ChartFromScratch.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.xwpf.usermodel.examples; +package org.apache.poi.examples.xwpf.usermodel; import java.io.BufferedReader; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/HeaderFooterTable.java b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/HeaderFooterTable.java similarity index 97% rename from src/examples/src/org/apache/poi/xwpf/usermodel/examples/HeaderFooterTable.java rename to src/examples/src/org/apache/poi/examples/xwpf/usermodel/HeaderFooterTable.java index bc40c4d764..70d2b7e588 100644 --- a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/HeaderFooterTable.java +++ b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/HeaderFooterTable.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xwpf.usermodel.examples; +package org.apache.poi.examples.xwpf.usermodel; import java.io.File; import java.io.FileOutputStream; @@ -66,7 +66,7 @@ public class HeaderFooterTable { // Now set up a grid for the table, cells will fit into the grid // Each cell width is 3120 in 1440ths of an inch, or 1/3rd of 6.5" - BigInteger w = BigInteger.valueOf(3120); + BigInteger w = new BigInteger("3120"); CTTblGrid grid = ctTbl.addNewTblGrid(); for (int i = 0; i < 3; i++) { CTTblGridCol gridCol = grid.addNewGridCol(); diff --git a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/SimpleDocument.java b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleDocument.java similarity index 99% rename from src/examples/src/org/apache/poi/xwpf/usermodel/examples/SimpleDocument.java rename to src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleDocument.java index 2699015445..57515545cf 100644 --- a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/SimpleDocument.java +++ b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleDocument.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xwpf.usermodel.examples; +package org.apache.poi.examples.xwpf.usermodel; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/SimpleDocumentWithHeader.java b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleDocumentWithHeader.java similarity index 97% rename from src/examples/src/org/apache/poi/xwpf/usermodel/examples/SimpleDocumentWithHeader.java rename to src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleDocumentWithHeader.java index 7927e911c7..659f6b6f39 100644 --- a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/SimpleDocumentWithHeader.java +++ b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleDocumentWithHeader.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xwpf.usermodel.examples; +package org.apache.poi.examples.xwpf.usermodel; import java.io.File; import java.io.FileOutputStream; @@ -29,7 +29,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText; /** - * + * * @author Richard Ngo * */ diff --git a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/SimpleImages.java b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleImages.java similarity index 98% rename from src/examples/src/org/apache/poi/xwpf/usermodel/examples/SimpleImages.java rename to src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleImages.java index 9e379955e2..1f996cfd1f 100644 --- a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/SimpleImages.java +++ b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleImages.java @@ -16,7 +16,7 @@ * limitations under the License. * ==================================================================== */ -package org.apache.poi.xwpf.usermodel.examples; +package org.apache.poi.examples.xwpf.usermodel; import java.io.FileInputStream; import java.io.FileOutputStream; diff --git a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/SimpleTable.java b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleTable.java similarity index 99% rename from src/examples/src/org/apache/poi/xwpf/usermodel/examples/SimpleTable.java rename to src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleTable.java index b09e00bd48..2a67f8f5df 100644 --- a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/SimpleTable.java +++ b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleTable.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.xwpf.usermodel.examples; +package org.apache.poi.examples.xwpf.usermodel; import java.io.FileOutputStream; import java.io.OutputStream; diff --git a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/UpdateEmbeddedDoc.java b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/UpdateEmbeddedDoc.java similarity index 99% rename from src/examples/src/org/apache/poi/xwpf/usermodel/examples/UpdateEmbeddedDoc.java rename to src/examples/src/org/apache/poi/examples/xwpf/usermodel/UpdateEmbeddedDoc.java index af0eefde46..faf31b3ded 100644 --- a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/UpdateEmbeddedDoc.java +++ b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/UpdateEmbeddedDoc.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.apache.poi.xwpf.usermodel.examples; +package org.apache.poi.examples.xwpf.usermodel; import java.io.File; import java.io.FileInputStream; diff --git a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/bar-chart-data.txt b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/bar-chart-data.txt similarity index 100% rename from src/examples/src/org/apache/poi/xwpf/usermodel/examples/bar-chart-data.txt rename to src/examples/src/org/apache/poi/examples/xwpf/usermodel/bar-chart-data.txt diff --git a/src/examples/src/org/apache/poi/xwpf/usermodel/examples/bar-chart-template.docx b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/bar-chart-template.docx similarity index 100% rename from src/examples/src/org/apache/poi/xwpf/usermodel/examples/bar-chart-template.docx rename to src/examples/src/org/apache/poi/examples/xwpf/usermodel/bar-chart-template.docx diff --git a/src/examples/src/org/apache/poi/xssf/streaming/examples/DeferredGeneration.java b/src/examples/src/org/apache/poi/xssf/streaming/examples/DeferredGeneration.java deleted file mode 100644 index ce1db096ac..0000000000 --- a/src/examples/src/org/apache/poi/xssf/streaming/examples/DeferredGeneration.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ - -package org.apache.poi.xssf.streaming.examples; - -import org.apache.poi.xssf.streaming.DeferredSXSSFSheet; -import org.apache.poi.xssf.streaming.DeferredSXSSFWorkbook; -import org.apache.poi.xssf.streaming.SXSSFCell; -import org.apache.poi.xssf.streaming.SXSSFRow; - -import java.io.FileOutputStream; - -/** - * An example that outputs a simple generated workbook that uses deferred creation of the rows in the sheets. - * When the workbook is written to an output stream, the output data is streamed immediately. - * There is no collation of the data in temp files prior to writing the overall file. - * This depends on how efficient the row generating functions are. - */ -public final class DeferredGeneration { - - private DeferredGeneration() {} - - public static void main(String[] args) throws Exception { - String filename; - if(args.length == 0) { - filename = "deferred-generation.xlsx"; - } else { - filename = args[0]; - } - try (DeferredSXSSFWorkbook wb = new DeferredSXSSFWorkbook()){ - for(int i = 0; i < 10; i++) { - DeferredSXSSFSheet sheet = wb.createSheet("Sheet" + i); - sheet.setRowGenerator((sh) -> { - for (int r = 0; r < 1000; r++) { - SXSSFRow row = sheet.createRow(r); - for (int c = 0; c < 100; c++) { - SXSSFCell cell = row.createCell(c); - cell.setCellValue("abcd"); - } - } - }); - } - wb.write(new FileOutputStream(filename)); - System.out.println("wrote " + filename); - } - } -} diff --git a/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java b/src/excelant/testcases/org/apache/poi/ss/excelant/CalculateMortgageFunction.java similarity index 85% rename from src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java rename to src/excelant/testcases/org/apache/poi/ss/excelant/CalculateMortgageFunction.java index 2e2e62bf81..73eb984db7 100644 --- a/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java +++ b/src/excelant/testcases/org/apache/poi/ss/excelant/CalculateMortgageFunction.java @@ -14,21 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples.formula; +package org.apache.poi.ss.excelant; -import org.apache.poi.ss.formula.OperationEvaluationContext ; -import org.apache.poi.ss.formula.eval.ErrorEval ; -import org.apache.poi.ss.formula.eval.EvaluationException ; -import org.apache.poi.ss.formula.eval.NumberEval ; -import org.apache.poi.ss.formula.eval.OperandResolver ; -import org.apache.poi.ss.formula.eval.ValueEval ; -import org.apache.poi.ss.formula.functions.FreeRefFunction ; +import org.apache.poi.ss.formula.OperationEvaluationContext; +import org.apache.poi.ss.formula.eval.ErrorEval; +import org.apache.poi.ss.formula.eval.EvaluationException; +import org.apache.poi.ss.formula.eval.NumberEval; +import org.apache.poi.ss.formula.eval.OperandResolver; +import org.apache.poi.ss.formula.eval.ValueEval; +import org.apache.poi.ss.formula.functions.FreeRefFunction; /** * A simple user-defined function to calculate principal and interest. * * Used by {@link org.apache.poi.ss.excelant.util.TestExcelAntWorkbookUtil}. - * + * * @author Jon Svede ( jon [at] loquatic [dot] com ) * @author Brian Bush ( brian [dot] bush [at] nrel [dot] gov ) * @@ -37,9 +37,9 @@ public class CalculateMortgageFunction implements FreeRefFunction { @Override public ValueEval evaluate( ValueEval[] args, OperationEvaluationContext ec ) { - + // verify that we have enough data - if (args.length != 3) { + if (args.length != 3) { return ErrorEval.VALUE_INVALID; } @@ -47,33 +47,33 @@ public class CalculateMortgageFunction implements FreeRefFunction { double principal, rate, years, result; try { // extract values as ValueEval - ValueEval v1 = OperandResolver.getSingleValue( args[0], - ec.getRowIndex(), + ValueEval v1 = OperandResolver.getSingleValue( args[0], + ec.getRowIndex(), ec.getColumnIndex() ) ; - ValueEval v2 = OperandResolver.getSingleValue( args[1], - ec.getRowIndex(), + ValueEval v2 = OperandResolver.getSingleValue( args[1], + ec.getRowIndex(), ec.getColumnIndex() ) ; - ValueEval v3 = OperandResolver.getSingleValue( args[2], - ec.getRowIndex(), + ValueEval v3 = OperandResolver.getSingleValue( args[2], + ec.getRowIndex(), ec.getColumnIndex() ) ; // get data as doubles - principal = OperandResolver.coerceValueToDouble( v1 ) ; + principal = OperandResolver.coerceValueToDouble( v1 ) ; rate = OperandResolver.coerceValueToDouble( v2 ) ; years = OperandResolver.coerceValueToDouble( v3 ) ; - + result = calculateMortgagePayment( principal, rate, years ) ; System.out.println( "Result = " + result ) ; checkValue(result); - + } catch (EvaluationException e) { return e.getErrorEval(); } return new NumberEval( result ) ; } - + public double calculateMortgagePayment( double p, double r, double y ) { double i = r / 12 ; double n = y * 12 ; @@ -89,5 +89,5 @@ public class CalculateMortgageFunction implements FreeRefFunction { if (Double.isNaN(result) || Double.isInfinite(result)) { throw new EvaluationException(ErrorEval.NUM_ERROR); } - } + } } diff --git a/src/excelant/testcases/org/apache/poi/ss/examples/formula/ExcelAntUserDefinedFunctionTestHelper.java b/src/excelant/testcases/org/apache/poi/ss/excelant/ExcelAntUserDefinedFunctionTestHelper.java similarity index 92% rename from src/excelant/testcases/org/apache/poi/ss/examples/formula/ExcelAntUserDefinedFunctionTestHelper.java rename to src/excelant/testcases/org/apache/poi/ss/excelant/ExcelAntUserDefinedFunctionTestHelper.java index 68e4b6957f..48086fc22d 100644 --- a/src/excelant/testcases/org/apache/poi/ss/examples/formula/ExcelAntUserDefinedFunctionTestHelper.java +++ b/src/excelant/testcases/org/apache/poi/ss/excelant/ExcelAntUserDefinedFunctionTestHelper.java @@ -14,9 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples.formula; - -import org.apache.poi.ss.excelant.ExcelAntUserDefinedFunction; +package org.apache.poi.ss.excelant; public class ExcelAntUserDefinedFunctionTestHelper extends ExcelAntUserDefinedFunction { diff --git a/src/excelant/testcases/org/apache/poi/ss/examples/formula/TestExcelAntUserDefinedFunction.java b/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java similarity index 97% rename from src/excelant/testcases/org/apache/poi/ss/examples/formula/TestExcelAntUserDefinedFunction.java rename to src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java index 0606a8bd89..73b10806ab 100644 --- a/src/excelant/testcases/org/apache/poi/ss/examples/formula/TestExcelAntUserDefinedFunction.java +++ b/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.ss.examples.formula; +package org.apache.poi.ss.excelant; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; diff --git a/src/excelant/testcases/org/apache/poi/ss/excelant/tests.xml b/src/excelant/testcases/org/apache/poi/ss/excelant/tests.xml index d387aab365..0882195551 100644 --- a/src/excelant/testcases/org/apache/poi/ss/excelant/tests.xml +++ b/src/excelant/testcases/org/apache/poi/ss/excelant/tests.xml @@ -1,5 +1,5 @@ -