| 1 | package pro.verron.officestamper.experimental; | |
| 2 | ||
| 3 | import org.docx4j.openpackaging.packages.PresentationMLPackage; | |
| 4 | import org.docx4j.openpackaging.packages.SpreadsheetMLPackage; | |
| 5 | import pro.verron.officestamper.api.OfficeStamper; | |
| 6 | import pro.verron.officestamper.api.OfficeStamperException; | |
| 7 | import pro.verron.officestamper.api.StreamStamper; | |
| 8 | import pro.verron.officestamper.utils.openpackaging.OpenpackagingUtils; | |
| 9 | ||
| 10 | /// ExperimentalStampers is a class that provides static methods for obtaining instances of OfficeStamper | |
| 11 | /// implementations for stamping PowerPoint presentations and Excel templates with context and writing the result to an | |
| 12 | /// OutputStream. | |
| 13 | /// | |
| 14 | /// @since 1.6.8 | |
| 15 | public class ExperimentalStampers { | |
| 16 | ||
| 17 | private ExperimentalStampers() { | |
| 18 | throw new OfficeStamperException("ExperimentalStampers cannot be instantiated"); | |
| 19 | } | |
| 20 | ||
| 21 | /// Returns a new instance of the OfficeStamper implementation for stamping Excel templates with context and writing | |
| 22 | /// the result to an OutputStream. | |
| 23 | /// | |
| 24 | /// @return a new OfficeStamper instance for Excel templates | |
| 25 | /// | |
| 26 | /// @since 3.0 | |
| 27 | public static OfficeStamper<SpreadsheetMLPackage> xlsxPackageStamper() { | |
| 28 |
1
1. xlsxPackageStamper : replaced return value with null for pro/verron/officestamper/experimental/ExperimentalStampers::xlsxPackageStamper → KILLED |
return new ExcelStamper(); |
| 29 | } | |
| 30 | ||
| 31 | ||
| 32 | /// Returns a new instance of the StreamStamper implementation for stamping PowerPoint presentations with context | |
| 33 | /// and writing the result to an OutputStream. | |
| 34 | /// | |
| 35 | /// @return a new StreamStamper instance for PowerPoint presentations | |
| 36 | /// | |
| 37 | /// @since 1.6.8 | |
| 38 | public static StreamStamper<PresentationMLPackage> pptxStamper() { | |
| 39 |
1
1. pptxStamper : replaced return value with null for pro/verron/officestamper/experimental/ExperimentalStampers::pptxStamper → NO_COVERAGE |
return new StreamStamper<>(OpenpackagingUtils::loadPowerPoint, |
| 40 | pptxPackageStamper(), | |
| 41 | OpenpackagingUtils::exportPowerPoint); | |
| 42 | } | |
| 43 | ||
| 44 | /// Returns a new instance of the OfficeStamper implementation for stamping PowerPoint presentations with context | |
| 45 | /// and writing the result to an OutputStream. | |
| 46 | /// | |
| 47 | /// @return a new OfficeStamper instance for PowerPoint presentations | |
| 48 | /// | |
| 49 | /// @since 3.0 | |
| 50 | public static OfficeStamper<PresentationMLPackage> pptxPackageStamper() { | |
| 51 |
1
1. pptxPackageStamper : replaced return value with null for pro/verron/officestamper/experimental/ExperimentalStampers::pptxPackageStamper → KILLED |
return new PowerpointStamper(); |
| 52 | } | |
| 53 | } | |
Mutations | ||
| 28 |
1.1 |
|
| 39 |
1.1 |
|
| 51 |
1.1 |