Kaydet (Commit) a49b2ba1 authored tarafından Noel Grandin's avatar Noel Grandin

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
üst 35f8d6af
......@@ -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 \
......
/*
* 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<String,String> getNamespaces()
{
final Map<String,String> map = new HashMap<String,String>();
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());
}
}
/*
* 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
{
}
#
# 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
# <style:style style:name="S1" style:family="graphics">
# <style:section-properties fo:background-color="#ffffff"/>
# </style:style>
#
# 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: *[<namespace>|<style-name>~="<classname>"]
#
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>.<namespace>.<attr-name>=<class>
#
# 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.<prefix> 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
<style:style style:name="S1" style:family="graphics">
<style:section-properties fo:background-color="#ffffff"/>
</style:style>
gets translated into:
*[draw|style-name~="S1"]
/*
* 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<String, CSSValue> mappings;
protected OneOfConstantsMapper(final StyleKey styleKey)
{
this.styleKey = styleKey;
this.mappings = new HashMap<String, CSSValue>();
}
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);
}
}
/*
* 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"));
}
}
/*
* 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);
}
}
}
/*
* 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);
}
}
/*
* 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);
}
}
}
/*
* 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);
}
}
/*
* 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);
}
}
/*
* 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);
}
}
/*
* 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);
}
}
/*
* 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));
}
}
}
/*
* 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));
}
}
}
/*
* 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));
}
}
/*
* 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"));
}
}
/*
* 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);
}
}
/*
* 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);
}
}
/*
* 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);
}
}
}
/*
* 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);
}
}
/*
* 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);
}
}
}
/*
* 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);
}
}
/*
* 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());
}
}
/*
* 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);
}
}
/*
* 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);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment