changeset 9364:0124d67ce5ab

salix pdf export fix
author gernotbelger
date Thu, 02 Aug 2018 11:47:49 +0200 (2018-08-02)
parents 0274c7444b2d
children ba1e2e8f05d1
files artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculationResult.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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("");
             }

http://dive4elements.wald.intevation.org