aboutsummaryrefslogtreecommitdiffstats
path: root/src/scratchpad/testcases
Commit message (Collapse)AuthorAgeFilesLines
* 65206 - Migrate ant / maven to gradle buildAndreas Beeker2021-03-27198-29009/+0
| | | | | | | | update gradle files and project structure along https://github.com/centic9/poi/tree/gradle_build remove eclipse IDE project files remove obsolete record generator files git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888111 13f79535-47bb-0310-9956-ffa450edef68
* add disabled test for corrupt filePJ Fanning2021-03-191-6/+30
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887827 13f79535-47bb-0310-9956-ffa450edef68
* Review EscherContainerRecord#getChildRecords() call sites for unnecessary workMarius Volkhart2021-03-012-4/+3
| | | | | | | | This started off as wanting to add the EscherContainerRecord#getChildCount() function in order to do an efficient check for how many children the container has. This was desirable in new code for editing HSSF pictures. The existing option of calling getChildRecords().size() was undesirable as this requires a list copy first. In the process of finding call sites that would benefit from replacing getChildRecords().size(), I realized that several other patterns would benefit from eliminating a copy, such as iterating over the children in a for-each loop, and indexed access to specific children. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887020 13f79535-47bb-0310-9956-ffa450edef68
* Add the ability to edit HSLFPictureData contentsMarius Volkhart2021-02-283-7/+185
| | | | | | | | | | | | Pictures can now be edited by calling HSLFPictureData#setData(byte[]). The byte[] should contain the image data as an image viewer might read it. To enable this functionality, a tighter coupling between the EscherBSERecords of the slideshow and the HSLFPictureData was required. This ensures that changes in image data size are accurately recorded in the records. In the course of coupling the records and the HSLFPictureData, various scenarios arose where a mapping of records to pictures was non-trivial. Accordingly, the HSLFSlideShowImpl#matchPicturesAndRecords(...) function was added to perform a more sophisticated matching pass. This function is heavily exercised by org.apache.poi.hslf.usermodel.TestBugs.testFile[5] and PPTX2PNG.render[2], as well as the new TestPictures#testSlideshowWithIncorrectOffsets(). Closes #225 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887017 13f79535-47bb-0310-9956-ffa450edef68
* [bug-63046] Use Log4j 2 for loggingMarius Volkhart2021-02-214-50/+7
| | | | | | | | | | This removes the POILogger and POILogFactory mechanism for logging. This mechanism was created at a time when the Java landscape looked very different than it does today. Log4j 2 is an Apache Foundation project that is well maintained and is widely regarded as having good performance and capabilities. We use only the Log4j API artifact. This lets application developers choose how they want to capture logging events if at all. Integrations with Log4j 2 Core and Logback are available from the Log4j project. Closes #224 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886770 13f79535-47bb-0310-9956-ffa450edef68
* Sonar fixesAndreas Beeker2021-01-231-1/+3
| | | | | | add asserts to tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885859 13f79535-47bb-0310-9956-ffa450edef68
* Sonar fixesAndreas Beeker2021-01-228-288/+272
| | | | | | add asserts to tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885819 13f79535-47bb-0310-9956-ffa450edef68
* Sonar fixesAndreas Beeker2021-01-172-7/+3
| | | | | | | constant name to match the regular expression '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$' reorder "final static" -> "static final" git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885613 13f79535-47bb-0310-9956-ffa450edef68
* Sonar fixesAndreas Beeker2021-01-1513-644/+326
| | | | | | add asserts to tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885537 13f79535-47bb-0310-9956-ffa450edef68
* Sonar fixesAndreas Beeker2021-01-155-637/+536
| | | | | | add asserts to tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885503 13f79535-47bb-0310-9956-ffa450edef68
* Sonar fixesAndreas Beeker2021-01-1015-44/+35
| | | | | | JUnit5 test classes and methods should have default package visibility git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885340 13f79535-47bb-0310-9956-ffa450edef68
* Sonar fixesAndreas Beeker2021-01-0968-166/+183
| | | | | | JUnit5 test classes and methods should have default package visibility git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885315 13f79535-47bb-0310-9956-ffa450edef68
* Sonar fixesAndreas Beeker2021-01-09179-727/+727
| | | | | | JUnit5 test classes and methods should have default package visibility git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885302 13f79535-47bb-0310-9956-ffa450edef68
* #65063 - WMF parsing failed on closed empty polygonAndreas Beeker2021-01-061-4/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885215 13f79535-47bb-0310-9956-ffa450edef68
* Bug 64132: Fix regression introduced by changing factoriesDominik Stadler2021-01-041-0/+10
| | | | | | | We need to return EscherBlipRecord for all types in the defined range of recordId, not UnknownEscherRecord. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885092 13f79535-47bb-0310-9956-ffa450edef68
* Also replace for JUnit 5 in commentsDominik Stadler2020-12-302-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884956 13f79535-47bb-0310-9956-ffa450edef68
* Bug 65009: Fix incorrect index for 1-based picturesDominik Stadler2020-12-301-2/+11
| | | | | | | | Adjusted somewhat from Github PR #211 Closes #211 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884948 13f79535-47bb-0310-9956-ffa450edef68
* Sonar fixesAndreas Beeker2020-12-264-37/+37
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884807 13f79535-47bb-0310-9956-ffa450edef68
* #65026 - Migrate tests to Junit 5Andreas Beeker2020-12-24199-2090/+1599
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884783 13f79535-47bb-0310-9956-ffa450edef68
* [github-198] Remove jdk.charset module dependency for spreadsheets ↵PJ Fanning2020-12-191-0/+68
| | | | | | generation. Thanks to Robert Marcano. This closes #198 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884631 13f79535-47bb-0310-9956-ffa450edef68
* #64876 - Unable to convert pptx to pdfAndreas Beeker2020-12-171-570/+483
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884578 13f79535-47bb-0310-9956-ffa450edef68
* avoid string concatsPJ Fanning2020-12-171-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884573 13f79535-47bb-0310-9956-ffa450edef68
* mute talkative tests, which spam to StdOut/StdErrAndreas Beeker2020-12-134-21/+65
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884379 13f79535-47bb-0310-9956-ffa450edef68
* remove more deprecated codePJ Fanning2020-12-092-96/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884263 13f79535-47bb-0310-9956-ffa450edef68
* #64716 - wmf display errorAndreas Beeker2020-11-271-0/+35
| | | | | | prepare binary raster operations git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1883882 13f79535-47bb-0310-9956-ffa450edef68
* #64867 - Provide PDF rendering with PPTX2PNGAndreas Beeker2020-11-082-1/+20
| | | | | | render text as text, i.e. not as shapes git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1883212 13f79535-47bb-0310-9956-ffa450edef68
* Fix Sonar issues and IDE warningsDominik Stadler2020-10-253-54/+45
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1882842 13f79535-47bb-0310-9956-ffa450edef68
* Update library versionsAndreas Beeker2020-08-185-54/+67
| | | | | | | Replace deprecated junit @Rules with assertThrows Adapt to XMLSec refactoring in version 2.2.0 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880965 13f79535-47bb-0310-9956-ffa450edef68
* Activate Forbidden-Apis-Check also for other testsAndreas Beeker2020-08-175-79/+73
| | | | | | | Max supported Java version is currently Java 14 Fix the check failures git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880944 13f79535-47bb-0310-9956-ffa450edef68
* removed test which is covered by TestPPTX2PNGAndreas Beeker2020-08-161-149/+80
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880910 13f79535-47bb-0310-9956-ffa450edef68
* use the forbidden-apis policies corresponding to the JREAndreas Beeker2020-08-151-66/+67
| | | | | | fix the forbidden apis issues git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880866 13f79535-47bb-0310-9956-ffa450edef68
* #64411 - Provide JigSaw modulesAndreas Beeker2020-08-134-231/+152
| | | | | | - rework extractors - see bugzilla entry for more information git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880839 13f79535-47bb-0310-9956-ffa450edef68
* #64411 - Provide JigSaw modulesAndreas Beeker2020-07-226-332/+8
| | | | | | | | | | | | | | | - 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
* remove some more deprecated codePJ Fanning2020-06-281-7/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879299 13f79535-47bb-0310-9956-ffa450edef68
* 63290 - PPTX To Png changes font sizes and colorsAndreas Beeker2020-06-041-4/+2
| | | | | | | | various fixes to HSLF moved line spacing to the following line refactored PropertyFetcher with lambdas git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1878492 13f79535-47bb-0310-9956-ffa450edef68
* #57843 - RuntimeException on extracting text from Word 97-2004 DocumentAndreas Beeker2020-04-161-32/+30
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1876641 13f79535-47bb-0310-9956-ffa450edef68
* Replace Allocate+System.arraycopy with Array.copyOf/Range and ↵Andreas Beeker2020-04-162-30/+22
| | | | | | IOUtils.safelyClone git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1876640 13f79535-47bb-0310-9956-ffa450edef68
* Sonar fixesAndreas Beeker2020-04-051-85/+39
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1876157 13f79535-47bb-0310-9956-ffa450edef68
* Bug 60656 - Emf image support in slideshowsAndreas Beeker2020-04-051-13/+19
| | | | | | | | | | | | | - fixed WmfExtTextOut dx handling for variable text spacing - fixed WmfExtTextOut text position for (0,0) references based on the current/last path location - fixed WmfExtTextOut handling of symbol/wingdings charset (move ascii to unicode private area, because Java font loader maps the glyphs there) - and use existing workaround if the fonts aren't installed, i.e. use corresponding unicode characters of the logcial font then - provide option in PPTX2PNG to use given file input type, if the file magic is unknown - provide option in PPTX2PNG to render text as shapes in SVG, as dx handling (above) implemented via TextAttribute.TRACKING is not supported by batik source of the sample.wmf, which I've used: https://stackoverflow.com/questions/58726194/svg-rendering-with-batik-produce-broken-image git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1876136 13f79535-47bb-0310-9956-ffa450edef68
* #64241 - shade and tint calculation are based now on scRGB (opposed to HSL) ↵Andreas Beeker2020-03-222-56/+59
| | | | | | colorspace git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1875522 13f79535-47bb-0310-9956-ffa450edef68
* github-167 - HSMF enhancementsAndreas Beeker2020-03-082-18/+110
| | | | | | | | | | | | | | | | | introduce NameIdChunks.GetPropertyTag: which enables evaluating property ids from properties identified by name/id in property sets (simple version of IMAPIProp::GetIDsFromNames) AttachmentChunks.getAttachData: use new ByteChunkDeferred instead of ByteChunk which enables delayed reading of attachments to avoid all attachments are completely read into memory when parsing which may cause OutOfMemoryErrors on e-mails with big attachments. POIFSChunkParser: support reading multi valued chunks (e.g. required when reading the Keywords ("categories") property) add MAPIProperty.RECEIVED_BY_SMTP_ADDRESS add unit tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1874990 13f79535-47bb-0310-9956-ffa450edef68
* Try to use https for poi.apache.org everywhereDominik Stadler2020-03-083-13/+13
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1874981 13f79535-47bb-0310-9956-ffa450edef68
* use indexOf(char) instead of indexOf(String) where possible; replace one ↵Axel Howind2020-02-201-1/+1
| | | | | | more StringBuffer with StringBuilder - bug 63805 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1874262 13f79535-47bb-0310-9956-ffa450edef68
* Local EMF test changesAndreas Beeker2020-01-311-32/+29
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1873430 13f79535-47bb-0310-9956-ffa450edef68
* try to fix some jdk 14 build issues due to java.lang.Record causing existing ↵PJ Fanning2020-01-108-22/+22
| | | | | | POI Record classes to be ambiguous git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872610 13f79535-47bb-0310-9956-ffa450edef68
* #63955 - HMEFContentsExtractor fails to extract content from winmail.datAndreas Beeker2020-01-085-155/+130
| | | | | | added example file - optimized junit tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872480 13f79535-47bb-0310-9956-ffa450edef68
* Fix Visio compressionAndreas Beeker2020-01-011-242/+183
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872223 13f79535-47bb-0310-9956-ffa450edef68
* Migrate all junit tests to Junit 4Andreas Beeker2019-12-2766-1477/+1575
| | | | | | | | get rid of references to junit.framework don't throw AssertionFailedErrors, but use Assert.fail instead add try-with-resources where it was missing git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872041 13f79535-47bb-0310-9956-ffa450edef68
* fix spelling of OutlookTextExtractor class namePJ Fanning2019-12-262-215/+245
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1871994 13f79535-47bb-0310-9956-ffa450edef68
* Let IntelliJ simplify some assertionsDominik Stadler2019-12-1517-107/+112
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1871591 13f79535-47bb-0310-9956-ffa450edef68