Skip to content

Commit

Permalink
Fix of images which are embedded like URL on an embedded html document (
Browse files Browse the repository at this point in the history
#1440)

into a birt report element (e.g. dynamic text) (#1436)
  • Loading branch information
speckyspooky authored Sep 29, 2023
1 parent 7956cd9 commit a6c487d
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3302,16 +3302,15 @@ public BackgroundImageInfo handleStyleImage(String uri, boolean isBackground, IS
ReportDesignHandle design = (ReportDesignHandle) runnable.getDesignHandle();
URL url = design.findResource(uri, IResourceLocator.IMAGE, reportContext.getAppContext());
String fileExtension = null;

Module module = design.getModule();
BackgroundImageInfo backgroundImage = null;
ResourceLocatorWrapper rl = null;
ExecutionContext exeContext = ((ReportContent) this.report).getExecutionContext();
if (exeContext != null) {
rl = exeContext.getResourceLocator();
}
BackgroundImageInfo backgroundImage = new BackgroundImageInfo("", null, 0, 0, 0, 0, rl, module);

if (isBackground && imageStyle != null) {
ResourceLocatorWrapper rl = null;
ExecutionContext exeContext = ((ReportContent) this.report).getExecutionContext();
if (exeContext != null) {
rl = exeContext.getResourceLocator();
}
String uriString = EmitterUtil.getBackgroundImageUrl(imageStyle, design,
this.report.getReportContext() == null ? null : this.report.getReportContext().getAppContext());

Expand Down Expand Up @@ -3375,7 +3374,9 @@ public BackgroundImageInfo handleStyleImage(String uri, boolean isBackground, IS
default:
assert (false);
}
backgroundImage.setUri(imgUri);
if (backgroundImage != null) {
backgroundImage.setUri(imgUri);
}
}
return backgroundImage;
}
Expand Down

0 comments on commit a6c487d

Please sign in to comment.