@Override public boolean isValueChanged() { final ImageElement imageElement = (ImageElement) getNode(); final FormulaExpression formulaExpression = imageElement.getFormula(); if (formulaExpression == null) { final FlowController controller = getFlowController(); final GlobalMasterRow masterRow = controller.getMasterRow(); final ReportDataRow reportDataRow = masterRow.getReportDataRow(); return reportDataRow.getCursor() == 0; } try { final Formula formula = formulaExpression.getCompiledFormula(); final LValue lValue = formula.getRootReference(); return FormatValueUtility.isReferenceChanged(this, lValue); } catch (ParseException e) { return false; } }
@Override protected LayoutController delegateContentGeneration(final ReportTarget target) throws ReportProcessingException, ReportDataFactoryException, DataSourceException { final ImageElement imageElement = (ImageElement) getNode(); final FormulaExpression formulaExpression = imageElement.getFormula(); if (formulaExpression == null) { // A static image is easy. At least at this level. Don't ask about the weird things we have to // do in the // output targets... final String linkTarget = imageElement.getImageData(); generateImage(target, linkTarget, imageElement.getScaleMode(), imageElement.isPreserveIRI()); } else { final Object value = LayoutControllerUtil.evaluateExpression( getFlowController(), imageElement, formulaExpression); generateImage(target, value, imageElement.getScaleMode(), imageElement.isPreserveIRI()); } return join(getFlowController()); }