[PATCH] salix pdf export fix

Wald Commits scm-commit at wald.intevation.org
Thu Aug 2 11:47:56 CEST 2018


# HG changeset patch
# User gernotbelger
# Date 1533203269 -7200
# Node ID 0124d67ce5abcbe8d112224209337657f1e95679
# Parent  0274c7444b2d76b91e4928fe2475eab081c86e88
salix pdf export fix

diff -r 0274c7444b2d -r 0124d67ce5ab artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculationResult.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculationResult.java	Thu Aug 02 09:59:48 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculationResult.java	Thu Aug 02 11:47:49 2018 +0200
@@ -15,6 +15,7 @@
 import java.util.List;
 
 import org.dive4elements.river.artifacts.common.AbstractCalculationExportableResult;
+import org.dive4elements.river.artifacts.common.AbstractExportContext;
 import org.dive4elements.river.artifacts.common.ExportContextCSV;
 import org.dive4elements.river.artifacts.common.ExportContextPDF;
 import org.dive4elements.river.artifacts.common.GeneralResultType;
@@ -122,7 +123,7 @@
         lines.add(context.formatRowValue(row, UInfoResultType.salixline));
         lines.add(context.formatRowValue(row, UInfoResultType.salix_mw_mnw));
 
-        final NumberFormat formatter = ((ExportContextCSV) context).getSalixScenFormatter();
+        final NumberFormat formatter = ((AbstractExportContext) context).getSalixScenFormatter();
         final List<SalixScenario> scenarios = (List<SalixScenario>) row.getValue(UInfoResultType.customMultiRowColSalixScenarios);
         for (int i = 1; i <= this.getScenarioCount(); i++) {
             if (i > scenarios.size())
@@ -130,8 +131,7 @@
             if (scenarios.get(i - 1) != null) {
                 lines.add(scenarios.get(i - 1).getDeltaWFormatted());
                 lines.add(scenarios.get(i - 1).getSalixValueFormatted(formatter));
-            }
-            else {
+            } else {
                 lines.add("");
                 lines.add("");
             }


More information about the Dive4Elements-commits mailing list