diff options
Diffstat (limited to 'reportbuilder/java/com/sun/star/report/pentaho/parser/style/PageLayoutReadHandler.java')
-rw-r--r-- | reportbuilder/java/com/sun/star/report/pentaho/parser/style/PageLayoutReadHandler.java | 92 |
1 files changed, 45 insertions, 47 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/style/PageLayoutReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/style/PageLayoutReadHandler.java index 46ba378a1ce5..5ee10d2b936b 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/parser/style/PageLayoutReadHandler.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/style/PageLayoutReadHandler.java @@ -27,8 +27,6 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - - package com.sun.star.report.pentaho.parser.style; import java.util.ArrayList; @@ -49,57 +47,57 @@ import org.xml.sax.SAXException; */ public class PageLayoutReadHandler extends ElementReadHandler { - private final PageLayout pageLayout; - private final List childs; - public PageLayoutReadHandler() - { - this.pageLayout = new PageLayout(); - this.childs = new ArrayList(); - } + private final PageLayout pageLayout; + private final List childs; - /** - * Returns the handler for a child element. - * - * @param tagName the tag name. - * @param atts the attributes. - * @return the handler or null, if the tagname is invalid. - * - * @throws org.xml.sax.SAXException if there is a parsing error. - */ - protected XmlReadHandler getHandlerForChild (final String uri, - final String tagName, - final Attributes atts) - throws SAXException - { - final StyleDefinitionReadHandler readHandler = - new StyleDefinitionReadHandler(); - childs.add(readHandler); - return readHandler; - } + public PageLayoutReadHandler() + { + this.pageLayout = new PageLayout(); + this.childs = new ArrayList(); + } + /** + * Returns the handler for a child element. + * + * @param tagName the tag name. + * @param atts the attributes. + * @return the handler or null, if the tagname is invalid. + * + * @throws org.xml.sax.SAXException if there is a parsing error. + */ + protected XmlReadHandler getHandlerForChild(final String uri, + final String tagName, + final Attributes atts) + throws SAXException + { + final StyleDefinitionReadHandler readHandler = + new StyleDefinitionReadHandler(); + childs.add(readHandler); + return readHandler; + } - /** - * Done parsing. - * - * @throws org.xml.sax.SAXException if there is a parsing error. - */ - protected void doneParsing() throws SAXException - { - for (int i = 0; i < childs.size(); i++) + /** + * Done parsing. + * + * @throws org.xml.sax.SAXException if there is a parsing error. + */ + protected void doneParsing() throws SAXException { - final ElementReadHandler handler = (ElementReadHandler) childs.get(i); - pageLayout.addNode(handler.getElement()); + for (int i = 0; i < childs.size(); i++) + { + final ElementReadHandler handler = (ElementReadHandler) childs.get(i); + pageLayout.addNode(handler.getElement()); + } } - } - public PageLayout getPageLayout() - { - return pageLayout; - } + public PageLayout getPageLayout() + { + return pageLayout; + } - public Element getElement() - { - return pageLayout; - } + public Element getElement() + { + return pageLayout; + } } |