diff options
Diffstat (limited to 'reportbuilder/java/com/sun/star/report/pentaho/parser/style/OfficeStyleReadHandler.java')
-rw-r--r-- | reportbuilder/java/com/sun/star/report/pentaho/parser/style/OfficeStyleReadHandler.java | 94 |
1 files changed, 46 insertions, 48 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/style/OfficeStyleReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/style/OfficeStyleReadHandler.java index a259a16ad8da..0a541495c8dd 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/parser/style/OfficeStyleReadHandler.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/style/OfficeStyleReadHandler.java @@ -27,8 +27,6 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - - package com.sun.star.report.pentaho.parser.style; import java.util.ArrayList; @@ -47,60 +45,60 @@ import org.xml.sax.SAXException; */ public class OfficeStyleReadHandler extends ElementReadHandler { - private final OfficeStyle officeStyle; - private final List childs; - public OfficeStyleReadHandler() - { - this.officeStyle = new OfficeStyle(); - this.childs = new ArrayList(); - } + private final OfficeStyle officeStyle; + private final List childs; + + public OfficeStyleReadHandler() + { + this.officeStyle = new OfficeStyle(); + 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 - { + /** + * 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 + { // if (OfficeParserUtil.getInstance().isValidStyleElement(uri, tagName)) // { // } - final StyleDefinitionReadHandler readHandler = - new StyleDefinitionReadHandler(); - childs.add(readHandler); - return readHandler; - } - + 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); - officeStyle.addNode(handler.getElement()); + for (int i = 0; i < childs.size(); i++) + { + final ElementReadHandler handler = (ElementReadHandler) childs.get(i); + officeStyle.addNode(handler.getElement()); + } } - } - public OfficeStyle getOfficeStyle() - { - return officeStyle; - } + public OfficeStyle getOfficeStyle() + { + return officeStyle; + } - public Element getElement() - { - return officeStyle; - } + public Element getElement() + { + return officeStyle; + } } |