]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/output/DataTable.java
Another calc fix
[gigi.git] / src / org / cacert / gigi / output / DataTable.java
index fb4f4da6f3baab60d1ed319c63deb886c5bf34da..e17714c8ab02569edda2d31af6fc1e2f729554c7 100644 (file)
@@ -16,7 +16,7 @@ public class DataTable implements Outputable {
        }
 
        public void output(PrintWriter out, Language l) {
-               int mesCells = cells.size();
+               float mesCells = cells.size();
                for (Cell c : cells) {
                        if (c.getColSpan() > 1) {
                                mesCells += c.getColSpan();
@@ -24,7 +24,7 @@ public class DataTable implements Outputable {
                }
                out.println("<table align=\"center\" valign=\"middle\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"wrapper\">");
                int cellsRendered = 0;
-               for (int i = 0; i < (mesCells / columnCount) - 1; i++) {
+               for (int i = 0; i < Math.ceil(mesCells / columnCount) - 1; i++) {
                        out.println("<tr>");
                        for (int j = 0; j < columnCount;) {
                                Cell current = cells.get(cellsRendered++);