+ chapPg = new Progress(0, chap.getParagraphs().size());
+ storyPg.addProgress(chapPg, 1);
+ chapPgs.add(chapPg);
+ chapPg = null;
+ }
+
+ writeStoryHeader(story);
+ for (int i = 0; i < story.getChapters().size(); i++) {
+ chapPg = chapPgs.get(i);
+ writeChapter(story.getChapters().get(i));
+ chapPg.setProgress(chapPg.getMax());
+ chapPg = null;