From a49b2ba1a6a9467aa75d320b45671ae1e87314d3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 18 Dec 2014 10:43:29 +0200 Subject: java: remove dead stylemapper code in reportbuilder as far as I can tell, this has been dead since the original import of this code Change-Id: I4bd47e55eb0abc991ea1d58c16fba6fa6c7878d9 --- reportbuilder/Jar_reportbuilder.mk | 30 -- .../report/pentaho/parser/OfficeParserUtil.java | 182 --------- .../report/pentaho/parser/StyleMapper.java | 24 -- .../report/pentaho/parser/rpt-schema-v1.0-os.xsd | 405 --------------------- .../report/pentaho/parser/selectors.properties | 104 ------ .../report/pentaho/parser/style-mapping.txt | 8 - .../parser/stylemapper/OneOfConstantsMapper.java | 68 ---- .../draw/TextAreaVerticalAlignMapper.java | 36 -- .../stylemapper/fo/BackgroundColorMapper.java | 41 --- .../parser/stylemapper/fo/BorderRightMapper.java | 34 -- .../pentaho/parser/stylemapper/fo/ColorMapper.java | 39 -- .../parser/stylemapper/fo/FontSizeMapper.java | 33 -- .../parser/stylemapper/fo/FontStyleMapper.java | 33 -- .../parser/stylemapper/fo/FontWeightMapper.java | 33 -- .../parser/stylemapper/fo/TextAlignMapper.java | 38 -- .../stylemapper/style/FontFamilyGenericMapper.java | 52 --- .../parser/stylemapper/style/FontFamilyMapper.java | 52 --- .../parser/stylemapper/style/FontNameMapper.java | 36 -- .../parser/stylemapper/style/FontPitchMapper.java | 34 -- .../parser/stylemapper/style/FontReliefMapper.java | 33 -- .../stylemapper/style/TextEmphasizeMapper.java | 32 -- .../style/TextUnderlineColorMapper.java | 41 --- .../style/TextUnderlineStyleMapper.java | 40 -- .../style/TextUnderlineWidthMapper.java | 68 ---- .../stylemapper/style/TextUnderlineWordMode.java | 34 -- .../stylemapper/style/VerticalAlignMapper.java | 38 -- .../stylemapper/table/ColumnWidthMapper.java | 39 -- .../parser/stylemapper/table/RowHeightMapper.java | 39 -- 28 files changed, 1646 deletions(-) delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeParserUtil.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/StyleMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt-schema-v1.0-os.xsd delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/selectors.properties delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/style-mapping.txt delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/OneOfConstantsMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/draw/TextAreaVerticalAlignMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/BackgroundColorMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/BorderRightMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/ColorMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontSizeMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontStyleMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontWeightMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/TextAlignMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontFamilyGenericMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontFamilyMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontNameMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontPitchMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontReliefMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextEmphasizeMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineColorMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineStyleMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineWidthMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineWordMode.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/VerticalAlignMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/table/ColumnWidthMapper.java delete mode 100644 reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/table/RowHeightMapper.java (limited to 'reportbuilder') diff --git a/reportbuilder/Jar_reportbuilder.mk b/reportbuilder/Jar_reportbuilder.mk index 36deed8832a6..3dfadcf7c5ef 100644 --- a/reportbuilder/Jar_reportbuilder.mk +++ b/reportbuilder/Jar_reportbuilder.mk @@ -147,11 +147,9 @@ $(eval $(call gb_Jar_add_sourcefiles,reportbuilder,\ reportbuilder/java/org/libreoffice/report/pentaho/parser/AttributeSpecification \ reportbuilder/java/org/libreoffice/report/pentaho/parser/ElementReadHandler \ reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeDocumentXmlResourceFactory \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeParserUtil \ reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeStylesXmlResourceFactory \ reportbuilder/java/org/libreoffice/report/pentaho/parser/StarStyleXmlFactoryModule \ reportbuilder/java/org/libreoffice/report/pentaho/parser/StarXmlFactoryModule \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/StyleMapper \ reportbuilder/java/org/libreoffice/report/pentaho/parser/chart/ChartReadHandler \ reportbuilder/java/org/libreoffice/report/pentaho/parser/data/DataStyleReadHandler \ reportbuilder/java/org/libreoffice/report/pentaho/parser/draw/ObjectOleReadHandler \ @@ -180,28 +178,6 @@ $(eval $(call gb_Jar_add_sourcefiles,reportbuilder,\ reportbuilder/java/org/libreoffice/report/pentaho/parser/style/OfficeStylesReadHandler \ reportbuilder/java/org/libreoffice/report/pentaho/parser/style/PageLayoutReadHandler \ reportbuilder/java/org/libreoffice/report/pentaho/parser/style/StyleDefinitionReadHandler \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/OneOfConstantsMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/draw/TextAreaVerticalAlignMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/BackgroundColorMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/BorderRightMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/ColorMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontSizeMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontStyleMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontWeightMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/TextAlignMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontFamilyGenericMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontFamilyMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontNameMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontPitchMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontReliefMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextEmphasizeMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineColorMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineStyleMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineWidthMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineWordMode \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/VerticalAlignMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/table/ColumnWidthMapper \ - reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/table/RowHeightMapper \ reportbuilder/java/org/libreoffice/report/pentaho/parser/table/CoveredCellReadHandler \ reportbuilder/java/org/libreoffice/report/pentaho/parser/table/TableCellReadHandler \ reportbuilder/java/org/libreoffice/report/pentaho/parser/table/TableColumnReadHandler \ @@ -257,12 +233,6 @@ $(eval $(call gb_Jar_add_packagefiles,reportbuilder,org/libreoffice/report/penta $(SRCDIR)/reportbuilder/java/org/libreoffice/report/pentaho/xsl-fo.css \ )) -$(eval $(call gb_Jar_add_packagefiles,reportbuilder,org/libreoffice/report/pentaho/parser,\ - $(SRCDIR)/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt-schema-v1.0-os.xsd \ - $(SRCDIR)/reportbuilder/java/org/libreoffice/report/pentaho/parser/selectors.properties \ - $(SRCDIR)/reportbuilder/java/org/libreoffice/report/pentaho/parser/style-mapping.txt \ -)) - $(eval $(call gb_Jar_add_packagefiles,reportbuilder,org/libreoffice/report/pentaho/styles,\ $(SRCDIR)/reportbuilder/java/org/libreoffice/report/pentaho/styles/stylemapper.xml \ $(SRCDIR)/reportbuilder/java/org/libreoffice/report/pentaho/styles/stylemapper.xsd \ diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeParserUtil.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeParserUtil.java deleted file mode 100644 index 9cc91f22b6d3..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeParserUtil.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Properties; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.jfree.layouting.namespace.NamespaceDefinition; -import org.jfree.layouting.namespace.Namespaces; -import org.jfree.report.JFreeReportBoot; - -import org.pentaho.reporting.libraries.base.config.DefaultConfiguration; -import org.pentaho.reporting.libraries.resourceloader.Resource; -import org.pentaho.reporting.libraries.resourceloader.ResourceException; -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."; - - public static synchronized OfficeParserUtil getInstance() - { - if (instance == null) - { - instance = new OfficeParserUtil(); - } - return instance; - } - private final DefaultConfiguration props; - private final NamespaceDefinition[] namespaces; - - private OfficeParserUtil() - { - props = new DefaultConfiguration(); - - final ResourceManager resourceManager = new ResourceManager(); - resourceManager.registerDefaults(); - try - { - final Resource res = resourceManager.createDirectly("res://org/libreoffice/report/pentaho/parser/selectors.properties", Properties.class); - final Properties resProps = (Properties) res.getResource(); - props.putAll(resProps); - } - catch (ResourceException e) - { - LOGGER.warn("Unable to load mapping rules. Parsing services may not be available.", e); - } - - namespaces = Namespaces.createFromConfig(JFreeReportBoot.getInstance().getGlobalConfig(), - "org.jfree.report.namespaces.", resourceManager); - } - - public NamespaceDefinition getNamespaceDeclaration(final String uri) - { - if (uri == null) - { - throw new NullPointerException("URI must not be null"); - } - - for (int i = 0; i < namespaces.length; i++) - { - final NamespaceDefinition definition = namespaces[i]; - if (uri.equals(definition.getURI())) - { - return definition; - } - } - return null; - } - - public String getGenericFont(final String officeFont) - { - return props.getProperty("font-family." + officeFont.toLowerCase(), officeFont); - } - - public String getNamespaceURI(final String namespacePrefix) - { - return props.getProperty(NAMESPACES_PREFIX + namespacePrefix); - } - - public String getNamespaceForStyleFamily(final String styleFamily) - { - return props.getProperty("style-family." + styleFamily); - } - - public Map getNamespaces() - { - final Map map = new HashMap(); - final Iterator keys = props.findPropertyKeys(NAMESPACES_PREFIX); - while (keys.hasNext()) - { - final String key = (String) keys.next(); - final String value = props.getConfigProperty(key); - map.put(key.substring(NAMESPACES_PREFIX.length()), value); - } - return map; - } - - public String getNamespacePrefix(final String namespaceURI) - { - final Iterator keys = props.findPropertyKeys(NAMESPACES_PREFIX); - while (keys.hasNext()) - { - final String key = (String) keys.next(); - final String value = props.getConfigProperty(key); - if (namespaceURI.equals(value)) - { - return key.substring(NAMESPACES_PREFIX.length()); - } - } - return null; - } - - public AttributeSpecification parseStyleAttrDefinition(final String key, final String prefix, final String tagname) - { - final String configPrefix = "attr." + prefix + "." + tagname + "."; - final String configSuffix = key.substring(configPrefix.length()); - final int dotPosition = configSuffix.indexOf('.'); - if (dotPosition == -1) - { - return null; - } - final String namespaceUri = getNamespaceURI(configSuffix.substring(0, dotPosition)); - final String attrName = configSuffix.substring(dotPosition + 1); - final String value = props.getProperty(key); - return new AttributeSpecification(namespaceUri, attrName, value); - } - - public Iterator findStylesForElement(final String prefix, - final String tagname) - { - final String configPrefix = "attr." + prefix + "." + tagname + "."; - return props.findPropertyKeys(configPrefix); - } - - public boolean isValidStyleElement(final String uri, final String tagName) - { - final String prefix = getNamespacePrefix(uri); - if (prefix == null) - { - return false; - } - - final Iterator stylesForElement = findStylesForElement(prefix, tagName); - return stylesForElement.hasNext(); - } - - public String getSelectorPattern() - { - return props.getConfigProperty("style-selector.pattern"); - } - - public static void main(final String[] args) - { - JFreeReportBoot.getInstance().start(); - System.out.print(OfficeParserUtil.getInstance().getNamespaces()); - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/StyleMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/StyleMapper.java deleted file mode 100644 index 539874dd9c25..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/StyleMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser; - -public interface StyleMapper -{ - - -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt-schema-v1.0-os.xsd b/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt-schema-v1.0-os.xsd deleted file mode 100644 index 4c296ac7a75f..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt-schema-v1.0-os.xsd +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/selectors.properties b/reportbuilder/java/org/libreoffice/report/pentaho/parser/selectors.properties deleted file mode 100644 index f9640d001fa5..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/selectors.properties +++ /dev/null @@ -1,104 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# -# x-no-translate - -# -# -# -# -# gets translated into: -# -# *[draw|style-name~="S1"] - -namespaces.draw=urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 -namespaces.fo=urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0 -namespaces.style=urn:oasis:names:tc:opendocument:xmlns:style:1.0 -namespaces.table=urn:oasis:names:tc:opendocument:xmlns:table:1.0 -namespaces.chart=urn:oasis:names:tc:opendocument:xmlns:chart:1.0 -namespaces.rpt=http://openoffice.org/2005/report - -# -# maps the style family type (graphics) into a style rule of the -# common form: *[|~=""] -# -style-family.graphic=draw -style-family.graphics=draw -style-family.control=control -style-family.report-element=rpt -style-family.table-column=table -style-family.table-row=table -style-family.table-cell=table -style-family.table=table - -# Builds the selector pattern for a star-office stylesheet -# -# 0: Namespace prefix -# 1: Style-class attribute name (from the global namespace definition) -# 2: Style-class value -style-selector.pattern=*[{0}|{1}~="{2}"] - -# -# The following properties map the OpenOffice-generic font names -# into their CSS counterparts. As I dont have a clue, whats the difference -# between modern and swiss typeface, I am ignorant for now and ignore -# them. Blame me for that :) -font-family.roman=serif -font-family.swiss=sans-serif -font-family.modern=sans-serif -font-family.decorative=fantasy -font-family.script=cursive -font-family.system=monospace - - -# -# Defines the style property mapping for the resolve process from the -# OpenOffice report format into the internal LibLayout format -# -# attr.style...= -# -# Group is an selector, which corresponds to one of the sub-elements of -# the style element of the OpenDocument format. (It must match the element -# name for which the attributes are defined.) -# -# Namespace is a defined namespace prefix from this file as defined in the -# namespaces. section above -# -# AttrName is the defined attribute name for this namespace as defined by the -# opendocument standard. -attr.style.graphic-properties.draw.textarea-vertical-align=org.libreoffice.report.pentaho.parser.stylemapper.draw.TextAreaVerticalAlignMapper -attr.style.section-properties.fo.background-color=org.libreoffice.report.pentaho.parser.stylemapper.fo.BackgroundColorMapper -attr.style.paragraph-properties.fo.text-align=org.libreoffice.report.pentaho.parser.stylemapper.fo.TextAlignMapper -attr.style.paragraph-properties.style.vertical-align=org.libreoffice.report.pentaho.parser.stylemapper.style.VerticalAlignMapper -attr.style.text-properties.fo.color=org.libreoffice.report.pentaho.parser.stylemapper.fo.ColorMapper -attr.style.text-properties.style.font-name=org.libreoffice.report.pentaho.parser.stylemapper.style.FontNameMapper -attr.style.text-properties.fo.font-family=org.libreoffice.report.pentaho.parser.stylemapper.style.FontFamilyMapper -attr.style.table-properties.fo.background-color=org.libreoffice.report.pentaho.parser.stylemapper.fo.BackgroundColorMapper -#attr.style.text-properties.style.font-style-name= -attr.style.text-properties.style.font-family-generic=org.libreoffice.report.pentaho.parser.stylemapper.style.FontFamilyGenericMapper -attr.style.text-properties.style.font-pitch=org.libreoffice.report.pentaho.parser.stylemapper.style.FontPitchMapper -attr.style.text-properties.fo.font-size=org.libreoffice.report.pentaho.parser.stylemapper.fo.FontSizeMapper -attr.style.text-properties.fo.font-style=org.libreoffice.report.pentaho.parser.stylemapper.fo.FontStyleMapper -attr.style.text-properties.style.text-underline-style=org.libreoffice.report.pentaho.parser.stylemapper.style.TextUnderlineStyleMapper -attr.style.text-properties.style.text-underline-width=org.libreoffice.report.pentaho.parser.stylemapper.style.TextUnderlineWidthMapper -attr.style.text-properties.style.text-underline-color=org.libreoffice.report.pentaho.parser.stylemapper.style.TextUnderlineColorMapper -attr.style.text-properties.fo.font-weight=org.libreoffice.report.pentaho.parser.stylemapper.fo.FontWeightMapper -attr.style.text-properties.style.text-emphasize=org.libreoffice.report.pentaho.parser.stylemapper.style.TextEmphasizeMapper -attr.style.text-properties.style.font-relief=org.libreoffice.report.pentaho.parser.stylemapper.style.FontReliefMapper -attr.style.table-column-properties.table.column-width=org.libreoffice.report.pentaho.parser.stylemapper.table.ColumnWidthMapper -attr.style.table-row-properties.table.row-height=org.libreoffice.report.pentaho.parser.stylemapper.table.RowHeightMapper -attr.style.table-cell-properties.fo.border-right=org.libreoffice.report.pentaho.parser.stylemapper.fo.BorderRightMapper diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/style-mapping.txt b/reportbuilder/java/org/libreoffice/report/pentaho/parser/style-mapping.txt deleted file mode 100644 index 6b1ede5d98cf..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/style-mapping.txt +++ /dev/null @@ -1,8 +0,0 @@ - - - - -gets translated into: - -*[draw|style-name~="S1"] - diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/OneOfConstantsMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/OneOfConstantsMapper.java deleted file mode 100644 index 0f7583dc6b74..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/OneOfConstantsMapper.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import java.util.HashMap; -import java.util.Map; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.StyleKey; -import org.jfree.layouting.input.style.values.CSSValue; - - -public abstract class OneOfConstantsMapper implements StyleMapper -{ - - private final StyleKey styleKey; - private final Map mappings; - - protected OneOfConstantsMapper(final StyleKey styleKey) - { - this.styleKey = styleKey; - this.mappings = new HashMap(); - } - - public void addMapping(final String value, final CSSValue target) - { - mappings.put(value, target); - } - - public void updateStyle(final String uri, - final String attrName, - final String attrValue, - final CSSDeclarationRule targetRule) - { - final CSSValue value = lookupMapping(attrValue); - if (value != null) - { - targetRule.setPropertyValue(styleKey, value); - } - } - - public StyleKey getStyleKey() - { - return styleKey; - } - - protected CSSValue lookupMapping(final String attrValue) - { - return mappings.get(attrValue); - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/draw/TextAreaVerticalAlignMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/draw/TextAreaVerticalAlignMapper.java deleted file mode 100644 index af921da41ff8..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/draw/TextAreaVerticalAlignMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.draw; - -import org.libreoffice.report.pentaho.parser.stylemapper.OneOfConstantsMapper; - -import org.jfree.layouting.input.style.keys.box.BoxStyleKeys; -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")); - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/BackgroundColorMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/BackgroundColorMapper.java deleted file mode 100644 index 1ccad389f9b0..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/BackgroundColorMapper.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.fo; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.border.BorderStyleKeys; -import org.jfree.layouting.input.style.values.CSSColorValue; -import org.jfree.layouting.util.ColorUtil; - -public class BackgroundColorMapper implements StyleMapper -{ - - 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) - { - targetRule.setPropertyValue(BorderStyleKeys.BACKGROUND_COLOR, cv); - } - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/BorderRightMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/BorderRightMapper.java deleted file mode 100644 index dc669bd0d7a0..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/BorderRightMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.fo; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; - -public class BorderRightMapper implements StyleMapper -{ - - public void updateStyle(final String uri, - final String attrName, - final String attrValue, - final CSSDeclarationRule targetRule) - { - targetRule.setPropertyValueAsString(attrName, attrValue); - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/ColorMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/ColorMapper.java deleted file mode 100644 index 71fa5e6f2b70..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/ColorMapper.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.fo; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.color.ColorStyleKeys; -import org.jfree.layouting.input.style.values.CSSColorValue; -import org.jfree.layouting.util.ColorUtil; - -public class ColorMapper implements StyleMapper -{ - - 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) - { - targetRule.setPropertyValue(ColorStyleKeys.COLOR, cv); - } - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontSizeMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontSizeMapper.java deleted file mode 100644 index ec8129b0f7be..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontSizeMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.fo; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.font.FontStyleKeys; - -public class FontSizeMapper implements StyleMapper -{ - - public void updateStyle(final String uri, final String attrName, final String attrValue, - final CSSDeclarationRule targetRule) - { - targetRule.setPropertyValueAsString(FontStyleKeys.FONT_SIZE, attrValue); - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontStyleMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontStyleMapper.java deleted file mode 100644 index 24044328a743..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontStyleMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.fo; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.font.FontStyleKeys; - -public class FontStyleMapper implements StyleMapper -{ - - 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/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontWeightMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontWeightMapper.java deleted file mode 100644 index cc3ff1e5d11a..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/FontWeightMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.fo; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.font.FontStyleKeys; - -public class FontWeightMapper implements StyleMapper -{ - - 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/org/libreoffice/report/pentaho/parser/stylemapper/fo/TextAlignMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/TextAlignMapper.java deleted file mode 100644 index f369af9bfa0a..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/fo/TextAlignMapper.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.fo; - -import org.libreoffice.report.pentaho.parser.stylemapper.OneOfConstantsMapper; - -import org.jfree.layouting.input.style.keys.text.TextAlign; -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); - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontFamilyGenericMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontFamilyGenericMapper.java deleted file mode 100644 index fa61ee0fedb3..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontFamilyGenericMapper.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.style; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.font.FontStyleKeys; -import org.jfree.layouting.input.style.values.CSSStringType; -import org.jfree.layouting.input.style.values.CSSStringValue; -import org.jfree.layouting.input.style.values.CSSValue; -import org.jfree.layouting.input.style.values.CSSValueList; - -public class FontFamilyGenericMapper implements StyleMapper -{ - - public void updateStyle(final String uri, final String attrName, final String attrValue, - final CSSDeclarationRule targetRule) - { - final CSSValue value = targetRule.getPropertyCSSValue(FontStyleKeys.FONT_FAMILY); - if (!(value instanceof CSSValueList)) - { - final CSSStringValue cssVal = new CSSStringValue(CSSStringType.STRING, attrValue); - targetRule.setPropertyValue(FontStyleKeys.FONT_FAMILY, - new CSSValueList(new CSSValue[] - { - cssVal - })); - } - else - { - final CSSValueList list = (CSSValueList) value; - targetRule.setPropertyValue(FontStyleKeys.FONT_FAMILY, - CSSValueList.insertLast(list, value)); - } - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontFamilyMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontFamilyMapper.java deleted file mode 100644 index 74fc88e5e222..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontFamilyMapper.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.style; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.font.FontStyleKeys; -import org.jfree.layouting.input.style.values.CSSStringType; -import org.jfree.layouting.input.style.values.CSSStringValue; -import org.jfree.layouting.input.style.values.CSSValue; -import org.jfree.layouting.input.style.values.CSSValueList; - -public class FontFamilyMapper implements StyleMapper -{ - - public void updateStyle(final String uri, final String attrName, final String attrValue, - final CSSDeclarationRule targetRule) - { - final CSSValue value = targetRule.getPropertyCSSValue(FontStyleKeys.FONT_FAMILY); - if (!(value instanceof CSSValueList)) - { - final CSSStringValue cssVal = new CSSStringValue(CSSStringType.STRING, attrValue); - targetRule.setPropertyValue(FontStyleKeys.FONT_FAMILY, - new CSSValueList(new CSSValue[] - { - cssVal - })); - } - else - { - final CSSValueList list = (CSSValueList) value; - targetRule.setPropertyValue(FontStyleKeys.FONT_FAMILY, - CSSValueList.insertFirst(list, value)); - } - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontNameMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontNameMapper.java deleted file mode 100644 index 93f564e0d0cd..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontNameMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.style; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.font.FontStyleKeys; -import org.jfree.layouting.input.style.values.CSSStringType; -import org.jfree.layouting.input.style.values.CSSStringValue; - -public class FontNameMapper implements StyleMapper -{ - - 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/org/libreoffice/report/pentaho/parser/stylemapper/style/FontPitchMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontPitchMapper.java deleted file mode 100644 index 15d87ae2ee10..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontPitchMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.style; - -import org.libreoffice.report.pentaho.parser.stylemapper.OneOfConstantsMapper; - -import org.jfree.layouting.input.style.keys.font.FontStyleKeys; -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")); - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontReliefMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontReliefMapper.java deleted file mode 100644 index 5929f35210e1..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/FontReliefMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.style; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.font.FontStyleKeys; - -public class FontReliefMapper implements StyleMapper -{ - - 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/org/libreoffice/report/pentaho/parser/stylemapper/style/TextEmphasizeMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextEmphasizeMapper.java deleted file mode 100644 index e9e6e46bd514..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextEmphasizeMapper.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.style; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; - -public class TextEmphasizeMapper implements StyleMapper -{ - - 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/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineColorMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineColorMapper.java deleted file mode 100644 index 68598d2f2dee..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineColorMapper.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.style; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.text.TextStyleKeys; -import org.jfree.layouting.input.style.values.CSSColorValue; -import org.jfree.layouting.util.ColorUtil; - -public class TextUnderlineColorMapper implements StyleMapper -{ - - 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) - { - targetRule.setPropertyValue(TextStyleKeys.TEXT_UNDERLINE_COLOR, cv); - } - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineStyleMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineStyleMapper.java deleted file mode 100644 index bb81af95417c..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineStyleMapper.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.style; - -import org.libreoffice.report.pentaho.parser.stylemapper.OneOfConstantsMapper; - -import org.jfree.layouting.input.style.keys.text.TextDecorationStyle; -import org.jfree.layouting.input.style.keys.text.TextStyleKeys; - -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); - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineWidthMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineWidthMapper.java deleted file mode 100644 index dd83d4666c3e..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineWidthMapper.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.style; - -import org.libreoffice.report.pentaho.parser.stylemapper.OneOfConstantsMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.border.BorderWidth; -import org.jfree.layouting.input.style.keys.text.TextDecorationWidth; -import org.jfree.layouting.input.style.keys.text.TextStyleKeys; -import org.jfree.layouting.input.style.values.CSSAutoValue; -import org.jfree.layouting.input.style.values.CSSValue; - -public class TextUnderlineWidthMapper extends OneOfConstantsMapper -{ - - public TextUnderlineWidthMapper() - { - super(TextStyleKeys.TEXT_UNDERLINE_WIDTH); - addMapping("auto", CSSAutoValue.getInstance()); - addMapping("normal", BorderWidth.MEDIUM); - addMapping("bold", TextDecorationWidth.BOLD); - addMapping("thin", BorderWidth.THIN); - addMapping("dash", TextDecorationWidth.DASH); - addMapping("medium", BorderWidth.MEDIUM); - addMapping("thick", BorderWidth.THICK); - } - - @Override - public void updateStyle(final String uri, - final String attrName, - final String attrValue, - final CSSDeclarationRule targetRule) - { - if (attrName == null) - { - throw new NullPointerException(); - } - - final CSSValue value = lookupMapping(attrValue); - if (value != null) - { - targetRule.setPropertyValue(getStyleKey(), value); - } - else - // percent - // positive integer - // positive length - { - targetRule.setPropertyValueAsString(getStyleKey(), attrValue); - } - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineWordMode.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineWordMode.java deleted file mode 100644 index 733835c28849..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/TextUnderlineWordMode.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.style; - -import org.libreoffice.report.pentaho.parser.stylemapper.OneOfConstantsMapper; - -import org.jfree.layouting.input.style.keys.text.TextDecorationMode; -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); - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/VerticalAlignMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/VerticalAlignMapper.java deleted file mode 100644 index 12759a67329d..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/style/VerticalAlignMapper.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.style; - -import org.libreoffice.report.pentaho.parser.stylemapper.OneOfConstantsMapper; - -import org.jfree.layouting.input.style.keys.line.LineStyleKeys; -import org.jfree.layouting.input.style.values.CSSAutoValue; -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()); - } -} diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/table/ColumnWidthMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/table/ColumnWidthMapper.java deleted file mode 100644 index 5dd9385fa0bd..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/table/ColumnWidthMapper.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.table; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.box.BoxStyleKeys; - -/** - * Creation-Date: 03.07.2006, 13:08:27 - * - */ -public class ColumnWidthMapper implements StyleMapper -{ - - 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/org/libreoffice/report/pentaho/parser/stylemapper/table/RowHeightMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/table/RowHeightMapper.java deleted file mode 100644 index 238b216c1895..000000000000 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper/table/RowHeightMapper.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package org.libreoffice.report.pentaho.parser.stylemapper.table; - -import org.libreoffice.report.pentaho.parser.StyleMapper; - -import org.jfree.layouting.input.style.CSSDeclarationRule; -import org.jfree.layouting.input.style.keys.box.BoxStyleKeys; - -/** - * Creation-Date: 03.07.2006, 13:08:27 - * - */ -public class RowHeightMapper implements StyleMapper -{ - - public void updateStyle(final String uri, - final String attrName, - final String attrValue, - final CSSDeclarationRule targetRule) - { - targetRule.setPropertyValueAsString(BoxStyleKeys.HEIGHT, attrValue); - } -} -- cgit