]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Removed SubSequenceSpecifier references.
authorPeter Bernard West <pbwest@apache.org>
Sun, 6 Oct 2002 14:18:05 +0000 (14:18 +0000)
committerPeter Bernard West <pbwest@apache.org>
Sun, 6 Oct 2002 14:18:05 +0000 (14:18 +0000)
Simplified exception catching and handling.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195300 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/pagination/FoLayoutMasterSet.java

index c708fa1ed5cba84181480ff75dae8ba8757dca62..b17c856c549d8cd2c617ce721fcae3a2bb818e7a 100644 (file)
@@ -15,9 +15,6 @@ import org.apache.fop.xml.XMLNamespaces;
 import org.apache.fop.xml.SyncedXmlEventsBuffer;
 import org.apache.fop.datastructs.Tree;
 import org.apache.fop.fo.pagination.FoPageSequenceMaster;
-import org.apache.fop.fo.pagination.FoPageSequenceMaster.SubSequenceSpecifier;
-import org.apache.fop.fo.pagination
-    .FoPageSequenceMaster.SubSequenceSpecifier.ConditionalPageMasterReference;
 
 /*
  * $Id$
@@ -66,8 +63,7 @@ public class FoLayoutMasterSet extends FONode {
     }
 
     /**
-     * Set up all the page masters.  !!!Note that the masters are not entered
-     * in the FO tree.!!!
+     * Set up all the page masters.
      * fo:layout-master-set contents are
      * (simple-page-master|page-sequence-master)+
      */
@@ -88,12 +84,7 @@ public class FoLayoutMasterSet extends FONode {
                 localName = ev.getLocalName();
                 if (localName.equals("simple-page-master")) {
                     System.out.println("Found simple-page-master");
-                    try {
-                        simple = new FoSimplePageMaster(foTree, this, ev);
-                    } catch (Tree.TreeException e) {
-                        throw new FOPException
-                                ("TreeException: " + e.getMessage());
-                    }
+                    simple = new FoSimplePageMaster(foTree, this, ev);
                     simpleName = simple.getMasterName();
                     if (pageMasters == null)
                         pageMasters = new HashMap();
@@ -112,22 +103,6 @@ public class FoLayoutMasterSet extends FONode {
                                 ("simple-page-master master-name clash in "
                                  + "simplePageMasters: " + simpleName);
                     simplePageMasters.put(simpleName, simple);
-                    FoPageSequenceMaster seqMaster;
-                    try {
-                        // Construct a new PageSequenceMaster
-                        seqMaster = new FoPageSequenceMaster
-                                (foTree, this, simpleName);
-                    } catch(Tree.TreeException e) {
-                        throw new FOPException
-                                ("TreeException: " + e.getMessage());
-                    }
-                    // Construct a SubSequence
-                    SubSequenceSpecifier subSeq =
-                            seqMaster.new SubSequenceSpecifier();
-                    // Construct a default ConditionalPageMasterReference
-                    ConditionalPageMasterReference cond = subSeq.new
-                            ConditionalPageMasterReference(simpleName);
-                    pageMasters.put(simpleName, seqMaster);
                 } else if (localName.equals("page-sequence-master")) {
                     System.out.println("Found page-sequence-master");
                     try {
@@ -153,7 +128,10 @@ public class FoLayoutMasterSet extends FONode {
             // Masters exhausted
         }
         catch (PropertyException e) {
-            throw new FOPException("PropertyException: " + e.getMessage());
+            throw new FOPException(e);
+        }
+        catch (Tree.TreeException e) {
+            throw new FOPException(e);
         }
     }