diff options
Diffstat (limited to 'reportbuilder/java/com/sun/star/report/pentaho/styles')
10 files changed, 1585 insertions, 0 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/styles/LengthCalculator.java b/reportbuilder/java/com/sun/star/report/pentaho/styles/LengthCalculator.java new file mode 100644 index 000000000000..0665066f2a9f --- /dev/null +++ b/reportbuilder/java/com/sun/star/report/pentaho/styles/LengthCalculator.java @@ -0,0 +1,110 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package com.sun.star.report.pentaho.styles; + +import org.jfree.layouting.input.style.values.CSSNumericType; +import org.jfree.layouting.input.style.values.CSSNumericValue; + +/** + * A helper class that sums up various CSS-length. The various unit types are + * kept separate until the final result is computed to minimize the computation + * inaccuracy. + * + * @author Thomas Morgner + * @since 15.03.2007 + */ +public class LengthCalculator +{ + // and centimeter (x10) + + private double millimeter; + // and pica (x12) and inch(x72). Px is assumed to be in 96dpi. + private double point; + private double pixel; + + public LengthCalculator() + { + } + + public void add(final CSSNumericValue value) + { + if (value == null) + { + return; + } + + final CSSNumericType numericType = value.getType(); + if (numericType == CSSNumericType.CM) + { + millimeter += value.getValue() * 10; + } + else if (numericType == CSSNumericType.MM) + { + millimeter += value.getValue(); + } + else if (numericType == CSSNumericType.PT) + { + point += value.getValue(); + } + else if (numericType == CSSNumericType.PC) + { + point += 12 * value.getValue(); + } + else if (numericType == CSSNumericType.INCH) + { + point += 72 * value.getValue(); + } + else if (numericType == CSSNumericType.PX) + { + pixel += value.getValue(); + } + // LOGGER.debug ("Adding " + value + " [mm: " + millimeter + "] [pt: " + point + "] px: [" + pixel + "]"); + } + + public CSSNumericValue getResult() + { + if (pixel == 0 && point == 0) + { + return CSSNumericValue.createValue(CSSNumericType.MM, millimeter); + } + if (pixel == 0 && millimeter == 0) + { + return CSSNumericValue.createValue(CSSNumericType.PT, point); + } + if (point == 0 && millimeter == 0) + { + return CSSNumericValue.createValue(CSSNumericType.PX, pixel); + } + // else convert it. + + double result = point; + result += (millimeter * 10 * 72 / 254); + result += pixel * 72 / 96; + + return CSSNumericValue.createValue(CSSNumericType.PT, result); + } +} diff --git a/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMapper.java new file mode 100644 index 000000000000..cee02bae0430 --- /dev/null +++ b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMapper.java @@ -0,0 +1,96 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package com.sun.star.report.pentaho.styles; + +import java.util.HashMap; +import java.util.Map; + +import org.pentaho.reporting.libraries.resourceloader.Resource; +import org.pentaho.reporting.libraries.resourceloader.ResourceException; +import org.pentaho.reporting.libraries.resourceloader.ResourceManager; + + +/** + * The style-mapper holds all information about the OpenOffice style mapping + * mechanism. OpenOffice references styles by their name and context, a style + * has a style-family assigned. The style family is determined by the element + * referencing the style, and there is no easily accessible information + * available on that. + * <p/> + * Therefore this mapper acts as gatekeeper for this information. The style + * mapping information is read from an external definition file and can be + * maintained externally. + * + * @author Thomas Morgner + * @since 11.03.2007 + */ +public class StyleMapper +{ + + private final Map backend; + + public StyleMapper() + { + this.backend = new HashMap(); + } + + public void addMapping(final StyleMappingRule rule) + { + backend.put(rule.getKey(), rule); + } + + public boolean isListOfStyles(final String elementNamespace, + final String elementTagName, + final String attributeNamespace, + final String attributeName) + { + final StyleMapperKey key = new StyleMapperKey(elementNamespace, elementTagName, attributeNamespace, attributeName); + final StyleMappingRule rule = (StyleMappingRule) backend.get(key); + return rule != null && rule.isListOfValues(); + } + + public String getStyleFamilyFor(final String elementNamespace, + final String elementTagName, + final String attributeNamespace, + final String attributeName) + { + final StyleMapperKey key = new StyleMapperKey(elementNamespace, elementTagName, attributeNamespace, attributeName); + final StyleMappingRule rule = (StyleMappingRule) backend.get(key); + if (rule == null) + { + return null; + } + return rule.getFamily(); + } + + public static StyleMapper loadInstance(final ResourceManager resourceManager) + throws ResourceException + { + final Resource resource = resourceManager.createDirectly("res://com/sun/star/report/pentaho/styles/stylemapper.xml", StyleMapper.class); + return (StyleMapper) resource.getResource(); + } +} diff --git a/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMapperKey.java b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMapperKey.java new file mode 100644 index 000000000000..447a0b958fd8 --- /dev/null +++ b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMapperKey.java @@ -0,0 +1,118 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package com.sun.star.report.pentaho.styles; + +/** + * A hash key for the stylemapper. + * + * @author Thomas Morgner + * @since 12.03.2007 + */ +public final class StyleMapperKey +{ + + private final String elementNamespace; + private final String elementName; + private final String attributeNamespace; + private final String attributeName; + private final int hashCode; + + public StyleMapperKey(final String elementNamespace, + final String elementName, + final String attributeNamespace, + final String attributeName) + { + if (elementNamespace == null) + { + throw new NullPointerException(); + } + if (elementName == null) + { + throw new NullPointerException(); + } + + this.elementNamespace = elementNamespace; + this.elementName = elementName; + this.attributeNamespace = attributeNamespace; + this.attributeName = attributeName; + this.hashCode = computeHashCode(); + } + + public String getElementNamespace() + { + return elementNamespace; + } + + public String getElementName() + { + return elementName; + } + + public String getAttributeNamespace() + { + return attributeNamespace; + } + + public String getAttributeName() + { + return attributeName; + } + + public boolean equals(final Object o) + { + if (this != o) + { + if (o == null || getClass() != o.getClass()) + { + return false; + } + + final StyleMapperKey that = (StyleMapperKey) o; + + if ((attributeName != null ? !attributeName.equals(that.attributeName) : that.attributeName != null) || (attributeNamespace != null ? !attributeNamespace.equals(that.attributeNamespace) : that.attributeNamespace != null) || !elementName.equals(that.elementName) || !elementNamespace.equals(that.elementNamespace)) + { + return false; + } + } + + return true; + } + + private int computeHashCode() + { + int result = elementNamespace.hashCode(); + result = 31 * result + elementName.hashCode(); + result = 31 * result + (attributeNamespace != null ? attributeNamespace.hashCode() : 0); + result = 31 * result + (attributeName != null ? attributeName.hashCode() : 0); + return result; + } + + public int hashCode() + { + return hashCode; + } +} diff --git a/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMapperXmlFactoryModule.java b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMapperXmlFactoryModule.java new file mode 100644 index 000000000000..95f8322de730 --- /dev/null +++ b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMapperXmlFactoryModule.java @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package com.sun.star.report.pentaho.styles; + +import org.pentaho.reporting.libraries.xmlns.parser.XmlDocumentInfo; +import org.pentaho.reporting.libraries.xmlns.parser.XmlFactoryModule; +import org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler; + +/** + * An XML-FactoryModule that load the style-mapper contents. + * + * @author Thomas Morgner + * @since 12.03.2007 + */ +public class StyleMapperXmlFactoryModule implements XmlFactoryModule +{ + + public static final String NAMESPACE = + "http://jfreereport.sourceforge.net/namespaces/engine/openoffice/stylemapper"; + + public StyleMapperXmlFactoryModule() + { + } + + public XmlReadHandler createReadHandler(final XmlDocumentInfo documentInfo) + { + return new StyleMappingDocumentReadHandler(); + } + + public int getDocumentSupport(final XmlDocumentInfo documentInfo) + { + final String rootNamespace = documentInfo.getRootElementNameSpace(); + if (StyleMapperXmlFactoryModule.NAMESPACE.equals(rootNamespace) && "style-mapper-definition".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/styles/StyleMapperXmlResourceFactory.java b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMapperXmlResourceFactory.java new file mode 100644 index 000000000000..3fecbbfc882e --- /dev/null +++ b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMapperXmlResourceFactory.java @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package com.sun.star.report.pentaho.styles; + +import org.jfree.report.JFreeReportBoot; + +import org.pentaho.reporting.libraries.base.config.Configuration; +import org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory; + +/** + * Todo: Document me! + * + * @author Thomas Morgner + * @since 12.03.2007 + */ +public class StyleMapperXmlResourceFactory extends AbstractXmlResourceFactory +{ + + public StyleMapperXmlResourceFactory() + { + } + + protected Configuration getConfiguration() + { + return JFreeReportBoot.getInstance().getGlobalConfig(); + } + + public Class getFactoryType() + { + return StyleMapper.class; + } +} diff --git a/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMappingDocumentReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMappingDocumentReadHandler.java new file mode 100644 index 000000000000..b0acf047df7f --- /dev/null +++ b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMappingDocumentReadHandler.java @@ -0,0 +1,107 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package com.sun.star.report.pentaho.styles; + +import java.util.ArrayList; +import java.util.List; + +import org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlReadHandler; +import org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler; + +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; + + +/** + * Todo: Document me! + * + * @author Thomas Morgner + * @since 12.03.2007 + */ +public class StyleMappingDocumentReadHandler extends AbstractXmlReadHandler +{ + + private final StyleMapper styleMapper; + private final List mappings; + + public StyleMappingDocumentReadHandler() + { + this.mappings = new ArrayList(); + this.styleMapper = new StyleMapper(); + } + + /** + * 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 (isSameNamespace(uri) && "mapping".equals(tagName)) + { + final StyleMappingReadHandler smr = new StyleMappingReadHandler(); + mappings.add(smr); + return smr; + } + 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 < mappings.size(); i++) + { + final StyleMappingReadHandler handler = + (StyleMappingReadHandler) mappings.get(i); + styleMapper.addMapping(handler.getRule()); + } + } + + /** + * Returns the object for this element or null, if this element does not + * create an object. + * + * @return the object. + */ + public Object getObject() + throws SAXException + { + return styleMapper; + } +} diff --git a/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMappingReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMappingReadHandler.java new file mode 100644 index 000000000000..1ec2dc111cb0 --- /dev/null +++ b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMappingReadHandler.java @@ -0,0 +1,101 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package com.sun.star.report.pentaho.styles; + +import org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlReadHandler; +import org.pentaho.reporting.libraries.xmlns.parser.ParseException; + +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; + +/** + * Todo: Document me! + * + * @author Thomas Morgner + * @since 12.03.2007 + */ +public class StyleMappingReadHandler extends AbstractXmlReadHandler +{ + + private StyleMappingRule rule; + + public StyleMappingReadHandler() + { + } + + /** + * Starts parsing. + * + * @param attrs the attributes. + * @throws org.xml.sax.SAXException if there is a parsing error. + */ + protected void startParsing(final Attributes attrs) + throws SAXException + { + final String elementNamespace = attrs.getValue(getUri(), + "element-namespace"); + if (elementNamespace == null) + { + throw new ParseException("Required attribute 'element-namespace' is missing", getLocator()); + } + + final String elementName = attrs.getValue(getUri(), "element-name"); + + if (elementName == null) + { + throw new ParseException("Required attribute 'element-name' is missing", getLocator()); + } + + final String attributeNamespace = attrs.getValue(getUri(), + "attribute-namespace"); + final String attributeName = attrs.getValue(getUri(), "attribute-name"); + + final boolean listOfValues = + "styleNameRefs".equals(attrs.getValue(getUri(), "type")); + + final String family = attrs.getValue(getUri(), "style-family"); + final StyleMapperKey key = new StyleMapperKey(elementNamespace, elementName, attributeNamespace, attributeName); + rule = new StyleMappingRule(key, family, listOfValues); + } + + public StyleMappingRule getRule() + { + return rule; + } + + /** + * Returns the object for this element or null, if this element does not + * create an object. + * + * @return the object. + */ + public Object getObject() + throws SAXException + { + return rule; + } +} diff --git a/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMappingRule.java b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMappingRule.java new file mode 100644 index 000000000000..9698e73ce67b --- /dev/null +++ b/reportbuilder/java/com/sun/star/report/pentaho/styles/StyleMappingRule.java @@ -0,0 +1,64 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package com.sun.star.report.pentaho.styles; + +/** + * Todo: Document me! + * + * @author Thomas Morgner + * @since 12.03.2007 + */ +public class StyleMappingRule +{ + + private final StyleMapperKey key; + private final String family; + private final boolean listOfValues; + + public StyleMappingRule(final StyleMapperKey key, final String family, + final boolean listOfValues) + { + this.key = key; + this.family = family; + this.listOfValues = listOfValues; + } + + public StyleMapperKey getKey() + { + return key; + } + + public String getFamily() + { + return family; + } + + public boolean isListOfValues() + { + return listOfValues; + } +} diff --git a/reportbuilder/java/com/sun/star/report/pentaho/styles/stylemapper.xml b/reportbuilder/java/com/sun/star/report/pentaho/styles/stylemapper.xml new file mode 100644 index 000000000000..fa350df051ce --- /dev/null +++ b/reportbuilder/java/com/sun/star/report/pentaho/styles/stylemapper.xml @@ -0,0 +1,772 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + + Copyright 2000, 2010 Oracle and/or its affiliates. + + OpenOffice.org - a multi-platform office productivity suite + + This file is part of OpenOffice.org. + + OpenOffice.org is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License version 3 + only, as published by the Free Software Foundation. + + OpenOffice.org is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License version 3 for more details + (a copy is included in the LICENSE file that accompanied this code). + + You should have received a copy of the GNU Lesser General Public License + version 3 along with OpenOffice.org. If not, see + <http://www.openoffice.org/license.html> + for a copy of the LGPLv3 License. + + --> +<style-mapper-definition + xmlns="http://jfreereport.sourceforge.net/namespaces/engine/openoffice/stylemapper"> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="a" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="text" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="alphabetical-index" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="section" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="alphabetical-index-entry-template" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="paragraph" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="bibliography" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="section" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="bibliography-entry-template" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="paragraph" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="h" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="paragraph" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="illustration-index" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="section" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="illustration-index-entry-template" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="paragraph" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="index-entry-bibliography" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="character" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="index-entry-chapter" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="character" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="index-entry-link-end" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="character" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="index-entry-link-start" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="character" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="index-entry-page-number" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="character" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="index-entry-span" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="character" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="index-entry-tab-stop" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="character" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="index-entry-text" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="character" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="index-source-style" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="paragraph" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="index-title" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="section" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="index-title-template" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="character" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="linenumbering-configuration" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="text" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="list" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="list" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="list-level-style-bullet" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="text" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="list-level-style-number" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="character" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="numbered-paragraph" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="list" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="object-index" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="section" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="object-index-entry-template" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="paragraph" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="outline-level-style" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="character" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="p" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="paragraph" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="p" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="class-names" + style-family="paragraph" + type="styleNameRefs"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="ruby" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="ruby" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="ruby-text" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="paragraph" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="section" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="section" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="span" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="text" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="span" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="class-names" + style-family="text" + type="styleNameRefs"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="table-index" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="section" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="table-index-entry-template" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="paragraph" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="table-of-content" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="section" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="table-of-content-entry-template" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="paragraph" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="user-index" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="section" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + element-name="user-index-entry-template" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" + attribute-name="style-name" + style-family="paragraph" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="table" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="background" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="body" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-cell" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="covered-table-cell" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-cell" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="even-columns" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-cell" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="even-rows" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-cell" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="first-column" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-cell" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="first-row" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-cell" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="last-column" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-cell" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="last-row" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-cell" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="odd-columns" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-cell" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="odd-rows" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-cell" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="table-cell" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-cell" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="table-column" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-column" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + element-name="table-row" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" + attribute-name="style-name" + style-family="table-row" + type="styleNameRef"/> + + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" + element-name="cube" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" + element-name="extrude" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" + element-name="rotate" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" + element-name="scene" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" + element-name="sphere" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="caption" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="circle" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="connector" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="control" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="custom-shape" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="ellipse" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="frame" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="g" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="line" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="measure" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="page" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="page-thumbnail" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="path" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="polygon" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="polyline" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="rect" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="regular-polygon" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:office:1.0" + element-name="annotation" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + element-name="notes" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:style:1.0" + element-name="handout-master" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:style:1.0" + element-name="master-page" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="graphic" + type="styleNameRef"/> + + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" + element-name="cube" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" + element-name="extrude" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" + element-name="rotate" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" + element-name="scene" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" + element-name="sphere" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="caption" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="circle" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="connector" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="custom-shape" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="ellipse" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="frame" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="g" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="line" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="measure" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="page-thumbnail" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="path" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="polygon" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="polyline" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="rect" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" + element-name="regular-polygon" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:office:1.0" + element-name="annotation" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" + attribute-name="style-name" + style-family="presentation" + type="styleNameRef"/> + + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="axis" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="chart" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="data-label" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="data-point" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="equation" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="error-indicator" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="floor" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="footer" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="grid" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="legend" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="mean-value" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="plot-area" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="regression-curve" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="series" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="stock-gain-marker" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="stock-loss-marker" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="stock-range-line" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="subtitle" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="title" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + element-name="wall" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" + attribute-name="style-name" + style-family="chart" + type="styleNameRef"/> + <mapping element-namespace="urn:oasis:names:tc:opendocument:xmlns:style:1.0" + element-name="drop-cap" + attribute-namespace="urn:oasis:names:tc:opendocument:xmlns:style:1.0" + attribute-name="style-name" + style-family="text" + type="styleNameRef"/> +</style-mapper-definition> diff --git a/reportbuilder/java/com/sun/star/report/pentaho/styles/stylemapper.xsd b/reportbuilder/java/com/sun/star/report/pentaho/styles/stylemapper.xsd new file mode 100644 index 000000000000..05e7d0c204f2 --- /dev/null +++ b/reportbuilder/java/com/sun/star/report/pentaho/styles/stylemapper.xsd @@ -0,0 +1,91 @@ +<!-- + + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + + Copyright 2000, 2010 Oracle and/or its affiliates. + + OpenOffice.org - a multi-platform office productivity suite + + This file is part of OpenOffice.org. + + OpenOffice.org is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License version 3 + only, as published by the Free Software Foundation. + + OpenOffice.org is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License version 3 for more details + (a copy is included in the LICENSE file that accompanied this code). + + You should have received a copy of the GNU Lesser General Public License + version 3 along with OpenOffice.org. If not, see + <http://www.openoffice.org/license.html> + for a copy of the LGPLv3 License. + + --> + +<xsd:schema version="0.9" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns="http://jfreereport.sourceforge.net/namespaces/engine/openoffice/stylemapper" + targetNamespace="http://jfreereport.sourceforge.net/namespaces/engine/openoffice/stylemapper" + attributeFormDefault="unqualified"> + <xsd:annotation> + <xsd:documentation> + This schema describes the format of the stylemapper definition file. + The stylemapper declares what style-families are referenced by an element. + </xsd:documentation> + </xsd:annotation> + + <xsd:simpleType name="styleNameRefType"> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="styleNameRef"/> + <xsd:enumeration value="styleNameRefs"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="styleFamilyType"> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="paragraph"/> + <xsd:enumeration value="text"/> + <xsd:enumeration value="section"/> + <xsd:enumeration value="table"/> + <xsd:enumeration value="table-column"/> + <xsd:enumeration value="table-row"/> + <xsd:enumeration value="table-cell"/> + <xsd:enumeration value="table-page"/> + <xsd:enumeration value="chart"/> + <xsd:enumeration value="default"/> + <xsd:enumeration value="drawing-page"/> + <xsd:enumeration value="graphic"/> + <xsd:enumeration value="presentation"/> + <xsd:enumeration value="control"/> + <xsd:enumeration value="ruby"/> + <xsd:enumeration value="custom-shape"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:element name="mapping"> + <xsd:complexType> + <xsd:attribute name="element-namespace" use="required" type="xsd:anyURI"/> + <xsd:attribute name="element-name" use="required" type="xsd:NCName"/> + <xsd:attribute name="attribute-namespace" use="required" type="xsd:anyURI"/> + <xsd:attribute name="attribute-name" use="required" type="xsd:NCName"/> + <xsd:attribute name="type" use="required" type="styleNameRefType"/> + <xsd:attribute name="style-family" use="required" type="styleFamilyType"/> + </xsd:complexType> + </xsd:element> + + <xsd:element name="style-mapper-definition"> + <xsd:complexType> + <xsd:complexContent> + <xsd:restriction base="xsd:anyType"> + <xsd:sequence> + <xsd:element ref="mapping" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:restriction> + </xsd:complexContent> + </xsd:complexType> + </xsd:element> + +</xsd:schema> |