Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade library versions #1486

Merged
merged 6 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 7 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf</artifactId>
<version>9.8.0</version>
<version>9.11.1</version>
mkeckmkeck marked this conversation as resolved.
Show resolved Hide resolved
</dependency>

<!-- Used to clean HTML before generating PDF -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.17.2</version>
<version>1.18.3</version>
</dependency>

<!-- Used to render SVG into PDF -->
Expand All @@ -118,30 +118,18 @@
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.2.5</version>
<version>5.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.2.5</version>
<exclusions>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Required, as the version provided by poi-ooxml has security issues -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.26.1</version>
<version>5.3.0</version>
</dependency>

<dependency>
<groupId>com.github.pjfanning</groupId>
<artifactId>excel-streaming-reader</artifactId>
<version>4.3.1</version>
<version>5.0.2</version>
<exclusions>
<exclusion>
<groupId>com.h2database</groupId>
Expand All @@ -154,7 +142,7 @@
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.2.22</version>
<version>2.2.26</version>
</dependency>

<dependency>
Expand All @@ -170,7 +158,7 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>4.1.109.Final</version>
<version>4.1.115.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/sirius/web/data/ExcelExport.java
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,11 @@ public void writeToStream(OutputStream stream) {
throw Exceptions.handle(e);
} finally {
if (workbook instanceof SXSSFWorkbook sxssfWorkbook) {
sxssfWorkbook.dispose();
try {
sxssfWorkbook.close();
} catch (IOException e) {
mkeckmkeck marked this conversation as resolved.
Show resolved Hide resolved
throw Exceptions.handle(e);
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/sirius/web/templates/pdf/InlinedSvgElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ public void paint(RenderingContext renderingContext, ITextOutputDevice outputDev
graphics.dispose();

PageBox page = renderingContext.getPage();
float x = (float) blockBox.getAbsX() + page.getMarginBorderPadding(renderingContext, CalculatedStyle.LEFT);
float x = (float) blockBox.getAbsX() + page.getMarginBorderPadding(renderingContext, CalculatedStyle.Edge.LEFT);
float y = (float) (page.getBottom() - (blockBox.getAbsY() + cssHeight)) + page.getMarginBorderPadding(
renderingContext,
CalculatedStyle.BOTTOM);
CalculatedStyle.Edge.BOTTOM);
x /= outputDevice.getDotsPerPoint();
y /= outputDevice.getDotsPerPoint();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected FSImage resizeImage(FSImage image, int cssWidth, int cssHeight) {
Tuple<Integer, Integer> newSize = computeResizeBox(cssWidth, cssHeight, image);

if (newSize != null) {
image.scale(newSize.getFirst(), newSize.getSecond());
return image.scale(newSize.getFirst(), newSize.getSecond());
}
}

Expand Down