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

Fix the correct PPTX handling of hyperlink decoration #1928

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,8 @@ private void setTextProperty(String fontName, float fontSize, int fontStyle, Col
}

void setHyperlink(HyperlinkDef link) {// TODO: set links for bookmark
if (link != null) {
// power point doesn't support undecorated hyperlink
if (link != null && link.isHasHyperlinkDecoration()) {
String hyperlink = null;
try {
hyperlink = URLEncoder.encode(link.getLink(), "UTF-8");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,7 @@ private void setTextProperty(String tag, TextStyle style) {
}
canvas.setBackgroundColor(style.getColor());
setTextFont(info.getFontName());
if (link != null && link.isHasHyperlinkDecoration()) {
canvas.setHyperlink(link);
}
canvas.setHyperlink(link);
canvas.setBookmark(bmk_relationshipid);
writer.closeTag(tag);
}
Expand Down Expand Up @@ -424,9 +422,7 @@ private void startBlockText(int startX, int startY, int width, int height, Conta
writer.attribute("id", shapeId);
writer.attribute("name", "TextBox " + shapeId);
// hyperlink decoration at text area
if (link != null && !link.isHasHyperlinkDecoration()) {
canvas.setHyperlink(link);
}
canvas.setHyperlink(link);
writer.closeTag("p:cNvPr");
writer.openTag("p:cNvSpPr");
writer.attribute("txBox", "1");
Expand Down
Loading