diff --git a/build.gradle b/build.gradle index 77949d8ca9..997089785b 100644 --- a/build.gradle +++ b/build.gradle @@ -3,10 +3,11 @@ buildscript { mavenCentral() maven { url "https://plugins.gradle.org/m2/" } } +} - dependencies { - classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.5" - } + +plugins { + id("com.github.spotbugs") version "6.1.9" } defaultTasks 'build' @@ -27,6 +28,10 @@ configurations.configureEach { } } +import com.github.spotbugs.snom.Effort +import com.github.spotbugs.snom.Confidence + + configure(subprojects.findAll { ['core', 'examples'].contains(it.name) }) { apply plugin: 'java' apply plugin: 'com.github.spotbugs' @@ -46,10 +51,10 @@ configure(subprojects.findAll { ['core', 'examples'].contains(it.name) }) { } spotbugs { - toolVersion = "4.7.3" // com.github.spotbugs:spotbugs-annotations + toolVersion = "4.8.6" // com.github.spotbugs:spotbugs-annotations reportsDir = file("$project.buildDir/reports/SpotBugsReports") - effort = "max" - reportLevel = "high" + effort = Effort.valueOf('MAX') + reportLevel = Confidence.valueOf('HIGH') } java { diff --git a/core/build.gradle b/core/build.gradle index 9a92884074..fa51942bac 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -126,6 +126,7 @@ configurations { dependencies { implementation( + 'org.springframework:spring-core:5.3.39', 'org.springframework:spring-context:5.3.39', 'org.springframework:spring-web:5.3.39', 'org.springframework:spring-webmvc:5.3.39', @@ -163,12 +164,18 @@ dependencies { 'org.geotools:gt-cql:33.0', ) jasper( - 'net.sf.jasperreports:jasperreports:6.21.4', - 'net.sf.jasperreports:jasperreports-fonts:6.21.4', - 'net.sf.jasperreports:jasperreports-functions:6.21.4', - 'org.codehaus.groovy:groovy-all:3.0.23', 'ar.com.fdvs:DynamicJasper:5.3.9', - 'joda-time:joda-time:2.13.1', + 'com.itextpdf:itextpdf:5.5.13.4', + 'joda-time:joda-time:2.14.0', + 'net.sf.jasperreports:jasperreports:7.0.2', + 'net.sf.jasperreports:jasperreports-excel-poi:7.0.2', + 'net.sf.jasperreports:jasperreports-fonts:7.0.2', + 'net.sf.jasperreports:jasperreports-functions:7.0.2', + 'net.sf.jasperreports:jasperreports-json:7.0.2', + 'net.sf.jasperreports:jasperreports-pdf:7.0.2', + 'org.jfree:jcommon:1.0.24', + 'org.apache.groovy:groovy-all:4.0.26', + 'xalan:serializer:2.7.3', ) implementation( 'org.slf4j:slf4j-api:2.0.16', diff --git a/core/src/main/java/org/mapfish/print/attribute/JsonDatasourceAttribute.java b/core/src/main/java/org/mapfish/print/attribute/JsonDatasourceAttribute.java index 4906c29919..89ab76b617 100644 --- a/core/src/main/java/org/mapfish/print/attribute/JsonDatasourceAttribute.java +++ b/core/src/main/java/org/mapfish/print/attribute/JsonDatasourceAttribute.java @@ -5,7 +5,7 @@ import java.util.List; import javax.annotation.Nonnull; import net.sf.jasperreports.engine.JRException; -import net.sf.jasperreports.engine.data.JsonDataSource; +import net.sf.jasperreports.json.data.JsonDataSource; import org.json.JSONException; import org.json.JSONObject; import org.json.JSONWriter; diff --git a/core/src/main/java/org/mapfish/print/attribute/map/MapBounds.java b/core/src/main/java/org/mapfish/print/attribute/map/MapBounds.java index ad5490818c..6c48059043 100644 --- a/core/src/main/java/org/mapfish/print/attribute/map/MapBounds.java +++ b/core/src/main/java/org/mapfish/print/attribute/map/MapBounds.java @@ -1,7 +1,5 @@ package org.mapfish.print.attribute.map; -import static org.mapfish.print.Constants.PDF_DPI; - import java.awt.Rectangle; import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.geometry.jts.ReferencedEnvelope; @@ -108,8 +106,7 @@ public Scale getNearestScale( if (geodetic) { newScale = - new Scale( - result.getScale(unit).getDenominator(PDF_DPI) * scaleRatio, getProjection(), dpi); + new Scale(result.getScale(unit).getDenominator(dpi) * scaleRatio, getProjection(), dpi); } else { newScale = result.getScale(unit); } diff --git a/core/src/main/java/org/mapfish/print/map/geotools/AbstractFeatureSourceLayerPlugin.java b/core/src/main/java/org/mapfish/print/map/geotools/AbstractFeatureSourceLayerPlugin.java index 3adcb1e9e0..b4fb33117e 100644 --- a/core/src/main/java/org/mapfish/print/map/geotools/AbstractFeatureSourceLayerPlugin.java +++ b/core/src/main/java/org/mapfish/print/map/geotools/AbstractFeatureSourceLayerPlugin.java @@ -68,7 +68,6 @@ public final Set getTypeNames() { .getBinding() .getSimpleName(); final String styleRef = styleString != null ? styleString : geomType; - final StyleParser styleParser = AbstractFeatureSourceLayerPlugin.this.parser; return OptionalUtils.or( () -> template.getStyle(styleRef), @@ -77,7 +76,11 @@ public final Set getTypeNames() { }; } - /** Sets the style parser for this feature source layer. */ + /** + * Sets the style parser for this feature source layer. + * + * @param parser + */ public final void setParser(final StyleParser parser) { this.parser = parser; } diff --git a/core/src/main/java/org/mapfish/print/output/JasperReportExcelOutputFormat.java b/core/src/main/java/org/mapfish/print/output/JasperReportExcelOutputFormat.java index 154174cc8d..364bdef686 100644 --- a/core/src/main/java/org/mapfish/print/output/JasperReportExcelOutputFormat.java +++ b/core/src/main/java/org/mapfish/print/output/JasperReportExcelOutputFormat.java @@ -2,9 +2,9 @@ import java.io.OutputStream; import net.sf.jasperreports.engine.JRException; -import net.sf.jasperreports.engine.export.JRXlsExporter; import net.sf.jasperreports.export.SimpleExporterInput; import net.sf.jasperreports.export.SimpleOutputStreamExporterOutput; +import net.sf.jasperreports.poi.export.JRXlsExporter; /** An PDF output format that uses Jasper reports to generate the result. */ public final class JasperReportExcelOutputFormat extends AbstractJasperReportOutputFormat diff --git a/core/src/main/java/org/mapfish/print/output/JasperReportPDFOutputFormat.java b/core/src/main/java/org/mapfish/print/output/JasperReportPDFOutputFormat.java index c1377e9429..70ab8d1eb9 100644 --- a/core/src/main/java/org/mapfish/print/output/JasperReportPDFOutputFormat.java +++ b/core/src/main/java/org/mapfish/print/output/JasperReportPDFOutputFormat.java @@ -4,11 +4,11 @@ import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.PrintPageFormat; -import net.sf.jasperreports.engine.export.JRPdfExporter; import net.sf.jasperreports.export.SimpleExporterInput; import net.sf.jasperreports.export.SimpleOutputStreamExporterOutput; -import net.sf.jasperreports.export.SimplePdfExporterConfiguration; -import net.sf.jasperreports.export.type.PdfVersionEnum; +import net.sf.jasperreports.pdf.JRPdfExporter; +import net.sf.jasperreports.pdf.SimplePdfExporterConfiguration; +import net.sf.jasperreports.pdf.type.PdfVersionEnum; import org.mapfish.print.config.PDFConfig; import org.mapfish.print.processor.ExecutionStats; diff --git a/core/src/main/java/org/mapfish/print/processor/map/CreateMapProcessor.java b/core/src/main/java/org/mapfish/print/processor/map/CreateMapProcessor.java index 7a643eb853..d3243f02e4 100644 --- a/core/src/main/java/org/mapfish/print/processor/map/CreateMapProcessor.java +++ b/core/src/main/java/org/mapfish/print/processor/map/CreateMapProcessor.java @@ -7,9 +7,9 @@ import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.Timer; import com.google.common.annotations.VisibleForTesting; -import com.lowagie.text.DocumentException; -import com.lowagie.text.pdf.PdfContentByte; -import com.lowagie.text.pdf.PdfWriter; +import com.itextpdf.text.DocumentException; +import com.itextpdf.text.pdf.PdfContentByte; +import com.itextpdf.text.pdf.PdfWriter; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; @@ -283,8 +283,9 @@ private URI createMergedGraphic( int height = mapContext.getMapSize().height; if ("pdf".equalsIgnoreCase(outputFormat)) { - try (com.lowagie.text.Document document = - new com.lowagie.text.Document(new com.lowagie.text.Rectangle(width, height))) { + try { + com.itextpdf.text.Document document = + new com.itextpdf.text.Document(new com.itextpdf.text.Rectangle(width, height)); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(mergedGraphic)); document.open(); PdfContentByte pdfCB = writer.getDirectContent(); diff --git a/core/src/main/java/org/springframework/core/NestedIOException.java b/core/src/main/java/org/springframework/core/NestedIOException.java new file mode 100644 index 0000000000..fc8ba7cc5b --- /dev/null +++ b/core/src/main/java/org/springframework/core/NestedIOException.java @@ -0,0 +1,26 @@ +package org.springframework.core; + +import java.io.IOException; + +public class NestedIOException extends IOException { + + static { + NestedExceptionUtils.class.getName(); + } + + public NestedIOException(final String msg) { + super(msg); + } + + public NestedIOException(final String msg, final Throwable cause) { + super(msg, cause); + } + + /** + * @return something + */ + @Override + public String getMessage() { + return NestedExceptionUtils.buildMessage(super.getMessage(), getCause()); + } +} diff --git a/core/src/main/java/org/springframework/core/package-info.java b/core/src/main/java/org/springframework/core/package-info.java new file mode 100644 index 0000000000..5305eb0387 --- /dev/null +++ b/core/src/main/java/org/springframework/core/package-info.java @@ -0,0 +1,2 @@ +/** Javadoc. */ +package org.springframework.core; diff --git a/core/src/main/resources/org/mapfish/print/processor/jasper/dynamic-table-default.jrxml b/core/src/main/resources/org/mapfish/print/processor/jasper/dynamic-table-default.jrxml index b911453a74..47848ea42d 100644 --- a/core/src/main/resources/org/mapfish/print/processor/jasper/dynamic-table-default.jrxml +++ b/core/src/main/resources/org/mapfish/print/processor/jasper/dynamic-table-default.jrxml @@ -1,9 +1,7 @@ - - - + - - - - - - @@ -73,66 +68,43 @@ - - - + - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + diff --git a/core/src/main/webapp/WEB-INF/web.xml b/core/src/main/webapp/WEB-INF/web.xml index ca3cec8e27..b5e39f4fa6 100644 --- a/core/src/main/webapp/WEB-INF/web.xml +++ b/core/src/main/webapp/WEB-INF/web.xml @@ -7,7 +7,7 @@ metadata-complete="true"> - + contextConfigLocation @@ -38,7 +38,7 @@ maxContentLength - 1048576 + 6129387 diff --git a/core/src/test/java/org/mapfish/print/attribute/JsonDatasourceAttributeTest.java b/core/src/test/java/org/mapfish/print/attribute/JsonDatasourceAttributeTest.java index 177e4db184..c4ff59cf32 100644 --- a/core/src/test/java/org/mapfish/print/attribute/JsonDatasourceAttributeTest.java +++ b/core/src/test/java/org/mapfish/print/attribute/JsonDatasourceAttributeTest.java @@ -6,8 +6,8 @@ import java.io.IOException; import java.util.HashMap; import net.sf.jasperreports.engine.JRException; -import net.sf.jasperreports.engine.data.JsonDataSource; import net.sf.jasperreports.engine.design.JRDesignField; +import net.sf.jasperreports.json.data.JsonDataSource; import org.junit.Test; import org.mapfish.print.AbstractMapfishSpringTest; import org.mapfish.print.TestHttpClientFactory; diff --git a/core/src/test/java/org/mapfish/print/attribute/map/BBoxMapBoundsTest.java b/core/src/test/java/org/mapfish/print/attribute/map/BBoxMapBoundsTest.java index 1baf05a213..b434a6893d 100644 --- a/core/src/test/java/org/mapfish/print/attribute/map/BBoxMapBoundsTest.java +++ b/core/src/test/java/org/mapfish/print/attribute/map/BBoxMapBoundsTest.java @@ -2,6 +2,7 @@ import static org.geotools.referencing.crs.DefaultGeographicCRS.WGS84; import static org.junit.Assert.assertEquals; +import static org.mapfish.print.Constants.PDF_DPI; import static org.mapfish.print.attribute.map.CenterScaleMapBoundsTest.CH1903; import java.awt.Rectangle; @@ -180,14 +181,14 @@ public void testAdjustToGeodeticScale() { assertEquals( 20000, newMapBounds - .getScale(screen, dpi) - .getGeodeticDenominator(SPHERICAL_MERCATOR, dpi, newBBox.centre()), + .getScale(screen, PDF_DPI) + .getGeodeticDenominator(SPHERICAL_MERCATOR, PDF_DPI, newBBox.centre()), 1); - assertEquals(26428d, newMapBounds.getScale(screen, dpi).getDenominator(dpi), 1d); - assertEquals(399664d, newBBox.getMinX(), 1d); - assertEquals(4999664d, newBBox.getMinY(), 1d); - assertEquals(400335d, newBBox.getMaxX(), 1d); - assertEquals(5000335d, newBBox.getMaxY(), 1d); + assertEquals(26428d, newMapBounds.getScale(screen, PDF_DPI).getDenominator(PDF_DPI), 1d); + assertEquals(399533d, newBBox.getMinX(), 1d); + assertEquals(4999533d, newBBox.getMinY(), 1d); + assertEquals(400466d, newBBox.getMaxX(), 1d); + assertEquals(5000466d, newBBox.getMaxY(), 1d); } @Test diff --git a/core/src/test/java/org/mapfish/print/http/HttpProxyTest.java b/core/src/test/java/org/mapfish/print/http/HttpProxyTest.java index 8313bfc909..ab89c2488a 100644 --- a/core/src/test/java/org/mapfish/print/http/HttpProxyTest.java +++ b/core/src/test/java/org/mapfish/print/http/HttpProxyTest.java @@ -5,7 +5,6 @@ import static org.mapfish.print.AbstractMapfishSpringTest.HTTP_REQUEST_MAX_NUMBER_FETCH_RETRY; import com.sun.net.httpserver.HttpExchange; -import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsParameters; @@ -33,6 +32,7 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; import org.junit.runner.RunWith; import org.mapfish.print.AbstractMapfishSpringTest; import org.mapfish.print.Constants; @@ -68,7 +68,8 @@ public class HttpProxyTest { @Autowired private MfClientHttpRequestFactoryImpl requestFactory; @BeforeClass - public static void setUp() throws Exception { + @BeforeEach + public static void setUpClass() throws Exception { proxyServer = HttpServer.create(new InetSocketAddress(LOCALHOST, PROXY_PORT), 0); proxyServer.start(); @@ -79,7 +80,7 @@ public static void setUp() throws Exception { } @AfterClass - public static void tearDown() { + public static void tearDownClass() { proxyServer.stop(0); targetServer.stop(0); httpsServer.stop(0); @@ -173,6 +174,7 @@ public static HttpsServer createHttpsServer(int httpsProxyPort) throws Exception httpsServer.setHttpsConfigurator( new HttpsConfigurator(sslContext) { + @Override public void configure(HttpsParameters params) { params.setCipherSuites(m_engine.getEnabledCipherSuites()); params.setProtocols(m_engine.getEnabledProtocols()); @@ -208,17 +210,16 @@ public void testExecuteProxy() throws Exception { httpProxy.setPort(PROXY_PORT); final String path = "/request"; - proxyServer.createContext( - path, - new HttpHandler() { - @Override - public void handle(HttpExchange httpExchange) throws IOException { - respond(httpExchange, MESSAGE_FROM_PROXY, 200); - } - }); + var proxyContext = + proxyServer.createContext( + path, + (HttpExchange httpExchange) -> { + respond(httpExchange, MESSAGE_FROM_PROXY, 200); + }); assertCorrectResponse( httpProxy, MESSAGE_FROM_PROXY, "http://" + LOCALHOST + ":" + TARGET_PORT, path); + proxyServer.removeContext(proxyContext); } @Test @@ -229,35 +230,35 @@ public void testExecuteProxyWithUsername() throws Exception { httpProxy.setUsername("username"); final String path = "/username"; - httpsServer.createContext( - path, - new HttpHandler() { - @Override - public void handle(HttpExchange httpExchange) throws IOException { - final String authorization = httpExchange.getRequestHeaders().getFirst("Authorization"); - if (authorization == null) { - httpExchange - .getResponseHeaders() - .add("WWW-Authenticate", "Basic realm=\"Test Site\""); - httpExchange.sendResponseHeaders(401, 0); - httpExchange.close(); - } else { - final String expectedAuth = "Basic dXNlcm5hbWU6bnVsbA=="; - if (authorization.equals(expectedAuth)) { - respond(httpExchange, MESSAGE_FROM_PROXY, 200); + var userContext = + httpsServer.createContext( + path, + (HttpExchange httpExchange) -> { + final String authorization = + httpExchange.getRequestHeaders().getFirst("Authorization"); + if (authorization == null) { + httpExchange + .getResponseHeaders() + .add("WWW-Authenticate", "Basic realm=\"Test Site\""); + httpExchange.sendResponseHeaders(401, 0); + httpExchange.close(); } else { - final String errorMessage = - String.format( - "Expected authorization:\n" + "'%s' but got:\n" + "'%s'", - expectedAuth, authorization); - respond(httpExchange, errorMessage, 500); + final String expectedAuth = "Basic dXNlcm5hbWU6bnVsbA=="; + if (authorization.equals(expectedAuth)) { + respond(httpExchange, MESSAGE_FROM_PROXY, 200); + } else { + final String errorMessage = + String.format( + "Expected authorization:\n" + "'%s' but got:\n" + "'%s'", + expectedAuth, authorization); + respond(httpExchange, errorMessage, 500); + } } - } - } - }); + }); assertCorrectResponse( httpProxy, MESSAGE_FROM_PROXY, "http://" + LOCALHOST + ":" + TARGET_PORT, path); + httpsServer.removeContext(userContext); } @Test @@ -271,29 +272,24 @@ public void testExecuteProxyWithUsernameAndPassword() throws Exception { final String path = "/usernameAndPassword"; httpsServer.createContext( path, - new HttpHandler() { - @Override - public void handle(HttpExchange httpExchange) throws IOException { - final String authorization = httpExchange.getRequestHeaders().getFirst("Authorization"); - if (authorization == null) { - httpExchange - .getResponseHeaders() - .add("WWW-Authenticate", "Basic realm=\"Test Site\""); - httpExchange.sendResponseHeaders(401, 0); - httpExchange.close(); + (HttpExchange httpExchange) -> { + final String authorization = httpExchange.getRequestHeaders().getFirst("Authorization"); + if (authorization == null) { + httpExchange.getResponseHeaders().add("WWW-Authenticate", "Basic realm=\"Test Site\""); + httpExchange.sendResponseHeaders(401, 0); + httpExchange.close(); + } else { + final String expectedAuth = "Basic dXNlcm5hbWU6cGFzc3dvcmQ="; + if (authorization.equals(expectedAuth)) { + respond(httpExchange, MESSAGE_FROM_PROXY, 200); } else { - final String expectedAuth = "Basic dXNlcm5hbWU6cGFzc3dvcmQ="; - if (authorization.equals(expectedAuth)) { - respond(httpExchange, MESSAGE_FROM_PROXY, 200); - } else { - final String errorMessage = - "Expected authorization:\n'" - + expectedAuth - + "' but got:\n'" - + authorization - + "'"; - respond(httpExchange, errorMessage, 500); - } + final String errorMessage = + "Expected authorization:\n'" + + expectedAuth + + "' but got:\n'" + + authorization + + "'"; + respond(httpExchange, errorMessage, 500); } } }); @@ -315,20 +311,14 @@ public void testExecuteProxyNoMatcher() throws Exception { final String path = "/nomatch"; targetServer.createContext( path, - new HttpHandler() { - @Override - public void handle(HttpExchange httpExchange) throws IOException { - respond(httpExchange, message, 200); - } + (HttpExchange httpExchange) -> { + respond(httpExchange, message, 200); }); proxyServer.createContext( path, - new HttpHandler() { - @Override - public void handle(HttpExchange httpExchange) throws IOException { - String msg = "Proxy was reached but in this test the proxy should not have been used."; - respond(httpExchange, msg, 500); - } + (HttpExchange httpExchange) -> { + String msg = "Proxy was reached but in this test the proxy should not have been used."; + respond(httpExchange, msg, 500); }); assertCorrectResponse(httpProxy, message, "http://" + LOCALHOST + ":" + TARGET_PORT, path); @@ -345,25 +335,24 @@ public void testExecuteProxyMatcherReject() throws Exception { final String message = "Target was reached without proxy"; final String path = "/nomatch"; - targetServer.createContext( - path, - new HttpHandler() { - @Override - public void handle(HttpExchange httpExchange) throws IOException { - respond(httpExchange, message, 200); - } - }); - proxyServer.createContext( - path, - new HttpHandler() { - @Override - public void handle(HttpExchange httpExchange) throws IOException { - String msg = "Proxy was reached but in this test the proxy should not have been used."; - respond(httpExchange, msg, 500); - } - }); + var nomatchContext = + targetServer.createContext( + path, + (httpExchange) -> { + respond(httpExchange, message, 200); + }); + var nomatchProxyContext = + proxyServer.createContext( + path, + (httpExchange) -> { + String msg = + "Proxy was reached but in this test the proxy should not have been used."; + respond(httpExchange, msg, 500); + }); assertCorrectResponse(httpProxy, message, "http://" + LOCALHOST + ":" + TARGET_PORT, path); + targetServer.removeContext(nomatchContext); + proxyServer.removeContext(nomatchProxyContext); } private void assertCorrectResponse( diff --git a/core/src/test/java/org/mapfish/print/processor/map/CreateMapPagesProcessorTest.java b/core/src/test/java/org/mapfish/print/processor/map/CreateMapPagesProcessorTest.java index 139bbdfd8d..63d443d99b 100644 --- a/core/src/test/java/org/mapfish/print/processor/map/CreateMapPagesProcessorTest.java +++ b/core/src/test/java/org/mapfish/print/processor/map/CreateMapPagesProcessorTest.java @@ -96,6 +96,13 @@ public void testExecute() throws Exception { getMapAttributes(requestData).put("dpi", 254); testPrint(config, requestData, "higher-dpi", format, 3); + config = configurationFactory.getConfig(getFile(BASE_DIR + "config-geodetic.yaml")); + requestData = loadJsonRequestData(); + testPrint(config, requestData, "geodetic", format, 0); + + getMapAttributes(requestData).put("dpi", 254); + testPrint(config, requestData, "higher-dpi-geodetic", format, 3); + config = configurationFactory.getConfig(getFile(BASE_DIR + "config-scalebar.yaml")); requestData = loadJsonRequestData(); testPrint(config, requestData, "scalebar", format, 0); diff --git a/core/src/test/java/org/mapfish/print/servlet/MapPrinterServletTest.java b/core/src/test/java/org/mapfish/print/servlet/MapPrinterServletTest.java index 81006d150a..f1fd847856 100644 --- a/core/src/test/java/org/mapfish/print/servlet/MapPrinterServletTest.java +++ b/core/src/test/java/org/mapfish/print/servlet/MapPrinterServletTest.java @@ -122,12 +122,16 @@ public void testExampleRequest_referrerNOK() throws Exception { @Test(timeout = 60000) public void testCreateReport_Success_NoAppId() throws Exception { + System.out.printf("HERE-X: %s\n", "TEST"); doCreateAndPollAndGetReport( (@Nullable MockHttpServletRequest servletCreateRequest) -> { try { + System.out.printf("HERE-X: %s\n", "TEST"); final MockHttpServletResponse servletCreateResponse = new MockHttpServletResponse(); String requestData = loadRequestDataAsString(); + System.out.printf("HERE-A: %s\n", requestData); servlet.createReport("png", requestData, servletCreateRequest, servletCreateResponse); + System.out.printf("HERE-B: %s\n", servletCreateResponse); return servletCreateResponse; } catch (Exception e) { throw new AssertionError(e); diff --git a/core/src/test/resources/org/mapfish/print/cli/simpleReport.jrxml b/core/src/test/resources/org/mapfish/print/cli/simpleReport.jrxml index b30bd1d67b..8998ca41bc 100644 --- a/core/src/test/resources/org/mapfish/print/cli/simpleReport.jrxml +++ b/core/src/test/resources/org/mapfish/print/cli/simpleReport.jrxml @@ -1,6 +1,4 @@ - - - + @@ -12,24 +10,16 @@ - - <band height="390" splitType="Stretch"> - <staticText> - <reportElement x="0" y="1" width="800" height="50" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc"/> - <textElement textAlignment="Center"> - <font size="36"/> - </textElement> - <text><![CDATA[Map]]></text> - </staticText> - <subreport> - <reportElement x="0" y="51" width="780" height="330" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <subreportExpression><![CDATA[$P{mapSubReport}]]></subreportExpression> - </subreport> - </band> + <title height="390" splitType="Stretch"> + <element kind="staticText" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc" x="0" y="1" width="800" height="50" fontSize="36.0" hTextAlign="Center"> + <text><![CDATA[Map]]></text> + </element> + <element kind="subreport" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d" x="0" y="51" width="780" height="330"> + <expression><![CDATA[$P{mapSubReport}]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </element> diff --git a/core/src/test/resources/org/mapfish/print/config/font/simpleReport.jrxml b/core/src/test/resources/org/mapfish/print/config/font/simpleReport.jrxml index 794a8a98b2..471ff7320b 100644 --- a/core/src/test/resources/org/mapfish/print/config/font/simpleReport.jrxml +++ b/core/src/test/resources/org/mapfish/print/config/font/simpleReport.jrxml @@ -1,6 +1,4 @@ - - - + @@ -13,23 +11,15 @@ - - <band height="390" splitType="Stretch"> - <staticText> - <reportElement x="0" y="1" width="800" height="50" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc"/> - <textElement textAlignment="Center"> - <font fontName="Coming Soon" size="36"/> - </textElement> - <text><![CDATA[Map]]></text> - </staticText> - <subreport> - <reportElement x="0" y="51" width="780" height="330" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d"/> - <subreportExpression><![CDATA[$P{mapSubReport}]]></subreportExpression> - </subreport> - <subreport> - <reportElement x="540" y="341" width="240" height="40" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d"/> - <subreportExpression><![CDATA[$P{scalebarSubReport}]]></subreportExpression> - </subreport> - </band> + <title height="390" splitType="Stretch"> + <element kind="staticText" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc" x="0" y="1" width="800" height="50" fontName="Coming Soon" fontSize="36.0" hTextAlign="Center"> + <text><![CDATA[Map]]></text> + </element> + <element kind="subreport" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d" x="0" y="51" width="780" height="330"> + <expression><![CDATA[$P{mapSubReport}]]></expression> + </element> + <element kind="subreport" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d" x="540" y="341" width="240" height="40"> + <expression><![CDATA[$P{scalebarSubReport}]]></expression> + </element> diff --git a/core/src/test/resources/org/mapfish/print/output/pdf-config/simple-map.jrxml b/core/src/test/resources/org/mapfish/print/output/pdf-config/simple-map.jrxml index 83c478ccc8..d4b95dfa02 100644 --- a/core/src/test/resources/org/mapfish/print/output/pdf-config/simple-map.jrxml +++ b/core/src/test/resources/org/mapfish/print/output/pdf-config/simple-map.jrxml @@ -1,47 +1,31 @@ - - - + - - - - - - - - <band height="40" splitType="Stretch"> - <staticText> - <reportElement x="0" y="0" width="580" height="30" uuid="213ea5bb-0b20-4478-ac53-f2935b69f2e9"/> - <textElement> - <font size="20"/> - </textElement> - <text><![CDATA[Report Title]]></text> - </staticText> - <image> - <reportElement x="460" y="0" width="82" height="40" backcolor="#FF7F27" uuid="a1d586d7-ed6a-4b0f-9194-3186eecfb4cf"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <imageExpression><![CDATA["logo.png"]]></imageExpression> - </image> - </band> + <query language="sql"><![CDATA[]]></query> + <background splitType="Stretch"/> + <title height="40" splitType="Stretch"> + <element kind="staticText" uuid="213ea5bb-0b20-4478-ac53-f2935b69f2e9" x="0" y="0" width="580" height="30" fontSize="20.0"> + <text><![CDATA[Report Title]]></text> + </element> + <element kind="image" uuid="a1d586d7-ed6a-4b0f-9194-3186eecfb4cf" x="460" y="0" width="82" height="40" backcolor="#FF7F27"> + <expression><![CDATA["logo.png"]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <box> + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> + </box> + </element> - - - - - - - + + + + + diff --git a/core/src/test/resources/org/mapfish/print/output/simple_map/simple-map-wrong-type.jrxml b/core/src/test/resources/org/mapfish/print/output/simple_map/simple-map-wrong-type.jrxml index 155b20ee60..5374205532 100644 --- a/core/src/test/resources/org/mapfish/print/output/simple_map/simple-map-wrong-type.jrxml +++ b/core/src/test/resources/org/mapfish/print/output/simple_map/simple-map-wrong-type.jrxml @@ -1,47 +1,31 @@ - - - + - - - - - - - - <band height="40" splitType="Stretch"> - <staticText> - <reportElement x="0" y="0" width="580" height="30" uuid="213ea5bb-0b20-4478-ac53-f2935b69f2e9"/> - <textElement> - <font size="20"/> - </textElement> - <text><![CDATA[Report Title]]></text> - </staticText> - <image> - <reportElement x="460" y="0" width="82" height="40" backcolor="#FF7F27" uuid="a1d586d7-ed6a-4b0f-9194-3186eecfb4cf"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <imageExpression><![CDATA["logo.png"]]></imageExpression> - </image> - </band> + <query language="sql"><![CDATA[]]></query> + <background splitType="Stretch"/> + <title height="40" splitType="Stretch"> + <element kind="staticText" uuid="213ea5bb-0b20-4478-ac53-f2935b69f2e9" x="0" y="0" width="580" height="30" fontSize="20.0"> + <text><![CDATA[Report Title]]></text> + </element> + <element kind="image" uuid="a1d586d7-ed6a-4b0f-9194-3186eecfb4cf" x="460" y="0" width="82" height="40" backcolor="#FF7F27"> + <expression><![CDATA["logo.png"]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <box> + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> + </box> + </element> - - - - - - - + + + + + diff --git a/core/src/test/resources/org/mapfish/print/output/simple_map/simple-map.jrxml b/core/src/test/resources/org/mapfish/print/output/simple_map/simple-map.jrxml index 83c478ccc8..d4b95dfa02 100644 --- a/core/src/test/resources/org/mapfish/print/output/simple_map/simple-map.jrxml +++ b/core/src/test/resources/org/mapfish/print/output/simple_map/simple-map.jrxml @@ -1,47 +1,31 @@ - - - + - - - - - - - - <band height="40" splitType="Stretch"> - <staticText> - <reportElement x="0" y="0" width="580" height="30" uuid="213ea5bb-0b20-4478-ac53-f2935b69f2e9"/> - <textElement> - <font size="20"/> - </textElement> - <text><![CDATA[Report Title]]></text> - </staticText> - <image> - <reportElement x="460" y="0" width="82" height="40" backcolor="#FF7F27" uuid="a1d586d7-ed6a-4b0f-9194-3186eecfb4cf"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <imageExpression><![CDATA["logo.png"]]></imageExpression> - </image> - </band> + <query language="sql"><![CDATA[]]></query> + <background splitType="Stretch"/> + <title height="40" splitType="Stretch"> + <element kind="staticText" uuid="213ea5bb-0b20-4478-ac53-f2935b69f2e9" x="0" y="0" width="580" height="30" fontSize="20.0"> + <text><![CDATA[Report Title]]></text> + </element> + <element kind="image" uuid="a1d586d7-ed6a-4b0f-9194-3186eecfb4cf" x="460" y="0" width="82" height="40" backcolor="#FF7F27"> + <expression><![CDATA["logo.png"]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <box> + <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> + </box> + </element> - - - - - - - + + + + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/incorrectly-configured-DataSourceProcessor/table.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/incorrectly-configured-DataSourceProcessor/table.jrxml index c5a1caad31..c5a31b8682 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/incorrectly-configured-DataSourceProcessor/table.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/incorrectly-configured-DataSourceProcessor/table.jrxml @@ -1,16 +1,14 @@ - - - + - - - - - - @@ -72,66 +67,43 @@ - - - + - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/legend/legend.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/legend/legend.jrxml index 5d8a904058..69577f04b4 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/legend/legend.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/legend/legend.jrxml @@ -1,26 +1,25 @@ - - - + + - + - - - - + + + - - - - - - + + + + + + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/table-dynamic-defaults/simpleReport.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/table-dynamic-defaults/simpleReport.jrxml index 41bfd47bce..bc2c416318 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/table-dynamic-defaults/simpleReport.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/table-dynamic-defaults/simpleReport.jrxml @@ -1,15 +1,12 @@ - - - + - - + - - + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/table-dynamic/simpleReport.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/table-dynamic/simpleReport.jrxml index 41bfd47bce..bc2c416318 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/table-dynamic/simpleReport.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/table-dynamic/simpleReport.jrxml @@ -1,15 +1,12 @@ - - - + - - + - - + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/table-dynamic/table.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/table-dynamic/table.jrxml index c5a1caad31..c5a31b8682 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/table-dynamic/table.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/table-dynamic/table.jrxml @@ -1,16 +1,14 @@ - - - + - - - - - - @@ -72,66 +67,43 @@ - - - + - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/table-image-column-resolver/simpleReport.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/table-image-column-resolver/simpleReport.jrxml index 0b04b295ad..594081b34a 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/table-image-column-resolver/simpleReport.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/table-image-column-resolver/simpleReport.jrxml @@ -1,86 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + - - - - - - + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/table/simpleReport-wrong-field-type.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/table/simpleReport-wrong-field-type.jrxml index 3a9d7f7fd8..bf844107ee 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/table/simpleReport-wrong-field-type.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/table/simpleReport-wrong-field-type.jrxml @@ -1,86 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + - - - - - - + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/table/simpleReport.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/table/simpleReport.jrxml index 85d1119b36..84a01396cf 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/table/simpleReport.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/table/simpleReport.jrxml @@ -1,85 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + - - - - - - + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters/simpleReport.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters/simpleReport.jrxml index 15e06b4ab7..0a0211bece 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters/simpleReport.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters/simpleReport.jrxml @@ -1,94 +1,72 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters_dyn/simpleReport.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters_dyn/simpleReport.jrxml index 41bfd47bce..bc2c416318 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters_dyn/simpleReport.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters_dyn/simpleReport.jrxml @@ -1,15 +1,12 @@ - - - + - - + - - + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters_dyn/table.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters_dyn/table.jrxml index c5a1caad31..c5a31b8682 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters_dyn/table.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters_dyn/table.jrxml @@ -1,16 +1,14 @@ - - - + - - - - - - @@ -72,66 +67,43 @@ - - - + - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/tablelist/simpleReport.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/tablelist/simpleReport.jrxml index 6e86d406f7..d5344c7bf9 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/tablelist/simpleReport.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/tablelist/simpleReport.jrxml @@ -1,17 +1,14 @@ - - - + - - + - - + + diff --git a/core/src/test/resources/org/mapfish/print/processor/jasper/tablelist/table.jrxml b/core/src/test/resources/org/mapfish/print/processor/jasper/tablelist/table.jrxml index a2accfaea7..eee0a4918f 100644 --- a/core/src/test/resources/org/mapfish/print/processor/jasper/tablelist/table.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/jasper/tablelist/table.jrxml @@ -1,41 +1,37 @@ - - - - - - - @@ -51,45 +47,31 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + - - - - - - + + diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/config-geodetic.yaml b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/config-geodetic.yaml new file mode 100644 index 0000000000..9cd8f42d6d --- /dev/null +++ b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/config-geodetic.yaml @@ -0,0 +1,32 @@ +templates: + #=========================================================================== + main: !template + #=========================================================================== + reportTemplate: simpleReport.jrxml + attributes: + map: !map + maxDpi: 400 + width: 780 + height: 330 + zoomLevelSnapStrategy: HIGHER_SCALE + zoomSnapGeodetic: true + zoomLevels: !zoomLevels + scales: [5000, 10000, 50000, 110000, 500000, 1000000] + paging: !paging + default: + scale: 10000 + overlap: 0 + processors: + - !reportBuilder # compile all reports in current directory + directory: '.' + - !createMapPages {} # creates the iterable consumed by dataSource + - !createMap {} + - !createDataSource + attributes: + scalebar: !scalebar + height: 20 + width: 143 + processors: + - !createMap {} + - !createScalebar {} + tableData: jrDataSource diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-0.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-0.png new file mode 100644 index 0000000000..22ab9e5cf2 Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-0.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-1.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-1.png new file mode 100644 index 0000000000..e359665da2 Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-1.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-2.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-2.png new file mode 100644 index 0000000000..d79c2b0ac4 Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-2.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-3.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-3.png new file mode 100644 index 0000000000..ed13d2b34f Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-3.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-4.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-4.png new file mode 100644 index 0000000000..32e2d3242f Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-4.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-5.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-5.png new file mode 100644 index 0000000000..6063973e6e Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-5.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-6.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-6.png new file mode 100644 index 0000000000..8a29556533 Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/geodetic/expected-page-6.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-0.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-0.png new file mode 100644 index 0000000000..af62ad0dfc Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-0.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-1.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-1.png new file mode 100644 index 0000000000..b0b5517aa5 Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-1.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-2.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-2.png new file mode 100644 index 0000000000..1a79e280ab Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-2.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-3.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-3.png new file mode 100644 index 0000000000..bfc8f638fa Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-3.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-4.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-4.png new file mode 100644 index 0000000000..9d4865f0a7 Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-4.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-5.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-5.png new file mode 100644 index 0000000000..0c2495c3ef Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-5.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-6.png b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-6.png new file mode 100644 index 0000000000..cb21b9f38b Binary files /dev/null and b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/output/higher-dpi-geodetic/expected-page-6.png differ diff --git a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/simpleReport.jrxml b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/simpleReport.jrxml index 4ead4ce24d..ef017ce28c 100644 --- a/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/simpleReport.jrxml +++ b/core/src/test/resources/org/mapfish/print/processor/map/paging_processor_test/simpleReport.jrxml @@ -1,6 +1,4 @@ - - - + @@ -19,106 +17,75 @@ - - <band height="390" splitType="Stretch"> - <staticText> - <reportElement x="0" y="1" width="800" height="50" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc"/> - <textElement textAlignment="Center"> - <font size="36"/> - </textElement> - <text><![CDATA[Full Map]]></text> - </staticText> - <subreport> - <reportElement x="0" y="51" width="780" height="330" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <subreportExpression><![CDATA[$P{mapSubReport}]]></subreportExpression> - </subreport> - </band> + <title height="390" splitType="Stretch"> + <element kind="staticText" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc" x="0" y="1" width="800" height="50" fontSize="36.0" hTextAlign="Center"> + <text><![CDATA[Full Map]]></text> + </element> + <element kind="subreport" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d" x="0" y="51" width="780" height="330"> + <expression><![CDATA[$P{mapSubReport}]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </element> - - - - - - - - - - - + + + + + + + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - - - + + + + diff --git a/core/src/test/resources/org/mapfish/print/servlet/MapOnly_A4.jrxml b/core/src/test/resources/org/mapfish/print/servlet/MapOnly_A4.jrxml index 1ba8e2caca..723f3c123b 100644 --- a/core/src/test/resources/org/mapfish/print/servlet/MapOnly_A4.jrxml +++ b/core/src/test/resources/org/mapfish/print/servlet/MapOnly_A4.jrxml @@ -1,40 +1,28 @@ - - - + - + - + - - - - - - + + - - - - - - - + + + + + - - - - - - - - - - + + + + + + diff --git a/docs/build.gradle b/docs/build.gradle index 0557d03179..5636c39af3 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -16,7 +16,8 @@ repositories { dependencies { implementation project(':core') - implementation ("org.codehaus.groovy:groovy-all:3.0.23", + implementation (\ + 'org.apache.groovy:groovy-all:4.0.26', "org.springframework:spring-test:5.3.39", 'org.ccil.cowan.tagsoup:tagsoup:1.2.1', 'com.samskivert:jmustache:1.16', diff --git a/docs/src/main/groovy/DocsXmlSupport.groovy b/docs/src/main/groovy/DocsXmlSupport.groovy index db256f5951..3c639a44cf 100644 --- a/docs/src/main/groovy/DocsXmlSupport.groovy +++ b/docs/src/main/groovy/DocsXmlSupport.groovy @@ -1,6 +1,5 @@ -import groovy.util.slurpersupport.NoChildren import org.ccil.cowan.tagsoup.Parser - +import groovy.xml.XmlSlurper import java.lang.reflect.Field @@ -17,7 +16,7 @@ class DocsXmlSupport { static String appendXmlToBuilder(node, StringBuilder stringBuilder) { stringBuilder.append("<").append(node.name()) - if (node instanceof NoChildren) { + if (node.children().isEmpty()) { stringBuilder.append(">") } else { node.attributes().each { name, value -> diff --git a/docs/src/main/groovy/Javadoc7Parser.groovy b/docs/src/main/groovy/Javadoc7Parser.groovy index 6dc1a6c9c1..5e40317072 100644 --- a/docs/src/main/groovy/Javadoc7Parser.groovy +++ b/docs/src/main/groovy/Javadoc7Parser.groovy @@ -1,6 +1,6 @@ import java.lang.reflect.Field import java.lang.reflect.Method - +import groovy.xml.XmlSlurper /** * Strategy for parsing out the field, class and method descriptions from Javadoc 7 compatible javadocs. */ diff --git a/examples/src/test/resources/examples/add_overlay_layer/simpleReport.jrxml b/examples/src/test/resources/examples/add_overlay_layer/simpleReport.jrxml index 29ccff8663..7f3c7e6534 100644 --- a/examples/src/test/resources/examples/add_overlay_layer/simpleReport.jrxml +++ b/examples/src/test/resources/examples/add_overlay_layer/simpleReport.jrxml @@ -1,6 +1,4 @@ - - - + @@ -13,33 +11,23 @@ - - <band height="554" splitType="Stretch"> - <staticText> - <reportElement x="0" y="1" width="800" height="50" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc"/> - <textElement textAlignment="Center"> - <font size="36"/> - </textElement> - <text><![CDATA[Map]]></text> - </staticText> - <subreport> - <reportElement x="0" y="51" width="780" height="330" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <subreportExpression><![CDATA[$P{mapSubReport}]]></subreportExpression> - </subreport> - <subreport> - <reportElement x="480" y="390" width="300" height="150" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <subreportExpression><![CDATA[$P{overviewMapSubReport}]]></subreportExpression> - </subreport> - </band> + <title height="554" splitType="Stretch"> + <element kind="staticText" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc" x="0" y="1" width="800" height="50" fontSize="36.0" hTextAlign="Center"> + <text><![CDATA[Map]]></text> + </element> + <element kind="subreport" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d" x="0" y="51" width="780" height="330"> + <expression><![CDATA[$P{mapSubReport}]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </element> + <element kind="subreport" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d" x="480" y="390" width="300" height="150"> + <expression><![CDATA[$P{overviewMapSubReport}]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </element> diff --git a/examples/src/test/resources/examples/config_aliases_defaults/pdf-preview-landscape.jrxml b/examples/src/test/resources/examples/config_aliases_defaults/pdf-preview-landscape.jrxml index 3503c598f5..e54ef91762 100644 --- a/examples/src/test/resources/examples/config_aliases_defaults/pdf-preview-landscape.jrxml +++ b/examples/src/test/resources/examples/config_aliases_defaults/pdf-preview-landscape.jrxml @@ -1,49 +1,29 @@ - - - + - - - - - <band height="790" splitType="Stretch"> + <query language="sql"><![CDATA[]]></query> + <title height="790" splitType="Stretch"> + <element kind="textField" uuid="023b2447-bf55-447c-b0f1-399775e61ec6" x="0" y="0" width="1151" height="79" fontSize="18.0" hTextAlign="Center"> + <expression><![CDATA[$P{mapTitle}]]></expression> <property name="local_mesure_unitheight" value="pixel"/> - <textField> - <reportElement x="0" y="0" width="1151" height="79" uuid="023b2447-bf55-447c-b0f1-399775e61ec6"> - <property name="local_mesure_unitheight" value="pixel"/> - </reportElement> - <textElement textAlignment="Center"> - <font size="18"/> - </textElement> - <textFieldExpression><![CDATA[$P{mapTitle}]]></textFieldExpression> - </textField> - <subreport> - <reportElement x="0" y="79" width="1151" height="711" uuid="9181d342-d448-4c00-b548-6ab402f0480f"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unity" value="pixel"/> - <property name="com.jaspersoft.studio.unit.y" value="px"/> - </reportElement> - <subreportExpression><![CDATA[$P{mainMapSubReport}]]></subreportExpression> - </subreport> - </band> + </element> + <element kind="subreport" uuid="9181d342-d448-4c00-b548-6ab402f0480f" x="0" y="79" width="1151" height="711"> + <expression><![CDATA[$P{mainMapSubReport}]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" value="px"/> + </element> + <property name="local_mesure_unitheight" value="pixel"/> - - + + + - - - - - - - - - - - + + + diff --git a/examples/src/test/resources/examples/config_aliases_defaults/pdf-preview-portrait.jrxml b/examples/src/test/resources/examples/config_aliases_defaults/pdf-preview-portrait.jrxml index 5cd3f4354d..61a859b98a 100644 --- a/examples/src/test/resources/examples/config_aliases_defaults/pdf-preview-portrait.jrxml +++ b/examples/src/test/resources/examples/config_aliases_defaults/pdf-preview-portrait.jrxml @@ -1,44 +1,27 @@ - - - + - - - - - <band height="790" splitType="Stretch"> + <query language="sql"><![CDATA[]]></query> + <title height="790" splitType="Stretch"> + <element kind="textField" uuid="023b2447-bf55-447c-b0f1-399775e61ec6" x="0" y="0" width="555" height="79"> + <expression><![CDATA[$P{mapTitle}]]></expression> <property name="local_mesure_unitheight" value="pixel"/> - <textField> - <reportElement x="0" y="0" width="555" height="79" uuid="023b2447-bf55-447c-b0f1-399775e61ec6"> - <property name="local_mesure_unitheight" value="pixel"/> - </reportElement> - <textFieldExpression><![CDATA[$P{mapTitle}]]></textFieldExpression> - </textField> - <subreport> - <reportElement x="0" y="79" width="555" height="711" uuid="9181d342-d448-4c00-b548-6ab402f0480f"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <subreportExpression><![CDATA[$P{mainMapSubReport}]]></subreportExpression> - </subreport> - </band> + </element> + <element kind="subreport" uuid="9181d342-d448-4c00-b548-6ab402f0480f" x="0" y="79" width="555" height="711"> + <expression><![CDATA[$P{mainMapSubReport}]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </element> + <property name="local_mesure_unitheight" value="pixel"/> - - + + + - - - - - - - - - - - + + + diff --git a/examples/src/test/resources/examples/crosses_point_grid/simpleReport.jrxml b/examples/src/test/resources/examples/crosses_point_grid/simpleReport.jrxml index daed906ead..8998ca41bc 100644 --- a/examples/src/test/resources/examples/crosses_point_grid/simpleReport.jrxml +++ b/examples/src/test/resources/examples/crosses_point_grid/simpleReport.jrxml @@ -1,11 +1,4 @@ - - - + @@ -17,24 +10,16 @@ - - <band height="390" splitType="Stretch"> - <staticText> - <reportElement x="0" y="1" width="800" height="50" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc"/> - <textElement textAlignment="Center"> - <font size="36"/> - </textElement> - <text><![CDATA[Map]]></text> - </staticText> - <subreport> - <reportElement x="0" y="51" width="780" height="330" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <subreportExpression><![CDATA[$P{mapSubReport}]]></subreportExpression> - </subreport> - </band> + <title height="390" splitType="Stretch"> + <element kind="staticText" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc" x="0" y="1" width="800" height="50" fontSize="36.0" hTextAlign="Center"> + <text><![CDATA[Map]]></text> + </element> + <element kind="subreport" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d" x="0" y="51" width="780" height="330"> + <expression><![CDATA[$P{mapSubReport}]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </element> diff --git a/examples/src/test/resources/examples/customDynamicReport/simpleReport.jrxml b/examples/src/test/resources/examples/customDynamicReport/simpleReport.jrxml index aba1dba427..da34fab46b 100644 --- a/examples/src/test/resources/examples/customDynamicReport/simpleReport.jrxml +++ b/examples/src/test/resources/examples/customDynamicReport/simpleReport.jrxml @@ -1,6 +1,4 @@ - - - + @@ -9,55 +7,31 @@ - - <band height="390" splitType="Stretch"> - <staticText> - <reportElement x="0" y="1" width="555" height="50" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc"/> - <textElement textAlignment="Center"> - <font size="36"/> - </textElement> - <text><![CDATA[The Map]]></text> - </staticText> - <subreport> - <reportElement x="0" y="51" width="555" height="230" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d"/> - <subreportExpression><![CDATA[$P{mapSubReport}]]></subreportExpression> - </subreport> - <textField> - <reportElement x="0" y="280" width="555" height="23" uuid="245a4b0e-d6e2-4c82-a5ec-072b3cc182e4"/> - <textElement> - <font size="16" isBold="true" isItalic="true"/> - </textElement> - <textFieldExpression><![CDATA[$P{name}]]></textFieldExpression> - </textField> - <textField> - <reportElement x="0" y="300" width="555" height="23" uuid="5b59bca0-4d72-4f52-889c-833479a3edc2"/> - <textElement> - <font size="16" isBold="true" isItalic="true"/> - </textElement> - <textFieldExpression><![CDATA[$P{description}]]></textFieldExpression> - </textField> - <break> - <reportElement x="0" y="360" width="100" height="1" uuid="63e34d7f-6ef9-4306-9b19-45d6f38fc760"/> - </break> - </band> + <title height="390" splitType="Stretch"> + <element kind="staticText" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc" x="0" y="1" width="555" height="50" fontSize="36.0" hTextAlign="Center"> + <text><![CDATA[The Map]]></text> + </element> + <element kind="subreport" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d" x="0" y="51" width="555" height="230"> + <expression><![CDATA[$P{mapSubReport}]]></expression> + </element> + <element kind="textField" uuid="245a4b0e-d6e2-4c82-a5ec-072b3cc182e4" x="0" y="280" width="555" height="23" fontSize="16.0" bold="true" italic="true"> + <expression><![CDATA[$P{name}]]></expression> + </element> + <element kind="textField" uuid="5b59bca0-4d72-4f52-889c-833479a3edc2" x="0" y="300" width="555" height="23" fontSize="16.0" bold="true" italic="true"> + <expression><![CDATA[$P{description}]]></expression> + </element> + <element kind="break" uuid="63e34d7f-6ef9-4306-9b19-45d6f38fc760" x="0" y="360" width="100" height="1"/> - - - - - - - - - + + + + - - - - - + + + diff --git a/examples/src/test/resources/examples/customDynamicReport/table.jrxml b/examples/src/test/resources/examples/customDynamicReport/table.jrxml index a2accfaea7..eee0a4918f 100644 --- a/examples/src/test/resources/examples/customDynamicReport/table.jrxml +++ b/examples/src/test/resources/examples/customDynamicReport/table.jrxml @@ -1,41 +1,37 @@ - - - - - - - @@ -51,45 +47,31 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + - - - - - - + + diff --git a/examples/src/test/resources/examples/data_uri_json/simpleReport.jrxml b/examples/src/test/resources/examples/data_uri_json/simpleReport.jrxml index 1c6158e6c4..300cba5275 100644 --- a/examples/src/test/resources/examples/data_uri_json/simpleReport.jrxml +++ b/examples/src/test/resources/examples/data_uri_json/simpleReport.jrxml @@ -1,6 +1,4 @@ - - - + @@ -12,24 +10,16 @@ - - <band height="390" splitType="Stretch"> - <staticText> - <reportElement x="0" y="1" width="800" height="50" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc"/> - <textElement textAlignment="Center"> - <font size="36"/> - </textElement> - <text><![CDATA[Map]]></text> - </staticText> - <subreport> - <reportElement x="0" y="51" width="470" height="330" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <subreportExpression><![CDATA[$P{mapSubReport}]]></subreportExpression> - </subreport> - </band> + <title height="390" splitType="Stretch"> + <element kind="staticText" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc" x="0" y="1" width="800" height="50" fontSize="36.0" hTextAlign="Center"> + <text><![CDATA[Map]]></text> + </element> + <element kind="subreport" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d" x="0" y="51" width="470" height="330"> + <expression><![CDATA[$P{mapSubReport}]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </element> diff --git a/examples/src/test/resources/examples/datasource_dynamic_tables/A4_Portrait.jrxml b/examples/src/test/resources/examples/datasource_dynamic_tables/A4_Portrait.jrxml index 7039499e21..d06c093fe8 100644 --- a/examples/src/test/resources/examples/datasource_dynamic_tables/A4_Portrait.jrxml +++ b/examples/src/test/resources/examples/datasource_dynamic_tables/A4_Portrait.jrxml @@ -1,45 +1,31 @@ - - - + - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - + + + + diff --git a/examples/src/test/resources/examples/datasource_dynamic_tables/A4_landscape.jrxml b/examples/src/test/resources/examples/datasource_dynamic_tables/A4_landscape.jrxml index 8ce73757f8..ef8d482f6a 100644 --- a/examples/src/test/resources/examples/datasource_dynamic_tables/A4_landscape.jrxml +++ b/examples/src/test/resources/examples/datasource_dynamic_tables/A4_landscape.jrxml @@ -1,6 +1,4 @@ - - - + @@ -13,42 +11,30 @@ - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - + + + + diff --git a/examples/src/test/resources/examples/datasource_dynamic_tables/results_landscape.jrxml b/examples/src/test/resources/examples/datasource_dynamic_tables/results_landscape.jrxml index c953e94990..538532de7c 100644 --- a/examples/src/test/resources/examples/datasource_dynamic_tables/results_landscape.jrxml +++ b/examples/src/test/resources/examples/datasource_dynamic_tables/results_landscape.jrxml @@ -1,24 +1,17 @@ - - - + - - + - - - - - - - - - + + + + + diff --git a/examples/src/test/resources/examples/datasource_dynamic_tables/results_portrait.jrxml b/examples/src/test/resources/examples/datasource_dynamic_tables/results_portrait.jrxml index ef95a67591..9ffef489e4 100644 --- a/examples/src/test/resources/examples/datasource_dynamic_tables/results_portrait.jrxml +++ b/examples/src/test/resources/examples/datasource_dynamic_tables/results_portrait.jrxml @@ -1,6 +1,4 @@ - - - + @@ -15,18 +13,13 @@ - - + - - - - - - - - - + + + + + diff --git a/examples/src/test/resources/examples/datasource_many_dynamictables_legend/A4_Portrait.jrxml b/examples/src/test/resources/examples/datasource_many_dynamictables_legend/A4_Portrait.jrxml index 9593662639..ad3f54ad2a 100644 --- a/examples/src/test/resources/examples/datasource_many_dynamictables_legend/A4_Portrait.jrxml +++ b/examples/src/test/resources/examples/datasource_many_dynamictables_legend/A4_Portrait.jrxml @@ -1,7 +1,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + - - - - - - + + diff --git a/examples/src/test/resources/examples/multiple_maps/report.jrxml b/examples/src/test/resources/examples/multiple_maps/report.jrxml index 0566d0d304..c9a26d3393 100644 --- a/examples/src/test/resources/examples/multiple_maps/report.jrxml +++ b/examples/src/test/resources/examples/multiple_maps/report.jrxml @@ -1,7 +1,4 @@ - - - - + @@ -16,50 +13,35 @@ - - <band height="50" splitType="Stretch"> - <property name="com.jaspersoft.studio.unit.height" value="pixel"/> - <textField> - <reportElement x="0" y="0" width="800" height="50" forecolor="#187ECC" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc"> - <property name="com.jaspersoft.studio.unit.y" value="pixel"/> - </reportElement> - <textElement textAlignment="Center"> - <font size="36"/> - </textElement> - <textFieldExpression><![CDATA[$P{title}]]></textFieldExpression> - </textField> - </band> + <title height="50" splitType="Stretch"> + <element kind="textField" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc" x="0" y="0" width="800" height="50" forecolor="#187ECC" fontSize="36.0" hTextAlign="Center"> + <expression><![CDATA[$P{title}]]></expression> + <property name="com.jaspersoft.studio.unit.y" value="pixel"/> + </element> + <property name="com.jaspersoft.studio.unit.height" value="pixel"/> + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/src/test/resources/examples/native_mix/report.jrxml b/examples/src/test/resources/examples/native_mix/report.jrxml index ffc106cf0e..f636da374e 100644 --- a/examples/src/test/resources/examples/native_mix/report.jrxml +++ b/examples/src/test/resources/examples/native_mix/report.jrxml @@ -1,7 +1,4 @@ - - - - + @@ -15,24 +12,16 @@ - - <band height="390" splitType="Stretch"> - <textField> - <reportElement x="0" y="1" width="800" height="50" forecolor="#187ECC" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc"/> - <textElement textAlignment="Center"> - <font size="36"/> - </textElement> - <textFieldExpression><![CDATA[$P{title}]]></textFieldExpression> - </textField> - <subreport> - <reportElement x="0" y="51" width="780" height="330" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <subreportExpression><![CDATA[$P{mapSubReport}]]></subreportExpression> - </subreport> - </band> + <title height="390" splitType="Stretch"> + <element kind="textField" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc" x="0" y="1" width="800" height="50" forecolor="#187ECC" fontSize="36.0" hTextAlign="Center"> + <expression><![CDATA[$P{title}]]></expression> + </element> + <element kind="subreport" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d" x="0" y="51" width="780" height="330"> + <expression><![CDATA[$P{mapSubReport}]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </element> diff --git a/examples/src/test/resources/examples/oereb/exclusion_of_liability.jrxml b/examples/src/test/resources/examples/oereb/exclusion_of_liability.jrxml index 3e2a5b705f..e2117bf4d0 100644 --- a/examples/src/test/resources/examples/oereb/exclusion_of_liability.jrxml +++ b/examples/src/test/resources/examples/oereb/exclusion_of_liability.jrxml @@ -1,46 +1,34 @@ - - - - - @@ -80,303 +78,210 @@ - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - + + - - - - - - - - - - - - - - - + - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + - - - - - - - - - - - - + + - - - - + + + + + + - - - - - - + + + + + + + + - - - - - - + + + - - - - - - - + - - + + + + + + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/examples/src/test/resources/examples/oereb/tocFull.jrxml b/examples/src/test/resources/examples/oereb/tocFull.jrxml index 650a7dc2fe..57dd1ac2e8 100644 --- a/examples/src/test/resources/examples/oereb/tocFull.jrxml +++ b/examples/src/test/resources/examples/oereb/tocFull.jrxml @@ -1,6 +1,4 @@ - - - + @@ -12,67 +10,52 @@ - - - - - @@ -51,45 +47,31 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + - - - - - - + + diff --git a/examples/src/test/resources/examples_to_port/print_tms_tyger_ny_EPSG_3857/simpleReport.jrxml b/examples/src/test/resources/examples_to_port/print_tms_tyger_ny_EPSG_3857/simpleReport.jrxml index b30bd1d67b..8998ca41bc 100644 --- a/examples/src/test/resources/examples_to_port/print_tms_tyger_ny_EPSG_3857/simpleReport.jrxml +++ b/examples/src/test/resources/examples_to_port/print_tms_tyger_ny_EPSG_3857/simpleReport.jrxml @@ -1,6 +1,4 @@ - - - + @@ -12,24 +10,16 @@ - - <band height="390" splitType="Stretch"> - <staticText> - <reportElement x="0" y="1" width="800" height="50" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc"/> - <textElement textAlignment="Center"> - <font size="36"/> - </textElement> - <text><![CDATA[Map]]></text> - </staticText> - <subreport> - <reportElement x="0" y="51" width="780" height="330" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <subreportExpression><![CDATA[$P{mapSubReport}]]></subreportExpression> - </subreport> - </band> + <title height="390" splitType="Stretch"> + <element kind="staticText" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc" x="0" y="1" width="800" height="50" fontSize="36.0" hTextAlign="Center"> + <text><![CDATA[Map]]></text> + </element> + <element kind="subreport" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d" x="0" y="51" width="780" height="330"> + <expression><![CDATA[$P{mapSubReport}]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </element> diff --git a/examples/src/test/resources/examples_to_port/print_vector_new_york_EPSG_3857/simpleReport.jrxml b/examples/src/test/resources/examples_to_port/print_vector_new_york_EPSG_3857/simpleReport.jrxml index b30bd1d67b..8998ca41bc 100644 --- a/examples/src/test/resources/examples_to_port/print_vector_new_york_EPSG_3857/simpleReport.jrxml +++ b/examples/src/test/resources/examples_to_port/print_vector_new_york_EPSG_3857/simpleReport.jrxml @@ -1,6 +1,4 @@ - - - + @@ -12,24 +10,16 @@ - - <band height="390" splitType="Stretch"> - <staticText> - <reportElement x="0" y="1" width="800" height="50" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc"/> - <textElement textAlignment="Center"> - <font size="36"/> - </textElement> - <text><![CDATA[Map]]></text> - </staticText> - <subreport> - <reportElement x="0" y="51" width="780" height="330" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <subreportExpression><![CDATA[$P{mapSubReport}]]></subreportExpression> - </subreport> - </band> + <title height="390" splitType="Stretch"> + <element kind="staticText" uuid="3988392b-f1e2-4eda-9cb4-7caa2b3eb0cc" x="0" y="1" width="800" height="50" fontSize="36.0" hTextAlign="Center"> + <text><![CDATA[Map]]></text> + </element> + <element kind="subreport" uuid="fa145068-76a5-4834-98ed-ce65b1976b3d" x="0" y="51" width="780" height="330"> + <expression><![CDATA[$P{mapSubReport}]]></expression> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </element>