private void computePages() {
    this.pages = new ArrayList<TextPage>();
    TextPage p = new TextPage();
    this.pages.add(p);
    org.jopendocument.model.office.OfficeText text = this.getBody().getText();
    System.err.println("--- Dump ----- " + text.getElementCount() + " elements");
    int stop = text.getElementCount();
    //
    int availableHeight = 0;
    int availableWidth = 0;
    int currentX = 0;
    int currentY = 0;

    for (int i = 0; i < stop; i++) {
      final Object element = text.getElementAt(i);
      System.err.println(i + ":" + element);
      if (element instanceof TextH) {
        RenderBlock b = new HeaderRenderBlock((TextH) element, availableWidth, availableHeight);
        b.setX(currentX);
        b.setY(currentY);
        p.add(b);
        availableHeight -= b.getHeight();
        currentY += b.getHeight();
      }
    }
  }
 public void dumpPages() {
   org.jopendocument.model.office.OfficeText text = this.getBody().getText();
   System.err.println("--- Dump ----- " + text.getElementCount() + " elements");
   int stop = text.getElementCount();
   for (int i = 0; i < stop; i++) {
     System.err.println(i + ":" + text.getElementAt(i));
   }
 }