summaryrefslogtreecommitdiff
path: root/reportbuilder/java/com/sun/star/report/pentaho/parser
diff options
context:
space:
mode:
Diffstat (limited to 'reportbuilder/java/com/sun/star/report/pentaho/parser')
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/AttributeSpecification.java45
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java17
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeParserUtil.java1
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeStylesXmlResourceFactory.java26
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/StarStyleXmlFactoryModule.java39
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/StarXmlFactoryModule.java3
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/StyleMapper.java11
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/chart/ChartReadHandler.java5
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/draw/ObjectOleReadHandler.java4
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/office/DocumentContentReadHandler.java1
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/office/DocumentStylesReadHandler.java96
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/office/FontFaceDeclsReadHandler.java103
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/rpt-schema-v1.0-os.xsd720
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/FormattedTextReadHandler.java14
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/GroupReadHandler.java4
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/MasterDetailReadHandler.java2
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/ReportReadHandler.java1
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/style/FontFaceReadHandler.java21
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/style/MasterPageReadHandler.java96
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/style/OfficeStyleReadHandler.java94
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/style/OfficeStylesReadHandler.java165
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/style/PageLayoutReadHandler.java92
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/style/StyleDefinitionReadHandler.java87
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/OneOfConstantsMapper.java2
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/draw/TextAreaVerticalAlignMapper.java19
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/FontStyleMapper.java19
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/FontWeightMapper.java19
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/TextAlignMapper.java22
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontFamilyGenericMapper.java5
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontFamilyMapper.java5
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontNameMapper.java21
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontPitchMapper.java15
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontReliefMapper.java18
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextEmphasizeMapper.java18
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineColorMapper.java27
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineStyleMapper.java28
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineWordMode.java15
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/VerticalAlignMapper.java21
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/table/ColumnWidthMapper.java22
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/table/RowHeightMapper.java22
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/table/TableColumnReadHandler.java1
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/parser/table/TableColumnsReadHandler.java2
42 files changed, 956 insertions, 992 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/AttributeSpecification.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/AttributeSpecification.java
index 578fc4f98716..e4f6e121c277 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/AttributeSpecification.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/AttributeSpecification.java
@@ -27,35 +27,34 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser;
public final class AttributeSpecification
{
- private final String namespaceUrl;
- private final String attributName;
- private final String mapperImplementation;
- public AttributeSpecification (String namespaceUrl, String attributName, String mapperImplementation)
- {
- this.namespaceUrl = namespaceUrl;
- this.attributName = attributName;
- this.mapperImplementation = mapperImplementation;
- }
+ private final String namespaceUrl;
+ private final String attributName;
+ private final String mapperImplementation;
+
+ public AttributeSpecification(String namespaceUrl, String attributName, String mapperImplementation)
+ {
+ this.namespaceUrl = namespaceUrl;
+ this.attributName = attributName;
+ this.mapperImplementation = mapperImplementation;
+ }
- public String getAttributName ()
- {
- return attributName;
- }
+ public String getAttributName()
+ {
+ return attributName;
+ }
- public String getMapperImplementation ()
- {
- return mapperImplementation;
- }
+ public String getMapperImplementation()
+ {
+ return mapperImplementation;
+ }
- public String getNamespaceUrl ()
- {
- return namespaceUrl;
- }
+ public String getNamespaceUrl()
+ {
+ return namespaceUrl;
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java
index 29e316f3be4c..e3b8f7374d43 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser;
import com.sun.star.report.pentaho.model.OfficeDocument;
@@ -44,13 +42,12 @@ import org.jfree.report.modules.factories.report.base.JFreeReportXmlResourceFact
public class OfficeDocumentXmlResourceFactory extends JFreeReportXmlResourceFactory
{
- public OfficeDocumentXmlResourceFactory()
- {
- }
-
- public Class getFactoryType()
- {
- return OfficeDocument.class;
- }
+ public OfficeDocumentXmlResourceFactory()
+ {
+ }
+ public Class getFactoryType()
+ {
+ return OfficeDocument.class;
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeParserUtil.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeParserUtil.java
index 85bbab40a1a7..266cfa529d5a 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeParserUtil.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeParserUtil.java
@@ -46,6 +46,7 @@ import org.pentaho.reporting.libraries.resourceloader.ResourceManager;
public class OfficeParserUtil
{
+
private static final Log LOGGER = LogFactory.getLog(OfficeParserUtil.class);
private static OfficeParserUtil instance;
private static final String NAMESPACES_PREFIX = "namespaces.";
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeStylesXmlResourceFactory.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeStylesXmlResourceFactory.java
index 50aaf2e0ca40..6971eb857a20 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeStylesXmlResourceFactory.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/OfficeStylesXmlResourceFactory.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser;
import com.sun.star.report.pentaho.model.OfficeStylesCollection;
@@ -46,19 +44,17 @@ import org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory;
public class OfficeStylesXmlResourceFactory extends AbstractXmlResourceFactory
{
- public OfficeStylesXmlResourceFactory()
- {
- }
-
-
- protected Configuration getConfiguration()
- {
- return JFreeReportBoot.getInstance().getGlobalConfig();
- }
+ public OfficeStylesXmlResourceFactory()
+ {
+ }
- public Class getFactoryType()
- {
- return OfficeStylesCollection.class;
- }
+ protected Configuration getConfiguration()
+ {
+ return JFreeReportBoot.getInstance().getGlobalConfig();
+ }
+ public Class getFactoryType()
+ {
+ return OfficeStylesCollection.class;
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/StarStyleXmlFactoryModule.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/StarStyleXmlFactoryModule.java
index b698a73dcc8e..ff3dfc494436 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/StarStyleXmlFactoryModule.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/StarStyleXmlFactoryModule.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser;
import com.sun.star.report.pentaho.OfficeNamespaces;
@@ -39,27 +37,28 @@ import org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler;
public class StarStyleXmlFactoryModule implements XmlFactoryModule
{
- public StarStyleXmlFactoryModule()
- {
- }
- public XmlReadHandler createReadHandler (final XmlDocumentInfo documentInfo)
- {
- return new DocumentStylesReadHandler();
- }
+ public StarStyleXmlFactoryModule()
+ {
+ }
- public int getDocumentSupport (final XmlDocumentInfo documentInfo)
- {
- final String rootNamespace = documentInfo.getRootElementNameSpace();
- if (OfficeNamespaces.OFFICE_NS.equals(rootNamespace) && "document-styles".equals(documentInfo.getRootElement()) )
+ public XmlReadHandler createReadHandler(final XmlDocumentInfo documentInfo)
{
- return XmlFactoryModule.RECOGNIZED_BY_NAMESPACE;
+ return new DocumentStylesReadHandler();
}
- return XmlFactoryModule.NOT_RECOGNIZED;
- }
- public String getDefaultNamespace(final XmlDocumentInfo documentInfo)
- {
- return null;
- }
+ public int getDocumentSupport(final XmlDocumentInfo documentInfo)
+ {
+ final String rootNamespace = documentInfo.getRootElementNameSpace();
+ if (OfficeNamespaces.OFFICE_NS.equals(rootNamespace) && "document-styles".equals(documentInfo.getRootElement()))
+ {
+ return XmlFactoryModule.RECOGNIZED_BY_NAMESPACE;
+ }
+ return XmlFactoryModule.NOT_RECOGNIZED;
+ }
+
+ public String getDefaultNamespace(final XmlDocumentInfo documentInfo)
+ {
+ return null;
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/StarXmlFactoryModule.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/StarXmlFactoryModule.java
index 261ee5a285ce..e69df1b60bbe 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/StarXmlFactoryModule.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/StarXmlFactoryModule.java
@@ -50,8 +50,7 @@ public class StarXmlFactoryModule implements XmlFactoryModule
public int getDocumentSupport(final XmlDocumentInfo documentInfo)
{
final String rootNamespace = documentInfo.getRootElementNameSpace();
- if (OfficeNamespaces.OFFICE_NS.equals(rootNamespace) &&
- ("document-content".equals(documentInfo.getRootElement()) || "document".equals(documentInfo.getRootElement())))
+ if (OfficeNamespaces.OFFICE_NS.equals(rootNamespace) && ("document-content".equals(documentInfo.getRootElement()) || "document".equals(documentInfo.getRootElement())))
{
return XmlFactoryModule.RECOGNIZED_BY_NAMESPACE;
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/StyleMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/StyleMapper.java
index f29d0b0abad5..81f92f7ebaea 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/StyleMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/StyleMapper.java
@@ -27,16 +27,15 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser;
import org.jfree.layouting.input.style.CSSDeclarationRule;
public interface StyleMapper
{
- void updateStyle (final String uri,
- final String attrName,
- final String attrValue,
- final CSSDeclarationRule targetRule);
+
+ void updateStyle(final String uri,
+ final String attrName,
+ final String attrValue,
+ final CSSDeclarationRule targetRule);
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/chart/ChartReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/chart/ChartReadHandler.java
index 5e98fe9f3622..820a8fee65e6 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/chart/ChartReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/chart/ChartReadHandler.java
@@ -30,6 +30,7 @@
package com.sun.star.report.pentaho.parser.chart;
import com.sun.star.report.pentaho.OfficeNamespaces;
+import java.lang.Object;
import java.util.ArrayList;
import com.sun.star.report.pentaho.parser.ElementReadHandler;
@@ -98,9 +99,9 @@ public class ChartReadHandler extends ElementReadHandler
*/
protected void doneParsing() throws SAXException
{
- for (int i = 0; i < children.size(); i++)
+ for (Object aChildren : children)
{
- final ElementReadHandler handler = (ElementReadHandler) children.get(i);
+ final ElementReadHandler handler = (ElementReadHandler) aChildren;
element.addNode(handler.getElement());
}
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/draw/ObjectOleReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/draw/ObjectOleReadHandler.java
index 77e28ccab6ee..6630d1e73962 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/draw/ObjectOleReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/draw/ObjectOleReadHandler.java
@@ -71,8 +71,10 @@ public class ObjectOleReadHandler extends ElementReadHandler
String classid = attrs.getValue(OfficeNamespaces.DRAWING_NS, "class-id");
if (classid != null)
{
- if ( classid.equalsIgnoreCase(RPT_CHART_CLASS_ID))
+ if (classid.equalsIgnoreCase(RPT_CHART_CLASS_ID))
+ {
classid = OOO_CHART_CLASS_ID;
+ }
element.setClassId(classid);
}
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/office/DocumentContentReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/office/DocumentContentReadHandler.java
index 9d1b4e1a9d14..64255c2ae373 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/office/DocumentContentReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/office/DocumentContentReadHandler.java
@@ -56,6 +56,7 @@ import org.xml.sax.SAXException;
*/
public class DocumentContentReadHandler extends AbstractXmlReadHandler
{
+
private static final Log LOGGER = LogFactory.getLog(DocumentContentReadHandler.class);
private OfficeDocument report;
private FontFaceDeclsReadHandler fontFaceReadHandler;
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/office/DocumentStylesReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/office/DocumentStylesReadHandler.java
index 33591203573f..32f7c54fa08a 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/office/DocumentStylesReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/office/DocumentStylesReadHandler.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.office;
import com.sun.star.report.pentaho.OfficeNamespaces;
@@ -50,61 +48,59 @@ import org.xml.sax.SAXException;
*/
public class DocumentStylesReadHandler extends ElementReadHandler
{
- private final OfficeStylesCollection officeStylesCollection;
- private FontFaceDeclsReadHandler fontFaceReadHandler;
-
- public DocumentStylesReadHandler()
- {
- officeStylesCollection = new OfficeStylesCollection();
- }
+ private final OfficeStylesCollection officeStylesCollection;
+ private FontFaceDeclsReadHandler fontFaceReadHandler;
- /**
- * 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 (!OfficeNamespaces.OFFICE_NS.equals(uri))
+ public DocumentStylesReadHandler()
{
- return null;
+ officeStylesCollection = new OfficeStylesCollection();
}
- if ("font-face-decls".equals(tagName))
+ /**
+ * 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 (fontFaceReadHandler == null)
- {
- fontFaceReadHandler = new FontFaceDeclsReadHandler
- (officeStylesCollection.getFontFaceDecls());
- }
- return fontFaceReadHandler;
- }
- else if ("automatic-styles".equals(tagName))
- {
- return new OfficeStylesReadHandler(officeStylesCollection.getAutomaticStyles());
- }
- else if ("styles".equals(tagName))
- {
- return new OfficeStylesReadHandler(officeStylesCollection.getCommonStyles());
+ if (!OfficeNamespaces.OFFICE_NS.equals(uri))
+ {
+ return null;
+ }
+
+ if ("font-face-decls".equals(tagName))
+ {
+ if (fontFaceReadHandler == null)
+ {
+ fontFaceReadHandler = new FontFaceDeclsReadHandler(officeStylesCollection.getFontFaceDecls());
+ }
+ return fontFaceReadHandler;
+ }
+ else if ("automatic-styles".equals(tagName))
+ {
+ return new OfficeStylesReadHandler(officeStylesCollection.getAutomaticStyles());
+ }
+ else if ("styles".equals(tagName))
+ {
+ return new OfficeStylesReadHandler(officeStylesCollection.getCommonStyles());
+ }
+ else if ("master-styles".equals(tagName))
+ {
+ return new MasterStylesReadHandler(officeStylesCollection.getMasterStyles());
+ }
+ return null;
}
- else if ("master-styles".equals(tagName))
+
+ public Element getElement()
{
- return new MasterStylesReadHandler(officeStylesCollection.getMasterStyles());
+ return officeStylesCollection;
}
- return null;
- }
-
-
- public Element getElement()
- {
- return officeStylesCollection;
- }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/office/FontFaceDeclsReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/office/FontFaceDeclsReadHandler.java
index c11bf6385bc9..7e40681faee3 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/office/FontFaceDeclsReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/office/FontFaceDeclsReadHandler.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.office;
import java.util.ArrayList;
@@ -53,67 +51,66 @@ import org.xml.sax.SAXException;
*/
public class FontFaceDeclsReadHandler extends ElementReadHandler
{
- private final FontFaceDeclsSection fontFaceDecls;
- private final List fontFaceReadHandlers;
-
- public FontFaceDeclsReadHandler(final FontFaceDeclsSection fontFaceDecls)
- {
- this.fontFaceDecls = fontFaceDecls;
- this.fontFaceReadHandlers = new ArrayList();
- }
- public FontFaceDeclsSection getFontFaceDecls()
- {
- return fontFaceDecls;
- }
+ private final FontFaceDeclsSection fontFaceDecls;
+ private final List fontFaceReadHandlers;
-
- /**
- * 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 (!OfficeNamespaces.STYLE_NS.equals(uri) )
+ public FontFaceDeclsReadHandler(final FontFaceDeclsSection fontFaceDecls)
{
- return null;
+ this.fontFaceDecls = fontFaceDecls;
+ this.fontFaceReadHandlers = new ArrayList();
}
- if ("font-face".equals(tagName))
+ public FontFaceDeclsSection getFontFaceDecls()
{
- final FontFaceReadHandler frh = new FontFaceReadHandler();
- fontFaceReadHandlers.add(frh);
- return frh;
+ return fontFaceDecls;
}
- return null;
- }
- /**
- * Done parsing.
- *
- * @throws org.xml.sax.SAXException if there is a parsing error.
- */
- protected void doneParsing()
- throws SAXException
- {
- for (int i = 0; i < fontFaceReadHandlers.size(); i++)
+ /**
+ * 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 FontFaceReadHandler handler = (FontFaceReadHandler) fontFaceReadHandlers.get(i);
- fontFaceDecls.addFontFace((FontFaceElement) handler.getElement());
+ if (!OfficeNamespaces.STYLE_NS.equals(uri))
+ {
+ return null;
+ }
+
+ if ("font-face".equals(tagName))
+ {
+ final FontFaceReadHandler frh = new FontFaceReadHandler();
+ fontFaceReadHandlers.add(frh);
+ return frh;
+ }
+ return null;
}
- }
- public Element getElement()
- {
- return fontFaceDecls;
- }
+ /**
+ * Done parsing.
+ *
+ * @throws org.xml.sax.SAXException if there is a parsing error.
+ */
+ protected void doneParsing()
+ throws SAXException
+ {
+ for (int i = 0; i < fontFaceReadHandlers.size(); i++)
+ {
+ final FontFaceReadHandler handler = (FontFaceReadHandler) fontFaceReadHandlers.get(i);
+ fontFaceDecls.addFontFace((FontFaceElement) handler.getElement());
+ }
+ }
+ public Element getElement()
+ {
+ return fontFaceDecls;
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt-schema-v1.0-os.xsd b/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt-schema-v1.0-os.xsd
index 88fcc020a2e6..f65b34149429 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt-schema-v1.0-os.xsd
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt-schema-v1.0-os.xsd
@@ -55,364 +55,364 @@
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
xmlns:dc="http://purl.org/dc/elements/1.1/">
- <xs:import namespace="http://purl.org/dc/elements/1.1/" schemaLocation="dc.xsd"/>
- <xs:import namespace="http://www.w3.org/1998/Math/MathML" schemaLocation="math.xsd"/>
- <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
- <xs:import namespace="http://www.w3.org/2002/xforms" schemaLocation="xforms.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" schemaLocation="anim.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" schemaLocation="chart.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:config:1.0" schemaLocation="config.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" schemaLocation="ns1.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" schemaLocation="dr3d.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" schemaLocation="draw.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:form:1.0" schemaLocation="form.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" schemaLocation="meta.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:office:1.0" schemaLocation="office.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" schemaLocation="presentation.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:script:1.0" schemaLocation="script.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" schemaLocation="smil.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:style:1.0" schemaLocation="style.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" schemaLocation="svg.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" schemaLocation="table.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" schemaLocation="OpenDocument-schema-v1.0-os.xsd"/>
- <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" schemaLocation="fo.xsd"/>
- <xs:attributeGroup name="office-report-attlist">
- <xs:attribute name="command-type" default="command" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="table"/>
- <xs:enumeration value="query"/>
- <xs:enumeration value="command"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="command" form="qualified" type="text:string"/>
- <xs:attribute name="escape-processing" default="true" form="qualified" type="text:boolean"/>
- <xs:attribute name="filter" form="qualified" type="text:string"/>
- <xs:attribute name="caption" form="qualified" type="text:string"/>
- </xs:attributeGroup>
- <xs:element name="report-component">
- <xs:complexType>
- <xs:attributeGroup ref="text:common-draw-name-attlist"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="group">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" maxOccurs="unbounded" ref="rpt:function"/>
- <xs:element minOccurs="0" ref="rpt:group-header"/>
- <xs:choice>
- <xs:element ref="rpt:group"/>
- <xs:element ref="rpt:detail"/>
- </xs:choice>
- <xs:element minOccurs="0" ref="rpt:group-footer"/>
- </xs:sequence>
- <xs:attributeGroup ref="rpt:rpt-group-attlist"/>
- </xs:complexType>
- </xs:element>
- <xs:attributeGroup name="rpt-group-attlist">
- <xs:attribute name="sort-ascending" use="required" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="start-new-column" default="false" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="reset-page-number" default="false" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="print-header-on-each-page" default="false" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="group-expression" use="required" form="qualified" type="text:string"/>
- <xs:attribute name="keep-together" default="no" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="no"/>
- <xs:enumeration value="whole-group"/>
- <xs:enumeration value="with-first-detail"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:attributeGroup>
- <xs:element name="group-header">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="table:table"/>
- </xs:sequence>
- <xs:attributeGroup ref="rpt:rpt-group-section-attlist"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="group-footer">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="table:table"/>
- </xs:sequence>
- <xs:attributeGroup ref="rpt:rpt-group-section-attlist"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="report-header">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="table:table"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="page-header">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="table:table"/>
- </xs:sequence>
- <xs:attributeGroup ref="rpt:rpt-page-attlist"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="column-header">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="table:table"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="detail">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="table:table"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="column-footer">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="table:table"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="page-footer">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="table:table"/>
- </xs:sequence>
- <xs:attributeGroup ref="rpt:rpt-page-attlist"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="report-footer">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="table:table"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:attributeGroup name="rpt-page-attlist">
- <xs:attribute name="page-print-option" default="all-pages" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="all-pages"/>
- <xs:enumeration value="not-with-report-header"/>
- <xs:enumeration value="not-with-report-footer"/>
- <xs:enumeration value="not-with-report-header-nor-footer"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:attributeGroup>
- <xs:attributeGroup name="rpt-section-attlist">
- <xs:attribute name="visible" default="true" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="force-new-page" default="none" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="none"/>
- <xs:enumeration value="before-section"/>
- <xs:enumeration value="after-section"/>
- <xs:enumeration value="before-after-section"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="new-row-or-column" default="none" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="none"/>
- <xs:enumeration value="before-section"/>
- <xs:enumeration value="after-section"/>
- <xs:enumeration value="before-after-section"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="keep-together" default="false" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:attributeGroup>
- <xs:attributeGroup name="rpt-group-section-attlist">
- <xs:attribute name="repeat-section" default="false" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:attributeGroup>
- <xs:element name="sub-document">
- <xs:complexType>
- <xs:sequence>
- <xs:group ref="rpt:report-master-detail-fields"/>
- <xs:element ref="rpt:report-element"/>
- <xs:choice minOccurs="0">
- <xs:element ref="office:document"/>
- <xs:element ref="math:math"/>
- </xs:choice>
- </xs:sequence>
- <xs:attributeGroup ref="rpt:report-sub-document-attlist"/>
- </xs:complexType>
- </xs:element>
- <xs:attributeGroup name="report-sub-document-attlist">
- <xs:attribute ref="xlink:href"/>
- <xs:attribute ref="xlink:type"/>
- <xs:attributeGroup ref="xlink:show"/>
- <xs:attributeGroup ref="xlink:actuate"/>
- </xs:attributeGroup>
- <xs:group name="report-master-detail-fields">
- <xs:sequence>
- <xs:element minOccurs="0" ref="rpt:master-detail-fields"/>
- </xs:sequence>
- </xs:group>
- <xs:element name="master-detail-fields">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" maxOccurs="unbounded" ref="rpt:master-detail-field"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="master-detail-field">
- <xs:complexType>
- <xs:attribute name="master" use="required" form="qualified" type="text:string"/>
- <xs:attribute name="detail" form="qualified" type="text:string"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="function">
- <xs:complexType>
- <xs:attribute name="formula" use="required" form="qualified" type="text:formula"/>
- <xs:attribute name="name" use="required" form="qualified" type="text:string"/>
- <xs:attribute name="pre-evaluated" use="required" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- <xs:element name="report-element">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" ref="rpt:conditional-print-expression"/>
- <xs:element minOccurs="0" ref="rpt:report-component"/>
- <xs:element minOccurs="0" maxOccurs="unbounded" ref="rpt:format-condition"/>
- </xs:sequence>
- <xs:attributeGroup ref="rpt:rpt-report-element-attlist"/>
- </xs:complexType>
- </xs:element>
- <xs:attributeGroup name="rpt-report-element-attlist">
- <xs:attribute name="print-when-group-change" default="false" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="print-repeated-values" default="true" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:attributeGroup>
- <xs:element name="conditional-print-expression" type="xs:string"/>
- <xs:element name="format-condition">
- <xs:complexType>
- <xs:attributeGroup ref="rpt:rpt-format-condition-attlist"/>
- </xs:complexType>
- </xs:element>
- <xs:attributeGroup name="rpt-format-condition-attlist">
- <xs:attribute name="enabled" default="false" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="formula" form="qualified" type="text:formula"/>
- </xs:attributeGroup>
- <xs:element name="fixed-content">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="rpt:report-element"/>
- <xs:element ref="text:p"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="formatted-text">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="rpt:report-element"/>
- <xs:group ref="text:common-form-control-content"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:attributeGroup name="rpt-formatted-text-attlist">
- <xs:attributeGroup ref="text:common-data-field-attlist"/>
- </xs:attributeGroup>
- <xs:element name="image">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="rpt:report-element"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:attributeGroup name="rpt-image-attlist">
- <xs:attributeGroup ref="text:common-data-field-attlist"/>
- <xs:attributeGroup ref="text:image-data"/>
- <xs:attribute name="scale" use="required" form="qualified">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:attributeGroup>
+ <xs:import namespace="http://purl.org/dc/elements/1.1/" schemaLocation="dc.xsd"/>
+ <xs:import namespace="http://www.w3.org/1998/Math/MathML" schemaLocation="math.xsd"/>
+ <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
+ <xs:import namespace="http://www.w3.org/2002/xforms" schemaLocation="xforms.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" schemaLocation="anim.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" schemaLocation="chart.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:config:1.0" schemaLocation="config.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" schemaLocation="ns1.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" schemaLocation="dr3d.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" schemaLocation="draw.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:form:1.0" schemaLocation="form.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" schemaLocation="meta.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:office:1.0" schemaLocation="office.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" schemaLocation="presentation.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:script:1.0" schemaLocation="script.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" schemaLocation="smil.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:style:1.0" schemaLocation="style.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" schemaLocation="svg.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" schemaLocation="table.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" schemaLocation="OpenDocument-schema-v1.0-os.xsd"/>
+ <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" schemaLocation="fo.xsd"/>
+ <xs:attributeGroup name="office-report-attlist">
+ <xs:attribute name="command-type" default="command" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="table"/>
+ <xs:enumeration value="query"/>
+ <xs:enumeration value="command"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="command" form="qualified" type="text:string"/>
+ <xs:attribute name="escape-processing" default="true" form="qualified" type="text:boolean"/>
+ <xs:attribute name="filter" form="qualified" type="text:string"/>
+ <xs:attribute name="caption" form="qualified" type="text:string"/>
+ </xs:attributeGroup>
+ <xs:element name="report-component">
+ <xs:complexType>
+ <xs:attributeGroup ref="text:common-draw-name-attlist"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="group">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="rpt:function"/>
+ <xs:element minOccurs="0" ref="rpt:group-header"/>
+ <xs:choice>
+ <xs:element ref="rpt:group"/>
+ <xs:element ref="rpt:detail"/>
+ </xs:choice>
+ <xs:element minOccurs="0" ref="rpt:group-footer"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="rpt:rpt-group-attlist"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="rpt-group-attlist">
+ <xs:attribute name="sort-ascending" use="required" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="start-new-column" default="false" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="reset-page-number" default="false" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="print-header-on-each-page" default="false" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="group-expression" use="required" form="qualified" type="text:string"/>
+ <xs:attribute name="keep-together" default="no" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="no"/>
+ <xs:enumeration value="whole-group"/>
+ <xs:enumeration value="with-first-detail"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:element name="group-header">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="table:table"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="rpt:rpt-group-section-attlist"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="group-footer">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="table:table"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="rpt:rpt-group-section-attlist"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="report-header">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="table:table"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="page-header">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="table:table"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="rpt:rpt-page-attlist"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="column-header">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="table:table"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="detail">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="table:table"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="column-footer">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="table:table"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="page-footer">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="table:table"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="rpt:rpt-page-attlist"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="report-footer">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="table:table"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="rpt-page-attlist">
+ <xs:attribute name="page-print-option" default="all-pages" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="all-pages"/>
+ <xs:enumeration value="not-with-report-header"/>
+ <xs:enumeration value="not-with-report-footer"/>
+ <xs:enumeration value="not-with-report-header-nor-footer"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="rpt-section-attlist">
+ <xs:attribute name="visible" default="true" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="force-new-page" default="none" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="none"/>
+ <xs:enumeration value="before-section"/>
+ <xs:enumeration value="after-section"/>
+ <xs:enumeration value="before-after-section"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="new-row-or-column" default="none" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="none"/>
+ <xs:enumeration value="before-section"/>
+ <xs:enumeration value="after-section"/>
+ <xs:enumeration value="before-after-section"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="keep-together" default="false" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="rpt-group-section-attlist">
+ <xs:attribute name="repeat-section" default="false" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:element name="sub-document">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:group ref="rpt:report-master-detail-fields"/>
+ <xs:element ref="rpt:report-element"/>
+ <xs:choice minOccurs="0">
+ <xs:element ref="office:document"/>
+ <xs:element ref="math:math"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attributeGroup ref="rpt:report-sub-document-attlist"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="report-sub-document-attlist">
+ <xs:attribute ref="xlink:href"/>
+ <xs:attribute ref="xlink:type"/>
+ <xs:attributeGroup ref="xlink:show"/>
+ <xs:attributeGroup ref="xlink:actuate"/>
+ </xs:attributeGroup>
+ <xs:group name="report-master-detail-fields">
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="rpt:master-detail-fields"/>
+ </xs:sequence>
+ </xs:group>
+ <xs:element name="master-detail-fields">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="rpt:master-detail-field"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="master-detail-field">
+ <xs:complexType>
+ <xs:attribute name="master" use="required" form="qualified" type="text:string"/>
+ <xs:attribute name="detail" form="qualified" type="text:string"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="function">
+ <xs:complexType>
+ <xs:attribute name="formula" use="required" form="qualified" type="text:formula"/>
+ <xs:attribute name="name" use="required" form="qualified" type="text:string"/>
+ <xs:attribute name="pre-evaluated" use="required" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="report-element">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="rpt:conditional-print-expression"/>
+ <xs:element minOccurs="0" ref="rpt:report-component"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="rpt:format-condition"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="rpt:rpt-report-element-attlist"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="rpt-report-element-attlist">
+ <xs:attribute name="print-when-group-change" default="false" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="print-repeated-values" default="true" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:element name="conditional-print-expression" type="xs:string"/>
+ <xs:element name="format-condition">
+ <xs:complexType>
+ <xs:attributeGroup ref="rpt:rpt-format-condition-attlist"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="rpt-format-condition-attlist">
+ <xs:attribute name="enabled" default="false" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="formula" form="qualified" type="text:formula"/>
+ </xs:attributeGroup>
+ <xs:element name="fixed-content">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="rpt:report-element"/>
+ <xs:element ref="text:p"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="formatted-text">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="rpt:report-element"/>
+ <xs:group ref="text:common-form-control-content"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="rpt-formatted-text-attlist">
+ <xs:attributeGroup ref="text:common-data-field-attlist"/>
+ </xs:attributeGroup>
+ <xs:element name="image">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="rpt:report-element"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="rpt-image-attlist">
+ <xs:attributeGroup ref="text:common-data-field-attlist"/>
+ <xs:attributeGroup ref="text:image-data"/>
+ <xs:attribute name="scale" use="required" form="qualified">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
</xs:schema>
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/FormattedTextReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/FormattedTextReadHandler.java
index 60897b0d3c07..7f98e3f79f6a 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/FormattedTextReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/FormattedTextReadHandler.java
@@ -72,14 +72,14 @@ public class FormattedTextReadHandler extends ElementReadHandler
element.setValueExpression(valueExpression);
}
- // * Print-Repeated-Values
- // * Print-In-First-New-Section
- // * Print-When-Group-Changes
+ // * Print-Repeated-Values
+ // * Print-In-First-New-Section
+ // * Print-When-Group-Changes
- // * Print-When-Section-Overflows
- // That property cannot be evaluated yet, as this would require us to
- // have a clue about pagebreaking. We dont have that - not yet and never
- // in the future, as pagebreaks are computed by OpenOffice instead
+ // * Print-When-Section-Overflows
+ // That property cannot be evaluated yet, as this would require us to
+ // have a clue about pagebreaking. We dont have that - not yet and never
+ // in the future, as pagebreaks are computed by OpenOffice instead
}
/**
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/GroupReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/GroupReadHandler.java
index 55ed4759c6be..b9c6cb42d77e 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/GroupReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/GroupReadHandler.java
@@ -79,7 +79,7 @@ public class GroupReadHandler extends ElementReadHandler
super.startParsing(attrs);
final String groupExpr = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "group-expression");
- if ( groupExpr != null && !"".equals(groupExpr) )
+ if (groupExpr != null && !"".equals(groupExpr))
{
final FormulaExpression function = new FormulaExpression();
function.setFormula(groupExpr);
@@ -128,7 +128,7 @@ public class GroupReadHandler extends ElementReadHandler
}
if ("group-footer".equals(tagName))
{
- ((Element)((Section)rh.getDetail().getElement()).getNode(0)).setAttribute(JFreeReportInfo.REPORT_NAMESPACE,"has-group-footer", OfficeToken.TRUE);
+ ((Element) ((Section) rh.getDetail().getElement()).getNode(0)).setAttribute(JFreeReportInfo.REPORT_NAMESPACE, "has-group-footer", OfficeToken.TRUE);
groupFooter = new GroupSectionReadHandler();
return groupFooter;
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/MasterDetailReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/MasterDetailReadHandler.java
index a867e2e85e4c..e9b1d8959333 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/MasterDetailReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/MasterDetailReadHandler.java
@@ -71,7 +71,7 @@ public class MasterDetailReadHandler extends ElementReadHandler
if (parseMasterDetail)
{
final String master = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "master");
- if (master != null && master.length() > 0 )
+ if (master != null && master.length() > 0)
{
final String detail = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "detail");
element.addMasterDetailFields(master, detail);
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/ReportReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/ReportReadHandler.java
index 7fa0f700dada..1d0acf709161 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/ReportReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/rpt/ReportReadHandler.java
@@ -56,6 +56,7 @@ public class ReportReadHandler extends ElementReadHandler
{
this.detail = detail;
}
+
public final RootTableReadHandler getDetail()
{
return detail;
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/style/FontFaceReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/style/FontFaceReadHandler.java
index 2b70a87d9d03..0c7b8747c9d5 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/style/FontFaceReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/style/FontFaceReadHandler.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.style;
import com.sun.star.report.pentaho.parser.ElementReadHandler;
@@ -45,15 +43,16 @@ import org.jfree.report.structure.Element;
*/
public class FontFaceReadHandler extends ElementReadHandler
{
- private final FontFaceElement fontFaceElement;
- public FontFaceReadHandler()
- {
- this.fontFaceElement = new FontFaceElement();
- }
+ private final FontFaceElement fontFaceElement;
+
+ public FontFaceReadHandler()
+ {
+ this.fontFaceElement = new FontFaceElement();
+ }
- public Element getElement()
- {
- return fontFaceElement;
- }
+ public Element getElement()
+ {
+ return fontFaceElement;
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/style/MasterPageReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/style/MasterPageReadHandler.java
index 160feadb737f..75773988cf76 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/style/MasterPageReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/style/MasterPageReadHandler.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,59 +47,59 @@ import org.xml.sax.SAXException;
*/
public class MasterPageReadHandler extends ElementReadHandler
{
- private final OfficeMasterPage masterPage;
- private final List otherHandlers;
- public MasterPageReadHandler()
- {
- masterPage = new OfficeMasterPage();
- this.otherHandlers = new ArrayList();
- }
+ private final OfficeMasterPage masterPage;
+ private final List otherHandlers;
- public OfficeMasterPage getMasterPage()
- {
- return masterPage;
- }
+ public MasterPageReadHandler()
+ {
+ masterPage = new OfficeMasterPage();
+ this.otherHandlers = 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();
- otherHandlers.add(readHandler);
- return readHandler;
- }
+ public OfficeMasterPage getMasterPage()
+ {
+ return masterPage;
+ }
- /**
- * Done parsing.
- *
- * @throws org.xml.sax.SAXException if there is a parsing error.
- */
- protected void doneParsing()
- throws SAXException
- {
- for (int i = 0; i < otherHandlers.size(); i++)
+ /**
+ * 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 ElementReadHandler handler =
- (ElementReadHandler) otherHandlers.get(i);
- masterPage.addNode(handler.getElement());
+ final StyleDefinitionReadHandler readHandler =
+ new StyleDefinitionReadHandler();
+ otherHandlers.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 < otherHandlers.size(); i++)
+ {
+ final ElementReadHandler handler =
+ (ElementReadHandler) otherHandlers.get(i);
+ masterPage.addNode(handler.getElement());
+ }
+ }
- public Element getElement()
- {
- return masterPage;
- }
+ public Element getElement()
+ {
+ return masterPage;
+ }
}
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;
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/style/OfficeStylesReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/style/OfficeStylesReadHandler.java
index 687b7b02ce49..4c4a2e80d19a 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/style/OfficeStylesReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/style/OfficeStylesReadHandler.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.style;
import java.util.ArrayList;
@@ -45,99 +43,100 @@ import java.util.List;
public class OfficeStylesReadHandler extends ElementReadHandler
{
- private final List textStyleChilds;
- private final List dataStyleChilds;
- private final List otherStyleChilds;
- private final List pageLayoutChilds;
- private final OfficeStyles officeStyles;
- public OfficeStylesReadHandler(final OfficeStyles officeStyles)
- {
- this.officeStyles = officeStyles;
- this.pageLayoutChilds = new ArrayList();
- this.dataStyleChilds = new ArrayList();
- this.textStyleChilds = new ArrayList();
- this.otherStyleChilds = new ArrayList();
- }
+ private final List textStyleChilds;
+ private final List dataStyleChilds;
+ private final List otherStyleChilds;
+ private final List pageLayoutChilds;
+ private final OfficeStyles officeStyles;
- /**
- * 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 (OfficeNamespaces.STYLE_NS.equals(uri))
- {
- if ("style".equals(tagName))
- {
- final OfficeStyleReadHandler xrh = new OfficeStyleReadHandler();
- textStyleChilds.add(xrh);
- return xrh;
- }
- else if ("page-layout".equals(tagName))
- {
- final PageLayoutReadHandler prh = new PageLayoutReadHandler();
- pageLayoutChilds.add(prh);
- return prh;
- }
- }
- else if (OfficeNamespaces.DATASTYLE_NS.equals(uri))
+ public OfficeStylesReadHandler(final OfficeStyles officeStyles)
{
- final DataStyleReadHandler xrh = new DataStyleReadHandler(false);
- dataStyleChilds.add(xrh);
- return xrh;
+ this.officeStyles = officeStyles;
+ this.pageLayoutChilds = new ArrayList();
+ this.dataStyleChilds = new ArrayList();
+ this.textStyleChilds = new ArrayList();
+ this.otherStyleChilds = new ArrayList();
}
- final SectionReadHandler genericReadHander = new SectionReadHandler();
- otherStyleChilds.add(genericReadHander);
- return genericReadHander;
- }
-
- /**
- * Done parsing.
- *
- * @throws org.xml.sax.SAXException if there is a parsing error.
- */
- protected void doneParsing() throws SAXException
- {
- for (int i = 0; i < textStyleChilds.size(); i++)
+ /**
+ * 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 OfficeStyleReadHandler handler =
- (OfficeStyleReadHandler) textStyleChilds.get(i);
- officeStyles.addStyle(handler.getOfficeStyle());
- }
+ if (OfficeNamespaces.STYLE_NS.equals(uri))
+ {
+ if ("style".equals(tagName))
+ {
+ final OfficeStyleReadHandler xrh = new OfficeStyleReadHandler();
+ textStyleChilds.add(xrh);
+ return xrh;
+ }
+ else if ("page-layout".equals(tagName))
+ {
+ final PageLayoutReadHandler prh = new PageLayoutReadHandler();
+ pageLayoutChilds.add(prh);
+ return prh;
+ }
+ }
+ else if (OfficeNamespaces.DATASTYLE_NS.equals(uri))
+ {
+ final DataStyleReadHandler xrh = new DataStyleReadHandler(false);
+ dataStyleChilds.add(xrh);
+ return xrh;
+ }
- for (int i = 0; i < pageLayoutChilds.size(); i++)
- {
- final PageLayoutReadHandler handler =
- (PageLayoutReadHandler) pageLayoutChilds.get(i);
- officeStyles.addPageStyle(handler.getPageLayout());
+ final SectionReadHandler genericReadHander = new SectionReadHandler();
+ otherStyleChilds.add(genericReadHander);
+ return genericReadHander;
}
- for (int i = 0; i < dataStyleChilds.size(); i++)
+ /**
+ * Done parsing.
+ *
+ * @throws org.xml.sax.SAXException if there is a parsing error.
+ */
+ protected void doneParsing() throws SAXException
{
- final DataStyleReadHandler handler =
- (DataStyleReadHandler) dataStyleChilds.get(i);
- officeStyles.addDataStyle(handler.getDataStyle());
+ for (int i = 0; i < textStyleChilds.size(); i++)
+ {
+ final OfficeStyleReadHandler handler =
+ (OfficeStyleReadHandler) textStyleChilds.get(i);
+ officeStyles.addStyle(handler.getOfficeStyle());
+ }
+
+ for (int i = 0; i < pageLayoutChilds.size(); i++)
+ {
+ final PageLayoutReadHandler handler =
+ (PageLayoutReadHandler) pageLayoutChilds.get(i);
+ officeStyles.addPageStyle(handler.getPageLayout());
+ }
+
+ for (int i = 0; i < dataStyleChilds.size(); i++)
+ {
+ final DataStyleReadHandler handler =
+ (DataStyleReadHandler) dataStyleChilds.get(i);
+ officeStyles.addDataStyle(handler.getDataStyle());
+ }
+
+ for (int i = 0; i < otherStyleChilds.size(); i++)
+ {
+ final SectionReadHandler handler =
+ (SectionReadHandler) otherStyleChilds.get(i);
+ officeStyles.addOtherNode((Element) handler.getNode());
+ }
}
- for (int i = 0; i < otherStyleChilds.size(); i++)
+ public Element getElement()
{
- final SectionReadHandler handler =
- (SectionReadHandler) otherStyleChilds.get(i);
- officeStyles.addOtherNode((Element) handler.getNode());
+ return officeStyles;
}
- }
-
- public Element getElement()
- {
- return officeStyles;
- }
}
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;
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/style/StyleDefinitionReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/style/StyleDefinitionReadHandler.java
index 6eb99dec3ee0..0fd0655d4e22 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/style/StyleDefinitionReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/style/StyleDefinitionReadHandler.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.style;
import java.util.ArrayList;
@@ -48,54 +46,53 @@ import org.xml.sax.SAXException;
*/
public class StyleDefinitionReadHandler extends ElementReadHandler
{
- private final Section rawSection;
- private final List childs;
-
- public StyleDefinitionReadHandler()
- {
- this.rawSection = new Section();
- 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;
- }
+ private final Section rawSection;
+ private final List childs;
+ public StyleDefinitionReadHandler()
+ {
+ this.rawSection = new Section();
+ this.childs = new ArrayList();
+ }
- /**
- * 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++)
+ /**
+ * 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 ElementReadHandler handler = (ElementReadHandler) childs.get(i);
- rawSection.addNode(handler.getElement());
+ 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++)
+ {
+ final ElementReadHandler handler = (ElementReadHandler) childs.get(i);
+ rawSection.addNode(handler.getElement());
+ }
+ }
- public Element getElement()
- {
- return rawSection;
- }
+ public Element getElement()
+ {
+ return rawSection;
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/OneOfConstantsMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/OneOfConstantsMapper.java
index 7ade32271b8f..8e385f2ba859 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/OneOfConstantsMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/OneOfConstantsMapper.java
@@ -49,7 +49,7 @@ public abstract class OneOfConstantsMapper implements StyleMapper
this.mappings = new HashMap();
}
- public void addMapping (final String value, final CSSValue target)
+ public void addMapping(final String value, final CSSValue target)
{
mappings.put(value, target);
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/draw/TextAreaVerticalAlignMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/draw/TextAreaVerticalAlignMapper.java
index f08255b615ee..8418815f3b7d 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/draw/TextAreaVerticalAlignMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/draw/TextAreaVerticalAlignMapper.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.stylemapper.draw;
import com.sun.star.report.pentaho.parser.stylemapper.OneOfConstantsMapper;
@@ -37,12 +35,13 @@ import org.jfree.layouting.input.style.values.CSSConstant;
public class TextAreaVerticalAlignMapper extends OneOfConstantsMapper
{
- public TextAreaVerticalAlignMapper ()
- {
- super (BoxStyleKeys.BOX_VERTICAL_ALIGN);
- addMapping("top", new CSSConstant("top"));
- addMapping("bottom", new CSSConstant("bottom"));
- addMapping("middle", new CSSConstant("middle"));
- addMapping("justify", new CSSConstant("justify"));
- }
+
+ public TextAreaVerticalAlignMapper()
+ {
+ super(BoxStyleKeys.BOX_VERTICAL_ALIGN);
+ addMapping("top", new CSSConstant("top"));
+ addMapping("bottom", new CSSConstant("bottom"));
+ addMapping("middle", new CSSConstant("middle"));
+ addMapping("justify", new CSSConstant("justify"));
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/FontStyleMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/FontStyleMapper.java
index 5369dc589d32..5c6111c1f55a 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/FontStyleMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/FontStyleMapper.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.stylemapper.fo;
import com.sun.star.report.pentaho.parser.StyleMapper;
@@ -37,13 +35,14 @@ import org.jfree.layouting.input.style.keys.font.FontStyleKeys;
public class FontStyleMapper implements StyleMapper
{
- public FontStyleMapper ()
- {
- }
- public void updateStyle (final String uri, final String attrName, final String attrValue,
- final CSSDeclarationRule targetRule)
- {
- targetRule.setPropertyValueAsString(FontStyleKeys.FONT_STYLE, attrValue);
- }
+ public FontStyleMapper()
+ {
+ }
+
+ public void updateStyle(final String uri, final String attrName, final String attrValue,
+ final CSSDeclarationRule targetRule)
+ {
+ targetRule.setPropertyValueAsString(FontStyleKeys.FONT_STYLE, attrValue);
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/FontWeightMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/FontWeightMapper.java
index 49571efae772..ec73596462e5 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/FontWeightMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/FontWeightMapper.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.stylemapper.fo;
import com.sun.star.report.pentaho.parser.StyleMapper;
@@ -37,13 +35,14 @@ import org.jfree.layouting.input.style.keys.font.FontStyleKeys;
public class FontWeightMapper implements StyleMapper
{
- public FontWeightMapper ()
- {
- }
- public void updateStyle (final String uri, final String attrName, final String attrValue,
- final CSSDeclarationRule targetRule)
- {
- targetRule.setPropertyValueAsString(FontStyleKeys.FONT_WEIGHT, attrValue);
- }
+ public FontWeightMapper()
+ {
+ }
+
+ public void updateStyle(final String uri, final String attrName, final String attrValue,
+ final CSSDeclarationRule targetRule)
+ {
+ targetRule.setPropertyValueAsString(FontStyleKeys.FONT_WEIGHT, attrValue);
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/TextAlignMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/TextAlignMapper.java
index 93d1ee1d57c0..b619442076b6 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/TextAlignMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/fo/TextAlignMapper.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.stylemapper.fo;
import com.sun.star.report.pentaho.parser.stylemapper.OneOfConstantsMapper;
@@ -37,15 +35,15 @@ import org.jfree.layouting.input.style.keys.text.TextStyleKeys;
public class TextAlignMapper extends OneOfConstantsMapper
{
- public TextAlignMapper ()
- {
- super(TextStyleKeys.TEXT_ALIGN);
- addMapping("start", TextAlign.START);
- addMapping("end", TextAlign.END);
- addMapping("left", TextAlign.LEFT);
- addMapping("center", TextAlign.CENTER);
- addMapping("right", TextAlign.RIGHT);
- addMapping("justify", TextAlign.JUSTIFY);
- }
+ public TextAlignMapper()
+ {
+ super(TextStyleKeys.TEXT_ALIGN);
+ addMapping("start", TextAlign.START);
+ addMapping("end", TextAlign.END);
+ addMapping("left", TextAlign.LEFT);
+ addMapping("center", TextAlign.CENTER);
+ addMapping("right", TextAlign.RIGHT);
+ addMapping("justify", TextAlign.JUSTIFY);
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontFamilyGenericMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontFamilyGenericMapper.java
index f218fc465a94..fce338d5688b 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontFamilyGenericMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontFamilyGenericMapper.java
@@ -52,7 +52,10 @@ public class FontFamilyGenericMapper implements StyleMapper
{
final CSSStringValue cssVal = new CSSStringValue(CSSStringType.STRING, attrValue);
targetRule.setPropertyValue(FontStyleKeys.FONT_FAMILY,
- new CSSValueList(new CSSValue[]{cssVal}));
+ new CSSValueList(new CSSValue[]
+ {
+ cssVal
+ }));
}
else
{
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontFamilyMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontFamilyMapper.java
index 019fea3182a2..696fb557bdde 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontFamilyMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontFamilyMapper.java
@@ -52,7 +52,10 @@ public class FontFamilyMapper implements StyleMapper
{
final CSSStringValue cssVal = new CSSStringValue(CSSStringType.STRING, attrValue);
targetRule.setPropertyValue(FontStyleKeys.FONT_FAMILY,
- new CSSValueList(new CSSValue[]{cssVal}));
+ new CSSValueList(new CSSValue[]
+ {
+ cssVal
+ }));
}
else
{
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontNameMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontNameMapper.java
index f9d238bfcb79..cc6cd926f7c7 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontNameMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontNameMapper.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.stylemapper.style;
import com.sun.star.report.pentaho.parser.StyleMapper;
@@ -39,14 +37,15 @@ import org.jfree.layouting.input.style.keys.font.FontStyleKeys;
public class FontNameMapper implements StyleMapper
{
- public FontNameMapper ()
- {
- }
- public void updateStyle (final String uri, final String attrName, final String attrValue,
- final CSSDeclarationRule targetRule)
- {
- targetRule.setPropertyValue(FontStyleKeys.FONT_NAME,
- new CSSStringValue(CSSStringType.STRING, attrValue));
- }
+ public FontNameMapper()
+ {
+ }
+
+ public void updateStyle(final String uri, final String attrName, final String attrValue,
+ final CSSDeclarationRule targetRule)
+ {
+ targetRule.setPropertyValue(FontStyleKeys.FONT_NAME,
+ new CSSStringValue(CSSStringType.STRING, attrValue));
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontPitchMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontPitchMapper.java
index ae180f8fac69..79dceddb88c6 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontPitchMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontPitchMapper.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.stylemapper.style;
import com.sun.star.report.pentaho.parser.stylemapper.OneOfConstantsMapper;
@@ -37,10 +35,11 @@ import org.jfree.layouting.input.style.values.CSSConstant;
public class FontPitchMapper extends OneOfConstantsMapper
{
- public FontPitchMapper ()
- {
- super (FontStyleKeys.FONT_PITCH);
- addMapping("variable", new CSSConstant("variable"));
- addMapping("fixed", new CSSConstant("fixed"));
- }
+
+ public FontPitchMapper()
+ {
+ super(FontStyleKeys.FONT_PITCH);
+ addMapping("variable", new CSSConstant("variable"));
+ addMapping("fixed", new CSSConstant("fixed"));
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontReliefMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontReliefMapper.java
index 059d01981a27..a9c18a8f7dc4 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontReliefMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/FontReliefMapper.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.stylemapper.style;
import com.sun.star.report.pentaho.parser.StyleMapper;
@@ -37,14 +35,14 @@ import org.jfree.layouting.input.style.keys.font.FontStyleKeys;
public class FontReliefMapper implements StyleMapper
{
- public FontReliefMapper ()
- {
- }
+ public FontReliefMapper()
+ {
+ }
- public void updateStyle (final String uri, final String attrName, final String attrValue,
- final CSSDeclarationRule targetRule)
- {
- targetRule.setPropertyValueAsString(FontStyleKeys.FONT_EFFECT, attrValue);
- }
+ public void updateStyle(final String uri, final String attrName, final String attrValue,
+ final CSSDeclarationRule targetRule)
+ {
+ targetRule.setPropertyValueAsString(FontStyleKeys.FONT_EFFECT, attrValue);
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextEmphasizeMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextEmphasizeMapper.java
index 961e22c5eb63..e465e7da1527 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextEmphasizeMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextEmphasizeMapper.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.stylemapper.style;
import com.sun.star.report.pentaho.parser.StyleMapper;
@@ -36,14 +34,14 @@ import org.jfree.layouting.input.style.CSSDeclarationRule;
public class TextEmphasizeMapper implements StyleMapper
{
- public TextEmphasizeMapper ()
- {
- }
+ public TextEmphasizeMapper()
+ {
+ }
- public void updateStyle (final String uri, final String attrName, final String attrValue,
- final CSSDeclarationRule targetRule)
- {
- targetRule.setPropertyValueAsString("font-emphasize", attrValue);
- }
+ public void updateStyle(final String uri, final String attrName, final String attrValue,
+ final CSSDeclarationRule targetRule)
+ {
+ targetRule.setPropertyValueAsString("font-emphasize", attrValue);
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineColorMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineColorMapper.java
index e0b4e309a9bc..b6b3812a834e 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineColorMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineColorMapper.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.stylemapper.style;
import com.sun.star.report.pentaho.parser.StyleMapper;
@@ -39,19 +37,20 @@ import org.jfree.layouting.util.ColorUtil;
public class TextUnderlineColorMapper implements StyleMapper
{
- public TextUnderlineColorMapper ()
- {
- }
- public void updateStyle (final String uri,
- final String attrName,
- final String attrValue,
- final CSSDeclarationRule targetRule)
- {
- final CSSColorValue cv = (CSSColorValue) ColorUtil.parseColor(attrValue);
- if (cv != null)
+ public TextUnderlineColorMapper()
+ {
+ }
+
+ public void updateStyle(final String uri,
+ final String attrName,
+ final String attrValue,
+ final CSSDeclarationRule targetRule)
{
- targetRule.setPropertyValue(TextStyleKeys.TEXT_UNDERLINE_COLOR, cv);
+ final CSSColorValue cv = (CSSColorValue) ColorUtil.parseColor(attrValue);
+ if (cv != null)
+ {
+ targetRule.setPropertyValue(TextStyleKeys.TEXT_UNDERLINE_COLOR, cv);
+ }
}
- }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineStyleMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineStyleMapper.java
index 70630674abbb..fcc4e8cc6a7a 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineStyleMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineStyleMapper.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.stylemapper.style;
import com.sun.star.report.pentaho.parser.stylemapper.OneOfConstantsMapper;
@@ -37,19 +35,17 @@ import org.jfree.layouting.input.style.keys.text.TextDecorationStyle;
public class TextUnderlineStyleMapper extends OneOfConstantsMapper
{
- public TextUnderlineStyleMapper ()
- {
- super(TextStyleKeys.TEXT_UNDERLINE_STYLE);
- addMapping("none", TextDecorationStyle.NONE);
- addMapping("solid", TextDecorationStyle.SOLID);
- addMapping("dotted", TextDecorationStyle.DOTTED);
- addMapping("dash", TextDecorationStyle.DASHED);
- addMapping("long-dash", TextDecorationStyle.LONG_DASH);
- addMapping("dot-dash", TextDecorationStyle.DOT_DASH);
- addMapping("dot-dot-dash", TextDecorationStyle.DOT_DOT_DASH);
- addMapping("wave", TextDecorationStyle.WAVE);
- }
-
-
+ public TextUnderlineStyleMapper()
+ {
+ super(TextStyleKeys.TEXT_UNDERLINE_STYLE);
+ addMapping("none", TextDecorationStyle.NONE);
+ addMapping("solid", TextDecorationStyle.SOLID);
+ addMapping("dotted", TextDecorationStyle.DOTTED);
+ addMapping("dash", TextDecorationStyle.DASHED);
+ addMapping("long-dash", TextDecorationStyle.LONG_DASH);
+ addMapping("dot-dash", TextDecorationStyle.DOT_DASH);
+ addMapping("dot-dot-dash", TextDecorationStyle.DOT_DOT_DASH);
+ addMapping("wave", TextDecorationStyle.WAVE);
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineWordMode.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineWordMode.java
index 3e2d879db846..aa23d66b131f 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineWordMode.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/TextUnderlineWordMode.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.stylemapper.style;
import com.sun.star.report.pentaho.parser.stylemapper.OneOfConstantsMapper;
@@ -37,12 +35,11 @@ import org.jfree.layouting.input.style.keys.text.TextStyleKeys;
public class TextUnderlineWordMode extends OneOfConstantsMapper
{
- public TextUnderlineWordMode ()
- {
- super(TextStyleKeys.TEXT_UNDERLINE_MODE);
- addMapping("continuous", TextDecorationMode.CONTINUOUS);
- addMapping("skip-white-space", TextDecorationMode.SKIP_WHITE_SPACE);
- }
-
+ public TextUnderlineWordMode()
+ {
+ super(TextStyleKeys.TEXT_UNDERLINE_MODE);
+ addMapping("continuous", TextDecorationMode.CONTINUOUS);
+ addMapping("skip-white-space", TextDecorationMode.SKIP_WHITE_SPACE);
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/VerticalAlignMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/VerticalAlignMapper.java
index ad9ea12ac6fb..9b56b1ae14be 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/VerticalAlignMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/style/VerticalAlignMapper.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.parser.stylemapper.style;
import com.sun.star.report.pentaho.parser.stylemapper.OneOfConstantsMapper;
@@ -38,13 +36,14 @@ import org.jfree.layouting.input.style.values.CSSConstant;
public class VerticalAlignMapper extends OneOfConstantsMapper
{
- public VerticalAlignMapper ()
- {
- super (LineStyleKeys.VERTICAL_ALIGN);
- addMapping("top", new CSSConstant("top"));
- addMapping("bottom", new CSSConstant("bottom"));
- addMapping("middle", new CSSConstant("middle"));
- addMapping("baseline", new CSSConstant("baseline"));
- addMapping("auto", CSSAutoValue.getInstance());
- }
+
+ public VerticalAlignMapper()
+ {
+ super(LineStyleKeys.VERTICAL_ALIGN);
+ addMapping("top", new CSSConstant("top"));
+ addMapping("bottom", new CSSConstant("bottom"));
+ addMapping("middle", new CSSConstant("middle"));
+ addMapping("baseline", new CSSConstant("baseline"));
+ addMapping("auto", CSSAutoValue.getInstance());
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/table/ColumnWidthMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/table/ColumnWidthMapper.java
index fca9edd38d33..82adc828982c 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/table/ColumnWidthMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/table/ColumnWidthMapper.java
@@ -27,7 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
package com.sun.star.report.pentaho.parser.stylemapper.table;
import com.sun.star.report.pentaho.parser.StyleMapper;
@@ -41,15 +40,16 @@ import org.jfree.layouting.input.style.keys.box.BoxStyleKeys;
*/
public class ColumnWidthMapper implements StyleMapper
{
- public ColumnWidthMapper()
- {
- }
- public void updateStyle(final String uri,
- final String attrName,
- final String attrValue,
- final CSSDeclarationRule targetRule)
- {
- targetRule.setPropertyValueAsString(BoxStyleKeys.WIDTH, attrValue);
- }
+ public ColumnWidthMapper()
+ {
+ }
+
+ public void updateStyle(final String uri,
+ final String attrName,
+ final String attrValue,
+ final CSSDeclarationRule targetRule)
+ {
+ targetRule.setPropertyValueAsString(BoxStyleKeys.WIDTH, attrValue);
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/table/RowHeightMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/table/RowHeightMapper.java
index c305a85a1e05..57e4dcd9c559 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/table/RowHeightMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/stylemapper/table/RowHeightMapper.java
@@ -27,7 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
package com.sun.star.report.pentaho.parser.stylemapper.table;
import com.sun.star.report.pentaho.parser.StyleMapper;
@@ -41,15 +40,16 @@ import org.jfree.layouting.input.style.keys.box.BoxStyleKeys;
*/
public class RowHeightMapper implements StyleMapper
{
- public RowHeightMapper()
- {
- }
- public void updateStyle(final String uri,
- final String attrName,
- final String attrValue,
- final CSSDeclarationRule targetRule)
- {
- targetRule.setPropertyValueAsString(BoxStyleKeys.HEIGHT, attrValue);
- }
+ public RowHeightMapper()
+ {
+ }
+
+ public void updateStyle(final String uri,
+ final String attrName,
+ final String attrValue,
+ final CSSDeclarationRule targetRule)
+ {
+ targetRule.setPropertyValueAsString(BoxStyleKeys.HEIGHT, attrValue);
+ }
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/table/TableColumnReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/table/TableColumnReadHandler.java
index 5b9e11fcbac6..172e8b475459 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/table/TableColumnReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/table/TableColumnReadHandler.java
@@ -42,6 +42,7 @@ public class TableColumnReadHandler extends ElementReadHandler
{
private final Section tableColumn;
+
public TableColumnReadHandler()
{
tableColumn = new Section();
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/table/TableColumnsReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/table/TableColumnsReadHandler.java
index a0052dbc1a9e..a72a5249af4c 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/table/TableColumnsReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/table/TableColumnsReadHandler.java
@@ -71,7 +71,7 @@ public class TableColumnsReadHandler extends ElementReadHandler
final Attributes atts)
throws SAXException
{
- if (OfficeNamespaces.TABLE_NS.equals(uri) && OfficeToken.TABLE_COLUMN.equals(tagName) )
+ if (OfficeNamespaces.TABLE_NS.equals(uri) && OfficeToken.TABLE_COLUMN.equals(tagName))
{
final TableColumnReadHandler readHandler = new TableColumnReadHandler();
columns.add(readHandler);