diff options
Diffstat (limited to 'reportbuilder/java/org/libreoffice/report/pentaho/parser/stylemapper')
22 files changed, 0 insertions, 893 deletions
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<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); - } -} 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); - } -} |