aboutsummaryrefslogtreecommitdiffstats
path: root/src/scratchpad
Commit message (Collapse)AuthorAgeFilesLines
* Try to fix sonar buildAndreas Beeker2021-03-141-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887659 13f79535-47bb-0310-9956-ffa450edef68
* Parse PPDrawing more deterministicallyMarius Volkhart2021-03-091-115/+28
| | | | | | The [MS-PPT] spec is very clear about what the format of the PPDrawing record must be, and parsing deterministically makes for clearer code. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887396 13f79535-47bb-0310-9956-ffa450edef68
* Additional debug logging for unknown records in HSLFMarius Volkhart2021-03-091-1/+6
| | | | | | Recently, while debugging app behavior on HSLF documents, I had to dig into the OOXML that Microsoft PowerPoint places into files saved in PPT format. Having information in the logs about when records were not parsed by POI was very helpful. The hex identifier was critical in being able to quickly search the [MS-PPT] spec for what type of record it was, and the integer identifier was helpful in quickly finding the Record type in RecordTypes.java. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887393 13f79535-47bb-0310-9956-ffa450edef68
* Remove unnecessary array conversion in HWPF FSPATableMarius Volkhart2021-03-011-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887044 13f79535-47bb-0310-9956-ffa450edef68
* Remove deprecated HWPF FSPA methodsMarius Volkhart2021-03-013-37/+1
| | | | | | These methods have been @Deprecated for years, and are part of @Internal structures. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887039 13f79535-47bb-0310-9956-ffa450edef68
* Improve performance of HSLFPictureData#writeMarius Volkhart2021-03-011-13/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887022 13f79535-47bb-0310-9956-ffa450edef68
* Review EscherContainerRecord#getChildRecords() call sites for unnecessary workMarius Volkhart2021-03-019-24/+15
| | | | | | | | 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-2817-129/+1027
| | | | | | | | | | | | 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
* Make picture loading in HWPF PicturesTable easier to understandMarius Volkhart2021-02-282-10/+7
| | | | | | The recursion is no longer necessary due to the more defined structure of OfficeArtContent. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887016 13f79535-47bb-0310-9956-ffa450edef68
* Add documentation to PICFAndOfficeArtDataMarius Volkhart2021-02-282-15/+30
| | | | | | Adjust call sites based on defined behavior. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887015 13f79535-47bb-0310-9956-ffa450edef68
* Simplify OfficeArtContent#getBStoreContainer methodMarius Volkhart2021-02-282-17/+8
| | | | | | Due to the new structure of the class, we can be more specific about how we load the BStore. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887011 13f79535-47bb-0310-9956-ffa450edef68
* Rename EscherRecordHolder to OfficeArtContentMarius Volkhart2021-02-286-28/+29
| | | | | | While the class does indeed hold EscherRecords, due to recent refactoring it is much more structured now than it was before. The contents of the class now closely resemble the OfficeArtContent structure referenced in the MS-DOC spec. Naming the class after the specification structure makes it easier to find and understand. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887009 13f79535-47bb-0310-9956-ffa450edef68
* Rework EscherRecordHolder parsingMarius Volkhart2021-02-281-106/+86
| | | | | | Modify the parsing done by EscherRecordHolder to be more deterministic. The format of the OfficeArtContent structure, which the EscherRecordHolder represents, is well defined in the MS-DOC spec. A clear class structure makes it easier to reason about the availability of data. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887008 13f79535-47bb-0310-9956-ffa450edef68
* Simplify initialization of HWPF EscherRecordHolderMarius Volkhart2021-02-282-11/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886999 13f79535-47bb-0310-9956-ffa450edef68
* Add documentation for HWPF FileInformationBlock DggInfo methodsMarius Volkhart2021-02-281-0/+10
| | | | | | This documentation comes from [MS-DOC] - v20191119. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886998 13f79535-47bb-0310-9956-ffa450edef68
* Revert "Replace magic constant with reference" changesMarius Volkhart2021-02-274-46/+46
| | | | | | Reverts r1886986, r1886987 and r1886988. Incorrect conversion between int and shorts led to incorrect logic. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886989 13f79535-47bb-0310-9956-ffa450edef68
* Replace magic constant use of Escher Blip End type ID with referenceMarius Volkhart2021-02-272-2/+3
| | | | | | Instead of referring to the magic constant 0xF117, reference the value in the EscherRecordTypes enum. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886988 13f79535-47bb-0310-9956-ffa450edef68
* Replace magic constant use of Escher Blip Start type ID with referenceMarius Volkhart2021-02-273-5/+6
| | | | | | Instead of referring to the magic constant 0xF018, reference the value in the EscherRecordTypes enum. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886987 13f79535-47bb-0310-9956-ffa450edef68
* Replace magic constant use of EscherBSERecord type ID with referenceMarius Volkhart2021-02-274-43/+42
| | | | | | Instead of referring to the magic constant 0xF007, reference the value in the EscherRecordTypes enum. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886986 13f79535-47bb-0310-9956-ffa450edef68
* [bug-63046] Use Log4j 2 for loggingMarius Volkhart2021-02-2199-765/+691
| | | | | | | | | | 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-232-680/+506
| | | | | | 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-1782-427/+397
| | | | | | | 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-062-9/+16
| | | | 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
* add failing regression test filesAndreas Beeker2020-12-303-6/+6
| | | | | | | fix ooxml-lite packaging fix PP97 dual storage file handling in extractor git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884962 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
* Slightly re-arrange code to only perform computations if we do not exit the ↵Dominik Stadler2020-12-301-20/+12
| | | | | | | | loop anyway Also simplify code somewhat git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884949 13f79535-47bb-0310-9956-ffa450edef68
* Bug 65009: Fix incorrect index for 1-based picturesDominik Stadler2020-12-302-4/+13
| | | | | | | | 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-2621-94/+150
| | | | 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-196-8/+618
| | | | | | 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
* fix log textPJ Fanning2020-12-191-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884623 13f79535-47bb-0310-9956-ffa450edef68
* #64876 - Unable to convert pptx to pdfAndreas Beeker2020-12-172-571/+484
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884578 13f79535-47bb-0310-9956-ffa450edef68
* [github-208] Fix a few instances of incorrect NotImplemented documentation. ↵PJ Fanning2020-12-171-2/+2
| | | | | | Thanks to Marius Volkhart. This closes #208 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884575 13f79535-47bb-0310-9956-ffa450edef68
* avoid string concatsPJ Fanning2020-12-176-11/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884574 13f79535-47bb-0310-9956-ffa450edef68
* avoid string concatsPJ Fanning2020-12-1737-84/+72
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884573 13f79535-47bb-0310-9956-ffa450edef68
* avoid string concatsPJ Fanning2020-12-1717-34/+31
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884572 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-0924-252/+40
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884269 13f79535-47bb-0310-9956-ffa450edef68
* remove more deprecated codePJ Fanning2020-12-096-163/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884263 13f79535-47bb-0310-9956-ffa450edef68
* remove more deprecated codePJ Fanning2020-12-091-18/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884257 13f79535-47bb-0310-9956-ffa450edef68
* remove more deprecated codePJ Fanning2020-12-092-18/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884256 13f79535-47bb-0310-9956-ffa450edef68
* #64716 - wmf display errorAndreas Beeker2020-11-297-62/+77
| | | | | | change hatch image preparation git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1883934 13f79535-47bb-0310-9956-ffa450edef68
* #64716 - wmf display errorAndreas Beeker2020-11-276-28/+35
| | | | | | | | provide font mapping with PPTX2PNG fix record enums references fix alignment of asian fonts git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1883883 13f79535-47bb-0310-9956-ffa450edef68