--- src/documentation/content/xdocs/trunk/running.xml (revision 1380926) +++ src/documentation/content/xdocs/trunk/running.xml (working copy) @@ -109,7 +109,7 @@

+Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-odt|-rtf|-tiff|-png|-pcl|-ps|-txt|-at [mime]|-print] [OPTIONS] -version print FOP version and exit -d debug mode @@ -164,6 +164,7 @@ -pdfa1b outfile input will be rendered as PDF/A-1b compliant PDF (outfile req'd, same as "-pdf outfile -pdfprofile PDF/A-1b") -awt input will be displayed on screen + -odt outfile input will be rendered as ODT (outfile req'd) -rtf outfile input will be rendered as RTF (outfile req'd) -pcl outfile input will be rendered as PCL (outfile req'd) -ps outfile input will be rendered as PostScript (outfile req'd) @@ -197,6 +198,7 @@ fop -xml foo.xml -xsl foo.xsl -foout foo.fo fop -xml - -xsl foo.xsl -pdf - fop foo.fo -mif foo.mif + fop foo.fo -odt foo.odt fop foo.fo -rtf foo.rtf fop foo.fo -print fop foo.fo -awt]]> --- src/documentation/content/xdocs/trunk/output.xml (revision 1380926) +++ src/documentation/content/xdocs/trunk/output.xml (working copy) @@ -1111,6 +1111,15 @@ +
+ ODT +

+ An open source XSL-FO to ODT converter has been integrated into Apache FOP. + This will create an ODT (rich text format) document that will + attempt to contain as much information from the XSL-FO document as + possible. +

+
RTF

--- src/java/org/apache/fop/render/odf/FopOdfConverter.java (revision 0) +++ src/java/org/apache/fop/render/odf/FopOdfConverter.java (revision 0) @@ -0,0 +1,47 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf; + +import java.io.OutputStream; + +import org.apache.fop.fo.FONode; + +/** + * Renderer that renders areas to odt. + */ +public interface FopOdfConverter { + + /** + * Initialisation of converter + * @throws OdfException + */ + void init() throws OdfException; + + /** + * Write created odf document to the output stream + * @param os output stream + */ + void writeToOutputStream(OutputStream os); + + /** + * Convert FONode with its children to odf document holden by converter + * @param foNode node of xslfo + */ + void convertRecursively(FONode foNode); + +} --- src/java/org/apache/fop/render/odf/OdfException.java (revision 0) +++ src/java/org/apache/fop/render/odf/OdfException.java (revision 0) @@ -0,0 +1,35 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf; + +import org.apache.avalon.framework.CascadingException; + +/** + * Generic exception for ODF renders. + */ +public class OdfException extends CascadingException { + + /** + * + */ + private static final long serialVersionUID = 6464226563894799824L; + + public OdfException(String message, Throwable throwable) { + super(message, throwable); + } +} --- src/java/org/apache/fop/render/odf/ODTHandler.java (revision 0) +++ src/java/org/apache/fop/render/odf/ODTHandler.java (revision 0) @@ -0,0 +1,74 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf; + +import java.io.OutputStream; + +import org.xml.sax.SAXException; + +import org.apache.fop.apps.FOUserAgent; +import org.apache.fop.fo.FOEventHandler; +import org.apache.fop.fo.pagination.PageSequence; + +import org.apache.fop.render.odf.odt.FopOdtConverter; + +/** + * ODT Handler: generates ODT output + */ +public class ODTHandler extends FOEventHandler { + + private FopOdfConverter converter = new FopOdtConverter(); + + private final OutputStream os; + + /** + * Constructor : keeping output stream + */ + public ODTHandler(FOUserAgent userAgent, OutputStream os) { + super(userAgent); + this.os = os; + } + + /** + * {@inheritDoc} + */ + @Override + public void startDocument() throws SAXException { + try { + converter.init(); + } catch (OdfException e) { + e.printStackTrace(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void endDocument() throws SAXException { + converter.writeToOutputStream(os); + } + + /** + * {@inheritDoc} + */ + @Override + public void endPageSequence(PageSequence pageSeq) { + converter.convertRecursively(pageSeq); + } +} --- src/java/org/apache/fop/render/odf/odt/FopOdtConverter.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/FopOdtConverter.java (revision 0) @@ -0,0 +1,115 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt; + +import java.io.OutputStream; +import java.util.Iterator; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; + +import org.apache.fop.fo.FONode; + +import org.apache.fop.render.odf.FopOdfConverter; +import org.apache.fop.render.odf.FopTagType; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.tags.RootTag; +import org.apache.fop.render.odf.odt.tags.Tag; +import org.apache.fop.render.odf.odt.tags.TagFactory; + +/** + * Renderer that renders areas to odt. + */ +public class FopOdtConverter implements FopOdfConverter { + + OdfTextDocument odt = null; + + private TagFactory factory = new TagFactory(); + + private Tag actualTag = null; + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void init() throws OdfException { + + try { + odt = OdfTextDocument.newTextDocument(); + } catch (Exception e) { + throw new OdfException("Can't initialize the document", e); + } + + actualTag = new RootTag(odt); + } + + /** + * {@inheritDoc} + */ + public void writeToOutputStream(OutputStream os) { + + try { + odt.save(os); + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } + } + + /** + * {@inheritDoc} + */ + public void convertRecursively(FONode foNode) { + this.convert(foNode, FopTagType.START); + + if (foNode.getChildNodes() != null) { + for (Iterator it = foNode.getChildNodes(); it.hasNext();) { + FONode fn = (FONode) it.next(); + convertRecursively(fn); + } + } + + this.convert(foNode, FopTagType.END); + } + + /** + * Convert one tag to the element of odt. + * @param image the image which will be painted + * @param context the renderer context for the current renderer + */ + private void convert(FONode foNode, FopTagType type) { + if (type == FopTagType.START) { + try { + actualTag = factory.getTag(this, foNode, actualTag); + } catch (OdfException e1) { + e1.printStackTrace(); + } + try { + actualTag.execute(); + } catch (OdfException e) { + e.printStackTrace(); + } + } else if (type == FopTagType.END) { + try { + actualTag.closeIntercept(); + } catch (OdfException e) { + e.printStackTrace(); + } + actualTag = actualTag.getParent(); + } + } +} --- src/java/org/apache/fop/render/odf/odt/Namespace.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/Namespace.java (revision 0) @@ -0,0 +1,40 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt; + +/** + * Defines namespeces used for odf attributes. + */ +public final class Namespace { + + public static final String OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0"; + + public static final String FO = "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"; + + public static final String XLINK = "http://www.w3.org/1999/xlink"; + + public static final String SVG = "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"; + + public static final String TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0"; + + public static final String STYLE = "urn:oasis:names:tc:opendocument:xmlns:style:1.0"; + + public static final String TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0"; + + private Namespace() { } +} --- src/java/org/apache/fop/render/odf/odt/Style.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/Style.java (revision 0) @@ -0,0 +1,84 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt; + +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; + +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * Main class for style management. + */ +public class Style { + + private Map parameters = new HashMap(); + + private Style parentStyle = null; + + /** + * Constructor + */ + public Style(Style parentStyle) { + this.parentStyle = parentStyle; + } + + /** + * Constructor Style for the root tag. Setting default style parameters + */ + public Style() { + parameters.put(Properties.FONT_FAMILY, "Times New Roman"); + parameters.put(Properties.FONT_SIZE, "12pt"); + parameters.put(Properties.COLOR, "#000000"); + parameters.put(Properties.TEXT_ALIGN, "left"); + } + + /** + * Get all style parameters + */ + public Map getParameters() { + return parameters; + } + + /** + * get an object from parameters. + */ + public String get(Property property) { + String value = parameters.get(property); + + if (value == null && parentStyle != null) { + value = parentStyle.get(property); + } + + return value; + } + + public static String getStyleName(Map styles, StyleStyleElement sse) { + for (Entry entry : styles.entrySet()) { + StyleStyleElement style = entry.getValue(); + if (style.equals(sse)) { + return entry.getKey(); + } + } + return null; + } +} --- src/java/org/apache/fop/render/odf/odt/package.html (revision 0) +++ src/java/org/apache/fop/render/odf/odt/package.html (revision 0) @@ -0,0 +1,23 @@ + + + +org.apache.fop.render.odt Package + +

ODT render

+ + --- src/java/org/apache/fop/render/odf/odt/tags/BasicLinkTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/BasicLinkTag.java (revision 0) @@ -0,0 +1,210 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.odftoolkit.odfdom.dom.element.text.TextAElement; +import org.odftoolkit.odfdom.dom.element.text.TextBookmarkRefElement; +import org.odftoolkit.odfdom.pkg.OdfElement; +import org.odftoolkit.odfdom.pkg.OdfXMLFactory; + +import org.w3c.dom.DOMException; + +import org.apache.fop.fo.flow.BasicLink; + +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * basic-link converter + */ +public class BasicLinkTag extends Tag { + + protected BasicLink bl = null; + + protected OdfElement oe = null; + + /** + * Constructor. + */ + public BasicLinkTag(Tag parent, BasicLink bl) { + super(parent); + this.bl = bl; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.ALIGNMENT_ADJUST, null); + params.put(Properties.ALIGNMENT_BASELINE, null); + params.put(Properties.BASELINE_SHIFT, Properties.BASELINE_SHIFT.getValue(bl.getBaselineShift())); + params.put(Properties.DOMINANT_BASELINE, null); + params.put(Properties.LINE_HEIGHT, null); + params.put(Properties.SOURCE_DOCUMENT, null); + params.put(Properties.ROLE, null); + params.put(Properties.AZIMUTH, null); + params.put(Properties.CUE_AFTER, null); + params.put(Properties.CUE_BEFORE, null); + params.put(Properties.ELEVATION, null); + params.put(Properties.PAUSE_AFTER, null); + params.put(Properties.PAUSE_BEFORE, null); + params.put(Properties.PITCH, null); + params.put(Properties.PITCH_RANGE, null); + params.put(Properties.PLAY_DURING, null); + params.put(Properties.RICHNESS, null); + params.put(Properties.SPEAK, null); + params.put(Properties.SPEAK_HEADER, null); + params.put(Properties.SPEAK_NUMERAL, null); + params.put(Properties.SPEAK_PUNCTUATION, null); + params.put(Properties.SPEECH_RATE, null); + params.put(Properties.STRESS, null); + params.put(Properties.VOICE_FAMILY, null); + params.put(Properties.VOLUME, null); + params.put(Properties.BACKGROUND_ATTACHMENT, null); + params.put(Properties.BACKGROUND_COLOR, Properties.BACKGROUND_COLOR.getColor(bl.getCommonBorderPaddingBackground())); + params.put(Properties.BACKGROUND_IMAGE, null); + params.put(Properties.BACKGROUND_REPEAT, null); + params.put(Properties.BACKGROUND_POSITION_HORIZONTAL, null); + params.put(Properties.BACKGROUND_POSITION_VERTICAL, null); + params.put(Properties.BORDER_BEFORE_COLOR, null); + params.put(Properties.BORDER_BEFORE_STYLE, null); + params.put(Properties.BORDER_BEFORE_WIDTH, null); + params.put(Properties.BORDER_AFTER_COLOR, null); + params.put(Properties.BORDER_AFTER_STYLE, null); + params.put(Properties.BORDER_AFTER_WIDTH, null); + params.put(Properties.BORDER_START_COLOR, null); + params.put(Properties.BORDER_START_STYLE, null); + params.put(Properties.BORDER_START_WIDTH, null); + params.put(Properties.BORDER_END_COLOR, null); + params.put(Properties.BORDER_END_STYLE, null); + params.put(Properties.BORDER_END_WIDTH, null); + params.put(Properties.BORDER_TOP_COLOR, null); + params.put(Properties.BORDER_TOP_STYLE, null); + params.put(Properties.BORDER_TOP_WIDTH, null); + params.put(Properties.BORDER_BOTTOM_COLOR, null); + params.put(Properties.BORDER_BOTTOM_STYLE, null); + params.put(Properties.BORDER_BOTTOM_WIDTH, null); + params.put(Properties.BORDER_LEFT_COLOR, null); + params.put(Properties.BORDER_LEFT_STYLE, null); + params.put(Properties.BORDER_LEFT_WIDTH, null); + params.put(Properties.BORDER_RIGHT_COLOR, null); + params.put(Properties.BORDER_RIGHT_STYLE, null); + params.put(Properties.BORDER_RIGHT_WIDTH, null); + params.put(Properties.PADDING_BEFORE, null); + params.put(Properties.PADDING_AFTER, null); + params.put(Properties.PADDING_START, null); + params.put(Properties.PADDING_END, null); + params.put(Properties.PADDING_TOP, null); + params.put(Properties.PADDING_BOTTOM, null); + params.put(Properties.PADDING_LEFT, null); + params.put(Properties.PADDING_RIGHT, null); + params.put(Properties.MARGIN_TOP_INLINE, null); + params.put(Properties.MARGIN_BOTTOM_INLINE, null); + params.put(Properties.MARGIN_LEFT_INLINE, null); + params.put(Properties.MARGIN_RIGHT_INLINE, null); + params.put(Properties.TOP_R, null); + params.put(Properties.RIGHT_R, null); + params.put(Properties.BOTTOM_R, null); + params.put(Properties.LEFT_R, null); + params.put(Properties.RELATIVE_POSITION, null); + params.put(Properties.KEEP_TOGETHER, null); + params.put(Properties.KEEP_WITH_NEXT, null); + params.put(Properties.KEEP_WITH_PREVIOUS, null); + params.put(Properties.ID, null); + params.put(Properties.DESTINATION_PLACEMENT_OFFSET, null); + params.put(Properties.EXTERNAL_DESTINATION, null); + params.put(Properties.INDICATE_DESTINATION, null); + params.put(Properties.INTERNAL_DESTINATION, null); + params.put(Properties.SHOW_DESTINATION, null); + params.put(Properties.TARGET_PRESENTATION_CONTEXT, null); + params.put(Properties.TARGET_PROCESSING_CONTEXT, null); + params.put(Properties.TARGET_STYLESHEET, null); + params.put(Properties.INDEX_CLASS, null); + params.put(Properties.INDEX_KEY, null); + params.put(Properties.PAGE_NUMBER_TREATMENT, null); + + // Not in the specification + params.put(Properties.FONT_FAMILY, Properties.FONT_FAMILY.getFont(bl.getCommonFont())); + params.put(Properties.FONT_STYLE, Properties.FONT_STYLE.getValue(bl.getCommonFont())); + params.put(Properties.FONT_WEIGHT, Properties.FONT_WEIGHT.getValue(bl.getCommonFont())); + params.put(Properties.FONT_SIZE, Properties.FONT_SIZE.getFontSize(bl.getCommonFont())); + params.put(Properties.COLOR, Properties.COLOR.getValue(bl.getColor())); + } + + public OdfElement getLinkElement() { + return oe; + } + + @Override + protected OdfElement getTextContainer() { + if (this.oe != null) { + return this.oe; + } else { + return parent.getTextContainer(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { + if (bl.hasExternalDestination()) { + try { + oe = (TextAElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TextAElement.ELEMENT_NAME); + } catch (Exception e1) { + e1.printStackTrace(); + } + String url = bl.getExternalDestination(); + if (url.startsWith("url")) { + url = url.substring(5, url.length() - 2); + } + oe.setAttributeNS(Namespace.XLINK, "xlink:href", url); + oe.setAttributeNS(Namespace.XLINK, "xlink:type", "simple"); + } else if (bl.hasInternalDestination()) { + try { + oe = (TextBookmarkRefElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TextBookmarkRefElement.ELEMENT_NAME); + } catch (Exception e) { + e.printStackTrace(); + } + oe.setAttributeNS(Namespace.TEXT, "text:ref-name", bl.getInternalDestination()); + oe.setAttributeNS(Namespace.TEXT, "text:reference-format", "page"); + } + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void closeIntercept() throws OdfException { + try { + parent.getTextContainer().appendChild(oe); + } catch (DOMException e) { + e.printStackTrace(); + } + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } +} --- src/java/org/apache/fop/render/odf/odt/tags/BidiOverrideTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/BidiOverrideTag.java (revision 0) @@ -0,0 +1,93 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.fo.flow.BidiOverride; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * bidi-override converter + */ +public class BidiOverrideTag extends Tag { + + protected BidiOverride bo = null; + + protected BidiOverrideTag(Tag parent, BidiOverride bo) { + super(parent); + this.bo = bo; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.LINE_HEIGHT, null); + params.put(Properties.LETTER_SPACING, null); + params.put(Properties.WORD_SPACING, null); + params.put(Properties.COLOR, null); + params.put(Properties.AZIMUTH, null); + params.put(Properties.CUE_AFTER, null); + params.put(Properties.CUE_BEFORE, null); + params.put(Properties.ELEVATION, null); + params.put(Properties.PAUSE_AFTER, null); + params.put(Properties.PAUSE_BEFORE, null); + params.put(Properties.PITCH, null); + params.put(Properties.PITCH_RANGE, null); + params.put(Properties.PLAY_DURING, null); + params.put(Properties.RICHNESS, null); + params.put(Properties.SPEAK, null); + params.put(Properties.SPEAK_HEADER, null); + params.put(Properties.SPEAK_NUMERAL, null); + params.put(Properties.SPEAK_PUNCTUATION, null); + params.put(Properties.SPEECH_RATE, null); + params.put(Properties.STRESS, null); + params.put(Properties.VOICE_FAMILY, null); + params.put(Properties.VOLUME, null); + params.put(Properties.FONT_FAMILY, null); + params.put(Properties.FONT_SELECTION_STRATEGY, null); + params.put(Properties.FONT_SIZE, null); + params.put(Properties.FONT_STRETCH, null); + params.put(Properties.FONT_SIZE_ADJUST, null); + params.put(Properties.FONT_STYLE, null); + params.put(Properties.FONT_VARIANT, null); + params.put(Properties.FONT_WEIGHT, null); + params.put(Properties.TOP_R, null); + params.put(Properties.RIGHT_R, null); + params.put(Properties.BOTTOM_R, null); + params.put(Properties.LEFT_R, null); + params.put(Properties.RELATIVE_POSITION, null); + params.put(Properties.ID, null); + params.put(Properties.SCORE_SPACES, null); + params.put(Properties.INDEX_CLASS, null); + params.put(Properties.INDEX_KEY, null); + params.put(Properties.DIRECTION, null); + params.put(Properties.UNICODE_BIDI, null); + + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/BlockContainerTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/BlockContainerTag.java (revision 0) @@ -0,0 +1,133 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.fo.flow.BlockContainer; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * block-container converter + */ +public class BlockContainerTag extends Tag { + + protected BlockContainer bc = null; + + /** + * Constructor + */ + protected BlockContainerTag(Tag parent, BlockContainer bc) { + super(parent); + this.bc = bc; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.DISPLAY_ALIGN, null); + params.put(Properties.BLOCK_PROGRESSION_DIMENSION, null); + params.put(Properties.CONTENT_WIDTH, null); + params.put(Properties.HEIGHT, null); + params.put(Properties.INLINE_PROGRESSION_DIMENSION, null); + params.put(Properties.WIDTH, null); + params.put(Properties.ABSOLUTE_POSITION, null); + params.put(Properties.TOP, null); + params.put(Properties.RIGHT, null); + params.put(Properties.BOTTOM, null); + params.put(Properties.LEFT, null); + params.put(Properties.BACKGROUND_ATTACHMENT, null); + params.put(Properties.BACKGROUND_COLOR, Properties.BACKGROUND_COLOR.getColor(bc.getCommonBorderPaddingBackground())); +// params.put(Properties.backgroundImage, null); +// params.put(Properties.backgroundRepeat, null); +// params.put(Properties.backgroundPositionHorizontal, null); +// params.put(Properties.backgroundPositionVertical, null); +// params.put(Properties.borderBeforeColor, null); +// params.put(Properties.borderBeforeStyle, null); +// params.put(Properties.borderBeforeWidth, null); +// params.put(Properties.borderAfterColor, null); +// params.put(Properties.borderAfterStyle, null); +// params.put(Properties.borderAfterWidth, null); +// params.put(Properties.borderStartColor, null); +// params.put(Properties.borderStartStyle, null); +// params.put(Properties.borderStartWidth, null); +// params.put(Properties.borderEndColor, null); +// params.put(Properties.borderEndStyle, null); +// params.put(Properties.borderEndWidth, null); +// params.put(Properties.borderTopColor, null); +// params.put(Properties.borderTopStyle, null); +// params.put(Properties.borderTopWidth, null); +// params.put(Properties.borderBottomColor, null); +// params.put(Properties.borderBottomStyle, null); +// params.put(Properties.borderBottomWidth, null); +// params.put(Properties.borderLeftColor, null); +// params.put(Properties.borderLeftStyle, null); +// params.put(Properties.borderLeftWidth, null); +// params.put(Properties.borderRightColor, null); +// params.put(Properties.borderRightStyle, null); +// params.put(Properties.borderRightWidth, null); +// params.put(Properties.paddingBefore, null); +// params.put(Properties.paddingAfter, null); +// params.put(Properties.paddingStart, null); +// params.put(Properties.paddingEnd, null); +// params.put(Properties.paddingTop, null); +// params.put(Properties.paddingBottom, null); +// params.put(Properties.paddingLeft, null); +// params.put(Properties.paddingRight, null); +// params.put(Properties.marginTopBlock, null); +// params.put(Properties.marginBottomBlock, null); + params.put(Properties.MARGIN_LEFT_BLOCK, Properties.MARGIN_LEFT_BLOCK.getMargin(bc.getCommonMarginBlock())); + params.put(Properties.MARGIN_RIGHT_BLOCK, Properties.MARGIN_RIGHT_BLOCK.getMargin(bc.getCommonMarginBlock())); +// params.put(Properties.spaceBeforeBlock, null); +// params.put(Properties.spaceAfterBlock, null); +// params.put(Properties.startIndentBlock, null); +// params.put(Properties.endIndentBlock, null); +// params.put(Properties.clear, null); +// params.put(Properties.intrusionDisplace, null); +// params.put(Properties.breakAfter, null); +// params.put(Properties.breakBefore, null); +// params.put(Properties.keepTogether, null); +// params.put(Properties.keepWithNext, null); +// params.put(Properties.keepWithPrevious, null); +// params.put(Properties.clip, null); +// params.put(Properties.overflow, null); +// params.put(Properties.referenceOrientation, null); +// params.put(Properties.span, null); +// params.put(Properties.id, null); +// params.put(Properties.zIndex, null); +// params.put(Properties.indexClass, null); +// params.put(Properties.indexKey, null); +// params.put(Properties.writingMode, null); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { + + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/BlockTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/BlockTag.java (revision 0) @@ -0,0 +1,330 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Iterator; +import java.util.Map; + +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.table.TableTableCellElement; +import org.odftoolkit.odfdom.dom.element.text.TextBookmarkElement; +import org.odftoolkit.odfdom.dom.element.text.TextLineBreakElement; +import org.odftoolkit.odfdom.dom.element.text.TextListItemElement; +import org.odftoolkit.odfdom.dom.element.text.TextPElement; +import org.odftoolkit.odfdom.pkg.OdfElement; +import org.odftoolkit.odfdom.pkg.OdfXMLFactory; + +import org.apache.fop.fo.FONode; +import org.apache.fop.fo.FOText; +import org.apache.fop.fo.flow.Block; +import org.apache.fop.fo.flow.ListBlock; +import org.apache.fop.fo.flow.table.Table; +import org.apache.fop.layoutmgr.BlockLayoutManager; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * block converter + */ +public class BlockTag extends Tag { + + private Block bl = null; + + private TextPElement paragraph = null; + + private OdfElement paragraphContainer = null; + + @Override + protected OdfElement getTextContainer() { + if (this.paragraph != null) { + return this.paragraph; + } else { + return parent.getTextContainer(); + } + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + protected TextPElement getParagraph() throws OdfException { + if (this.paragraph != null) { + return this.paragraph; + } else { + return parent.getParagraph(); + } + } + + /** + * {@inheritDoc} + */ + @Override + protected OdfElement getParagraphContainer() { + if (paragraphContainer != null) { + return this.paragraphContainer; + } else { + return parent.getParagraphContainer(); + } + } + + /** + * Constructor + * @throws OdfException + */ + BlockTag(Tag parent, Block bl) throws OdfException { + super(parent); + this.bl = bl; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.HYPHENATION_KEEP, null); + params.put(Properties.HYPHENATION_LADDER_COUNT, null); + params.put(Properties.LAST_LINE_END_INDENT, null); + params.put(Properties.LINE_HEIGHT, null); + params.put(Properties.LINE_HEIGHT_SHIFT_ADJUSTMENT, null); + params.put(Properties.LINE_STACKING_STRATEGY, null); + params.put(Properties.LINEFEED_TREATMENT, null); + params.put(Properties.WHITE_SPACE_TREATMENT, null); + params.put(Properties.TEXT_ALIGN, Properties.TEXT_ALIGN.getTextAlign(bl.getTextAlign())); + params.put(Properties.TEXT_ALIGN_LAST, null); + params.put(Properties.TEXT_INDENT, null); + params.put(Properties.WHITE_SPACE_COLLAPSE, null); + params.put(Properties.WRAP_OPTION, null); + params.put(Properties.COLOR, Properties.COLOR.getValue(bl.getColor())); + params.put(Properties.SOURCE_DOCUMENT, null); + params.put(Properties.ROLE, null); + params.put(Properties.AZIMUTH, null); + params.put(Properties.CUE_AFTER, null); + params.put(Properties.CUE_BEFORE, null); + params.put(Properties.ELEVATION, null); + params.put(Properties.PAUSE_AFTER, null); + params.put(Properties.PAUSE_BEFORE, null); + params.put(Properties.PITCH, null); + params.put(Properties.PITCH_RANGE, null); + params.put(Properties.PLAY_DURING, null); + params.put(Properties.RICHNESS, null); +// params.put(Properties.speak, null); +// params.put(Properties.speakHeader, null); +// params.put(Properties.speakNumeral, null); +// params.put(Properties.speakPunctuation, null); +// params.put(Properties.speechRate, null); +// params.put(Properties.stress, null); +// params.put(Properties.voiceFamily, null); +// params.put(Properties.volume, null); +// params.put(Properties.backgroundAttachment, null); + params.put(Properties.BACKGROUND_COLOR, Properties.BACKGROUND_COLOR.getColor(bl.getCommonBorderPaddingBackground())); +// params.put(Properties.backgroundImage, null); +// params.put(Properties.backgroundRepeat, null); +// params.put(Properties.backgroundPositionHorizontal, null); +// params.put(Properties.backgroundPositionVertical, null); +// params.put(Properties.borderBeforeColor, null); +// params.put(Properties.borderBeforeStyle, null); +// params.put(Properties.borderBeforeWidth, null); +// params.put(Properties.borderAfterColor, null); +// params.put(Properties.borderAfterStyle, null); +// params.put(Properties.borderAfterWidth, null); +// params.put(Properties.borderStartColor, null); +// params.put(Properties.borderStartStyle, null); +// params.put(Properties.borderStartWidth, null); +// params.put(Properties.borderEndColor, null); +// params.put(Properties.borderEndStyle, null); +// params.put(Properties.borderEndWidth, null); +// params.put(Properties.borderTopColor, null); +// params.put(Properties.borderTopStyle, null); +// params.put(Properties.borderTopWidth, null); +// params.put(Properties.borderBottomColor, null); +// params.put(Properties.borderBottomStyle, null); + params.put(Properties.BORDER_BOTTOM_WIDTH, null); + params.put(Properties.BORDER_LEFT_COLOR, null); + params.put(Properties.BORDER_LEFT_STYLE, null); + params.put(Properties.BORDER_LEFT_WIDTH, null); + params.put(Properties.BORDER_RIGHT_COLOR, null); + params.put(Properties.BORDER_RIGHT_STYLE, null); + params.put(Properties.BORDER_RIGHT_WIDTH, null); + params.put(Properties.PADDING_BEFORE, null); + params.put(Properties.PADDING_AFTER, null); + params.put(Properties.PADDING_START, null); + params.put(Properties.PADDING_END, null); + params.put(Properties.PADDING_TOP, null); + params.put(Properties.PADDING_BOTTOM, null); + params.put(Properties.PADDING_LEFT, null); + params.put(Properties.PADDING_RIGHT, null); + params.put(Properties.FONT_FAMILY, Properties.FONT_FAMILY.getFont(bl.getCommonFont())); + params.put(Properties.FONT_SELECTION_STRATEGY, null); + params.put(Properties.FONT_SIZE, Properties.FONT_SIZE.getFontSize(bl.getCommonFont())); + params.put(Properties.FONT_STRETCH, null); + params.put(Properties.FONT_SIZE_ADJUST, null); + params.put(Properties.FONT_STYLE, Properties.FONT_STYLE.getValue(bl.getCommonFont())); + params.put(Properties.FONT_VARIANT, Properties.FONT_VARIANT.getValue(bl.getCommonFont())); + params.put(Properties.FONT_WEIGHT, Properties.FONT_WEIGHT.getValue(bl.getCommonFont())); + params.put(Properties.COUNTRY, null); + params.put(Properties.LANGUAGE, null); + params.put(Properties.SCRIPT, null); + params.put(Properties.HYPHENATE, null); + params.put(Properties.HYPHENATION_CHARACTER, null); + params.put(Properties.HYPHENATION_PUSH_CHARACTER_COUNT, null); + params.put(Properties.HYPHENATION_RAMAIN_CHARACTER_COUNT, null); + params.put(Properties.MARGIN_TOP_BLOCK, null); + params.put(Properties.MARGIN_BOTTOM_BLOCK, null); + params.put(Properties.MARGIN_LEFT_BLOCK, Properties.MARGIN_LEFT_BLOCK.getMargin(bl.getCommonMarginBlock())); + params.put(Properties.MARGIN_RIGHT_BLOCK, Properties.MARGIN_RIGHT_BLOCK.getMargin(bl.getCommonMarginBlock())); + params.put(Properties.SPACE_BEFORE_BLOCK, Properties.SPACE_BEFORE_BLOCK.getSpace(bl.getCommonMarginBlock(), new BlockLayoutManager(bl))); + params.put(Properties.SPACE_AFTER_BLOCK, Properties.SPACE_AFTER_BLOCK.getSpace(bl.getCommonMarginBlock(), new BlockLayoutManager(bl))); +// params.put(Properties.startIndentBlock, null); +// params.put(Properties.endIndentBlock, null); +// params.put(Properties.topR, null); +// params.put(Properties.rightR, null); +// params.put(Properties.bottomR, null); +// params.put(Properties.leftR, null); +// params.put(Properties.relativePosition, null); +// params.put(Properties.clear, null); +// params.put(Properties.intrusionDisplace, null); +// params.put(Properties.breakAfter, null); +// params.put(Properties.breakBefore, null); +// params.put(Properties.keepTogether, null); +// params.put(Properties.keepWithNext, null); +// params.put(Properties.keepWithPrevious, null); +// params.put(Properties.orphans, null); +// params.put(Properties.windows, null); +// params.put(Properties.span, null); +// params.put(Properties.id, null); +// params.put(Properties.visibility, null); +// params.put(Properties.indexClass, null); +// params.put(Properties.indexKey, null); +// params.put(Properties.textAltitude, null); +// params.put(Properties.textDepth, null); + + registerFont(this.currentStyle.getParameters().get(Properties.FONT_FAMILY)); + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute() throws OdfException { + parent.executeFromParent(this); + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute(Tag tag) throws OdfException { + + if (!bl.hasChildren()) { + addLineBreak(); + } else { + if (!childrenAreOnlyBlocks(this.bl)) { + this.paragraph = this.newParagraph(parent.getParagraphContainer()); + StyleStyleElement sse = this.generateOdtStyle(this.currentStyle); + sse.setAttributeNS(Namespace.STYLE, "style:family", "paragraph"); + this.paragraph.setStyleName(this.appendNewStyle(sse)); + + if (bl.getId() != null) { + insertBookmark(bl.getId()); + } + } + } + } + + private void insertBookmark(String id) throws OdfException { + TextBookmarkElement tbe = null; + try { + tbe = (TextBookmarkElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TextBookmarkElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create link intern.", e); + } + tbe.setAttributeNS(Namespace.TEXT, "text:name", id); + this.paragraph.appendChild(tbe); + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute(TableCellTag tag) throws OdfException { + TableTableCellElement ttce = tag.getTableCellElement(); + + this.paragraphContainer = ttce; + + if (!childrenAreOnlyBlocks(this.bl)) { + this.paragraph = this.newParagraph(this.paragraphContainer); + } + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute(ListItemTag tag) throws OdfException { + TextListItemElement tlie = tag.getTextListItemElement(); + + this.paragraphContainer = tlie; + + if (!childrenAreOnlyBlocks(this.bl)) { + this.paragraph = this.newParagraph(this.paragraphContainer); + } + } + + private void addLineBreak() throws OdfException { + TextLineBreakElement tlb = null; + try { + tlb = (TextLineBreakElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TextLineBreakElement.ELEMENT_NAME); + } catch (Exception e) { + e.printStackTrace(); + } + + this.getParagraph().appendChild(tlb); + } + + private boolean childrenAreOnlyBlocks(Block bl) { + + if (bl.hasChildren()) { + for (Iterator it = bl.getChildNodes(); it.hasNext();) { + FONode next = (FONode) it.next(); + if (!(next instanceof Block || next instanceof ListBlock || next instanceof Table) ) { + if (next instanceof FOText) { + if ( ((FOText) next).length() != 0) { + return false; + } + } else { + return false; + } + } + } + } else { + return false; + } + + return true; + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } +} --- src/java/org/apache/fop/render/odf/odt/tags/BookmarkTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/BookmarkTag.java (revision 0) @@ -0,0 +1,57 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.fo.pagination.bookmarks.Bookmark; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * bookmark converter + */ +public class BookmarkTag extends Tag { + + protected Bookmark bm = null; + + protected BookmarkTag(Tag parent, Bookmark bm) { + super(parent); + this.bm = bm; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.SOURCE_DOCUMENT, null); + params.put(Properties.ROLE, null); + params.put(Properties.EXTERNAL_DESTINATION, null); + params.put(Properties.INTERNAL_DESTINATION, null); + params.put(Properties.STARTING_STATE, null); + + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/BookmarkTitleTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/BookmarkTitleTag.java (revision 0) @@ -0,0 +1,57 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.fo.pagination.bookmarks.BookmarkTitle; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * bookmark-title converter + */ +public class BookmarkTitleTag extends Tag { + + protected BookmarkTitle bt = null; + + public BookmarkTitleTag(Tag parent, BookmarkTitle bt) { + super(parent); + this.bt = bt; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.COLOR, null); + params.put(Properties.SOURCE_DOCUMENT, null); + params.put(Properties.ROLE, null); + params.put(Properties.FONT_STYLE, null); + params.put(Properties.FONT_WEIGHT, null); + + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/BookmarkTreeTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/BookmarkTreeTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.bookmarks.BookmarkTree; +import org.apache.fop.render.odf.OdfException; + +public class BookmarkTreeTag extends Tag { + + protected BookmarkTree bt = null; + + protected BookmarkTreeTag(Tag parent, BookmarkTree bt) { + super(parent); + this.bt = bt; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/ChangeBarBeginTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/ChangeBarBeginTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class ChangeBarBeginTag extends Tag { + + protected Object o = null; + + protected ChangeBarBeginTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/ChangeBarEndTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/ChangeBarEndTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class ChangeBarEndTag extends Tag { + + protected Object o = null; + + protected ChangeBarEndTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/CharacterTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/CharacterTag.java (revision 0) @@ -0,0 +1,161 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.fo.flow.Character; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * Character converter + */ +public class CharacterTag extends Tag { + + protected Character c = null; + + CharacterTag(Tag actualTag, Character c) { + super(actualTag); + this.c = c; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.ALIGNMENT_ADJUST, null); + params.put(Properties.ALIGNMENT_BASELINE, null); + params.put(Properties.BASELINE_SHIFT, Properties.BASELINE_SHIFT.getValue(c.getBaselineShift())); + params.put(Properties.DOMINANT_BASELINE, null); + params.put(Properties.LINE_HEIGHT, null); + params.put(Properties.CHARACTER, null); + params.put(Properties.LETTER_SPACING, null); + params.put(Properties.SUPPRESS_AT_LINE_BREAK, null); + params.put(Properties.TEXT_DECORATION, null); + params.put(Properties.TEXT_SHADOW, null); + params.put(Properties.TEXT_TRANSFORM, null); + params.put(Properties.TREAT_AS_WORD_SPACE, null); + params.put(Properties.COLOR, null); + params.put(Properties.AZIMUTH, null); +// params.put(Properties.cueAfter, null); +// params.put(Properties.cueBefore, null); +// params.put(Properties.elevation, null); +// params.put(Properties.pauseAfter, null); +// params.put(Properties.pauseBefore, null); +// params.put(Properties.pitch, null); +// params.put(Properties.pitchRange, null); +// params.put(Properties.playDuring, null); +// params.put(Properties.richness, null); +// params.put(Properties.speak, null); +// params.put(Properties.speakHeader, null); +// params.put(Properties.speakNumeral, null); +// params.put(Properties.speakPunctuation, null); +// params.put(Properties.speechRate, null); +// params.put(Properties.stress, null); +// params.put(Properties.voiceFamily, null); +// params.put(Properties.volume, null); +// params.put(Properties.backgroundAttachment, null); + params.put(Properties.BACKGROUND_COLOR, Properties.BACKGROUND_COLOR.getColor(c.getCommonBorderPaddingBackground())); + params.put(Properties.BACKGROUND_IMAGE, null); +// params.put(Properties.backgroundRepeat, null); +// params.put(Properties.backgroundPositionHorizontal, null); +// params.put(Properties.backgroundPositionVertical, null); +// params.put(Properties.borderBeforeColor, null); +// params.put(Properties.borderBeforeStyle, null); +// params.put(Properties.borderBeforeWidth, null); +// params.put(Properties.borderAfterColor, null); +// params.put(Properties.borderAfterStyle, null); +// params.put(Properties.borderAfterWidth, null); +// params.put(Properties.borderStartColor, null); +// params.put(Properties.borderStartStyle, null); +// params.put(Properties.borderStartWidth, null); +// params.put(Properties.borderEndColor, null); +// params.put(Properties.borderEndStyle, null); +// params.put(Properties.borderEndWidth, null); +// params.put(Properties.borderTopColor, null); +// params.put(Properties.borderTopStyle, null); +// params.put(Properties.borderTopWidth, null); +// params.put(Properties.borderBottomColor, null); +// params.put(Properties.borderBottomStyle, null); +// params.put(Properties.borderBottomWidth, null); +// params.put(Properties.borderLeftColor, null); +// params.put(Properties.borderLeftStyle, null); +// params.put(Properties.borderLeftWidth, null); +// params.put(Properties.borderRightColor, null); +// params.put(Properties.borderRightStyle, null); +// params.put(Properties.borderRightWidth, null); +// params.put(Properties.paddingBefore, null); +// params.put(Properties.paddingAfter, null); +// params.put(Properties.paddingStart, null); +// params.put(Properties.paddingEnd, null); +// params.put(Properties.paddingTop, null); +// params.put(Properties.paddingBottom, null); +// params.put(Properties.paddingLeft, null); +// params.put(Properties.paddingRight, null); +// params.put(Properties.fontFamily, null); +// params.put(Properties.fontSelectionStrategy, null); +// params.put(Properties.fontSize, null); +// params.put(Properties.fontStretch, null); +// params.put(Properties.fontSizeAdjust, null); +// params.put(Properties.fontStyle, null); +// params.put(Properties.fontVariant, null); +// params.put(Properties.fontWeight, null); +// params.put(Properties.country, null); +// params.put(Properties.language, null); +// params.put(Properties.script, null); +// params.put(Properties.hyphenate, null); +// params.put(Properties.hyphenationCharacter, null); +// params.put(Properties.hyphenationPushCharacterCount, null); +// params.put(Properties.hyphenationRamainCharacterCount, null); +// params.put(Properties.marginTopInline, null); +// params.put(Properties.marginBottomInline, null); +// params.put(Properties.marginLeftInline, null); +// params.put(Properties.marginRightInline, null); +// params.put(Properties.spaceEndInline, null); +// params.put(Properties.spaceStartInline, null); +// params.put(Properties.topR, null); +// params.put(Properties.rightR, null); +// params.put(Properties.bottomR, null); +// params.put(Properties.leftR, null); +// params.put(Properties.relativePosition, null); +// params.put(Properties.keepWithNext, null); +// params.put(Properties.keepWithPrevious, null); +// params.put(Properties.id, null); +// params.put(Properties.scoreSpaces, null); +// params.put(Properties.visibility, null); +// params.put(Properties.indexClass, null); +// params.put(Properties.indexKey, null); +// params.put(Properties.glyphOrientationHorizontal, null); +// params.put(Properties.glyphOrientationVertical, null); +// params.put(Properties.textAltitude, null); +// params.put(Properties.textDepth, null); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/ColorProfileTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/ColorProfileTag.java (revision 0) @@ -0,0 +1,49 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.fo.pagination.ColorProfile; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +public class ColorProfileTag extends Tag { + + protected ColorProfile cp = null; + + protected ColorProfileTag(Tag parent, ColorProfile cp) { + super(parent); + this.cp = cp; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.SRC, null); + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/ConditionalPageMasterReferenceTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/ConditionalPageMasterReferenceTag.java (revision 0) @@ -0,0 +1,53 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.fo.pagination.ConditionalPageMasterReference; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +public class ConditionalPageMasterReferenceTag extends Tag { + + protected ConditionalPageMasterReference cpmr = null; + + protected ConditionalPageMasterReferenceTag(Tag parent, ConditionalPageMasterReference cpmr) { + super(parent); + this.cpmr = cpmr; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.BLANK_OR_NOT_BLANK, null); + params.put(Properties.MASTER_REFERENCE, null); + params.put(Properties.ODD_OR_EVEN, null); + params.put(Properties.PAGE_POSITION, null); + + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/DeclarationsTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/DeclarationsTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.Declarations; +import org.apache.fop.render.odf.OdfException; + +public class DeclarationsTag extends Tag { + + protected Declarations d = null; + + protected DeclarationsTag(Tag parent, Declarations d) { + super(parent); + this.d = d; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/ExternalGraphicTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/ExternalGraphicTag.java (revision 0) @@ -0,0 +1,350 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Map; +import java.util.Random; + +import org.odftoolkit.odfdom.dom.element.draw.DrawFrameElement; +import org.odftoolkit.odfdom.dom.element.draw.DrawImageElement; +import org.odftoolkit.odfdom.dom.element.text.TextParagraphElementBase; +import org.odftoolkit.odfdom.pkg.OdfXMLFactory; + +import org.apache.commons.io.IOUtils; + +import org.apache.xmlgraphics.image.loader.Image; +import org.apache.xmlgraphics.image.loader.ImageFlavor; +import org.apache.xmlgraphics.image.loader.ImageInfo; +import org.apache.xmlgraphics.image.loader.ImageManager; +import org.apache.xmlgraphics.image.loader.ImageSessionContext; +import org.apache.xmlgraphics.image.loader.impl.ImageRawStream; +import org.apache.xmlgraphics.image.loader.util.ImageUtil; + +import org.apache.fop.apps.FOUserAgent; + +import org.apache.fop.datatypes.LengthBase; +import org.apache.fop.fo.FObj; +import org.apache.fop.fo.flow.AbstractGraphics; +import org.apache.fop.fo.flow.ExternalGraphic; +import org.apache.fop.layoutmgr.inline.ImageLayout; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * External Graphic converter + */ +public class ExternalGraphicTag extends Tag { + + public static class PercentBaseContext implements org.apache.fop.datatypes.PercentBaseContext { + + Image image = null; + + public PercentBaseContext(Image image) { + this.image = image; + } + + public int getBaseLength(int lengthBase, FObj fobj) { + + final ImageInfo info = image.getInfo(); + + switch (lengthBase) { + case LengthBase.IMAGE_INTRINSIC_WIDTH: + return info.getSize().getWidthMpt(); + case LengthBase.IMAGE_INTRINSIC_HEIGHT: + return info.getSize().getHeightMpt(); + default: + return info.getSize().getHeightMpt(); + } + } + } + + public static final String ODT_IMAGES_PATH = "Pictures/"; + + ExternalGraphic eg = null; + + ExternalGraphicTag(Tag parent, ExternalGraphic eg) { + super(parent); + this.eg = eg; + Map params = this.currentStyle.getParameters(); + +// params.put(Properties.alignmentAdjust, null); +// params.put(Properties.alignmentBaseline, null); +// params.put(Properties.baselineShift, null); +// params.put(Properties.displayAlign, null); +// params.put(Properties.dominantBaseline, null); +// params.put(Properties.allowedHeightScale, null); +// params.put(Properties.allowedWidthScale, null); +// params.put(Properties.blockProgressionDimension, null); +// params.put(Properties.contentHeight, null); +// params.put(Properties.contentWidth, null); +// params.put(Properties.height, null); +// params.put(Properties.inlineProgressionDimension, null); +// params.put(Properties.scaling, null); +// params.put(Properties.scalingMethod, null); +// params.put(Properties.width, null); +// params.put(Properties.lineHeight, null); +// params.put(Properties.textAlign, null); +// params.put(Properties.sourceDocument, null); +// params.put(Properties.role, null); +// params.put(Properties.azimuth, null); +// params.put(Properties.cueAfter, null); +// params.put(Properties.cueBefore, null); +// params.put(Properties.elevation, null); +// params.put(Properties.pauseAfter, null); +// params.put(Properties.pauseBefore, null); +// params.put(Properties.pitch, null); +// params.put(Properties.pitchRange, null); +// params.put(Properties.playDuring, null); +// params.put(Properties.richness, null); +// params.put(Properties.speak, null); +// params.put(Properties.speakHeader, null); +// params.put(Properties.speakNumeral, null); +// params.put(Properties.speakPunctuation, null); +// params.put(Properties.speechRate, null); +// params.put(Properties.stress, null); +// params.put(Properties.voiceFamily, null); +// params.put(Properties.volume, null); +// params.put(Properties.backgroundAttachment, null); + params.put(Properties.BACKGROUND_COLOR, Properties.BACKGROUND_COLOR.getColor(eg.getCommonBorderPaddingBackground())); +// params.put(Properties.backgroundImage, null); +// params.put(Properties.backgroundRepeat, null); +// params.put(Properties.backgroundPositionHorizontal, null); +// params.put(Properties.backgroundPositionVertical, null); +// params.put(Properties.borderBeforeColor, null); +// params.put(Properties.borderBeforeStyle, null); +// params.put(Properties.borderBeforeWidth, null); +// params.put(Properties.borderAfterColor, null); +// params.put(Properties.borderAfterStyle, null); +// params.put(Properties.borderAfterWidth, null); +// params.put(Properties.borderStartColor, null); +// params.put(Properties.borderStartStyle, null); +// params.put(Properties.borderStartWidth, null); +// params.put(Properties.borderEndColor, null); +// params.put(Properties.borderEndStyle, null); +// params.put(Properties.borderEndWidth, null); +// params.put(Properties.borderTopColor, null); +// params.put(Properties.borderTopStyle, null); +// params.put(Properties.borderTopWidth, null); +// params.put(Properties.borderBottomColor, null); +// params.put(Properties.borderBottomStyle, null); +// params.put(Properties.borderBottomWidth, null); +// params.put(Properties.borderLeftColor, null); +// params.put(Properties.borderLeftStyle, null); +// params.put(Properties.borderLeftWidth, null); +// params.put(Properties.borderRightColor, null); +// params.put(Properties.borderRightStyle, null); +// params.put(Properties.borderRightWidth, null); +// params.put(Properties.paddingBefore, null); +// params.put(Properties.paddingAfter, null); +// params.put(Properties.paddingStart, null); +// params.put(Properties.paddingEnd, null); +// params.put(Properties.paddingTop, null); +// params.put(Properties.paddingBottom, null); +// params.put(Properties.paddingLeft, null); +// params.put(Properties.paddingRight, null); +// params.put(Properties.marginTopInline, null); +// params.put(Properties.marginBottomInline, null); +// params.put(Properties.marginLeftInline, null); +// params.put(Properties.marginRightInline, null); +// params.put(Properties.spaceEndInline, null); +// params.put(Properties.spaceStartInline, null); +// params.put(Properties.topR, null); +// params.put(Properties.rightR, null); +// params.put(Properties.bottomR, null); +// params.put(Properties.leftR, null); +// params.put(Properties.relativePosition, null); +// params.put(Properties.keepWithNext, null); +// params.put(Properties.keepWithPrevious, null); +// params.put(Properties.clip, null); +// params.put(Properties.overflow, null); +// params.put(Properties.id, null); +// params.put(Properties.src, null); +// params.put(Properties.indexClass, null); +// params.put(Properties.indexKey, null); + + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute() throws OdfException { + + ImageInfo info = null; + FOUserAgent userAgent = eg.getUserAgent(); + ImageManager manager = userAgent.getImageManager(); + + try { + info = manager.getImageInfo(eg.getURL(), userAgent.getImageSessionContext()); + putGraphic(eg, info); + } catch (Exception e) { + throw new OdfException("Can't create an image.", e); + } + } + + private static final ImageFlavor[] FLAVORS = new ImageFlavor[] { + ImageFlavor.RAW_EMF, + ImageFlavor.RAW_PNG, + ImageFlavor.RAW_JPEG + }; + + private void putGraphic(AbstractGraphics abstractGraphic, ImageInfo info) + throws OdfException { + + FOUserAgent userAgent = abstractGraphic.getUserAgent(); + ImageManager manager = userAgent.getImageManager(); + ImageSessionContext sessionContext = userAgent.getImageSessionContext(); + Map hints = ImageUtil.getDefaultHints(sessionContext); + Image image; + try { + image = manager.getImage(info, FLAVORS, hints, sessionContext); + } catch (Exception e) { + throw new OdfException("Can't create an image.", e); + } + + putGraphic(abstractGraphic, image); + } + + private void putGraphic(AbstractGraphics abstractGraphic, Image image) + throws OdfException { + + byte[] rawData; + try { + rawData = getRawData(image); + } catch (IOException e) { + throw new OdfException("Can't create an image.", e); + } + + if (rawData == null) { + return; + } + + ImageLayout layout = getImageLayout(abstractGraphic, image); + + String imageType = image.getInfo().getMimeType().split("/")[1]; + + String filename = createFilename(imageType); + + putImageFileIntoOdt(rawData, filename, imageType); + + DrawImageElement die = createImage(); + + die.setAttributeNS(Namespace.XLINK, "xlink:href", ODT_IMAGES_PATH + filename); + die.setAttributeNS(Namespace.XLINK, "xlink:type", "simple"); + die.setAttributeNS(Namespace.XLINK, "xlink:show", "embed"); + die.setAttributeNS(Namespace.XLINK, "xlink:actuate", "onLoad"); + + DrawFrameElement dfe = createImageFrame(); + + dfe.setAttributeNS(Namespace.SVG, "svg:width", Double.valueOf(layout.getViewportSize().getWidth() / 1000) + "pt"); + dfe.setAttributeNS(Namespace.SVG, "svg:height", Double.valueOf(layout.getViewportSize().getHeight() / 1000) + "pt"); + + addImageToImageFrame(die, dfe); + + addImageFrameToParagraph(dfe, this.getParagraph()); + } + + private byte[] getRawData(Image image) throws IOException { + + byte[] rawData = null; + + if (image instanceof ImageRawStream) { + ImageRawStream rawImage = (ImageRawStream)image; + InputStream in = rawImage.createInputStream(); + try { + rawData = IOUtils.toByteArray(in); + } finally { + IOUtils.closeQuietly(in); + } + } + return rawData; + } + + private ImageLayout getImageLayout(AbstractGraphics abstractGraphic, Image image) { + + PercentBaseContext pContext = new ExternalGraphicTag.PercentBaseContext(image); + + return new ImageLayout( abstractGraphic, + pContext, + image.getInfo().getSize().getDimensionMpt()); + } + + private void putImageFileIntoOdt(byte[] rawData, String filename, String imageType) { + this.getOdt().getPackage().insert(rawData, ODT_IMAGES_PATH + filename, imageType); + } + + private String createFilename(String imageType) { + String filename = null; + + do { + Random randomGenerator = new Random(); + filename = randomGenerator.nextInt(100) + "." + imageType; + } while(this.getOdt().getPackage().contains(ODT_IMAGES_PATH + filename)); + + return filename; + } + + private DrawImageElement createImage() throws OdfException { + DrawImageElement die = null; + try { + die = (DrawImageElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), DrawImageElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create an image.", e); + } + return die; + } + + private DrawFrameElement createImageFrame() { + DrawFrameElement dfe = null; + try { + dfe = (DrawFrameElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), DrawFrameElement.ELEMENT_NAME); + } catch (Exception e) { + e.printStackTrace(); + } + return dfe; + } + + private void addImageToImageFrame(DrawImageElement die, DrawFrameElement dfe) throws OdfException { + try { + dfe.appendChild(die); + } catch (Exception e) { + throw new OdfException("Can't create an image.", e); + } + } + + private void addImageFrameToParagraph(DrawFrameElement dfe, TextParagraphElementBase tpeb) { + try { + tpeb.appendChild(dfe); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } +} --- src/java/org/apache/fop/render/odf/odt/tags/FloatTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/FloatTag.java (revision 0) @@ -0,0 +1,53 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.fo.flow.Float; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +public class FloatTag extends Tag { + + protected Float f = null; + + protected FloatTag(Tag parent, Float f) { + super(parent); + this.f = f; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.CLEAR, null); + params.put(Properties.FLOAT_PROPERTY, null); + params.put(Properties.ID, null); + params.put(Properties.INDEX_CLASS, null); + params.put(Properties.INDEX_KEY, null); + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/FlowAssignmentTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/FlowAssignmentTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class FlowAssignmentTag extends Tag { + + protected Object o = null; + + protected FlowAssignmentTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/FlowMapTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/FlowMapTag.java (revision 0) @@ -0,0 +1,48 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +public class FlowMapTag extends Tag { + + protected Object o = null; + + protected FlowMapTag(Tag parent, Object o) { + super(parent); + this.o = o; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.FLOW_MAP_NAME, null); + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/FlowNameSpecifierTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/FlowNameSpecifierTag.java (revision 0) @@ -0,0 +1,48 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +public class FlowNameSpecifierTag extends Tag { + + protected Object o = null; + + protected FlowNameSpecifierTag(Tag parent, Object o) { + super(parent); + this.o = o; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.FLOW_NAME_REFERENCE, null); + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/FlowSourceListTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/FlowSourceListTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class FlowSourceListTag extends Tag { + + protected Object o = null; + + protected FlowSourceListTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/FlowTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/FlowTag.java (revision 0) @@ -0,0 +1,58 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.fo.pagination.Flow; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * Flow converter. + */ +public class FlowTag extends Tag { + + protected Flow f = null; + + FlowTag(Tag parent, Flow f) { + super(parent); + this.f = f; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.ID, null); + params.put(Properties.FLOW_NAME, null); + params.put(Properties.INDEX_CLASS, null); + params.put(Properties.INDEX_KEY, null); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } +} --- src/java/org/apache/fop/render/odf/odt/tags/FlowTargetListTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/FlowTargetListTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class FlowTargetListTag extends Tag { + + protected Object o = null; + + protected FlowTargetListTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/FolioPrefixTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/FolioPrefixTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class FolioPrefixTag extends Tag { + + protected Object o = null; + + protected FolioPrefixTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/FolioSuffixTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/FolioSuffixTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class FolioSuffixTag extends Tag { + + protected Object o = null; + + protected FolioSuffixTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/FootnoteBodyTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/FootnoteBodyTag.java (revision 0) @@ -0,0 +1,60 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.fo.flow.FootnoteBody; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * FootnoteBodyConverter + */ +public class FootnoteBodyTag extends Tag { + + protected FootnoteBody fb = null; + + protected FootnoteBodyTag(Tag parent, FootnoteBody fb) { + super(parent); + this.fb = fb; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.SOURCE_DOCUMENT, null); + params.put(Properties.ROLE, null); + params.put(Properties.ID, null); + params.put(Properties.INDEX_CLASS, null); + params.put(Properties.INDEX_KEY, null); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/FootnoteTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/FootnoteTag.java (revision 0) @@ -0,0 +1,66 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.fo.flow.Footnote; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * Footnote converter + */ +public class FootnoteTag extends Tag { + + protected Footnote fn = null; + + FootnoteTag(Tag parent, Footnote fn) { + super(parent); + this.fn = fn; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.SOURCE_DOCUMENT, null); + params.put(Properties.ROLE, null); + params.put(Properties.ID, null); + params.put(Properties.INDEX_CLASS, null); + params.put(Properties.INDEX_KEY, null); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { + /*Footnote fn = (Footnote)foNode; + + recurseFONode(fn.getFootnoteCitation()); + recurseFONode(fn.getFootnoteBody()); */ + + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/IndexKeyReferenceTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/IndexKeyReferenceTag.java (revision 0) @@ -0,0 +1,56 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * FootnoteBodyConverter + */ +public class IndexKeyReferenceTag extends Tag { + + protected Object o = null; + + protected IndexKeyReferenceTag(Tag parent, Object o) { + super(parent); + this.o = o; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.PAGE_NUMBER_TREATMENT, null); + params.put(Properties.REF_INDEX_KEY, null); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/IndexPageCitationListSeparatorTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/IndexPageCitationListSeparatorTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class IndexPageCitationListSeparatorTag extends Tag { + + protected Object o = null; + + protected IndexPageCitationListSeparatorTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/IndexPageCitationListTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/IndexPageCitationListTag.java (revision 0) @@ -0,0 +1,50 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +public class IndexPageCitationListTag extends Tag { + + protected Object o = null; + + protected IndexPageCitationListTag(Tag parent, Object o) { + super(parent); + this.o = o; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.MERGE_RANGES_ACROSS_INDEX_KEY_REFERENCES, null); + params.put(Properties.MERGE_SEQUENTIAL_PAGE_NUMBERS, null); + params.put(Properties.MERGE_PAGES_ACROSS_INDEX_KEY_REFERENCES, null); + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/IndexPageCitationRangeSeparatorTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/IndexPageCitationRangeSeparatorTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class IndexPageCitationRangeSeparatorTag extends Tag { + + protected Object o = null; + + protected IndexPageCitationRangeSeparatorTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/IndexPageNumberPrefixTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/IndexPageNumberPrefixTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class IndexPageNumberPrefixTag extends Tag { + + protected Object o = null; + + protected IndexPageNumberPrefixTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/IndexPagePageNumberSuffixTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/IndexPagePageNumberSuffixTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class IndexPagePageNumberSuffixTag extends Tag { + + protected Object o = null; + + protected IndexPagePageNumberSuffixTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/IndexRangeBeginTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/IndexRangeBeginTag.java (revision 0) @@ -0,0 +1,50 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +public class IndexRangeBeginTag extends Tag { + + protected Object o = null; + + protected IndexRangeBeginTag(Tag parent, Object o) { + super(parent); + this.o = o; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.ID, null); + params.put(Properties.INDEX_CLASS, null); + params.put(Properties.INDEX_KEY, null); + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/IndexRangeEndTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/IndexRangeEndTag.java (revision 0) @@ -0,0 +1,48 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +public class IndexRangeEndTag extends Tag { + + protected Object o = null; + + protected IndexRangeEndTag(Tag parent, Object o) { + super(parent); + this.o = o; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.REF_ID, null); + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/InitialPropertySetTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/InitialPropertySetTag.java (revision 0) @@ -0,0 +1,127 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.apache.fop.fo.flow.InitialPropertySet; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +public class InitialPropertySetTag extends Tag { + + protected InitialPropertySet ips = null; + + protected InitialPropertySetTag(Tag parent, InitialPropertySet ips) { + super(parent); + this.ips = ips; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.LINE_HEIGHT, null); +// params.put(Properties.letterSpacing, null); +// params.put(Properties.textDecoration, null); +// params.put(Properties.textShadow, null); +// params.put(Properties.textTransform, null); +// params.put(Properties.wordSpacing, null); +// params.put(Properties.color, null); +// params.put(Properties.sourceDocument, null); +// params.put(Properties.role, null); +// params.put(Properties.azimuth, null); +// params.put(Properties.cueAfter, null); +// params.put(Properties.cueBefore, null); +// params.put(Properties.elevation, null); +// params.put(Properties.pauseAfter, null); +// params.put(Properties.pauseBefore, null); +// params.put(Properties.pitch, null); +// params.put(Properties.pitchRange, null); +// params.put(Properties.playDuring, null); +// params.put(Properties.richness, null); +// params.put(Properties.speak, null); +// params.put(Properties.speakHeader, null); +// params.put(Properties.speakNumeral, null); +// params.put(Properties.speakPunctuation, null); +// params.put(Properties.speechRate, null); +// params.put(Properties.stress, null); +// params.put(Properties.voiceFamily, null); +// params.put(Properties.volume, null); +// params.put(Properties.backgroundAttachment, null); +// params.put(Properties.backgroundColor, null); +// params.put(Properties.backgroundImage, null); +// params.put(Properties.backgroundRepeat, null); +// params.put(Properties.backgroundPositionHorizontal, null); +// params.put(Properties.backgroundPositionVertical, null); +// params.put(Properties.borderBeforeColor, null); +// params.put(Properties.borderBeforeStyle, null); +// params.put(Properties.borderBeforeWidth, null); +// params.put(Properties.borderAfterColor, null); +// params.put(Properties.borderAfterStyle, null); +// params.put(Properties.borderAfterWidth, null); +// params.put(Properties.borderStartColor, null); +// params.put(Properties.borderStartStyle, null); +// params.put(Properties.borderStartWidth, null); +// params.put(Properties.borderEndColor, null); +// params.put(Properties.borderEndStyle, null); +// params.put(Properties.borderEndWidth, null); +// params.put(Properties.borderTopColor, null); +// params.put(Properties.borderTopStyle, null); +// params.put(Properties.borderTopWidth, null); +// params.put(Properties.borderBottomColor, null); +// params.put(Properties.borderBottomStyle, null); +// params.put(Properties.borderBottomWidth, null); +// params.put(Properties.borderLeftColor, null); +// params.put(Properties.borderLeftStyle, null); +// params.put(Properties.borderLeftWidth, null); +// params.put(Properties.borderRightColor, null); +// params.put(Properties.borderRightStyle, null); +// params.put(Properties.borderRightWidth, null); +// params.put(Properties.paddingBefore, null); +// params.put(Properties.paddingAfter, null); +// params.put(Properties.paddingStart, null); +// params.put(Properties.paddingEnd, null); +// params.put(Properties.paddingTop, null); +// params.put(Properties.paddingBottom, null); +// params.put(Properties.paddingLeft, null); +// params.put(Properties.paddingRight, null); +// params.put(Properties.fontFamily, null); +// params.put(Properties.fontSelectionStrategy, null); +// params.put(Properties.fontSize, null); +// params.put(Properties.fontStretch, null); +// params.put(Properties.fontSizeAdjust, null); +// params.put(Properties.fontStyle, null); +// params.put(Properties.fontVariant, null); +// params.put(Properties.fontWeight, null); +// params.put(Properties.topR, null); +// params.put(Properties.rightR, null); +// params.put(Properties.bottomR, null); +// params.put(Properties.leftR, null); +// params.put(Properties.relativePosition, null); +// params.put(Properties.scoreSpaces, null); + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/InlineContainerTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/InlineContainerTag.java (revision 0) @@ -0,0 +1,200 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.odftoolkit.odfdom.dom.OdfContentDom; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.style.StyleTextPropertiesElement; +import org.odftoolkit.odfdom.dom.element.text.TextSpanElement; +import org.odftoolkit.odfdom.pkg.OdfElement; +import org.odftoolkit.odfdom.pkg.OdfXMLFactory; +import org.w3c.dom.Node; + +import org.apache.fop.fo.flow.InlineContainer; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * Inline converter + */ +public class InlineContainerTag extends Tag { + + protected InlineContainer ic = null; + + protected TextSpanElement tse = null; + + InlineContainerTag(Tag parent, InlineContainer ic) throws OdfException { + super(parent); + this.ic = ic; + Map params = this.currentStyle.getParameters(); + + params.put(Properties.ALIGNMENT_ADJUST, null); +// params.put(Properties.alignmentBaseline, null); +// params.put(Properties.baselineShift, null); +// params.put(Properties.displayAlign, null); +// params.put(Properties.dominantBaseline, null); +// params.put(Properties.blockProgressionDimension, null); +// params.put(Properties.height, null); +// params.put(Properties.inlineProgressionDimension, null); +// params.put(Properties.width, null); +// params.put(Properties.lineHeight, null); +// params.put(Properties.backgroundAttachment, null); +// params.put(Properties.backgroundColor, null); +// params.put(Properties.backgroundImage, null); +// params.put(Properties.backgroundRepeat, null); +// params.put(Properties.backgroundPositionHorizontal, null); +// params.put(Properties.backgroundPositionVertical, null); +// params.put(Properties.borderBeforeColor, null); +// params.put(Properties.borderBeforeStyle, null); +// params.put(Properties.borderBeforeWidth, null); +// params.put(Properties.borderAfterColor, null); +// params.put(Properties.borderAfterStyle, null); +// params.put(Properties.borderAfterWidth, null); +// params.put(Properties.borderStartColor, null); +// params.put(Properties.borderStartStyle, null); +// params.put(Properties.borderStartWidth, null); +// params.put(Properties.borderEndColor, null); +// params.put(Properties.borderEndStyle, null); +// params.put(Properties.borderEndWidth, null); +// params.put(Properties.borderTopColor, null); +// params.put(Properties.borderTopStyle, null); +// params.put(Properties.borderTopWidth, null); +// params.put(Properties.borderBottomColor, null); +// params.put(Properties.borderBottomStyle, null); +// params.put(Properties.borderBottomWidth, null); +// params.put(Properties.borderLeftColor, null); +// params.put(Properties.borderLeftStyle, null); +// params.put(Properties.borderLeftWidth, null); +// params.put(Properties.borderRightColor, null); +// params.put(Properties.borderRightStyle, null); +// params.put(Properties.borderRightWidth, null); +// params.put(Properties.paddingBefore, null); +// params.put(Properties.paddingAfter, null); +// params.put(Properties.paddingStart, null); +// params.put(Properties.paddingEnd, null); +// params.put(Properties.paddingTop, null); +// params.put(Properties.paddingBottom, null); +// params.put(Properties.paddingLeft, null); +// params.put(Properties.paddingRight, null); +// params.put(Properties.marginTopInline, null); +// params.put(Properties.marginBottomInline, null); +// params.put(Properties.marginLeftInline, null); +// params.put(Properties.marginRightInline, null); +// params.put(Properties.spaceEndInline, null); +// params.put(Properties.spaceStartInline, null); +// params.put(Properties.topR, null); +// params.put(Properties.rightR, null); +// params.put(Properties.bottomR, null); +// params.put(Properties.leftR, null); +// params.put(Properties.relativePosition, null); +// params.put(Properties.keepTogether, null); +// params.put(Properties.keepWithNext, null); +// params.put(Properties.keepWithPrevious, null); +// params.put(Properties.clip, null); +// params.put(Properties.overflow, null); +// params.put(Properties.referenceOrientation, null); +// params.put(Properties.id, null); +// params.put(Properties.indexClass, null); +// params.put(Properties.indexKey, null); +// params.put(Properties.writingMode, null); + + registerFont(this.currentStyle.getParameters().get(Properties.FONT_FAMILY)); + } + + public TextSpanElement getTextSpanElement() { + return tse; + } + + @Override + protected OdfElement getTextContainer() { + if (this.tse != null) { + return this.tse; + } else { + return parent.getTextContainer(); + } + } + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute() throws OdfException { + try { + tse = (TextSpanElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TextSpanElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create text span.", e); + } + + StyleStyleElement sse = null; + try { + sse = (StyleStyleElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), StyleStyleElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create new style for text span.", e); + } + + sse.setAttributeNS(Namespace.STYLE, "style:family", "text"); + + StyleTextPropertiesElement stpe = null; + + try { + stpe = (StyleTextPropertiesElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), StyleTextPropertiesElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create new style for text span.", e); + } + + stpe.setAttributeNS(Namespace.FO, "fo:font-size", this.currentStyle.get(Properties.FONT_SIZE)); + stpe.setAttributeNS(Namespace.FO, "fo:font-weight", this.currentStyle.get(Properties.FONT_WEIGHT)); + stpe.setAttributeNS(Namespace.FO, "fo:font-style", this.currentStyle.get(Properties.FONT_STYLE)); + stpe.setAttributeNS(Namespace.FO, "fo:color", this.currentStyle.get(Properties.COLOR)); + stpe.setAttributeNS(Namespace.STYLE, "style:font-name", this.currentStyle.get(Properties.FONT_FAMILY)); + + sse.appendChild(stpe); + + try { + OdfContentDom odf = this.getOdt().getContentDom(); + Node odfstyles = odf.getElementsByTagNameNS(Namespace.OFFICE, "automatic-styles").item(0); + odfstyles.appendChild(sse); + } catch (Exception e) { + throw new OdfException("Can't create new style.", e); + } + + tse.setStyleName(this.appendNewStyle(sse)); + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void closeIntercept() throws OdfException { + parent.getTextContainer().appendChild(tse); + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/InlineTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/InlineTag.java (revision 0) @@ -0,0 +1,175 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; + +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.text.TextSpanElement; +import org.odftoolkit.odfdom.pkg.OdfElement; +import org.odftoolkit.odfdom.pkg.OdfXMLFactory; + +import org.apache.fop.fo.flow.Inline; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; +import org.apache.fop.render.odf.properties.Properties; +import org.apache.fop.render.odf.properties.Property; + +/** + * Inline converter + */ +public class InlineTag extends Tag { + + protected Inline inl = null; + + protected TextSpanElement tse = null; + + InlineTag(Tag parent, Inline inl) throws OdfException { + super(parent); + this.inl = inl; + Map params = this.currentStyle.getParameters(); + +// params.put(Properties.alignmentAdjust, null); +// params.put(Properties.alignmentBaseline, null); + params.put(Properties.BASELINE_SHIFT, Properties.BASELINE_SHIFT.getValue(inl.getBaselineShift())); +// params.put(Properties.dominantBaseline, null); +// params.put(Properties.blockProgressionDimension, null); +// params.put(Properties.height, null); +// params.put(Properties.inlineProgressionDimension, null); +// params.put(Properties.width, null); +// params.put(Properties.lineHeight, null); +// params.put(Properties.wrapOption, null); + params.put(Properties.TEXT_DECORATION, Properties.TEXT_DECORATION.getValue(inl)); + params.put(Properties.COLOR, Properties.COLOR.getValue(inl.getColor())); +// params.put(Properties.sourceDocument, null); +// params.put(Properties.role, null); +// params.put(Properties.backgroundAttachment, null); +// params.put(Properties.backgroundColor, null); +// params.put(Properties.backgroundImage, null); +// params.put(Properties.backgroundRepeat, null); +// params.put(Properties.backgroundPositionHorizontal, null); +// params.put(Properties.backgroundPositionVertical, null); +// params.put(Properties.borderBeforeColor, null); +// params.put(Properties.borderBeforeStyle, null); +// params.put(Properties.borderBeforeWidth, null); +// params.put(Properties.borderAfterColor, null); +// params.put(Properties.borderAfterStyle, null); +// params.put(Properties.borderAfterWidth, null); +// params.put(Properties.borderStartColor, null); +// params.put(Properties.borderStartStyle, null); +// params.put(Properties.borderStartWidth, null); +// params.put(Properties.borderEndColor, null); +// params.put(Properties.borderEndStyle, null); +// params.put(Properties.borderEndWidth, null); +// params.put(Properties.borderTopColor, null); +// params.put(Properties.borderTopStyle, null); +// params.put(Properties.borderTopWidth, null); +// params.put(Properties.borderBottomColor, null); +// params.put(Properties.borderBottomStyle, null); +// params.put(Properties.borderBottomWidth, null); +// params.put(Properties.borderLeftColor, null); +// params.put(Properties.borderLeftStyle, null); +// params.put(Properties.borderLeftWidth, null); + params.put(Properties.BORDER_RIGHT_COLOR, null); + params.put(Properties.BORDER_RIGHT_STYLE, null); + params.put(Properties.BORDER_RIGHT_WIDTH, null); + params.put(Properties.PADDING_BEFORE, null); + params.put(Properties.PADDING_AFTER, null); + params.put(Properties.PADDING_START, null); + params.put(Properties.PADDING_END, null); + params.put(Properties.PADDING_TOP, null); + params.put(Properties.PADDING_BOTTOM, null); + params.put(Properties.PADDING_LEFT, null); + params.put(Properties.PADDING_RIGHT, null); + params.put(Properties.FONT_FAMILY, Properties.FONT_FAMILY.getFont(inl.getCommonFont())); + params.put(Properties.FONT_SELECTION_STRATEGY, null); + params.put(Properties.FONT_SIZE, Properties.FONT_SIZE.getFontSize(inl.getCommonFont())); + params.put(Properties.FONT_STRETCH, null); + params.put(Properties.FONT_SIZE_ADJUST, null); + params.put(Properties.FONT_STYLE, Properties.FONT_STYLE.getValue(inl.getCommonFont())); + params.put(Properties.FONT_VARIANT, Properties.FONT_VARIANT.getValue(inl.getCommonFont())); + params.put(Properties.FONT_WEIGHT, Properties.FONT_WEIGHT.getValue(inl.getCommonFont())); +// params.put(Properties.marginTopInline, null); +// params.put(Properties.marginBottomInline, null); +// params.put(Properties.marginLeftInline, null); +// params.put(Properties.marginRightInline, null); +// params.put(Properties.spaceEndInline, null); +// params.put(Properties.spaceStartInline, null); +// params.put(Properties.topR, null); +// params.put(Properties.rightR, null); +// params.put(Properties.bottomR, null); +// params.put(Properties.leftR, null); +// params.put(Properties.relativePosition, null); +// params.put(Properties.keepTogether, null); +// params.put(Properties.keepWithNext, null); +// params.put(Properties.keepWithPrevious, null); +// params.put(Properties.id, null); +// params.put(Properties.visibility, null); +// params.put(Properties.indexClass, null); +// params.put(Properties.indexKey, null); + + registerFont(this.currentStyle.getParameters().get(Properties.FONT_FAMILY)); + } + + public TextSpanElement getTextSpanElement() { + return tse; + } + + @Override + protected OdfElement getTextContainer() { + if (this.tse != null) { + return this.tse; + } else { + return parent.getTextContainer(); + } + } + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute() throws OdfException { + try { + tse = (TextSpanElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TextSpanElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create text span.", e); + } + + StyleStyleElement sse = this.generateOdtStyle(this.currentStyle); + sse.setAttributeNS(Namespace.STYLE, "style:family", "text"); + tse.setStyleName(this.appendNewStyle(sse)); + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void closeIntercept() throws OdfException { + parent.getTextContainer().appendChild(tse); + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/InstreamForeignObjectTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/InstreamForeignObjectTag.java (revision 0) @@ -0,0 +1,46 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.InstreamForeignObject; +import org.apache.fop.render.odf.OdfException; + +/** + * InstreamForeignObject converter + */ +public class InstreamForeignObjectTag extends Tag { + + InstreamForeignObjectTag(Tag parent, InstreamForeignObject foNode) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/LayoutMasterSetTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/LayoutMasterSetTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class LayoutMasterSetTag extends Tag { + + protected Object o = null; + + protected LayoutMasterSetTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/LeaderTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/LeaderTag.java (revision 0) @@ -0,0 +1,49 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.Leader; +import org.apache.fop.render.odf.OdfException; + +/** + * Leader converter + */ +public class LeaderTag extends Tag { + + protected LeaderTag(Tag parent, Leader foNode) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { + // TODO Auto-generated method stub + + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/ListBlockTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/ListBlockTag.java (revision 0) @@ -0,0 +1,71 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.odftoolkit.odfdom.dom.element.text.TextListElement; +import org.odftoolkit.odfdom.pkg.OdfXMLFactory; + +import org.apache.fop.fo.flow.ListBlock; +import org.apache.fop.render.odf.OdfException; + +/** + * ListBlock converter + */ +public class ListBlockTag extends Tag { + + protected TextListElement tle = null; + + ListBlockTag(Tag parent, ListBlock foNode) { + super(parent); + } + + public TextListElement getTextListElement() { + return tle; + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute() throws OdfException { + try { + tle = (TextListElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TextListElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create the list", e); + } + } + + @Override + public void closeIntercept() throws OdfException { + try { + this.getParagraphContainer().appendChild(tle); + } catch (Exception e) { + throw new OdfException("Can't create the list", e); + } + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/ListItemBodyTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/ListItemBodyTag.java (revision 0) @@ -0,0 +1,46 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.ListItemBody; +import org.apache.fop.render.odf.OdfException; + +/** + * ListItemBody converter + */ +public class ListItemBodyTag extends Tag { + + protected ListItemBodyTag(Tag parent, ListItemBody foNode) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + parent.executeFromParent(child); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/ListItemLabelTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/ListItemLabelTag.java (revision 0) @@ -0,0 +1,46 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.ListItemLabel; +import org.apache.fop.render.odf.OdfException; + +/** + * ListItemLabel converter + */ +public class ListItemLabelTag extends Tag { + + ListItemLabelTag(Tag parent, ListItemLabel foNode) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/ListItemTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/ListItemTag.java (revision 0) @@ -0,0 +1,90 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.odftoolkit.odfdom.dom.element.text.TextListItemElement; +import org.odftoolkit.odfdom.pkg.OdfXMLFactory; + +import org.apache.fop.fo.flow.ListItem; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.FopOdtConverter; + +/** + * ListItem converter + */ +public class ListItemTag extends Tag { + + private ListItem xslfoListItem = null; + + private TextListItemElement tlie = null; + + private FopOdtConverter converter = null; + + ListItemTag(Tag parent, ListItem foNode, FopOdtConverter converter) { + super(parent); + this.xslfoListItem = foNode; + this.converter = converter; + } + + public ListItem getXslfoListItem() { + return xslfoListItem; + } + + public TextListItemElement getTextListItemElement() { + return tlie; + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute() throws OdfException { + try { + tlie = (TextListItemElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TextListItemElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create List Item", e); + } + + parent.executeFromParent(this); + + converter.convertRecursively(xslfoListItem.getBody()); + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute(ListBlockTag tag) throws OdfException { + try { + tag.getTextListElement().appendChild(tlie); + } catch (Exception e) { + throw new OdfException("Can't create List Item", e); + } + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/MarkerTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/MarkerTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class MarkerTag extends Tag { + + protected Object o = null; + + MarkerTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/MultiCaseTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/MultiCaseTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.MultiCase; +import org.apache.fop.render.odf.OdfException; + +public class MultiCaseTag extends Tag { + + protected MultiCase mc = null; + + MultiCaseTag(Tag parent, MultiCase mc) { + super(parent); + this.mc = mc; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/MultiPropertiesTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/MultiPropertiesTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.MultiProperties; +import org.apache.fop.render.odf.OdfException; + +public class MultiPropertiesTag extends Tag { + + protected MultiProperties mp = null; + + MultiPropertiesTag(Tag parent, MultiProperties mp) { + super(parent); + this.mp = mp; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/MultiSwitchTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/MultiSwitchTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.MultiSwitch; +import org.apache.fop.render.odf.OdfException; + +public class MultiSwitchTag extends Tag { + + protected MultiSwitch ms = null; + + MultiSwitchTag(Tag parent, MultiSwitch ms) { + super(parent); + this.ms = ms; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/MultiToggleTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/MultiToggleTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.MultiToggle; +import org.apache.fop.render.odf.OdfException; + +public class MultiToggleTag extends Tag { + + protected MultiToggle mt = null; + + MultiToggleTag(Tag parent, MultiToggle mt) { + super(parent); + this.mt = mt; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/PageNumberCitationLastTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/PageNumberCitationLastTag.java (revision 0) @@ -0,0 +1,46 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.PageNumberCitationLast; +import org.apache.fop.render.odf.OdfException; + +/** + * PageNumberCitation converter + */ +public class PageNumberCitationLastTag extends Tag { + + PageNumberCitationLastTag(Tag parent, PageNumberCitationLast foNode) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/PageNumberCitationTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/PageNumberCitationTag.java (revision 0) @@ -0,0 +1,46 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.PageNumberCitation; +import org.apache.fop.render.odf.OdfException; + +/** + * PageNumberCitation converter + */ +public class PageNumberCitationTag extends Tag { + + PageNumberCitationTag(Tag parent, PageNumberCitation foNode) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/PageNumberTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/PageNumberTag.java (revision 0) @@ -0,0 +1,46 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.PageNumber; +import org.apache.fop.render.odf.OdfException; + +/** + * PageNumber converter + */ +public class PageNumberTag extends Tag { + + PageNumberTag(Tag parent, PageNumber foNode) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/PageSequenceMasterTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/PageSequenceMasterTag.java (revision 0) @@ -0,0 +1,46 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.PageSequenceMaster; +import org.apache.fop.render.odf.OdfException; + +/** + * PageNumberCitation converter + */ +public class PageSequenceMasterTag extends Tag { + + PageSequenceMasterTag(Tag parent, PageSequenceMaster foNode) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/PageSequenceTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/PageSequenceTag.java (revision 0) @@ -0,0 +1,113 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.PageSequence; +import org.apache.fop.fo.pagination.PageSequenceMaster; +import org.apache.fop.fo.pagination.SimplePageMaster; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.FopOdtConverter; + +/** + * Defines a number of standard constants (keys) for use by the RendererContext class. + */ +public class PageSequenceTag extends Tag { + + protected PageSequence pageSeq = null; + + protected FopOdtConverter converter = null; + + protected SimplePageMaster pagemaster = null; + + PageSequenceTag(Tag parent, PageSequence pageSeq, FopOdtConverter converter) { + super(parent); + this.pageSeq = pageSeq; + this.converter = converter; + + String reference = pageSeq.getMasterReference(); + this.pagemaster = pageSeq.getRoot().getLayoutMasterSet().getSimplePageMaster(reference); + if (pagemaster == null) { + PageSequenceMaster master = pageSeq.getRoot().getLayoutMasterSet().getPageSequenceMaster(reference); + this.pagemaster = master.getNextSimplePageMaster(false, false, false, false, ""); + } + + //if(!isFirstPageSequence()) this.getOdt().addPageBreak(); + + //read page size and margins, if specified + //only simple-page-master supported, so pagemaster may be null + + //builderContext.pushContainer(sect); + + //Calculate usable page width for this flow + //int useAblePageWidth = pagemaster.getPageWidth().getValue() + // - pagemaster.getCommonMarginBlock().marginLeft.getValue() + // - pagemaster.getCommonMarginBlock().marginRight.getValue() + //percentManager.setDimension(pageSeq, useAblePageWidth); + + //bHeaderSpecified = false; + //bFooterSpecified = false; + + /*Region regionBefore = pagemaster.getRegion(Constants.FO_REGION_BEFORE); + if (regionBefore != null) { + FONode staticBefore = (FONode) pageSequence.getFlowMap().get(regionBefore.getRegionName()); + if (staticBefore != null) recurseFONode(staticBefore); + } + + Region regionAfter = pagemaster.getRegion(Constants.FO_REGION_AFTER); + if (regionAfter != null) { + FONode staticAfter = (FONode) pageSequence.getFlowMap().get(regionAfter.getRegionName()); + if (staticAfter != null) recurseFONode(staticAfter); + }*/ + } + + //private boolean isFirstPageSequence() { + // TODO Auto-generated method stub + // return false; + //} + + /** + * {@inheritDoc} + */ + @Override + public void execute() { + setMargins(); + converter.convertRecursively(pageSeq.getMainFlow()); + } + + private void setMargins() { + //int a = this.pagemaster.getPageWidth().getValue(); + //int b = this.pagemaster.getPageHeight().getValue(); + //int c = this.pagemaster.getCommonMarginBlock().marginLeft.getValue(); + //int d = this.pagemaster.getCommonMarginBlock().marginRight.getValue(); + } + + /** + * {@inheritDoc} + */ + @Override + public void closeIntercept() { + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } +} --- src/java/org/apache/fop/render/odf/odt/tags/PageSequenceWrapperTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/PageSequenceWrapperTag.java (revision 0) @@ -0,0 +1,46 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.PageSequenceWrapper; +import org.apache.fop.render.odf.OdfException; + +/** + * PageNumberCitation converter + */ +public class PageSequenceWrapperTag extends Tag { + + PageSequenceWrapperTag(Tag parent, PageSequenceWrapper foNode) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/RegionAfterTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/RegionAfterTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.RegionAfter; +import org.apache.fop.render.odf.OdfException; + +public class RegionAfterTag extends Tag { + + protected RegionAfter ra = null; + + protected RegionAfterTag(Tag parent, RegionAfter ra) { + super(parent); + this.ra = ra; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/RegionBeforeTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/RegionBeforeTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.RegionBefore; +import org.apache.fop.render.odf.OdfException; + +public class RegionBeforeTag extends Tag { + + protected RegionBefore rb = null; + + protected RegionBeforeTag(Tag parent, RegionBefore rb) { + super(parent); + this.rb = rb; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/RegionBodyTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/RegionBodyTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.RegionBody; +import org.apache.fop.render.odf.OdfException; + +public class RegionBodyTag extends Tag { + + protected RegionBody rb = null; + + protected RegionBodyTag(Tag parent, RegionBody rb) { + super(parent); + this.rb = rb; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/RegionEndTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/RegionEndTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.RegionEnd; +import org.apache.fop.render.odf.OdfException; + +public class RegionEndTag extends Tag { + + protected RegionEnd re = null; + + protected RegionEndTag(Tag parent, RegionEnd re) { + super(parent); + this.re = re; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/RegionNameSpecifierTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/RegionNameSpecifierTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class RegionNameSpecifierTag extends Tag { + + protected Object o = null; + + protected RegionNameSpecifierTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/RegionStartTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/RegionStartTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.RegionStart; +import org.apache.fop.render.odf.OdfException; + +public class RegionStartTag extends Tag { + + protected RegionStart rs = null; + + protected RegionStartTag(Tag parent, RegionStart rs) { + super(parent); + this.rs = rs; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/RepeatablePageMasterAlternativesTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/RepeatablePageMasterAlternativesTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.RepeatablePageMasterAlternatives; +import org.apache.fop.render.odf.OdfException; + +public class RepeatablePageMasterAlternativesTag extends Tag { + + protected RepeatablePageMasterAlternatives rpma = null; + + protected RepeatablePageMasterAlternativesTag(Tag parent, RepeatablePageMasterAlternatives rpma) { + super(parent); + this.rpma = rpma; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/RepeatablePageMasterReferenceTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/RepeatablePageMasterReferenceTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.RepeatablePageMasterReference; +import org.apache.fop.render.odf.OdfException; + +public class RepeatablePageMasterReferenceTag extends Tag { + + protected RepeatablePageMasterReference rpmr = null; + + protected RepeatablePageMasterReferenceTag(Tag parent, RepeatablePageMasterReference rpmr) { + super(parent); + this.rpmr = rpmr; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/RetriveMarkerTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/RetriveMarkerTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class RetriveMarkerTag extends Tag { + + protected Object o = null; + + protected RetriveMarkerTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/RetriveTableMarkerTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/RetriveTableMarkerTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class RetriveTableMarkerTag extends Tag { + + protected Object o = null; + + protected RetriveTableMarkerTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/RootTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/RootTag.java (revision 0) @@ -0,0 +1,93 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.HashMap; +import java.util.Map; +import java.util.Vector; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.text.TextPElement; +import org.odftoolkit.odfdom.pkg.OdfElement; + +import org.apache.fop.render.odf.OdfException; + +/** + * + */ +public class RootTag extends Tag { + + private OdfTextDocument outputOdt = null; + + private Map usedStyles = new HashMap(); + + private Vector usedFonts = new Vector(); + + private TextPElement paragraph = null; + + public RootTag(OdfTextDocument odt) { + super(null); + this.outputOdt = odt; + } + + protected OdfTextDocument getOdt() { + return outputOdt; + } + + @Override + public Map getUsedStyles() { + return usedStyles; + } + + @Override + public Vector getUsedFonts() { + return usedFonts; + } + + @Override + protected TextPElement getParagraph() throws OdfException { + this.paragraph = this.newParagraph(getParagraphContainer()); + return this.paragraph; + } + + @Override + protected OdfElement getParagraphContainer() { + try { + return outputOdt.getContentRoot(); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/ScalingValueCitationTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/ScalingValueCitationTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class ScalingValueCitationTag extends Tag { + + protected Object o = null; + + protected ScalingValueCitationTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/SimplePageMasterReferenceTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/SimplePageMasterReferenceTag.java (revision 0) @@ -0,0 +1,41 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +public class SimplePageMasterReferenceTag extends Tag { + + protected Object o = null; + + protected SimplePageMasterReferenceTag(Tag parent, Object o) { + super(parent); + this.o = o; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/SimplePageMasterTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/SimplePageMasterTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.SimplePageMaster; +import org.apache.fop.render.odf.OdfException; + +public class SimplePageMasterTag extends Tag { + + protected SimplePageMaster spm = null; + + protected SimplePageMasterTag(Tag parent, SimplePageMaster spm) { + super(parent); + this.spm = spm; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/StaticContentTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/StaticContentTag.java (revision 0) @@ -0,0 +1,46 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.StaticContent; +import org.apache.fop.render.odf.OdfException; + +/** + * + */ +public class StaticContentTag extends Tag { + + protected StaticContentTag(Tag parent, StaticContent foNode) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/StaticTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/StaticTag.java (revision 0) @@ -0,0 +1,37 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +/** + * + */ +public class StaticTag extends Tag { + + protected StaticTag(Tag parent) { + super(parent); + } + + @Override + public void execute() { } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } +} --- src/java/org/apache/fop/render/odf/odt/tags/TableAndCaptionTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TableAndCaptionTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.table.TableAndCaption; +import org.apache.fop.render.odf.OdfException; + +public class TableAndCaptionTag extends Tag { + + protected TableAndCaption tac = null; + + protected TableAndCaptionTag(Tag parent, TableAndCaption tac) { + super(parent); + this.tac = tac; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/TableBodyTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TableBodyTag.java (revision 0) @@ -0,0 +1,45 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.table.TableBody; +import org.apache.fop.render.odf.OdfException; + +/** + * TableBody converter + */ +public class TableBodyTag extends Tag { + + TableBodyTag(Tag parent, TableBody tblBody) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + parent.executeFromParent(child); + } +} --- src/java/org/apache/fop/render/odf/odt/tags/TableCaptionTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TableCaptionTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.table.TableCaption; +import org.apache.fop.render.odf.OdfException; + +public class TableCaptionTag extends Tag { + + protected TableCaption tc = null; + + protected TableCaptionTag(Tag parent, TableCaption tc) { + super(parent); + this.tc = tc; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/TableCellTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TableCellTag.java (revision 0) @@ -0,0 +1,138 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.style.StyleTableCellPropertiesElement; +import org.odftoolkit.odfdom.dom.element.table.TableTableCellElement; +import org.odftoolkit.odfdom.pkg.OdfXMLFactory; + +import org.apache.fop.fo.flow.table.TableCell; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +/** + * TableCell converter + */ +public class TableCellTag extends Tag { + + private TableCell tblCell = null; + + private TableTableCellElement tce = null; + + TableCellTag(Tag parent, TableCell tblCell) { + super(parent); + this.tblCell = tblCell; + } + + public TableCell getTableCell() { + return tblCell; + } + + public TableTableCellElement getTableCellElement() { + return tce; + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute() throws OdfException { + + try { + tce = (TableTableCellElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TableTableCellElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create table cell", e); + } + + StyleStyleElement sse = null; + try { + sse = (StyleStyleElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), StyleStyleElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create the style for new table cell", e); + } + + sse.setAttributeNS(Namespace.STYLE, "style:family", "table-cell"); + + StyleTableCellPropertiesElement stcpe = null; + + try { + stcpe = (StyleTableCellPropertiesElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), StyleTableCellPropertiesElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create style fot table cell", e); + } + + float borderSize = Math.round(((float)tblCell.getCommonBorderPaddingBackground().getBorderStartWidth(false)) / 100); + borderSize = borderSize / 10; + stcpe.setAttributeNS(Namespace.FO, "fo:border-left", Float.toString(borderSize) + "pt solid #000000"); + + borderSize = Math.round((float)tblCell.getCommonBorderPaddingBackground().getBorderEndWidth(false) / 100); + borderSize = borderSize / 10; + stcpe.setAttributeNS(Namespace.FO, "fo:border-right", Float.toString(borderSize) + "pt solid #000000"); + + borderSize = Math.round((float)tblCell.getCommonBorderPaddingBackground().getBorderBeforeWidth(false) / 100); + borderSize = borderSize / 10; + stcpe.setAttributeNS(Namespace.FO, "fo:border-top", Float.toString(borderSize) + "pt solid #000000"); + + borderSize = Math.round((float)tblCell.getCommonBorderPaddingBackground().getBorderAfterWidth(false) / 100); + borderSize = borderSize / 10; + stcpe.setAttributeNS(Namespace.FO, "fo:border-bottom", Float.toString(borderSize) + "pt solid #000000"); + + float paddingSize = Math.round((float)tblCell.getCommonBorderPaddingBackground().getPaddingLengthProperty(0).getLengthValue() / 100); + paddingSize = paddingSize / 10; + stcpe.setAttributeNS(Namespace.FO, "fo:padding-left", Float.toString(paddingSize) + "pt"); + + paddingSize = Math.round((float)tblCell.getCommonBorderPaddingBackground().getPaddingLengthProperty(1).getLengthValue() / 100); + paddingSize = paddingSize / 10; + stcpe.setAttributeNS(Namespace.FO, "fo:padding-top", Float.toString(paddingSize) + "pt"); + + paddingSize = Math.round((float)tblCell.getCommonBorderPaddingBackground().getPaddingLengthProperty(2).getLengthValue() / 100); + paddingSize = paddingSize / 10; + stcpe.setAttributeNS(Namespace.FO, "fo:padding-right", Float.toString(paddingSize) + "pt"); + + paddingSize = Math.round((float)tblCell.getCommonBorderPaddingBackground().getPaddingLengthProperty(3).getLengthValue() / 100); + paddingSize = paddingSize / 10; + stcpe.setAttributeNS(Namespace.FO, "fo:padding-bottom", Float.toString(paddingSize) + "pt"); + + sse.appendChild(stcpe); + + tce.setAttributeNS(Namespace.TABLE, "table:number-columns-spanned", Integer.toString(tblCell.getNumberColumnsSpanned())); + tce.setAttributeNS(Namespace.TABLE, "table:number-rows-spanned", Integer.toString(tblCell.getNumberRowsSpanned())); + + tce.setStyleName(this.appendNewStyle(sse)); + + parent.executeFromParent(this); + } + + @Override + public void execute(TableRowTag tag) throws OdfException { + try { + tag.getTableRow().appendChild(tce); + } catch (Exception e) { + throw new OdfException("Can't create table cell", e); + } + } + + public void executeFromParent(TagExecutable child) throws OdfException { + if (this != child) { + child.execute(this); + } + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/TableColumnTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TableColumnTag.java (revision 0) @@ -0,0 +1,46 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.table.TableColumn; +import org.apache.fop.render.odf.OdfException; + +/** + * TableColumn converter + */ +public class TableColumnTag extends Tag { + + TableColumnTag(Tag parent, TableColumn tblColumn) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/TableFooterTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TableFooterTag.java (revision 0) @@ -0,0 +1,39 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.table.TableFooter; +import org.apache.fop.render.odf.OdfException; + +/** + * TableFooter converter + */ +public class TableFooterTag extends Tag { + + TableFooterTag(Tag parent, TableFooter tblFooter) { + super(parent); + } + + @Override + public void execute() { } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/TableHeaderTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TableHeaderTag.java (revision 0) @@ -0,0 +1,46 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.table.TableHeader; +import org.apache.fop.render.odf.OdfException; + +/** + * TableHeader converter + */ +public class TableHeaderTag extends Tag { + + TableHeaderTag(Tag parent, TableHeader tblHeader) { + super(parent); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute() { } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/TableRowTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TableRowTag.java (revision 0) @@ -0,0 +1,75 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.odftoolkit.odfdom.dom.element.table.TableTableRowElement; +import org.odftoolkit.odfdom.pkg.OdfXMLFactory; + +import org.apache.fop.fo.flow.table.TableRow; +import org.apache.fop.render.odf.OdfException; + +/** + * TableRow converter + */ +public class TableRowTag extends Tag { + + private TableTableRowElement tre = null; + + TableRowTag(Tag parent, TableRow tblRow) { + super(parent); + } + + public TableTableRowElement getTableRow() { + return this.tre; + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute() throws OdfException { + try { + tre = (TableTableRowElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TableTableRowElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create table row.", e); + } + + parent.executeFromParent(this); + } + + /** + * {@inheritDoc} + */ + @Override + public void execute(TableTag tag) { + try { + tag.getTable().appendChild(tre); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } +} --- src/java/org/apache/fop/render/odf/odt/tags/TableTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TableTag.java (revision 0) @@ -0,0 +1,98 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.odftoolkit.odfdom.dom.element.table.TableTableColumnElement; +import org.odftoolkit.odfdom.dom.element.table.TableTableElement; +import org.odftoolkit.odfdom.pkg.OdfXMLFactory; +import org.w3c.dom.DOMException; + + +import org.apache.fop.fo.flow.table.Table; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +/** + * Table converter + */ +public class TableTag extends Tag { + + private Table table = null; + + private TableTableElement tte = null; + + TableTag(Tag parent, Table table) { + super(parent); + this.table = table; + } + + public TableTableElement getTable() { + return tte; + } + + /** + * {@inheritDoc} + * @throws OdfException + */ + @Override + public void execute() throws OdfException { + + try { + tte = (TableTableElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TableTableElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create new table.", e); + } + tte.setAttributeNS(Namespace.TABLE, "table:align", "margins"); + + if (table.getColumns().size() > 1) { + TableTableColumnElement tcne = null; + try { + tcne = (TableTableColumnElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TableTableColumnElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create new table column.", e); + } + tcne.setAttributeNS(Namespace.TABLE, + "table:number-columns-repeated", + Integer.toString(table.getColumns().size())); + + try { + tte.appendChild(tcne); + } catch (Exception e) { + throw new OdfException("Can't create table.", e); + } + } + } + + /** + * {@inheritDoc} + */ + @Override + public void closeIntercept() { + try { + this.getParagraphContainer().appendChild(tte); + } catch (DOMException e) { + e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } +} --- src/java/org/apache/fop/render/odf/odt/tags/Tag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/Tag.java (revision 0) @@ -0,0 +1,250 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import java.util.Map; +import java.util.Map.Entry; +import java.util.Random; +import java.util.Vector; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.OdfContentDom; +import org.odftoolkit.odfdom.dom.element.style.StyleFontFaceElement; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.text.TextPElement; +import org.odftoolkit.odfdom.pkg.OdfElement; +import org.odftoolkit.odfdom.pkg.OdfXMLFactory; +import org.w3c.dom.DOMException; +import org.w3c.dom.Node; + +import org.apache.fop.fo.pagination.Flow; +import org.apache.fop.render.odf.FopTagType; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; +import org.apache.fop.render.odf.odt.Style; +import org.apache.fop.render.odf.properties.Property; + +/** + * Tag converter abstract class. + */ +public abstract class Tag implements TagExecutable, TagExecutor { + + protected Tag parent = null; + + protected Style currentStyle = null; + + private static Random rand = new Random(); + + protected Tag(Tag parent) { + this.parent = parent; + if (parent != null) { + currentStyle = new Style(parent.getStyle()); + } else { + currentStyle = new Style(); + } + } + + protected OdfTextDocument getOdt() { + return parent != null ? parent.getOdt() : null; + } + + protected Map getUsedStyles() { + return parent.getUsedStyles(); + } + + protected Vector getUsedFonts() { + return parent.getUsedFonts(); + } + + protected void registerFont(String font) throws OdfException { + if (!this.getUsedFonts().contains(font)) { + StyleFontFaceElement sffe = null; + try { + sffe = (StyleFontFaceElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), StyleFontFaceElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create new style.", e); + } + + if (isOnlyOneParagraph(this.getOdt())) { + removeLastParagraph(this.getOdt()); + } + + sffe.setStyleNameAttribute(font); + sffe.setAttributeNS(Namespace.SVG, "svg:font-family", font); + try { + this.getOdt().getContentDom().getElementsByTagNameNS(Namespace.OFFICE, "font-face-decls").item(0).appendChild(sffe); + } catch (Exception e) { + throw new OdfException("Can't register new font", e); + } + this.getUsedFonts().add(font); + } + } + + private boolean isOnlyOneParagraph(OdfTextDocument textDocument) { + int i = 0; + try { + i = textDocument.getContentDom().getElementsByTagNameNS(Namespace.TEXT, "p").getLength(); + } catch (Exception e) { + return false; + } + return i == 1 ? true : false; + } + + private void removeLastParagraph(OdfTextDocument textDocument) { + try { + textDocument.getContentDom().getElementsByTagNameNS(Namespace.OFFICE, "text").item(0).removeChild(textDocument.getContentDom().getElementsByTagNameNS(Namespace.TEXT, "p").item(0)); + } catch (Exception e) { + e.printStackTrace(); + } + } + + protected Style getStyle() { + return this.currentStyle; + } + + public Tag getParent() { + return parent; + } + + protected OdfElement getTextContainer() { + if (parent != null) { + return parent.getTextContainer(); + } else { + return null; + } + } + + protected TextPElement getParagraph() throws OdfException { + return parent != null ? parent.getParagraph() : null; + } + + protected OdfElement getParagraphContainer() { + return parent != null ? parent.getParagraphContainer() : null; + } + + protected TextPElement newParagraph(Node paragraphContainer) throws OdfException { + + TextPElement tpe = null; + + try { + tpe = (TextPElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), TextPElement.ELEMENT_NAME); + } catch (Exception e1) { + throw new OdfException("Can't create new style.", e1); + } + + try { + paragraphContainer.appendChild(tpe); + } catch (DOMException e) { + throw new OdfException("Can't create new paragraph", e); + } + + return tpe; + } + + protected String appendNewStyle(StyleStyleElement sse) throws OdfException { + + sse.setAttributeNS(Namespace.STYLE, "style:name", ""); + + String styleName = Style.getStyleName(this.getUsedStyles(), sse); + + if (styleName == null) { + styleName = generateName(); + sse.setAttributeNS(Namespace.STYLE, "style:name", styleName); + + try { + OdfContentDom odf = this.getOdt().getContentDom(); + Node odfstyles = odf.getElementsByTagNameNS(Namespace.OFFICE, "automatic-styles").item(0); + odfstyles.appendChild(sse); + } catch (Exception e) { + throw new OdfException("Can't create new style.", e); + } + + this.getUsedStyles().put(styleName, sse); + } + + return styleName; + } + + private String generateName() { + return Integer.toString(rand.nextInt()); + } + + public abstract void execute() throws OdfException; + + public Tag execute(Flow fl, FopTagType type) { + return this; + } + + protected StyleStyleElement generateOdtStyle(Style currentStyle) throws OdfException { + StyleStyleElement sse = null; + try { + sse = (StyleStyleElement) OdfXMLFactory.newOdfElement(this.getOdt().getContentDom(), StyleStyleElement.ELEMENT_NAME); + } catch (Exception e) { + throw new OdfException("Can't create new style for paragraph.", e); + } + + Map params = this.currentStyle.getParameters(); + + for (Entry e : params.entrySet()) { + if (e.getKey().isInheritable()) { + e.getKey().execute(sse, this.currentStyle.get(e.getKey()), this.getOdt()); + } else { + e.getKey().execute(sse, e.getValue(), this.getOdt()); + } + } + + return sse; + } + + public void closeIntercept() throws OdfException { } + + public void execute(Tag tag) throws OdfException { } + + public void execute(BlockTag tag) throws OdfException { + this.execute((Tag) tag); + } + + public void execute(InlineTag tag) throws OdfException { + this.execute((Tag) tag); + } + + public void execute(BasicLinkTag tag) throws OdfException { + this.execute((Tag) tag); + } + + public void execute(TableTag tag) throws OdfException { + this.execute((Tag) tag); + } + + public void execute(TableRowTag tag) throws OdfException { + this.execute((Tag) tag); + } + + public void execute(TableCellTag tag) throws OdfException { + this.execute((Tag) tag); + } + + public void execute(ListBlockTag tag) throws OdfException { + this.execute((Tag) tag); + } + + public void execute(ListItemTag tag) throws OdfException { + this.execute((Tag) tag); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/TagExecutable.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TagExecutable.java (revision 0) @@ -0,0 +1,44 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +/** + * Interface for the class that accept parent visitor. + */ +public interface TagExecutable { + + void execute(Tag tag) throws OdfException; + + void execute(BlockTag tag) throws OdfException; + + void execute(InlineTag tag) throws OdfException; + + void execute(BasicLinkTag tag) throws OdfException; + + void execute(TableTag tag) throws OdfException; + + void execute(TableRowTag tag) throws OdfException; + + void execute(TableCellTag tag) throws OdfException; + + void execute(ListBlockTag tag) throws OdfException; + + void execute(ListItemTag tag) throws OdfException; +} --- src/java/org/apache/fop/render/odf/odt/tags/TagExecutor.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TagExecutor.java (revision 0) @@ -0,0 +1,28 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +/** + * Interface of the converter class that wants to execute in order to its parent converter + */ +public interface TagExecutor { + + void executeFromParent(TagExecutable child) throws OdfException; +} --- src/java/org/apache/fop/render/odf/odt/tags/TagFactory.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TagFactory.java (revision 0) @@ -0,0 +1,134 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.FONode; +import org.apache.fop.fo.FOText; +import org.apache.fop.fo.flow.BasicLink; +import org.apache.fop.fo.flow.BidiOverride; +import org.apache.fop.fo.flow.Block; +import org.apache.fop.fo.flow.BlockContainer; +import org.apache.fop.fo.flow.Character; +import org.apache.fop.fo.flow.ExternalGraphic; +import org.apache.fop.fo.flow.Footnote; +import org.apache.fop.fo.flow.FootnoteBody; +import org.apache.fop.fo.flow.Inline; +import org.apache.fop.fo.flow.InstreamForeignObject; +import org.apache.fop.fo.flow.Leader; +import org.apache.fop.fo.flow.ListBlock; +import org.apache.fop.fo.flow.ListItem; +import org.apache.fop.fo.flow.ListItemBody; +import org.apache.fop.fo.flow.ListItemLabel; +import org.apache.fop.fo.flow.PageNumber; +import org.apache.fop.fo.flow.PageNumberCitation; +import org.apache.fop.fo.flow.table.Table; +import org.apache.fop.fo.flow.table.TableBody; +import org.apache.fop.fo.flow.table.TableCell; +import org.apache.fop.fo.flow.table.TableColumn; +import org.apache.fop.fo.flow.table.TableFooter; +import org.apache.fop.fo.flow.table.TableHeader; +import org.apache.fop.fo.flow.table.TableRow; +import org.apache.fop.fo.pagination.ColorProfile; +import org.apache.fop.fo.pagination.Declarations; +import org.apache.fop.fo.pagination.Flow; +import org.apache.fop.fo.pagination.PageSequence; +import org.apache.fop.fo.pagination.StaticContent; +import org.apache.fop.fo.pagination.bookmarks.Bookmark; +import org.apache.fop.fo.pagination.bookmarks.BookmarkTitle; +import org.apache.fop.fo.pagination.bookmarks.BookmarkTree; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.FopOdtConverter; + +/** + * Factory that creates tag converters + */ +public class TagFactory { + + public Tag getTag(FopOdtConverter converter, FONode foNode, Tag actualTag) throws OdfException { + if (foNode instanceof PageSequence) { + return new PageSequenceTag(actualTag, (PageSequence) foNode, converter); + } else if (foNode instanceof Flow) { + return new FlowTag(actualTag, (Flow) foNode); + } else if (foNode instanceof StaticContent) { + return new StaticContentTag(actualTag, (StaticContent) foNode); + } else if (foNode instanceof ExternalGraphic) { + return new ExternalGraphicTag(actualTag, (ExternalGraphic) foNode); + } else if (foNode instanceof InstreamForeignObject) { + return new InstreamForeignObjectTag(actualTag, (InstreamForeignObject) foNode); + } else if (foNode instanceof Block) { + return new BlockTag(actualTag, (Block) foNode); + } else if (foNode instanceof BlockContainer) { + return new BlockContainerTag(actualTag, (BlockContainer) foNode); + } else if (foNode instanceof BasicLink) { + return new BasicLinkTag(actualTag, (BasicLink) foNode); + } else if (foNode instanceof Inline) { + return new InlineTag(actualTag, (Inline) foNode); + } else if (foNode instanceof FOText) { + return new Text(actualTag, (FOText) foNode); + } else if (foNode instanceof Character) { + return new CharacterTag(actualTag, (Character) foNode); + } else if (foNode instanceof PageNumber) { + return new PageNumberTag(actualTag, (PageNumber) foNode); + } else if (foNode instanceof Footnote) { + return new FootnoteTag(actualTag, (Footnote) foNode); + } else if (foNode instanceof FootnoteBody) { + return new FootnoteBodyTag(actualTag, (FootnoteBody) foNode); + } else if (foNode instanceof ListBlock) { + return new ListBlockTag(actualTag, (ListBlock) foNode); + } else if (foNode instanceof ListItemBody) { + return new ListItemBodyTag(actualTag, (ListItemBody) foNode); + } else if (foNode instanceof ListItem) { + return new ListItemTag(actualTag, (ListItem) foNode, converter); + } else if (foNode instanceof ListItemLabel) { + return new ListItemLabelTag(actualTag, (ListItemLabel) foNode); + } else if (foNode instanceof Table) { + return new TableTag(actualTag, (Table) foNode); + } else if (foNode instanceof TableHeader) { + return new TableHeaderTag(actualTag, (TableHeader) foNode); + } else if (foNode instanceof TableFooter) { + return new TableFooterTag(actualTag, (TableFooter) foNode); + } else if (foNode instanceof TableBody) { + return new TableBodyTag(actualTag, (TableBody) foNode); + } else if (foNode instanceof TableColumn) { + return new TableColumnTag(actualTag, (TableColumn) foNode); + } else if (foNode instanceof TableRow) { + return new TableRowTag(actualTag, (TableRow) foNode); + } else if (foNode instanceof TableCell) { + return new TableCellTag(actualTag, (TableCell) foNode); + } else if (foNode instanceof Leader) { + return new LeaderTag(actualTag, (Leader) foNode); + } else if (foNode instanceof PageNumberCitation) { + return new PageNumberCitationTag(actualTag, (PageNumberCitation) foNode); + } else if (foNode instanceof BidiOverride) { + return new BidiOverrideTag(actualTag, (BidiOverride) foNode); + } else if (foNode instanceof Bookmark) { + return new BookmarkTag(actualTag, (Bookmark) foNode); + } else if (foNode instanceof BookmarkTitle) { + return new BookmarkTitleTag(actualTag, (BookmarkTitle) foNode); + } else if (foNode instanceof BookmarkTree) { + return new BookmarkTreeTag(actualTag, (BookmarkTree) foNode); + } else if (foNode instanceof ColorProfile) { + return new ColorProfileTag(actualTag, (ColorProfile) foNode); + } else if (foNode instanceof Declarations) { + return new DeclarationsTag(actualTag, (Declarations) foNode); + } else { + return new UnknownTag(actualTag); + } + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/Text.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/Text.java (revision 0) @@ -0,0 +1,135 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.odftoolkit.odfdom.dom.element.text.TextLineBreakElement; +import org.odftoolkit.odfdom.dom.element.text.TextSElement; +import org.odftoolkit.odfdom.dom.element.text.TextTabElement; +import org.odftoolkit.odfdom.pkg.OdfElement; +import org.odftoolkit.odfdom.pkg.OdfFileDom; + +import org.apache.fop.fo.FOText; +import org.apache.fop.render.odf.OdfException; + +/** + * Text converter + */ +public class Text extends Tag { + + protected FOText t = null; + + private String string = null; + + Text(Tag parent, FOText t) { + super(parent); + this.t = t; + this.string = t.getCharSequence().toString(); + } + + @Override + public void execute() throws OdfException { + + if (string.length() == 0) { + return; + } + + parent.executeFromParent(this); + } + + @Override + public void execute(Tag parent) throws OdfException { + if (string != null && !string.equals("")) { + appendTextElements(parent.getTextContainer(), string, true); + } + } + + public void executeFromParent(TagExecutable child) throws OdfException { + if (this != child) { + child.execute(this); + } + } + + /** + * Function came from Apache simple-odf-0.6.6 (incubation) + * Paragraph.java:667 + * http://incubator.apache.org/odftoolkit/simple/index.html + * @param ownerElement + * @param content + * @param isWhitespaceCollapsed + */ + private void appendTextElements(OdfElement ownerElement, String content, boolean isWhitespaceCollapsed) { + OdfFileDom ownerDocument = (OdfFileDom) ownerElement.getOwnerDocument(); + if (isWhitespaceCollapsed) { + int i = 0; + int length = content.length(); + String str = ""; + while (i < length) { + char ch = content.charAt(i); + if (ch == ' ') { + int j = 1; + i++; + while ((i < length) && (content.charAt(i) == ' ')) { + j++; + i++; + } + if (j == 1) { + str += ' '; + } else { + str += ' '; + org.w3c.dom.Text textnode = ownerDocument.createTextNode(str); + ownerElement.appendChild(textnode); + str = ""; + TextSElement spaceElement = ownerDocument.newOdfElement(TextSElement.class); + ownerElement.appendChild(spaceElement); + spaceElement.setTextCAttribute(j - 1); + } + } else if (ch == '\n') { + if (str.length() > 0) { + org.w3c.dom.Text textnode = ownerDocument.createTextNode(str); + ownerElement.appendChild(textnode); + str = ""; + } + TextLineBreakElement lineBreakElement = ownerDocument.newOdfElement(TextLineBreakElement.class); + ownerElement.appendChild(lineBreakElement); + i++; + } else if (ch == '\t') { + if (str.length() > 0) { + org.w3c.dom.Text textnode = ownerElement.getOwnerDocument().createTextNode(str); + ownerElement.appendChild(textnode); + str = ""; + } + TextTabElement tabElement = ownerDocument.newOdfElement(TextTabElement.class); + ownerElement.appendChild(tabElement); + i++; + } else if (ch == '\r') { + i++; + } else { + str += ch; + i++; + } + } + if (str.length() > 0) { + org.w3c.dom.Text textnode = ownerDocument.createTextNode(str); + ownerElement.appendChild(textnode); + } + } else { + org.w3c.dom.Text textnode = ownerDocument.createTextNode(content); + ownerElement.appendChild(textnode); + } + } +} --- src/java/org/apache/fop/render/odf/odt/tags/TitleTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/TitleTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.pagination.Title; +import org.apache.fop.render.odf.OdfException; + +public class TitleTag extends Tag { + + protected Title t = null; + + protected TitleTag(Tag parent, Title t) { + super(parent); + this.t = t; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/UnknownTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/UnknownTag.java (revision 0) @@ -0,0 +1,38 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.render.odf.OdfException; + +/** + * Unknown tag converter + */ +public class UnknownTag extends Tag { + + protected UnknownTag(Tag parent) { + super(parent); + } + + @Override + public void execute() { } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/WrapperTag.java (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/WrapperTag.java (revision 0) @@ -0,0 +1,42 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.odt.tags; + +import org.apache.fop.fo.flow.Wrapper; +import org.apache.fop.render.odf.OdfException; + +public class WrapperTag extends Tag { + + protected Wrapper w = null; + + protected WrapperTag(Tag parent, Wrapper w) { + super(parent); + this.w = w; + } + + @Override + public void execute() throws OdfException { + // TODO Auto-generated method stub + + } + + public void executeFromParent(TagExecutable child) throws OdfException { + child.execute(this); + } + +} --- src/java/org/apache/fop/render/odf/odt/tags/package.html (revision 0) +++ src/java/org/apache/fop/render/odf/odt/tags/package.html (revision 0) @@ -0,0 +1,23 @@ + + + +org.apache.fop.render.odt.tags Package + +

Converters of xslfo xml tags to odt xml tags

+ + --- src/java/org/apache/fop/render/odf/FopTagType.java (revision 0) +++ src/java/org/apache/fop/render/odf/FopTagType.java (revision 0) @@ -0,0 +1,26 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf; + +/** + * Defines START and END tags helping to detect hierarchical structure of xslfo. + */ +public enum FopTagType { + START, + END; +} --- src/java/org/apache/fop/render/odf/ODTFOEventHandlerMaker.java (revision 0) +++ src/java/org/apache/fop/render/odf/ODTFOEventHandlerMaker.java (revision 0) @@ -0,0 +1,63 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf; + +import java.io.OutputStream; + +import org.apache.fop.apps.FOUserAgent; +import org.apache.fop.apps.MimeConstants; +import org.apache.fop.fo.FOEventHandler; +import org.apache.fop.render.AbstractFOEventHandlerMaker; + +/** + * Maker class for ODT support. + */ +public class ODTFOEventHandlerMaker extends AbstractFOEventHandlerMaker { + + private static final String[] MIMES = new String[] { + MimeConstants.MIME_ODT + }; + + + /** + * {@inheritDoc} + * @param ua FOUserAgent + * @param out OutputStream + * @return created ODTHandler + */ + public FOEventHandler makeFOEventHandler(FOUserAgent ua, OutputStream out) { + return new ODTHandler(ua, out); + } + + /** + * {@inheritDoc} + * @return true, if an outputstream is needed + */ + public boolean needsOutputStream() { + return true; + } + + /** + * {@inheritDoc} + * @return array of MIME types + */ + public String[] getSupportedMimeTypes() { + return MIMES; + } + +} --- src/java/org/apache/fop/render/odf/properties/AbsolutePosition.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/AbsolutePosition.java (revision 0) @@ -0,0 +1,31 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class AbsolutePosition extends Property { + + private static AbsolutePosition instance = new AbsolutePosition(); + + public static AbsolutePosition getInstance() { + return instance; + } + + private AbsolutePosition() { + this.inheritable = false; + } +} --- src/java/org/apache/fop/render/odf/properties/ActiveState.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ActiveState.java (revision 0) @@ -0,0 +1,31 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ActiveState extends Property { + + private static ActiveState instance = new ActiveState(); + + public static ActiveState getInstance() { + return instance; + } + + private ActiveState() { + this.inheritable = false; + } +} --- src/java/org/apache/fop/render/odf/properties/AlignmentAdjust.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/AlignmentAdjust.java (revision 0) @@ -0,0 +1,31 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class AlignmentAdjust extends Property { + + private static AlignmentAdjust instance = new AlignmentAdjust(); + + public static AlignmentAdjust getInstance() { + return instance; + } + + private AlignmentAdjust() { + this.inheritable = false; + } +} --- src/java/org/apache/fop/render/odf/properties/AlignmentBaseline.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/AlignmentBaseline.java (revision 0) @@ -0,0 +1,31 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class AlignmentBaseline extends Property { + + private static AlignmentBaseline instance = new AlignmentBaseline(); + + public static AlignmentBaseline getInstance() { + return instance; + } + + private AlignmentBaseline() { + this.inheritable = false; + } +} --- src/java/org/apache/fop/render/odf/properties/AllowedHeightScale.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/AllowedHeightScale.java (revision 0) @@ -0,0 +1,31 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class AllowedHeightScale extends Property { + + private static AllowedHeightScale instance = new AllowedHeightScale(); + + public static AllowedHeightScale getInstance() { + return instance; + } + + private AllowedHeightScale() { + this.inheritable = true; + } +} --- src/java/org/apache/fop/render/odf/properties/AllowedWidthScale.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/AllowedWidthScale.java (revision 0) @@ -0,0 +1,31 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class AllowedWidthScale extends Property { + + private static AllowedWidthScale instance = new AllowedWidthScale(); + + public static AllowedWidthScale getInstance() { + return instance; + } + + private AllowedWidthScale() { + this.inheritable = true; + } +} --- src/java/org/apache/fop/render/odf/properties/AutoRestore.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/AutoRestore.java (revision 0) @@ -0,0 +1,31 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class AutoRestore extends Property { + + private static AutoRestore instance = new AutoRestore(); + + public static AutoRestore getInstance() { + return instance; + } + + private AutoRestore() { + this.inheritable = false; + } +} --- src/java/org/apache/fop/render/odf/properties/Azimuth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Azimuth.java (revision 0) @@ -0,0 +1,32 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Azimuth extends Property { + + private static Azimuth instance = new Azimuth(); + + public static Azimuth getInstance() { + return instance; + } + + private Azimuth() { + this.inheritable = true; + } + +} --- src/java/org/apache/fop/render/odf/properties/BackgroundAttachment.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BackgroundAttachment.java (revision 0) @@ -0,0 +1,32 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BackgroundAttachment extends Property { + + private static BackgroundAttachment instance = new BackgroundAttachment(); + + public static BackgroundAttachment getInstance() { + return instance; + } + + private BackgroundAttachment() { + this.inheritable = false; + } + +} --- src/java/org/apache/fop/render/odf/properties/BackgroundColor.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BackgroundColor.java (revision 0) @@ -0,0 +1,57 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import java.awt.Color; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleParagraphPropertiesElement; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; + +import org.apache.fop.fo.properties.CommonBorderPaddingBackground; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class BackgroundColor extends Property { + + private static BackgroundColor instance = new BackgroundColor(); + + public static BackgroundColor getInstance() { + return instance; + } + + private BackgroundColor() { + this.inheritable = false; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleParagraphPropertiesElement sppe = (StyleParagraphPropertiesElement) this.getElement(StyleParagraphPropertiesElement.class, StyleParagraphPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + sppe.setAttributeNS(Namespace.FO, "fo:background-color", value); + } + + public String getColor(CommonBorderPaddingBackground commonBorderPaddingBackground) { + Color color = commonBorderPaddingBackground.backgroundColor; + if (color == null) { + return null; + } + return "#" + Integer.toHexString(color.getRed()) + + Integer.toHexString(color.getGreen()) + + Integer.toHexString(color.getBlue()); + } +} --- src/java/org/apache/fop/render/odf/properties/BackgroundImage.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BackgroundImage.java (revision 0) @@ -0,0 +1,32 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BackgroundImage extends Property { + + private static BackgroundImage instance = new BackgroundImage(); + + public static BackgroundImage getInstance() { + return instance; + } + + private BackgroundImage() { + this.inheritable = false; + } + +} --- src/java/org/apache/fop/render/odf/properties/BackgroundPositionHorizontal.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BackgroundPositionHorizontal.java (revision 0) @@ -0,0 +1,32 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BackgroundPositionHorizontal extends Property { + + private static BackgroundPositionHorizontal instance = new BackgroundPositionHorizontal(); + + public static BackgroundPositionHorizontal getInstance() { + return instance; + } + + private BackgroundPositionHorizontal() { + this.inheritable = false; + } + +} --- src/java/org/apache/fop/render/odf/properties/BackgroundPositionVertical.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BackgroundPositionVertical.java (revision 0) @@ -0,0 +1,32 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BackgroundPositionVertical extends Property { + + private static BackgroundPositionVertical instance = new BackgroundPositionVertical(); + + public static BackgroundPositionVertical getInstance() { + return instance; + } + + private BackgroundPositionVertical() { + this.inheritable = false; + } + +} --- src/java/org/apache/fop/render/odf/properties/BackgroundRepeat.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BackgroundRepeat.java (revision 0) @@ -0,0 +1,32 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BackgroundRepeat extends Property { + + private static BackgroundRepeat instance = new BackgroundRepeat(); + + public static BackgroundRepeat getInstance() { + return instance; + } + + private BackgroundRepeat() { + this.inheritable = false; + } + +} --- src/java/org/apache/fop/render/odf/properties/BaselineShift.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BaselineShift.java (revision 0) @@ -0,0 +1,68 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.style.StyleTextPropertiesElement; + +import org.apache.fop.datatypes.Length; +import org.apache.fop.fo.Constants; +import org.apache.fop.fo.expr.PropertyException; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class BaselineShift extends Property { + + private static BaselineShift instance = new BaselineShift(); + + public static BaselineShift getInstance() { + return instance; + } + + private BaselineShift() { + this.inheritable = false; + } + + public String getValue(Length baselineShift) { + if (baselineShift == null) { + return null; + } + String value = null; + + if (baselineShift.getEnum() == Constants.EN_SUB) { + value = "sub"; + } else if (baselineShift.getEnum() == Constants.EN_SUPER) { + value = "super"; + } else if (baselineShift.getEnum() != 12) { + try { + value = Double.valueOf( ((12000 + (double)baselineShift.getNumericValue())) / 120 - 100) + "%"; + } catch (PropertyException e) { + value = 0.0 + "%"; + } + } + + return value; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleTextPropertiesElement stpe = (StyleTextPropertiesElement) this.getElement(StyleTextPropertiesElement.class, StyleTextPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + stpe.setAttributeNS(Namespace.STYLE, "style:text-position", value); + } +} --- src/java/org/apache/fop/render/odf/properties/BlankOrNotBlank.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BlankOrNotBlank.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BlankOrNotBlank extends Property { + + private static BlankOrNotBlank instance = new BlankOrNotBlank(); + + public static BlankOrNotBlank getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/BlockProgressionDimension.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BlockProgressionDimension.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BlockProgressionDimension extends Property { + + private static BlockProgressionDimension instance = new BlockProgressionDimension(); + + public static BlockProgressionDimension getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/BorderAfterColor.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderAfterColor.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderAfterColor extends Property { + + private static BorderAfterColor instance = new BorderAfterColor(); + + public static BorderAfterColor getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderAfterPrecedence.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderAfterPrecedence.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderAfterPrecedence extends Property { + + private static BorderAfterPrecedence instance = new BorderAfterPrecedence(); + + public static BorderAfterPrecedence getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/BorderAfterStyle.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderAfterStyle.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderAfterStyle extends Property { + + private static BorderAfterStyle instance = new BorderAfterStyle(); + + public static BorderAfterStyle getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderAfterWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderAfterWidth.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderAfterWidth extends Property { + + private static BorderAfterWidth instance = new BorderAfterWidth(); + + public static BorderAfterWidth getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderBeforeColor.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderBeforeColor.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderBeforeColor extends Property { + + private static BorderBeforeColor instance = new BorderBeforeColor(); + + public static BorderBeforeColor getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderBeforePrecedence.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderBeforePrecedence.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderBeforePrecedence extends Property { + + private static BorderBeforePrecedence instance = new BorderBeforePrecedence(); + + public static BorderBeforePrecedence getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/BorderBeforeStyle.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderBeforeStyle.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderBeforeStyle extends Property { + + private static BorderBeforeStyle instance = new BorderBeforeStyle(); + + public static BorderBeforeStyle getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderBeforeWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderBeforeWidth.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderBeforeWidth extends Property { + + private static BorderBeforeWidth instance = new BorderBeforeWidth(); + + public static BorderBeforeWidth getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderBottomColor.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderBottomColor.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderBottomColor extends Property { + + private static BorderBottomColor instance = new BorderBottomColor(); + + public static BorderBottomColor getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderBottomStyle.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderBottomStyle.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderBottomStyle extends Property { + + private static BorderBottomStyle instance = new BorderBottomStyle(); + + public static BorderBottomStyle getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderBottomWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderBottomWidth.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderBottomWidth extends Property { + + private static BorderBottomWidth instance = new BorderBottomWidth(); + + public static BorderBottomWidth getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderCollapse.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderCollapse.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderCollapse extends Property { + + private static BorderCollapse instance = new BorderCollapse(); + + public static BorderCollapse getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/BorderEndColor.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderEndColor.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderEndColor extends Property { + + private static BorderEndColor instance = new BorderEndColor(); + + public static BorderEndColor getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderEndPrecedence.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderEndPrecedence.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderEndPrecedence extends Property { + + private static BorderEndPrecedence instance = new BorderEndPrecedence(); + + public static BorderEndPrecedence getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/BorderEndStyle.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderEndStyle.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderEndStyle extends Property { + + private static BorderEndStyle instance = new BorderEndStyle(); + + public static BorderEndStyle getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderEndWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderEndWidth.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderEndWidth extends Property { + + private static BorderEndWidth instance = new BorderEndWidth(); + + public static BorderEndWidth getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderLeftColor.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderLeftColor.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderLeftColor extends Property { + + private static BorderLeftColor instance = new BorderLeftColor(); + + public static BorderLeftColor getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderLeftStyle.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderLeftStyle.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderLeftStyle extends Property { + + private static BorderLeftStyle instance = new BorderLeftStyle(); + + public static BorderLeftStyle getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderLeftWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderLeftWidth.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderLeftWidth extends Property { + + private static BorderLeftWidth instance = new BorderLeftWidth(); + + public static BorderLeftWidth getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderRightColor.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderRightColor.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderRightColor extends Property { + + private static BorderRightColor instance = new BorderRightColor(); + + public static BorderRightColor getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderRightStyle.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderRightStyle.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderRightStyle extends Property { + + private static BorderRightStyle instance = new BorderRightStyle(); + + public static BorderRightStyle getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderRightWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderRightWidth.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderRightWidth extends Property { + + private static BorderRightWidth instance = new BorderRightWidth(); + + public static BorderRightWidth getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderSeparation.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderSeparation.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderSeparation extends Property { + + private static BorderSeparation instance = new BorderSeparation(); + + public static BorderSeparation getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/BorderStartColor.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderStartColor.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderStartColor extends Property { + + private static BorderStartColor instance = new BorderStartColor(); + + public static BorderStartColor getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderStartPrecedence.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderStartPrecedence.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderStartPrecedence extends Property { + + private static BorderStartPrecedence instance = new BorderStartPrecedence(); + + public static BorderStartPrecedence getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/BorderStartStyle.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderStartStyle.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderStartStyle extends Property { + + private static BorderStartStyle instance = new BorderStartStyle(); + + public static BorderStartStyle getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderStartWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderStartWidth.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderStartWidth extends Property { + + private static BorderStartWidth instance = new BorderStartWidth(); + + public static BorderStartWidth getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderTopColor.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderTopColor.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderTopColor extends Property { + + private static BorderTopColor instance = new BorderTopColor(); + + public static BorderTopColor getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderTopStyle.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderTopStyle.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderTopStyle extends Property { + + private static BorderTopStyle instance = new BorderTopStyle(); + + public static BorderTopStyle getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BorderTopWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BorderTopWidth.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BorderTopWidth extends Property { + + private static BorderTopWidth instance = new BorderTopWidth(); + + public static BorderTopWidth getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/Bottom.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Bottom.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Bottom extends Property { + + private static Bottom instance = new Bottom(); + + public static Bottom getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/BottomR.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BottomR.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BottomR extends Property { + + private static BottomR instance = new BottomR(); + + public static BottomR getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BreakAfter.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BreakAfter.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BreakAfter extends Property { + + private static BreakAfter instance = new BreakAfter(); + + public static BreakAfter getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/BreakBefore.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/BreakBefore.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class BreakBefore extends Property { + + private static BreakBefore instance = new BreakBefore(); + + public static BreakBefore getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/CaptionSide.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/CaptionSide.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class CaptionSide extends Property { + + private static CaptionSide instance = new CaptionSide(); + + public static CaptionSide getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/CaseName.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/CaseName.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class CaseName extends Property { + + private static CaseName instance = new CaseName(); + + public static CaseName getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/CaseTitle.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/CaseTitle.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class CaseTitle extends Property { + + private static CaseTitle instance = new CaseTitle(); + + public static CaseTitle getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ChangeBarClass.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ChangeBarClass.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ChangeBarClass extends Property { + + private static ChangeBarClass instance = new ChangeBarClass(); + + public static ChangeBarClass getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ChangeBarColor.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ChangeBarColor.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ChangeBarColor extends Property { + + private static ChangeBarColor instance = new ChangeBarColor(); + + public static ChangeBarColor getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ChangeBarOffset.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ChangeBarOffset.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ChangeBarOffset extends Property { + + private static ChangeBarOffset instance = new ChangeBarOffset(); + + public static ChangeBarOffset getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ChangeBarPlacement.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ChangeBarPlacement.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ChangeBarPlacement extends Property { + + private static ChangeBarPlacement instance = new ChangeBarPlacement(); + + public static ChangeBarPlacement getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ChangeBarStyle.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ChangeBarStyle.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ChangeBarStyle extends Property { + + private static ChangeBarStyle instance = new ChangeBarStyle(); + + public static ChangeBarStyle getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ChangeBarWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ChangeBarWidth.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ChangeBarWidth extends Property { + + private static ChangeBarWidth instance = new ChangeBarWidth(); + + public static ChangeBarWidth getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Character.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Character.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Character extends Property { + + private static Character instance = new Character(); + + public static Character getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Clear.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Clear.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Clear extends Property { + + private static Clear instance = new Clear(); + + public static Clear getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Clip.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Clip.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Clip extends Property { + + private static Clip instance = new Clip(); + + public static Clip getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Color.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Color.java (revision 0) @@ -0,0 +1,58 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.style.StyleTextPropertiesElement; + +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class Color extends Property { + + private static Color instance = new Color(); + + public static Color getInstance() { + return instance; + } + + private Color() { + this.inheritable = true; + } + + public String getValue(java.awt.Color color) { + if (color == null) { + return null; + } + return awtColorToString(color); + } + + public static String awtColorToString(java.awt.Color color) { + return "#" + String.format("%2s", Integer.toHexString(color.getRed())).replace(' ', '0') + + String.format("%2s", Integer.toHexString(color.getGreen())).replace(' ', '0') + + String.format("%2s", Integer.toHexString(color.getBlue())).replace(' ', '0'); + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleTextPropertiesElement stpe = (StyleTextPropertiesElement) this.getElement(StyleTextPropertiesElement.class, StyleTextPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + stpe.setAttributeNS(Namespace.FO, "fo:color", value); + } +} --- src/java/org/apache/fop/render/odf/properties/ColorProfileName.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ColorProfileName.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ColorProfileName extends Property { + + private static ColorProfileName instance = new ColorProfileName(); + + public static ColorProfileName getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ColumnCount.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ColumnCount.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ColumnCount extends Property { + + private static ColumnCount instance = new ColumnCount(); + + public static ColumnCount getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ColumnGap.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ColumnGap.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ColumnGap extends Property { + + private static ColumnGap instance = new ColumnGap(); + + public static ColumnGap getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ColumnNumber.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ColumnNumber.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ColumnNumber extends Property { + + private static ColumnNumber instance = new ColumnNumber(); + + public static ColumnNumber getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ColumnWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ColumnWidth.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ColumnWidth extends Property { + + private static ColumnWidth instance = new ColumnWidth(); + + public static ColumnWidth getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ContentHeight.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ContentHeight.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ContentHeight extends Property { + + private static ContentHeight instance = new ContentHeight(); + + public static ContentHeight getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ContentType.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ContentType.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ContentType extends Property { + + private static ContentType instance = new ContentType(); + + public static ContentType getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ContentWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ContentWidth.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ContentWidth extends Property { + + private static ContentWidth instance = new ContentWidth(); + + public static ContentWidth getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Country.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Country.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Country extends Property { + + private static Country instance = new Country(); + + public static Country getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/CueAfter.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/CueAfter.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class CueAfter extends Property { + + private static CueAfter instance = new CueAfter(); + + public static CueAfter getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/CueBefore.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/CueBefore.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class CueBefore extends Property { + + private static CueBefore instance = new CueBefore(); + + public static CueBefore getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/DestinationPlacementOffset.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/DestinationPlacementOffset.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class DestinationPlacementOffset extends Property { + + private static DestinationPlacementOffset instance = new DestinationPlacementOffset(); + + public static DestinationPlacementOffset getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Direction.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Direction.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Direction extends Property { + + private static Direction instance = new Direction(); + + public static Direction getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/DisplayAlign.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/DisplayAlign.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class DisplayAlign extends Property { + + private static DisplayAlign instance = new DisplayAlign(); + + public static DisplayAlign getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/DominantBaseline.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/DominantBaseline.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class DominantBaseline extends Property { + + private static DominantBaseline instance = new DominantBaseline(); + + public static DominantBaseline getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Elevation.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Elevation.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Elevation extends Property { + + private static Elevation instance = new Elevation(); + + public static Elevation getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/EmptyCells.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/EmptyCells.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class EmptyCells extends Property { + + private static EmptyCells instance = new EmptyCells(); + + public static EmptyCells getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/EndIndentBlock.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/EndIndentBlock.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class EndIndentBlock extends Property { + + private static EndIndentBlock instance = new EndIndentBlock(); + + public static EndIndentBlock getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/EndsRow.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/EndsRow.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class EndsRow extends Property { + + private static EndsRow instance = new EndsRow(); + + public static EndsRow getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Extent.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Extent.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Extent extends Property { + + private static Extent instance = new Extent(); + + public static Extent getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ExternalDestination.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ExternalDestination.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ExternalDestination extends Property { + + private static ExternalDestination instance = new ExternalDestination(); + + public static ExternalDestination getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/FloatProperty.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FloatProperty.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class FloatProperty extends Property { + + private static FloatProperty instance = new FloatProperty(); + + public static FloatProperty getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/FlowMapName.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FlowMapName.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class FlowMapName extends Property { + + private static FlowMapName instance = new FlowMapName(); + + public static FlowMapName getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/FlowMapReference.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FlowMapReference.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class FlowMapReference extends Property { + + private static FlowMapReference instance = new FlowMapReference(); + + public static FlowMapReference getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/FlowName.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FlowName.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class FlowName extends Property { + + private static FlowName instance = new FlowName(); + + public static FlowName getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/FlowNameReference.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FlowNameReference.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class FlowNameReference extends Property { + + private static FlowNameReference instance = new FlowNameReference(); + + public static FlowNameReference getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/FontFamily.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FontFamily.java (revision 0) @@ -0,0 +1,49 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.style.StyleTextPropertiesElement; + +import org.apache.fop.fo.properties.CommonFont; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class FontFamily extends Property { + + private static FontFamily instance = new FontFamily(); + + public static FontFamily getInstance() { + return instance; + } + + private FontFamily() { + this.inheritable = true; + } + + public String getFont(CommonFont commonFont) { + return commonFont.getFirstFontFamily().split(",")[0]; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleTextPropertiesElement stpe = (StyleTextPropertiesElement) this.getElement(StyleTextPropertiesElement.class, StyleTextPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + stpe.setAttributeNS(Namespace.STYLE, "style:font-name", value); + } +} --- src/java/org/apache/fop/render/odf/properties/FontSelectionStrategy.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FontSelectionStrategy.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class FontSelectionStrategy extends Property { + + private static FontSelectionStrategy instance = new FontSelectionStrategy(); + + public static FontSelectionStrategy getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/FontSize.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FontSize.java (revision 0) @@ -0,0 +1,57 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.style.StyleTextPropertiesElement; + +import org.apache.fop.datatypes.Length; +import org.apache.fop.fo.properties.CommonFont; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class FontSize extends Property { + + private static FontSize instance = new FontSize(); + + public static FontSize getInstance() { + return instance; + } + + private FontSize() { + this.inheritable = true; + } + + public String getFontSize(CommonFont commonFont) { + Length l = commonFont.getFontSize(); + if (l == null) { + return null; + } + Double value = Double.valueOf((double)l.getValue() / 1000); + return value + "pt"; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleTextPropertiesElement stpe = (StyleTextPropertiesElement) this.getElement(StyleTextPropertiesElement.class, StyleTextPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + stpe.setAttributeNS(Namespace.FO, "fo:font-size", value); + + } +} --- src/java/org/apache/fop/render/odf/properties/FontSizeAdjust.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FontSizeAdjust.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class FontSizeAdjust extends Property { + + private static FontSizeAdjust instance = new FontSizeAdjust(); + + public static FontSizeAdjust getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/FontStretch.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FontStretch.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class FontStretch extends Property { + + private static FontStretch instance = new FontStretch(); + + public static FontStretch getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/FontStyle.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FontStyle.java (revision 0) @@ -0,0 +1,50 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.style.StyleTextPropertiesElement; + +import org.apache.fop.fo.Constants; +import org.apache.fop.fo.properties.CommonFont; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class FontStyle extends Property { + + private static FontStyle instance = new FontStyle(); + + public static FontStyle getInstance() { + return instance; + } + + private FontStyle() { + this.inheritable = true; + } + + public String getValue(CommonFont commonFont) { + return commonFont.getFontStyle() == Constants.EN_ITALIC ? "italic" : "normal"; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleTextPropertiesElement stpe = (StyleTextPropertiesElement) this.getElement(StyleTextPropertiesElement.class, StyleTextPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + stpe.setAttributeNS(Namespace.FO, "fo:font-style", value); + } +} --- src/java/org/apache/fop/render/odf/properties/FontVariant.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FontVariant.java (revision 0) @@ -0,0 +1,47 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.style.StyleTextPropertiesElement; + +import org.apache.fop.fo.Constants; +import org.apache.fop.fo.properties.CommonFont; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class FontVariant extends Property { + + private static FontVariant instance = new FontVariant(); + + public static FontVariant getInstance() { + return instance; + } + + public String getValue(CommonFont commonFont) { + return commonFont.getFontVariant() == Constants.EN_SMALL_CAPS ? "small-caps" : "normal"; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleTextPropertiesElement stpe = (StyleTextPropertiesElement) this.getElement(StyleTextPropertiesElement.class, StyleTextPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + stpe.setAttributeNS(Namespace.FO, "fo:font-variant", value); + } + +} --- src/java/org/apache/fop/render/odf/properties/FontWeight.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/FontWeight.java (revision 0) @@ -0,0 +1,50 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.style.StyleTextPropertiesElement; + +import org.apache.fop.fo.Constants; +import org.apache.fop.fo.properties.CommonFont; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class FontWeight extends Property { + + private static FontWeight instance = new FontWeight(); + + public static FontWeight getInstance() { + return instance; + } + + private FontWeight() { + this.inheritable = true; + } + + public String getValue(CommonFont commonFont) { + return commonFont.getFontWeight() >= Constants.EN_700 ? "bold" : "normal"; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleTextPropertiesElement stpe = (StyleTextPropertiesElement) this.getElement(StyleTextPropertiesElement.class, StyleTextPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + stpe.setAttributeNS(Namespace.FO, "fo:font-weight", value); + } +} --- src/java/org/apache/fop/render/odf/properties/ForcePageCount.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ForcePageCount.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ForcePageCount extends Property { + + private static ForcePageCount instance = new ForcePageCount(); + + public static ForcePageCount getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Format.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Format.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Format extends Property { + + private static Format instance = new Format(); + + public static Format getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/GlyphOrientationHorizontal.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/GlyphOrientationHorizontal.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class GlyphOrientationHorizontal extends Property { + + private static GlyphOrientationHorizontal instance = new GlyphOrientationHorizontal(); + + public static GlyphOrientationHorizontal getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/GlyphOrientationVertical.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/GlyphOrientationVertical.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class GlyphOrientationVertical extends Property { + + private static GlyphOrientationVertical instance = new GlyphOrientationVertical(); + + public static GlyphOrientationVertical getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/GroupingSeparator.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/GroupingSeparator.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class GroupingSeparator extends Property { + + private static GroupingSeparator instance = new GroupingSeparator(); + + public static GroupingSeparator getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/GroupingSize.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/GroupingSize.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class GroupingSize extends Property { + + private static GroupingSize instance = new GroupingSize(); + + public static GroupingSize getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Height.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Height.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Height extends Property { + + private static Height instance = new Height(); + + public static Height getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Hyphenate.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Hyphenate.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Hyphenate extends Property { + + private static Hyphenate instance = new Hyphenate(); + + public static Hyphenate getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/HyphenationCharacter.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/HyphenationCharacter.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class HyphenationCharacter extends Property { + + private static HyphenationCharacter instance = new HyphenationCharacter(); + + public static HyphenationCharacter getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/HyphenationKeep.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/HyphenationKeep.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class HyphenationKeep extends Property { + + private static HyphenationKeep instance = new HyphenationKeep(); + + public static HyphenationKeep getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/HyphenationLadderCount.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/HyphenationLadderCount.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class HyphenationLadderCount extends Property { + + private static HyphenationLadderCount instance = new HyphenationLadderCount(); + + public static HyphenationLadderCount getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/HyphenationPushCharacterCount.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/HyphenationPushCharacterCount.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class HyphenationPushCharacterCount extends Property { + + private static HyphenationPushCharacterCount instance = new HyphenationPushCharacterCount(); + + public static HyphenationPushCharacterCount getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/HyphenationRamainCharacterCount.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/HyphenationRamainCharacterCount.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class HyphenationRamainCharacterCount extends Property { + + private static HyphenationRamainCharacterCount instance = new HyphenationRamainCharacterCount(); + + public static HyphenationRamainCharacterCount getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/Id.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Id.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Id extends Property { + + private static Id instance = new Id(); + + public static Id getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/IndexClass.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/IndexClass.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class IndexClass extends Property { + + private static IndexClass instance = new IndexClass(); + + public static IndexClass getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/IndexKey.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/IndexKey.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class IndexKey extends Property { + + private static IndexKey instance = new IndexKey(); + + public static IndexKey getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/IndicateDestination.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/IndicateDestination.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class IndicateDestination extends Property { + + private static IndicateDestination instance = new IndicateDestination(); + + public static IndicateDestination getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/InitialPageNumber.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/InitialPageNumber.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class InitialPageNumber extends Property { + + private static InitialPageNumber instance = new InitialPageNumber(); + + public static InitialPageNumber getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/InlineProgressionDimension.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/InlineProgressionDimension.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class InlineProgressionDimension extends Property { + + private static InlineProgressionDimension instance = new InlineProgressionDimension(); + + public static InlineProgressionDimension getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/InternalDestination.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/InternalDestination.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class InternalDestination extends Property { + + private static InternalDestination instance = new InternalDestination(); + + public static InternalDestination getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/IntrinsicScaleValue.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/IntrinsicScaleValue.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class IntrinsicScaleValue extends Property { + + private static IntrinsicScaleValue instance = new IntrinsicScaleValue(); + + public static IntrinsicScaleValue getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/IntrusionDisplace.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/IntrusionDisplace.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class IntrusionDisplace extends Property { + + private static IntrusionDisplace instance = new IntrusionDisplace(); + + public static IntrusionDisplace getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/KeepTogether.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/KeepTogether.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class KeepTogether extends Property { + + private static KeepTogether instance = new KeepTogether(); + + public static KeepTogether getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/KeepWithNext.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/KeepWithNext.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class KeepWithNext extends Property { + + private static KeepWithNext instance = new KeepWithNext(); + + public static KeepWithNext getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/KeepWithPrevious.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/KeepWithPrevious.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class KeepWithPrevious extends Property { + + private static KeepWithPrevious instance = new KeepWithPrevious(); + + public static KeepWithPrevious getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/Language.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Language.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Language extends Property { + + private static Language instance = new Language(); + + public static Language getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/LastLineEndIndent.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/LastLineEndIndent.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class LastLineEndIndent extends Property { + + private static LastLineEndIndent instance = new LastLineEndIndent(); + + public static LastLineEndIndent getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/LeaderAlignment.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/LeaderAlignment.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class LeaderAlignment extends Property { + + private static LeaderAlignment instance = new LeaderAlignment(); + + public static LeaderAlignment getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/LeaderLength.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/LeaderLength.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class LeaderLength extends Property { + + private static LeaderLength instance = new LeaderLength(); + + public static LeaderLength getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/LeaderPattern.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/LeaderPattern.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class LeaderPattern extends Property { + + private static LeaderPattern instance = new LeaderPattern(); + + public static LeaderPattern getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/LeaderPatternWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/LeaderPatternWidth.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class LeaderPatternWidth extends Property { + + private static LeaderPatternWidth instance = new LeaderPatternWidth(); + + public static LeaderPatternWidth getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Left.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Left.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Left extends Property { + + private static Left instance = new Left(); + + public static Left getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/LeftR.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/LeftR.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class LeftR extends Property { + + private static LeftR instance = new LeftR(); + + public static LeftR getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/LetterSpacing.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/LetterSpacing.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class LetterSpacing extends Property { + + private static LetterSpacing instance = new LetterSpacing(); + + public static LetterSpacing getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/LetterValue.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/LetterValue.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class LetterValue extends Property { + + private static LetterValue instance = new LetterValue(); + + public static LetterValue getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/LineHeight.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/LineHeight.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class LineHeight extends Property { + + private static LineHeight instance = new LineHeight(); + + public static LineHeight getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/LineHeightShiftAdjustment.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/LineHeightShiftAdjustment.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class LineHeightShiftAdjustment extends Property { + + private static LineHeightShiftAdjustment instance = new LineHeightShiftAdjustment(); + + public static LineHeightShiftAdjustment getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/LineStackingStrategy.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/LineStackingStrategy.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class LineStackingStrategy extends Property { + + private static LineStackingStrategy instance = new LineStackingStrategy(); + + public static LineStackingStrategy getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/LinefeedTreatment.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/LinefeedTreatment.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class LinefeedTreatment extends Property { + + private static LinefeedTreatment instance = new LinefeedTreatment(); + + public static LinefeedTreatment getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/MarginBottomBlock.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MarginBottomBlock.java (revision 0) @@ -0,0 +1,46 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleParagraphPropertiesElement; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; + +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class MarginBottomBlock extends Property { + + private static MarginBottomBlock instance = new MarginBottomBlock(); + + public static MarginBottomBlock getInstance() { + return instance; + } + + private MarginBottomBlock() { + this.inheritable = false; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleParagraphPropertiesElement sppe = (StyleParagraphPropertiesElement) this.getElement(StyleParagraphPropertiesElement.class, StyleParagraphPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + sppe.setAttributeNS(Namespace.FO, "fo:margin-bottom", value); + } + + +} --- src/java/org/apache/fop/render/odf/properties/MarginBottomInline.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MarginBottomInline.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MarginBottomInline extends Property { + + private static MarginBottomInline instance = new MarginBottomInline(); + + public static MarginBottomInline getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MarginLeftBlock.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MarginLeftBlock.java (revision 0) @@ -0,0 +1,58 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleParagraphPropertiesElement; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; + +import org.apache.fop.datatypes.Length; +import org.apache.fop.fo.properties.CommonMarginBlock; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class MarginLeftBlock extends Property { + + private static MarginLeftBlock instance = new MarginLeftBlock(); + + public static MarginLeftBlock getInstance() { + return instance; + } + + private MarginLeftBlock() { + this.inheritable = false; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleParagraphPropertiesElement sppe = (StyleParagraphPropertiesElement) this.getElement(StyleParagraphPropertiesElement.class, StyleParagraphPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + sppe.setAttributeNS(Namespace.FO, "fo:margin-left", value); + } + + public String getMargin(CommonMarginBlock commonMarginBlock) { + Length l = commonMarginBlock.marginLeft; + if (l == null) { + return null; + } + Double value = Double.valueOf((double)l.getValue() / 1000); + return value + "pt"; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/MarginLeftInline.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MarginLeftInline.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MarginLeftInline extends Property { + + private static MarginLeftInline instance = new MarginLeftInline(); + + public static MarginLeftInline getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MarginRightBlock.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MarginRightBlock.java (revision 0) @@ -0,0 +1,57 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleParagraphPropertiesElement; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; + +import org.apache.fop.datatypes.Length; +import org.apache.fop.fo.properties.CommonMarginBlock; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class MarginRightBlock extends Property { + + private static MarginRightBlock instance = new MarginRightBlock(); + + public static MarginRightBlock getInstance() { + return instance; + } + + private MarginRightBlock() { + this.inheritable = false; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleParagraphPropertiesElement sppe = (StyleParagraphPropertiesElement) this.getElement(StyleParagraphPropertiesElement.class, StyleParagraphPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + sppe.setAttributeNS(Namespace.FO, "fo:margin-right", value); + + } + + public String getMargin(CommonMarginBlock commonMarginBlock) { + Length l = commonMarginBlock.marginRight; + if (l == null) { + return null; + } + Double value = Double.valueOf((double)l.getValue() / 1000); + return value + "pt"; + } + +} --- src/java/org/apache/fop/render/odf/properties/MarginRightInline.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MarginRightInline.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MarginRightInline extends Property { + + private static MarginRightInline instance = new MarginRightInline(); + + public static MarginRightInline getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MarginTopBlock.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MarginTopBlock.java (revision 0) @@ -0,0 +1,45 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleParagraphPropertiesElement; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; + +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class MarginTopBlock extends Property { + + private static MarginTopBlock instance = new MarginTopBlock(); + + public static MarginTopBlock getInstance() { + return instance; + } + + private MarginTopBlock() { + this.inheritable = false; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleParagraphPropertiesElement sppe = (StyleParagraphPropertiesElement) this.getElement(StyleParagraphPropertiesElement.class, StyleParagraphPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + sppe.setAttributeNS(Namespace.FO, "fo:margin-top", value); + + } +} --- src/java/org/apache/fop/render/odf/properties/MarginTopInline.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MarginTopInline.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MarginTopInline extends Property { + + private static MarginTopInline instance = new MarginTopInline(); + + public static MarginTopInline getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MarkerClassName.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MarkerClassName.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MarkerClassName extends Property { + + private static MarkerClassName instance = new MarkerClassName(); + + public static MarkerClassName getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MasterName.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MasterName.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MasterName extends Property { + + private static MasterName instance = new MasterName(); + + public static MasterName getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MasterReference.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MasterReference.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MasterReference extends Property { + + private static MasterReference instance = new MasterReference(); + + public static MasterReference getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MaxHeight.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MaxHeight.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MaxHeight extends Property { + + private static MaxHeight instance = new MaxHeight(); + + public static MaxHeight getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MaxWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MaxWidth.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MaxWidth extends Property { + + private static MaxWidth instance = new MaxWidth(); + + public static MaxWidth getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MaximumRepeats.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MaximumRepeats.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MaximumRepeats extends Property { + + private static MaximumRepeats instance = new MaximumRepeats(); + + public static MaximumRepeats getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MediaUsage.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MediaUsage.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MediaUsage extends Property { + + private static MediaUsage instance = new MediaUsage(); + + public static MediaUsage getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MergePagesAcrossIndexKeyReferences.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MergePagesAcrossIndexKeyReferences.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MergePagesAcrossIndexKeyReferences extends Property { + + private static MergePagesAcrossIndexKeyReferences instance = new MergePagesAcrossIndexKeyReferences(); + + public static MergePagesAcrossIndexKeyReferences getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MergeRangesAcrossIndexKeyReferences.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MergeRangesAcrossIndexKeyReferences.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MergeRangesAcrossIndexKeyReferences extends Property { + + private static MergeRangesAcrossIndexKeyReferences instance = new MergeRangesAcrossIndexKeyReferences(); + + public static MergeRangesAcrossIndexKeyReferences getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MergeSequentialPageNumbers.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MergeSequentialPageNumbers.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MergeSequentialPageNumbers extends Property { + + private static MergeSequentialPageNumbers instance = new MergeSequentialPageNumbers(); + + public static MergeSequentialPageNumbers getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MinHeight.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MinHeight.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MinHeight extends Property { + + private static MinHeight instance = new MinHeight(); + + public static MinHeight getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/MinWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/MinWidth.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class MinWidth extends Property { + + private static MinWidth instance = new MinWidth(); + + public static MinWidth getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/NumberColumnsRepeated.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/NumberColumnsRepeated.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class NumberColumnsRepeated extends Property { + + private static NumberColumnsRepeated instance = new NumberColumnsRepeated(); + + public static NumberColumnsRepeated getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/NumberColumnsSpanned.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/NumberColumnsSpanned.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class NumberColumnsSpanned extends Property { + + private static NumberColumnsSpanned instance = new NumberColumnsSpanned(); + + public static NumberColumnsSpanned getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/NumberRowsSpanned.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/NumberRowsSpanned.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class NumberRowsSpanned extends Property { + + private static NumberRowsSpanned instance = new NumberRowsSpanned(); + + public static NumberRowsSpanned getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/OddOrEven.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/OddOrEven.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class OddOrEven extends Property { + + private static OddOrEven instance = new OddOrEven(); + + public static OddOrEven getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Orphans.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Orphans.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Orphans extends Property { + + private static Orphans instance = new Orphans(); + + public static Orphans getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/Overflow.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Overflow.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Overflow extends Property { + + private static Overflow instance = new Overflow(); + + public static Overflow getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/PaddingAfter.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PaddingAfter.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PaddingAfter extends Property { + + private static PaddingAfter instance = new PaddingAfter(); + + public static PaddingAfter getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/PaddingBefore.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PaddingBefore.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PaddingBefore extends Property { + + private static PaddingBefore instance = new PaddingBefore(); + + public static PaddingBefore getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/PaddingBottom.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PaddingBottom.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PaddingBottom extends Property { + + private static PaddingBottom instance = new PaddingBottom(); + + public static PaddingBottom getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/PaddingEnd.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PaddingEnd.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PaddingEnd extends Property { + + private static PaddingEnd instance = new PaddingEnd(); + + public static PaddingEnd getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/PaddingLeft.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PaddingLeft.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PaddingLeft extends Property { + + private static PaddingLeft instance = new PaddingLeft(); + + public static PaddingLeft getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/PaddingRight.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PaddingRight.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PaddingRight extends Property { + + private static PaddingRight instance = new PaddingRight(); + + public static PaddingRight getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/PaddingStart.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PaddingStart.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PaddingStart extends Property { + + private static PaddingStart instance = new PaddingStart(); + + public static PaddingStart getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/PaddingTop.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PaddingTop.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PaddingTop extends Property { + + private static PaddingTop instance = new PaddingTop(); + + public static PaddingTop getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/PageCitationStrategy.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PageCitationStrategy.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PageCitationStrategy extends Property { + + private static PageCitationStrategy instance = new PageCitationStrategy(); + + public static PageCitationStrategy getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/PageHeight.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PageHeight.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PageHeight extends Property { + + private static PageHeight instance = new PageHeight(); + + public static PageHeight getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/PageNumberTreatment.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PageNumberTreatment.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PageNumberTreatment extends Property { + + private static PageNumberTreatment instance = new PageNumberTreatment(); + + public static PageNumberTreatment getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/PagePosition.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PagePosition.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PagePosition extends Property { + + private static PagePosition instance = new PagePosition(); + + public static PagePosition getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/PageWidth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PageWidth.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PageWidth extends Property { + + private static PageWidth instance = new PageWidth(); + + public static PageWidth getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/PauseAfter.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PauseAfter.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PauseAfter extends Property { + + private static PauseAfter instance = new PauseAfter(); + + public static PauseAfter getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/PauseBefore.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PauseBefore.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PauseBefore extends Property { + + private static PauseBefore instance = new PauseBefore(); + + public static PauseBefore getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/Pitch.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Pitch.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Pitch extends Property { + + private static Pitch instance = new Pitch(); + + public static Pitch getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/PitchRange.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PitchRange.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PitchRange extends Property { + + private static PitchRange instance = new PitchRange(); + + public static PitchRange getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/PlayDuring.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/PlayDuring.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class PlayDuring extends Property { + + private static PlayDuring instance = new PlayDuring(); + + public static PlayDuring getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/Precedence.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Precedence.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Precedence extends Property { + + private static Precedence instance = new Precedence(); + + public static Precedence getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Properties.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Properties.java (revision 0) @@ -0,0 +1,280 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Properties { + + private Properties() { } + + public static final AlignmentAdjust ALIGNMENT_ADJUST = AlignmentAdjust.getInstance(); + public static final AlignmentBaseline ALIGNMENT_BASELINE = AlignmentBaseline.getInstance(); + public static final BaselineShift BASELINE_SHIFT = BaselineShift.getInstance(); + public static final DisplayAlign DISPLAY_ALIGN = DisplayAlign.getInstance(); + public static final DominantBaseline DOMINANT_BASELINE = DominantBaseline.getInstance();; + public static final RelativeAlign RELATIVE_ALIGN = RelativeAlign.getInstance(); + public static final AllowedHeightScale ALLOWED_HEIGHT_SCALE = AllowedHeightScale.getInstance(); + public static final AllowedWidthScale ALLOWED_WIDTH_SCALE = AllowedWidthScale.getInstance(); + public static final BlockProgressionDimension BLOCK_PROGRESSION_DIMENSION = BlockProgressionDimension.getInstance(); + public static final ContentHeight CONTENT_HEIGHT = ContentHeight.getInstance(); + public static final ContentWidth CONTENT_WIDTH = ContentWidth.getInstance(); + public static final Height HEIGHT = Height.getInstance(); + public static final InlineProgressionDimension INLINE_PROGRESSION_DIMENSION = InlineProgressionDimension.getInstance(); + public static final MaxHeight MAX_HEIGHT = MaxHeight.getInstance(); + public static final MaxWidth MAX_WIDTH = MaxWidth.getInstance(); + public static final MinHeight MIN_HEIGHT = MinHeight.getInstance(); + public static final MinWidth MIN_WIDTH = MinWidth.getInstance(); + public static final Scaling SCALING = Scaling.getInstance(); + public static final ScalingMethod SCALING_METHOD = ScalingMethod.getInstance(); + public static final Width WIDTH = Width.getInstance(); + public static final HyphenationKeep HYPHENATION_KEEP = HyphenationKeep.getInstance(); + public static final HyphenationLadderCount HYPHENATION_LADDER_COUNT = HyphenationLadderCount.getInstance(); + public static final LastLineEndIndent LAST_LINE_END_INDENT = LastLineEndIndent.getInstance(); + public static final LineHeight LINE_HEIGHT = LineHeight.getInstance(); + public static final LineHeightShiftAdjustment LINE_HEIGHT_SHIFT_ADJUSTMENT = LineHeightShiftAdjustment.getInstance(); + public static final LineStackingStrategy LINE_STACKING_STRATEGY = LineStackingStrategy.getInstance(); + public static final LinefeedTreatment LINEFEED_TREATMENT = LinefeedTreatment.getInstance(); + public static final WhiteSpaceTreatment WHITE_SPACE_TREATMENT = WhiteSpaceTreatment.getInstance(); + public static final TextAlign TEXT_ALIGN = TextAlign.getInstance(); + public static final TextAlignLast TEXT_ALIGN_LAST = TextAlignLast.getInstance(); + public static final TextIndent TEXT_INDENT = TextIndent.getInstance(); + public static final WhiteSpaceCollapse WHITE_SPACE_COLLAPSE = WhiteSpaceCollapse.getInstance(); + public static final WrapOption WRAP_OPTION = WrapOption.getInstance(); + public static final Character CHARACTER = Character.getInstance(); + public static final LetterSpacing LETTER_SPACING = LetterSpacing.getInstance(); + public static final SuppressAtLineBreak SUPPRESS_AT_LINE_BREAK = SuppressAtLineBreak.getInstance(); + public static final TextDecoration TEXT_DECORATION = TextDecoration.getInstance(); + public static final TextShadow TEXT_SHADOW = TextShadow.getInstance(); + public static final TextTransform TEXT_TRANSFORM = TextTransform.getInstance(); + public static final TreatAsWordSpace TREAT_AS_WORD_SPACE = TreatAsWordSpace.getInstance(); + public static final WordSpacing WORD_SPACING = WordSpacing.getInstance(); + public static final Color COLOR = Color.getInstance(); + public static final ColorProfileName COLOR_PROFILE_NAME = ColorProfileName.getInstance(); + public static final RenderingIntent RENDERING_INTENT = RenderingIntent.getInstance(); + public static final AbsolutePosition ABSOLUTE_POSITION = AbsolutePosition.getInstance(); + public static final Top TOP = Top.getInstance(); + public static final Right RIGHT = Right.getInstance(); + public static final Bottom BOTTOM = Bottom.getInstance(); + public static final Left LEFT = Left.getInstance(); + public static final SourceDocument SOURCE_DOCUMENT = SourceDocument.getInstance(); + public static final Role ROLE = Role.getInstance(); + public static final Azimuth AZIMUTH = Azimuth.getInstance(); + public static final CueAfter CUE_AFTER = CueAfter.getInstance(); + public static final CueBefore CUE_BEFORE = CueBefore.getInstance(); + public static final Elevation ELEVATION = Elevation.getInstance(); + public static final PauseAfter PAUSE_AFTER = PauseAfter.getInstance(); + public static final PauseBefore PAUSE_BEFORE = PauseBefore.getInstance(); + public static final Pitch PITCH = Pitch.getInstance(); + public static final PitchRange PITCH_RANGE = PitchRange.getInstance(); + public static final PlayDuring PLAY_DURING = PlayDuring.getInstance(); + public static final Richness RICHNESS = Richness.getInstance(); + public static final Speak SPEAK = Speak.getInstance(); + public static final SpeakHeader SPEAK_HEADER = SpeakHeader.getInstance(); + public static final SpeakNumeral SPEAK_NUMERAL = SpeakNumeral.getInstance(); + public static final SpeakPunctuation SPEAK_PUNCTUATION = SpeakPunctuation.getInstance(); + public static final SpeechRate SPEECH_RATE = SpeechRate.getInstance(); + public static final Stress STRESS = Stress.getInstance(); + public static final VoiceFamily VOICE_FAMILY = VoiceFamily.getInstance(); + public static final Volume VOLUME = Volume.getInstance(); + public static final BackgroundAttachment BACKGROUND_ATTACHMENT = BackgroundAttachment.getInstance(); + public static final BackgroundColor BACKGROUND_COLOR = BackgroundColor.getInstance(); + public static final BackgroundImage BACKGROUND_IMAGE = BackgroundImage.getInstance(); + public static final BackgroundRepeat BACKGROUND_REPEAT = BackgroundRepeat.getInstance(); + public static final BackgroundPositionHorizontal BACKGROUND_POSITION_HORIZONTAL = BackgroundPositionHorizontal.getInstance(); + public static final BackgroundPositionVertical BACKGROUND_POSITION_VERTICAL = BackgroundPositionVertical.getInstance(); + public static final BorderBeforeColor BORDER_BEFORE_COLOR = BorderBeforeColor.getInstance(); + public static final BorderBeforeStyle BORDER_BEFORE_STYLE = BorderBeforeStyle.getInstance(); + public static final BorderBeforeWidth BORDER_BEFORE_WIDTH = BorderBeforeWidth.getInstance(); + public static final BorderAfterColor BORDER_AFTER_COLOR = BorderAfterColor.getInstance(); + public static final BorderAfterStyle BORDER_AFTER_STYLE = BorderAfterStyle.getInstance(); + public static final BorderAfterWidth BORDER_AFTER_WIDTH = BorderAfterWidth.getInstance(); + public static final BorderStartColor BORDER_START_COLOR = BorderStartColor.getInstance(); + public static final BorderStartStyle BORDER_START_STYLE = BorderStartStyle.getInstance(); + public static final BorderStartWidth BORDER_START_WIDTH = BorderStartWidth.getInstance(); + public static final BorderEndColor BORDER_END_COLOR = BorderEndColor.getInstance(); + public static final BorderEndStyle BORDER_END_STYLE = BorderEndStyle.getInstance(); + public static final BorderEndWidth BORDER_END_WIDTH = BorderEndWidth.getInstance(); + public static final BorderTopColor BORDER_TOP_COLOR = BorderTopColor.getInstance(); + public static final BorderTopStyle BORDER_TOP_STYLE = BorderTopStyle.getInstance(); + public static final BorderTopWidth BORDER_TOP_WIDTH = BorderTopWidth.getInstance(); + public static final BorderBottomColor BORDER_BOTTOM_COLOR = BorderBottomColor.getInstance(); + public static final BorderBottomStyle BORDER_BOTTOM_STYLE = BorderBottomStyle.getInstance(); + public static final BorderBottomWidth BORDER_BOTTOM_WIDTH = BorderBottomWidth.getInstance(); + public static final BorderLeftColor BORDER_LEFT_COLOR = BorderLeftColor.getInstance(); + public static final BorderLeftStyle BORDER_LEFT_STYLE = BorderLeftStyle.getInstance(); + public static final BorderLeftWidth BORDER_LEFT_WIDTH = BorderLeftWidth.getInstance(); + public static final BorderRightColor BORDER_RIGHT_COLOR = BorderRightColor.getInstance(); + public static final BorderRightStyle BORDER_RIGHT_STYLE = BorderRightStyle.getInstance(); + public static final BorderRightWidth BORDER_RIGHT_WIDTH = BorderRightWidth.getInstance(); + public static final PaddingBefore PADDING_BEFORE = PaddingBefore.getInstance(); + public static final PaddingAfter PADDING_AFTER = PaddingAfter.getInstance(); + public static final PaddingStart PADDING_START = PaddingStart.getInstance(); + public static final PaddingEnd PADDING_END = PaddingEnd.getInstance(); + public static final PaddingTop PADDING_TOP = PaddingTop.getInstance(); + public static final PaddingBottom PADDING_BOTTOM = PaddingBottom.getInstance(); + public static final PaddingLeft PADDING_LEFT = PaddingLeft.getInstance(); + public static final PaddingRight PADDING_RIGHT = PaddingRight.getInstance(); + public static final FontFamily FONT_FAMILY = FontFamily.getInstance(); + public static final FontSelectionStrategy FONT_SELECTION_STRATEGY = FontSelectionStrategy.getInstance(); + public static final FontSize FONT_SIZE = FontSize.getInstance(); + public static final FontStretch FONT_STRETCH = FontStretch.getInstance(); + public static final FontSizeAdjust FONT_SIZE_ADJUST = FontSizeAdjust.getInstance(); + public static final FontStyle FONT_STYLE = FontStyle.getInstance(); + public static final FontVariant FONT_VARIANT = FontVariant.getInstance(); + public static final FontWeight FONT_WEIGHT = FontWeight.getInstance(); + public static final Country COUNTRY = Country.getInstance(); + public static final Language LANGUAGE = Language.getInstance(); + public static final Script SCRIPT = Script.getInstance(); + public static final Hyphenate HYPHENATE = Hyphenate.getInstance(); + public static final HyphenationCharacter HYPHENATION_CHARACTER = HyphenationCharacter.getInstance(); + public static final HyphenationPushCharacterCount HYPHENATION_PUSH_CHARACTER_COUNT = HyphenationPushCharacterCount.getInstance(); + public static final HyphenationRamainCharacterCount HYPHENATION_RAMAIN_CHARACTER_COUNT = HyphenationRamainCharacterCount.getInstance(); + public static final MarginTopBlock MARGIN_TOP_BLOCK = MarginTopBlock.getInstance(); + public static final MarginBottomBlock MARGIN_BOTTOM_BLOCK = MarginBottomBlock.getInstance(); + public static final MarginLeftBlock MARGIN_LEFT_BLOCK = MarginLeftBlock.getInstance(); + public static final MarginRightBlock MARGIN_RIGHT_BLOCK = MarginRightBlock.getInstance(); + public static final SpaceBeforeBlock SPACE_BEFORE_BLOCK = SpaceBeforeBlock.getInstance(); + public static final SpaceAfterBlock SPACE_AFTER_BLOCK = SpaceAfterBlock.getInstance(); + public static final StartIndentBlock START_INDENT_BLOCK = StartIndentBlock.getInstance(); + public static final EndIndentBlock END_INDENT_BLOCK = EndIndentBlock.getInstance(); + public static final MarginTopInline MARGIN_TOP_INLINE = MarginTopInline.getInstance(); + public static final MarginBottomInline MARGIN_BOTTOM_INLINE = MarginBottomInline.getInstance(); + public static final MarginLeftInline MARGIN_LEFT_INLINE = MarginLeftInline.getInstance(); + public static final MarginRightInline MARGIN_RIGHT_INLINE = MarginRightInline.getInstance(); + public static final SpaceEndInline SPACE_END_INLINE = SpaceEndInline.getInstance(); + public static final SpaceStartInline SPACE_START_INLINE = SpaceStartInline.getInstance(); + public static final TopR TOP_R = TopR.getInstance(); + public static final RightR RIGHT_R = RightR.getInstance(); + public static final BottomR BOTTOM_R = BottomR.getInstance(); + public static final LeftR LEFT_R = LeftR.getInstance(); + public static final RelativePosition RELATIVE_POSITION = RelativePosition.getInstance(); + public static final Clear CLEAR = Clear.getInstance(); + public static final FloatProperty FLOAT_PROPERTY = FloatProperty.getInstance(); + public static final IntrusionDisplace INTRUSION_DISPLACE = IntrusionDisplace.getInstance(); + public static final BreakAfter BREAK_AFTER = BreakAfter.getInstance(); + public static final BreakBefore BREAK_BEFORE = BreakBefore.getInstance(); + public static final KeepTogether KEEP_TOGETHER = KeepTogether.getInstance(); + public static final KeepWithNext KEEP_WITH_NEXT = KeepWithNext.getInstance(); + public static final KeepWithPrevious KEEP_WITH_PREVIOUS = KeepWithPrevious.getInstance(); + public static final Orphans ORPHANS = Orphans.getInstance(); + public static final Windows WINDOWS = Windows.getInstance(); + public static final Clip CLIP = Clip.getInstance(); + public static final Overflow OVERFLOW = Overflow.getInstance(); + public static final ReferenceOrientation REFERENCE_ORIENTATION = ReferenceOrientation.getInstance(); + public static final Span SPAN = Span.getInstance(); + public static final LeaderAlignment LEADER_ALIGNMENT = LeaderAlignment.getInstance(); + public static final LeaderPattern LEADER_PATTERN = LeaderPattern.getInstance(); + public static final LeaderPatternWidth LEADER_PATTERN_WIDTH = LeaderPatternWidth.getInstance(); + public static final LeaderLength LEADER_LENGTH = LeaderLength.getInstance(); + public static final RuleStyle RULE_STYLE = RuleStyle.getInstance(); + public static final RuleThickness RULE_THICKNESS = RuleThickness.getInstance(); + public static final ChangeBarClass CHANGE_BAR_CLASS = ChangeBarClass.getInstance(); + public static final ChangeBarColor CHANGE_BAR_COLOR = ChangeBarColor.getInstance(); + public static final ChangeBarOffset CHANGE_BAR_OFFSET = ChangeBarOffset.getInstance(); + public static final ChangeBarPlacement CHANGE_BAR_PLACEMENT = ChangeBarPlacement.getInstance(); + public static final ChangeBarStyle CHANGE_BAR_STYLE = ChangeBarStyle.getInstance(); + public static final ChangeBarWidth CHANGE_BAR_WIDTH = ChangeBarWidth.getInstance(); + public static final ContentType CONTENT_TYPE = ContentType.getInstance(); + public static final Id ID = Id.getInstance(); + public static final IntrinsicScaleValue INTRINSIC_SCALE_VALUE = IntrinsicScaleValue.getInstance(); + public static final PageCitationStrategy PAGE_CITATION_STRATEGY = PageCitationStrategy.getInstance(); + public static final ProvisionalLabelSeparation PROVISIONAL_LABEL_SEPARATION = ProvisionalLabelSeparation.getInstance(); + public static final ProvisionalDistanceBetweenStarts PROVISIONAL_DISTANCE_BETWEEN_STARTS = ProvisionalDistanceBetweenStarts.getInstance(); + public static final RefId REF_ID = RefId.getInstance(); + public static final ScaleOption SCALE_OPTION = ScaleOption.getInstance(); + public static final ScoreSpaces SCORE_SPACES = ScoreSpaces.getInstance(); + public static final Src SRC = Src.getInstance(); + public static final Visibility VISIBILITY = Visibility.getInstance(); + public static final ZIndex Z_INDEX = ZIndex.getInstance(); + public static final BlankOrNotBlank BLANK_OR_NOT_BLANK = BlankOrNotBlank.getInstance(); + public static final ColumnCount COLUMN_COUNT = ColumnCount.getInstance(); + public static final ColumnGap COLUMN_GAP = ColumnGap.getInstance(); + public static final Extent EXTENT = Extent.getInstance(); + public static final FlowName FLOW_NAME = FlowName.getInstance(); + public static final ForcePageCount FORCE_PAGE_COUNT = ForcePageCount.getInstance(); + public static final InitialPageNumber INITIAL_PAGE_NUMBER = InitialPageNumber.getInstance(); + public static final MasterName MASTER_NAME = MasterName.getInstance(); + public static final MasterReference MASTER_REFERENCE = MasterReference.getInstance(); + public static final MaximumRepeats MAXIMUM_REPEATS = MaximumRepeats.getInstance(); + public static final MediaUsage MEDIA_USAGE = MediaUsage.getInstance(); + public static final OddOrEven ODD_OR_EVEN = OddOrEven.getInstance(); + public static final PageHeight PAGE_HEIGHT = PageHeight.getInstance(); + public static final PagePosition PAGE_POSITION = PagePosition.getInstance(); + public static final PageWidth PAGE_WIDTH = PageWidth.getInstance(); + public static final Precedence PRECEDENCE = Precedence.getInstance(); + public static final RegionName REGION_NAME = RegionName.getInstance(); + public static final FlowMapName FLOW_MAP_NAME = FlowMapName.getInstance(); + public static final FlowMapReference FLOW_MAP_REFERENCE = FlowMapReference.getInstance(); + public static final FlowNameReference FLOW_NAME_REFERENCE = FlowNameReference.getInstance(); + public static final RegionNameReference REGION_NAME_REFERENCE = RegionNameReference.getInstance(); + public static final ActiveState ACTIVE_STATE = ActiveState.getInstance(); + public static final AutoRestore AUTO_RESTORE = AutoRestore.getInstance(); + public static final CaseName CASE_NAME = CaseName.getInstance(); + public static final CaseTitle CASE_TITLE = CaseTitle.getInstance(); + public static final DestinationPlacementOffset DESTINATION_PLACEMENT_OFFSET = DestinationPlacementOffset.getInstance(); + public static final ExternalDestination EXTERNAL_DESTINATION = ExternalDestination.getInstance(); + public static final IndicateDestination INDICATE_DESTINATION = IndicateDestination.getInstance(); + public static final InternalDestination INTERNAL_DESTINATION = InternalDestination.getInstance(); + public static final ShowDestination SHOW_DESTINATION = ShowDestination.getInstance(); + public static final StartingState STARTING_STATE = StartingState.getInstance(); + public static final SwitchTo SWITCH_TO = SwitchTo.getInstance(); + public static final TargetPresentationContext TARGET_PRESENTATION_CONTEXT = TargetPresentationContext.getInstance(); + public static final TargetProcessingContext TARGET_PROCESSING_CONTEXT = TargetProcessingContext.getInstance(); + public static final TargetStylesheet TARGET_STYLESHEET = TargetStylesheet.getInstance(); + public static final IndexClass INDEX_CLASS = IndexClass.getInstance(); + public static final IndexKey INDEX_KEY = IndexKey.getInstance(); + public static final PageNumberTreatment PAGE_NUMBER_TREATMENT = PageNumberTreatment.getInstance(); + public static final MergeRangesAcrossIndexKeyReferences MERGE_RANGES_ACROSS_INDEX_KEY_REFERENCES = MergeRangesAcrossIndexKeyReferences.getInstance(); + public static final MergeSequentialPageNumbers MERGE_SEQUENTIAL_PAGE_NUMBERS = MergeSequentialPageNumbers.getInstance(); + public static final MergePagesAcrossIndexKeyReferences MERGE_PAGES_ACROSS_INDEX_KEY_REFERENCES = MergePagesAcrossIndexKeyReferences.getInstance(); + public static final RefIndexKey REF_INDEX_KEY = RefIndexKey.getInstance(); + public static final Format FORMAT = Format.getInstance(); + public static final GroupingSeparator GROUPING_SEPARATOR = GroupingSeparator.getInstance(); + public static final GroupingSize GROUPING_SIZE = GroupingSize.getInstance(); + public static final LetterValue LETTER_VALUE = LetterValue.getInstance(); + public static final MarkerClassName MARKER_CLASS_NAME = MarkerClassName.getInstance(); + public static final RetrieveBoundaryWithinTable RETRIEVE_BOUNDARY_WITHIN_TABLE = RetrieveBoundaryWithinTable.getInstance(); + public static final RetrieveClassName RETRIEVE_CLASS_NAME = RetrieveClassName.getInstance(); + public static final RetrievePosition RETRIEVE_POSITION = RetrievePosition.getInstance(); + public static final RetrieveBoundary RETRIEVE_BOUNDARY = RetrieveBoundary.getInstance(); + public static final RetrievePositionWithinTable RETRIEVE_POSITION_WITHIN_TABLE = RetrievePositionWithinTable.getInstance(); + public static final BorderAfterPrecedence BORDER_AFTER_PRECEDENCE = BorderAfterPrecedence.getInstance(); + public static final BorderBeforePrecedence BORDER_BEFORE_PRECEDENCE = BorderBeforePrecedence.getInstance(); + public static final BorderCollapse BORDER_COLLAPSE = BorderCollapse.getInstance(); + public static final BorderEndPrecedence BORDER_END_PRECEDENCE = BorderEndPrecedence.getInstance(); + public static final BorderSeparation BORDER_SEPARATION = BorderSeparation.getInstance(); + public static final BorderStartPrecedence BORDER_START_PRECEDENCE = BorderStartPrecedence.getInstance(); + public static final CaptionSide CAPTION_SIDE = CaptionSide.getInstance(); + public static final ColumnNumber COLUMN_NUMBER = ColumnNumber.getInstance(); + public static final ColumnWidth COLUMN_WIDTH = ColumnWidth.getInstance(); + public static final EmptyCells EMPTY_CELLS = EmptyCells.getInstance(); + public static final EndsRow ENDS_ROW = EndsRow.getInstance(); + public static final NumberColumnsRepeated NUMBER_COLUMNS_REPEATED = NumberColumnsRepeated.getInstance(); + public static final NumberColumnsSpanned NUMBER_COLUMNS_SPANNED = NumberColumnsSpanned.getInstance(); + public static final NumberRowsSpanned NUMBER_ROWS_SPANNED = NumberRowsSpanned.getInstance(); + public static final StartsRow STARTS_ROW = StartsRow.getInstance(); + public static final TableLayout TABLE_LAYOUT = TableLayout.getInstance(); + public static final TableOmitFooterAtBreak TABLE_OMIT_FOOTER_AT_BREAK = TableOmitFooterAtBreak.getInstance(); + public static final TableOmitHeaderAtBreak TABLE_OMIT_HEADER_AT_BREAK = TableOmitHeaderAtBreak.getInstance(); + public static final Direction DIRECTION = Direction.getInstance(); + public static final GlyphOrientationHorizontal GLYPH_ORIENTATION_HORIZONTAL = GlyphOrientationHorizontal.getInstance(); + public static final GlyphOrientationVertical GLYPH_ORIENTATION_VERTICAL = GlyphOrientationVertical.getInstance(); + public static final TextAltitude TEXT_ALTITUDE = TextAltitude.getInstance(); + public static final TextDepth TEXT_DEPTH = TextDepth.getInstance(); + public static final UnicodeBidi UNICODE_BIDI = UnicodeBidi.getInstance(); + public static final WritingMode WRITING_MODE = WritingMode.getInstance(); +} --- src/java/org/apache/fop/render/odf/properties/Property.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Property.java (revision 0) @@ -0,0 +1,60 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.pkg.OdfName; +import org.odftoolkit.odfdom.pkg.OdfXMLFactory; +import org.w3c.dom.Node; + +import org.apache.fop.render.odf.OdfException; + +public class Property { + + protected boolean inheritable = false; + + public boolean isInheritable() { + return inheritable; + } + + protected Node getElement(Class element, OdfName name, StyleStyleElement sse, OdfTextDocument odfTextDocument) throws OdfException { + Node o = null; + + for (int i = 0; i < sse.getChildNodes().getLength(); i++) { + if (sse.getChildNodes().item(i).getClass().equals(element)) { + o = sse.getChildNodes().item(i); + } + } + + if (o == null) { + try { + o = OdfXMLFactory.newOdfElement(odfTextDocument.getContentDom(), name); + } catch (Exception e) { + throw new OdfException("Can't create new style for pragraph.", e); + } + sse.appendChild(o); + } + + return o; + } + + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { } + +} --- src/java/org/apache/fop/render/odf/properties/ProvisionalDistanceBetweenStarts.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ProvisionalDistanceBetweenStarts.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ProvisionalDistanceBetweenStarts extends Property { + + private static ProvisionalDistanceBetweenStarts instance = new ProvisionalDistanceBetweenStarts(); + + public static ProvisionalDistanceBetweenStarts getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ProvisionalLabelSeparation.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ProvisionalLabelSeparation.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ProvisionalLabelSeparation extends Property { + + private static ProvisionalLabelSeparation instance = new ProvisionalLabelSeparation(); + + public static ProvisionalLabelSeparation getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RefId.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RefId.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RefId extends Property { + + private static RefId instance = new RefId(); + + public static RefId getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RefIndexKey.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RefIndexKey.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RefIndexKey extends Property { + + private static RefIndexKey instance = new RefIndexKey(); + + public static RefIndexKey getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ReferenceOrientation.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ReferenceOrientation.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ReferenceOrientation extends Property { + + private static ReferenceOrientation instance = new ReferenceOrientation(); + + public static ReferenceOrientation getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RegionName.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RegionName.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RegionName extends Property { + + private static RegionName instance = new RegionName(); + + public static RegionName getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RegionNameReference.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RegionNameReference.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RegionNameReference extends Property { + + private static RegionNameReference instance = new RegionNameReference(); + + public static RegionNameReference getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RelativeAlign.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RelativeAlign.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RelativeAlign extends Property { + + private static RelativeAlign instance = new RelativeAlign(); + + public static RelativeAlign getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RelativePosition.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RelativePosition.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RelativePosition extends Property { + + private static RelativePosition instance = new RelativePosition(); + + public static RelativePosition getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/RenderingIntent.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RenderingIntent.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RenderingIntent extends Property { + + private static RenderingIntent instance = new RenderingIntent(); + + public static RenderingIntent getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RetrieveBoundary.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RetrieveBoundary.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RetrieveBoundary extends Property { + + private static RetrieveBoundary instance = new RetrieveBoundary(); + + public static RetrieveBoundary getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RetrieveBoundaryWithinTable.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RetrieveBoundaryWithinTable.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RetrieveBoundaryWithinTable extends Property { + + private static RetrieveBoundaryWithinTable instance = new RetrieveBoundaryWithinTable(); + + public static RetrieveBoundaryWithinTable getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RetrieveClassName.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RetrieveClassName.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RetrieveClassName extends Property { + + private static RetrieveClassName instance = new RetrieveClassName(); + + public static RetrieveClassName getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RetrievePosition.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RetrievePosition.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RetrievePosition extends Property { + + private static RetrievePosition instance = new RetrievePosition(); + + public static RetrievePosition getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RetrievePositionWithinTable.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RetrievePositionWithinTable.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RetrievePositionWithinTable extends Property { + + private static RetrievePositionWithinTable instance = new RetrievePositionWithinTable(); + + public static RetrievePositionWithinTable getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Richness.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Richness.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Richness extends Property { + + private static Richness instance = new Richness(); + + public static Richness getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/Right.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Right.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Right extends Property { + + private static Right instance = new Right(); + + public static Right getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RightR.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RightR.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RightR extends Property { + + private static RightR instance = new RightR(); + + public static RightR getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/Role.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Role.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Role extends Property { + + private static Role instance = new Role(); + + public static Role getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/RuleStyle.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RuleStyle.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RuleStyle extends Property { + + private static RuleStyle instance = new RuleStyle(); + + public static RuleStyle getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/RuleThickness.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/RuleThickness.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class RuleThickness extends Property { + + private static RuleThickness instance = new RuleThickness(); + + public static RuleThickness getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ScaleOption.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ScaleOption.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ScaleOption extends Property { + + private static ScaleOption instance = new ScaleOption(); + + public static ScaleOption getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Scaling.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Scaling.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Scaling extends Property { + + private static Scaling instance = new Scaling(); + + public static Scaling getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ScalingMethod.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ScalingMethod.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ScalingMethod extends Property { + + private static ScalingMethod instance = new ScalingMethod(); + + public static ScalingMethod getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ScoreSpaces.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ScoreSpaces.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ScoreSpaces extends Property { + + private static ScoreSpaces instance = new ScoreSpaces(); + + public static ScoreSpaces getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Script.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Script.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Script extends Property { + + private static Script instance = new Script(); + + public static Script getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/ShowDestination.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ShowDestination.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ShowDestination extends Property { + + private static ShowDestination instance = new ShowDestination(); + + public static ShowDestination getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/SourceDocument.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/SourceDocument.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class SourceDocument extends Property { + + private static SourceDocument instance = new SourceDocument(); + + public static SourceDocument getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/SpaceAfterBlock.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/SpaceAfterBlock.java (revision 0) @@ -0,0 +1,51 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleParagraphPropertiesElement; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; + +import org.apache.fop.fo.properties.CommonMarginBlock; +import org.apache.fop.layoutmgr.BlockLayoutManager; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class SpaceAfterBlock extends Property { + + private static SpaceAfterBlock instance = new SpaceAfterBlock(); + + public static SpaceAfterBlock getInstance() { + return instance; + } + + public String getSpace(CommonMarginBlock commonMarginBlock, BlockLayoutManager blockLayoutManager) { + if (commonMarginBlock.spaceAfter == null) { + return null; + } + Double value = Double.valueOf((double) commonMarginBlock.spaceAfter.getLengthRange().toMinOptMax(blockLayoutManager).getOpt() / 1000); + return value + "pt"; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleParagraphPropertiesElement sppe = (StyleParagraphPropertiesElement) this.getElement(StyleParagraphPropertiesElement.class, StyleParagraphPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + sppe.setAttributeNS(Namespace.FO, "fo:margin-bottom", value); + } + +} --- src/java/org/apache/fop/render/odf/properties/SpaceBeforeBlock.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/SpaceBeforeBlock.java (revision 0) @@ -0,0 +1,51 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleParagraphPropertiesElement; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; + +import org.apache.fop.fo.properties.CommonMarginBlock; +import org.apache.fop.layoutmgr.BlockLayoutManager; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class SpaceBeforeBlock extends Property { + + private static SpaceBeforeBlock instance = new SpaceBeforeBlock(); + + public static SpaceBeforeBlock getInstance() { + return instance; + } + + public String getSpace(CommonMarginBlock commonMarginBlock, BlockLayoutManager blockLayoutManager) { + if (commonMarginBlock.spaceBefore == null) { + return null; + } + Double value = Double.valueOf((double) commonMarginBlock.spaceBefore.getLengthRange().toMinOptMax(blockLayoutManager).getOpt() / 1000); + return value + "pt"; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleParagraphPropertiesElement sppe = (StyleParagraphPropertiesElement) this.getElement(StyleParagraphPropertiesElement.class, StyleParagraphPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + sppe.setAttributeNS(Namespace.FO, "fo:margin-top", value); + } + +} --- src/java/org/apache/fop/render/odf/properties/SpaceEndInline.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/SpaceEndInline.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class SpaceEndInline extends Property { + + private static SpaceEndInline instance = new SpaceEndInline(); + + public static SpaceEndInline getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/SpaceStartInline.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/SpaceStartInline.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class SpaceStartInline extends Property { + + private static SpaceStartInline instance = new SpaceStartInline(); + + public static SpaceStartInline getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Span.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Span.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Span extends Property { + + private static Span instance = new Span(); + + public static Span getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/Speak.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Speak.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Speak extends Property { + + private static Speak instance = new Speak(); + + public static Speak getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/SpeakHeader.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/SpeakHeader.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class SpeakHeader extends Property { + + private static SpeakHeader instance = new SpeakHeader(); + + public static SpeakHeader getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/SpeakNumeral.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/SpeakNumeral.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class SpeakNumeral extends Property { + + private static SpeakNumeral instance = new SpeakNumeral(); + + public static SpeakNumeral getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/SpeakPunctuation.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/SpeakPunctuation.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class SpeakPunctuation extends Property { + + private static SpeakPunctuation instance = new SpeakPunctuation(); + + public static SpeakPunctuation getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/SpeechRate.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/SpeechRate.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class SpeechRate extends Property { + + private static SpeechRate instance = new SpeechRate(); + + public static SpeechRate getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/Src.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Src.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Src extends Property { + + private static Src instance = new Src(); + + public static Src getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/StartIndentBlock.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/StartIndentBlock.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class StartIndentBlock extends Property { + + private static StartIndentBlock instance = new StartIndentBlock(); + + public static StartIndentBlock getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/StartingState.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/StartingState.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class StartingState extends Property { + + private static StartingState instance = new StartingState(); + + public static StartingState getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/StartsRow.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/StartsRow.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class StartsRow extends Property { + + private static StartsRow instance = new StartsRow(); + + public static StartsRow getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Stress.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Stress.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Stress extends Property { + + private static Stress instance = new Stress(); + + public static Stress getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/SuppressAtLineBreak.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/SuppressAtLineBreak.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class SuppressAtLineBreak extends Property { + + private static SuppressAtLineBreak instance = new SuppressAtLineBreak(); + + public static SuppressAtLineBreak getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/SwitchTo.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/SwitchTo.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class SwitchTo extends Property { + + private static SwitchTo instance = new SwitchTo(); + + public static SwitchTo getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/TableLayout.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TableLayout.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TableLayout extends Property { + + private static TableLayout instance = new TableLayout(); + + public static TableLayout getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/TableOmitFooterAtBreak.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TableOmitFooterAtBreak.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TableOmitFooterAtBreak extends Property { + + private static TableOmitFooterAtBreak instance = new TableOmitFooterAtBreak(); + + public static TableOmitFooterAtBreak getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/TableOmitHeaderAtBreak.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TableOmitHeaderAtBreak.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TableOmitHeaderAtBreak extends Property { + + private static TableOmitHeaderAtBreak instance = new TableOmitHeaderAtBreak(); + + public static TableOmitHeaderAtBreak getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/TargetPresentationContext.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TargetPresentationContext.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TargetPresentationContext extends Property { + + private static TargetPresentationContext instance = new TargetPresentationContext(); + + public static TargetPresentationContext getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/TargetProcessingContext.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TargetProcessingContext.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TargetProcessingContext extends Property { + + private static TargetProcessingContext instance = new TargetProcessingContext(); + + public static TargetProcessingContext getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/TargetStylesheet.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TargetStylesheet.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TargetStylesheet extends Property { + + private static TargetStylesheet instance = new TargetStylesheet(); + + public static TargetStylesheet getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/TextAlign.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TextAlign.java (revision 0) @@ -0,0 +1,59 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleParagraphPropertiesElement; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; + +import org.apache.fop.fo.Constants; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class TextAlign extends Property { + + private static TextAlign instance = new TextAlign(); + + public static TextAlign getInstance() { + return instance; + } + + private TextAlign() { + this.inheritable = true; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleParagraphPropertiesElement sppe = (StyleParagraphPropertiesElement) this.getElement(StyleParagraphPropertiesElement.class, StyleParagraphPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + sppe.setAttributeNS(Namespace.FO, "fo:text-align", value); + } + + public String getTextAlign(int textAlign) { + if (textAlign == Constants.EN_LEFT) { + return "left"; + } else if (textAlign == Constants.EN_JUSTIFY) { + return "justify"; + } else if (textAlign == Constants.EN_CENTER) { + return "center"; + } else if (textAlign == 39) { + return "right"; + } else { + return null; + } + } +} --- src/java/org/apache/fop/render/odf/properties/TextAlignLast.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TextAlignLast.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TextAlignLast extends Property { + + private static TextAlignLast instance = new TextAlignLast(); + + public static TextAlignLast getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/TextAltitude.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TextAltitude.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TextAltitude extends Property { + + private static TextAltitude instance = new TextAltitude(); + + public static TextAltitude getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/TextDecoration.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TextDecoration.java (revision 0) @@ -0,0 +1,94 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +import org.odftoolkit.odfdom.doc.OdfTextDocument; +import org.odftoolkit.odfdom.dom.element.style.StyleStyleElement; +import org.odftoolkit.odfdom.dom.element.style.StyleTextPropertiesElement; + +import org.apache.fop.fo.FONode; +import org.apache.fop.fo.FOText; +import org.apache.fop.fo.flow.Inline; +import org.apache.fop.render.odf.OdfException; +import org.apache.fop.render.odf.odt.Namespace; + +public final class TextDecoration extends Property { + + private static TextDecoration instance = new TextDecoration(); + + public static TextDecoration getInstance() { + return instance; + } + + private TextDecoration() { + this.inheritable = false; + } + + public String getValue(Inline inl) { + String value = ""; + FONode n = (FONode) inl.getChildNodes().firstNode(); + + if (n instanceof FOText) { + if (((FOText) n).getTextDecoration() != null) { + if (((FOText) n).getTextDecoration().hasUnderline()) { + value += "U,"; + value += Color.awtColorToString(((FOText) n).getTextDecoration().getUnderlineColor()) + ","; + } + if (((FOText) n).getTextDecoration().hasOverline()) { + value += "O,"; + value += Color.awtColorToString(((FOText) n).getTextDecoration().getOverlineColor()) + ","; + } + if (((FOText) n).getTextDecoration().hasLineThrough()) { + value += "T,"; + value += Color.awtColorToString(((FOText) n).getTextDecoration().getLineThroughColor()) + ","; + } + if (((FOText) n).getTextDecoration().isBlinking()) { + value += "B,"; + } + + return value; + } + } + + return ""; + } + + @Override + public void execute(StyleStyleElement sse, String value, OdfTextDocument odfTextDocument) throws OdfException { + StyleTextPropertiesElement stpe = (StyleTextPropertiesElement) this.getElement(StyleTextPropertiesElement.class, StyleTextPropertiesElement.ELEMENT_NAME, sse, odfTextDocument); + String[] values = value.split(","); + for (int i = 0; i < values.length; i++) { + if (values[i].equals("U")) { + stpe.setAttributeNS(Namespace.STYLE, "style:text-underline-type", "single"); + stpe.setAttributeNS(Namespace.STYLE, "style:text-underline-style", "solid"); + stpe.setAttributeNS(Namespace.STYLE, "style:text-underline-color", values[i + 1]); + i++; + } else if (values[i].equals("O")) { + stpe.setAttributeNS(Namespace.STYLE, "style:text-overline-type", "single"); + stpe.setAttributeNS(Namespace.STYLE, "style:text-overline-style", "solid"); + stpe.setAttributeNS(Namespace.STYLE, "style:text-overline-color", values[i + 1]); + i++; + } else if (values[i].equals("T")) { + stpe.setAttributeNS(Namespace.STYLE, "style:text-line-through-type", "single"); + stpe.setAttributeNS(Namespace.STYLE, "style:text-line-through-style", "solid"); + stpe.setAttributeNS(Namespace.STYLE, "style:text-line-through-color", values[i + 1]); + i++; + } + } + } +} --- src/java/org/apache/fop/render/odf/properties/TextDepth.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TextDepth.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TextDepth extends Property { + + private static TextDepth instance = new TextDepth(); + + public static TextDepth getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/TextIndent.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TextIndent.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TextIndent extends Property { + + private static TextIndent instance = new TextIndent(); + + public static TextIndent getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/TextShadow.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TextShadow.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TextShadow extends Property { + + private static TextShadow instance = new TextShadow(); + + public static TextShadow getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/TextTransform.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TextTransform.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TextTransform extends Property { + + private static TextTransform instance = new TextTransform(); + + public static TextTransform getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Top.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Top.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Top extends Property { + + private static Top instance = new Top(); + + public static Top getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/TopR.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TopR.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TopR extends Property { + + private static TopR instance = new TopR(); + + public static TopR getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/TreatAsWordSpace.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/TreatAsWordSpace.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class TreatAsWordSpace extends Property { + + private static TreatAsWordSpace instance = new TreatAsWordSpace(); + + public static TreatAsWordSpace getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/UnicodeBidi.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/UnicodeBidi.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class UnicodeBidi extends Property { + + private static UnicodeBidi instance = new UnicodeBidi(); + + public static UnicodeBidi getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Visibility.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Visibility.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Visibility extends Property { + + private static Visibility instance = new Visibility(); + + public static Visibility getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/VoiceFamily.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/VoiceFamily.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class VoiceFamily extends Property { + + private static VoiceFamily instance = new VoiceFamily(); + + public static VoiceFamily getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/Volume.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Volume.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Volume extends Property { + + private static Volume instance = new Volume(); + + public static Volume getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/WhiteSpaceCollapse.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/WhiteSpaceCollapse.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class WhiteSpaceCollapse extends Property { + + private static WhiteSpaceCollapse instance = new WhiteSpaceCollapse(); + + public static WhiteSpaceCollapse getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/WhiteSpaceTreatment.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/WhiteSpaceTreatment.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class WhiteSpaceTreatment extends Property { + + private static WhiteSpaceTreatment instance = new WhiteSpaceTreatment(); + + public static WhiteSpaceTreatment getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/Width.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Width.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Width extends Property { + + private static Width instance = new Width(); + + public static Width getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/Windows.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/Windows.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class Windows extends Property { + + private static Windows instance = new Windows(); + + public static Windows getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/WordSpacing.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/WordSpacing.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class WordSpacing extends Property { + + private static WordSpacing instance = new WordSpacing(); + + public static WordSpacing getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/WrapOption.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/WrapOption.java (revision 0) @@ -0,0 +1,30 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class WrapOption extends Property { + + private static WrapOption instance = new WrapOption(); + + public static WrapOption getInstance() { + return instance; + } + + + +} --- src/java/org/apache/fop/render/odf/properties/WritingMode.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/WritingMode.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class WritingMode extends Property { + + private static WritingMode instance = new WritingMode(); + + public static WritingMode getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/ZIndex.java (revision 0) +++ src/java/org/apache/fop/render/odf/properties/ZIndex.java (revision 0) @@ -0,0 +1,27 @@ +/* + * 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.fop.render.odf.properties; + +public final class ZIndex extends Property { + + private static ZIndex instance = new ZIndex(); + + public static ZIndex getInstance() { + return instance; + } +} --- src/java/org/apache/fop/render/odf/properties/package.html (revision 0) +++ src/java/org/apache/fop/render/odf/properties/package.html (revision 0) @@ -0,0 +1,23 @@ + + + +org.apache.fop.render.odt.tags Package + +

Converters of xslfo xml attributes to odt xml attributes

+ + --- src/java/org/apache/fop/cli/CommandLineOptions.java (revision 1380926) +++ src/java/org/apache/fop/cli/CommandLineOptions.java (working copy) @@ -325,6 +325,8 @@ i = i + parsePDFOutputOption(args, i, "PDF/A-1b"); } else if (args[i].equals("-mif")) { i = i + parseMIFOutputOption(args, i); + } else if (args[i].equals("-odt")) { + i = i + parseODTOutputOption(args, i); } else if (args[i].equals("-rtf")) { i = i + parseRTFOutputOption(args, i); } else if (args[i].equals("-tiff")) { @@ -531,6 +533,17 @@ } } + private int parseODTOutputOption(String[] args, int i) throws FOPException { + setOutputMode(MimeConstants.MIME_ODT); + if ((i + 1 == args.length) + || (isOption(args[i + 1]))) { + throw new FOPException("you must specify the ODT output file"); + } else { + setOutputFile(args[i + 1]); + return 1; + } + } + private void setOutputFile(String filename) { if (isSystemInOutFile(filename)) { this.useStdOut = true; @@ -1204,7 +1217,7 @@ public static void printUsage(PrintStream out) { out.println( "\nUSAGE\nfop [options] [-fo|-xml] infile [-xsl file] " - + "[-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl|-ps|-txt|-at [mime]|-print] \n" + + "[-awt|-pdf|-mif|-odt|-rtf|-tiff|-png|-pcl|-ps|-txt|-at [mime]|-print] \n" + " [OPTIONS] \n" + " -version print FOP version and exit\n" + " -d debug mode \n" @@ -1263,6 +1276,7 @@ + " -pdfa1b outfile input will be rendered as PDF/A-1b compliant PDF\n" + " (outfile req'd, same as \"-pdf outfile -pdfprofile PDF/A-1b\")\n" + " -awt input will be displayed on screen \n" + + " -odt outfile input will be rendered as ODT (outfile req'd)\n" + " -rtf outfile input will be rendered as RTF (outfile req'd)\n" + " -pcl outfile input will be rendered as PCL (outfile req'd) \n" + " -ps outfile input will be rendered as PostScript (outfile req'd) \n" @@ -1298,6 +1312,7 @@ + " fop -xml foo.xml -xsl foo.xsl -foout foo.fo\n" + " fop -xml - -xsl foo.xsl -pdf -\n" + " fop foo.fo -mif foo.mif\n" + + " fop foo.fo -odt foo.odt\n" + " fop foo.fo -rtf foo.rtf\n" + " fop foo.fo -print\n" + " fop foo.fo -awt\n"); --- src/java/org/apache/fop/apps/MimeConstants.java (revision 1380926) +++ src/java/org/apache/fop/apps/MimeConstants.java (working copy) @@ -34,4 +34,6 @@ String MIME_FOP_IF = "application/X-fop-intermediate-format"; /** Bitmap images */ String MIME_BITMAP = "image/x-bitmap"; + /** Apache FOP's ODT format */ + String MIME_ODT = "application/vnd.oasis.opendocument.text"; } --- src/java/META-INF/services/org.apache.fop.fo.FOEventHandler (revision 1380926) +++ src/java/META-INF/services/org.apache.fop.fo.FOEventHandler (working copy) @@ -1, +1,2 @@ -org.apache.fop.render.rtf.RTFFOEventHandlerMaker +org.apache.fop.render.rtf.RTFFOEventHandlerMaker +org.apache.fop.render.odf.ODTFOEventHandlerMaker --- lib/odfdom-java.LICENSE.txt (revision 0) +++ lib/odfdom-java.LICENSE.txt (revision 0) @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. --- test/odf/odt/basic_link/basic_link.fo (revision 0) +++ test/odf/odt/basic_link/basic_link.fo (revision 0) @@ -0,0 +1,46 @@ + + + + + + + + + + + + Links in PDF + Example of a link to internal + destination + + + Refer to + + internal + + . + + Example of a link to external + destination + + + Refer to + + external + + . + + Internal + + + + --- test/odf/odt/basic_link/board_padding_background.fo (revision 0) +++ test/odf/odt/basic_link/board_padding_background.fo (revision 0) @@ -0,0 +1,26 @@ + + + + + + + + + + + + Common board, padding and background + + + + external + + + + + --- test/odf/odt/block/color.fo (revision 0) +++ test/odf/odt/block/color.fo (revision 0) @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + Julian Tuwim - Rzepka + + + Zasadził dziadek rzepkę w ogrodzie, + + Chodził te rzepkę oglądać co dzień. + + Wyrosła rzepka jędrna i krzepka, + + Schrupać by rzepkę z kawałkiem chlebaka! + + Więc ciągnie rzepkę dziadek niebożę, + + Ciągnie i ciągnie, wyciągnąć nie może! + + + Zawołał dziadek na pomoc babcię: + + "Ja złapię rzepkę, ty za mnie złap się!" + + I biedny dziadek z babcią niebogą + + Ciągną i ciągną, wyciągnąć nie mogą! + + Babcia za dziadka, + + Dziadek za rzepkę, + + Oj, przydałby się ktoś na przyczepkę! + + + Przyleciał wnuczek, babci się złapał, + + Poci się, stęka, aż się zasapał! + + Wnuczek za babcię, + + Babcia za dziadka, + + Dziadek za rzepkę, + + Oj, przydałby się ktoś na przyczepkę! + + Pocą się, sapią, stękają srogo, + + Ciągną i ciągną, wyciągnąć nie mogą! + + + Zawołał wnuczek szczeniaczka Mruczka, + + Przyleciał Mruczek i ciągnie wnuczka! + + Mruczek za wnuczka, + + Wnuczek za babcię, + + Babcia za dziadka, + + Dziadek za rzepkę, + + Oj, przydałby się ktoś na przyczepkę! + + Pocą się, sapią, stękają srogo, + + Ciągną i ciągną, wyciągnąć nie mogą! + + + Na kurkę czyhał kotek w ukryciu, + + Zaszczekał Mruczek: "Pomóż nam, Kiciu!" + + Kicia za Mruczka, + + Mruczek za wnuczka, + + Wnuczek za babcię, + + Babcia za dziadka, + + Dziadek za rzepkę, + + Oj, przydałby się ktoś na przyczepkę! + + Pocą się, sapią, stękają srogo, + + Ciągną i ciągną, wyciągnąć nie mogą! + + + Więc woła Kicia kurkę z podwórka, + + Wnet przyleciała usłużna kurka. + + Kurka za Kicię, + + Kicia za Mruczka, + + Mruczek za wnuczka, + + Wnuczek za babcię, + + Babcia za dziadka, + + Dziadek za rzepkę, + + Oj, przydałby się ktoś na przyczepkę! + + Pocą się, sapią, stękają srogo, + + Ciągną i ciągną, wyciągnąć nie mogą! + + + Szła sobie gąska ścieżynką wąską, + + Krzyknęła kurka: "ChodĽ no tu gąsko!" + + Gąska za kurkę, + + Kurka za Kicię, + + Kicia za Mruczka, + + Mruczek za wnuczka, + + Wnuczek za babcię, + + Babcia za dziadka, + + Dziadek za rzepkę, + + Oj, przydałby się ktoś na przyczepkę! + + Pocą się, sapią, stękają srogo, + + Ciągną i ciągną, wyciągnąć nie mogą! + + + Leciał wysoko bocian-długonos, + + "Fruńże tu, boćku, do nas na pomoc!" + + Bociek za gąskę, + + Gąska za kurkę, + + Kurka za Kicię, + + Kicia za Mruczka, + + Mruczek za wnuczka, + + Wnuczek za babcię, + + Babcia za dziadka, + + Dziadek za rzepkę, + + Oj, przydałby się ktoś na przyczepkę! + + Pocą się, sapią, stękają srogo, + + Ciągną i ciągną, wyciągnąć nie mogą! + + + Skakała drogą zielona żabka, + + Złapała boćka - rzadka to gradka! + + Żabka za boćka, + + Bociek za gąskę, + + Gąska za kurkę, + + Kurka za Kicię, + + Kicia za Mruczka, + + Mruczek za wnuczka, + + Wnuczek za babcię, + + Babcia za dziadka, + + Dziadek za rzepkę, + + A na przyczepkę + + Kawka za żabkę + + Bo na tę rzepkę + + Też miała chrapkę. + + + Tak się zawzięli, + + Tak się nadęli, + + Ze nagle rzepkę + + Trrrach!! - wyciągnęli! + + Aż wstyd powiedzieć, + + Co było dalej! + + Wszyscy na siebie + + Poupadali: + + Rzepka na dziadka, + + Dziadek na babcię, + + Babcia na wnuczka, + + Wnuczek na Mruczka, + + Mruczek na Kicię, + + Kicia na kurkę, + + Kurka na gąskę, + + Gąska na boćka, + + Bociek na żabkę, + + Żabka na kawkę + + I na ostatku + + Kawka na trawkę. + + + + + --- test/odf/odt/block/font_family.fo (revision 0) +++ test/odf/odt/block/font_family.fo (revision 0) @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + Lokomotywa + + + Stoi na stacji lokomotywa, + + Ciężka, ogromna i pot z niej spływa - + + Tłusta oliwa. + + Stoi i sapie, dyszy i dmucha, + + Żar z rozgrzanego jej brzucha bucha: + + Buch - jak gorąco! + + Uch - jak gorąco! + + Puff - jak gorąco! + + Uff - jak gorąco! + + Już ledwo sapie, już ledwo zipie, + + A jeszcze palacz węgiel w nią sypie. + + Wagony do niej podoczepiali + + Wielkie i ciężkie, z żelaza, stali, + + I pełno ludzi w każdym wagonie, + + A w jednym krowy, a w drugim konie, + + A w trzecim siedzą same grubasy, + + Siedzą i jedzą tłuste kiełbasy. + + A czwarty wagon pełen bananów, + + A w piątym stoi sześć fortepianów, + + W szóstym armata, o! jaka wielka! + + Pod każdym kołem żelazna belka! + + W siódmym dębowe stoły i szafy, + + W ósmym słoń, niedźwiedź i dwie żyrafy, + + W dziewiątym - same tuczone świnie, + + W dziesiątym - kufry, paki i skrzynie, + + A tych wagonów jest ze czterdzieści, + + Sam nie wiem, co się w nich jeszcze mieści. + + + Lecz choćby przyszło tysiąc atletów + + I każdy zjadłby tysiąc kotletów, + + I każdy nie wiem jak się natężał, + + To nie udźwigną - taki to ciężar! + + + Nagle - gwizd! + + Nagle - świst! + + Para - buch! + + Koła - w ruch! + + + Najpierw + + powoli + + jak żółw + + ociężale + + Ruszyła + + maszyna + + po szynach + + ospale. + + Szarpnęła wagony i ciągnie z mozołem, + + I kręci się, kręci się koło za kołem, + + I biegu przyspiesza, i gna coraz prędzej, + + I dudni, i stuka, łomoce i pędzi. + + + A dokąd? A dokąd? A dokąd? Na wprost! + + Po torze, po torze, po torze, przez most, + + Przez góry, przez tunel, przez pola, przez las + + I spieszy się, spieszy, by zdążyć na czas, + + Do taktu turkoce i puka, i stuka to: + + Tak to to, tak to to, tak to to, tak to to, + + Gładko tak, lekko tak toczy się w dal, + + Jak gdyby to była piłeczka, nie stal, + + Nie ciężka maszyna zziajana, zdyszana, + + Lecz raszka, igraszka, zabawka blaszana. + + + A skądże to, jakże to, czemu tak gna? + + A co to to, co to to, kto to tak pcha? + + Że pędzi, że wali, że bucha, buch-buch? + + To para gorąca wprawiła to w ruch, + + To para, co z kotła rurami do tłoków, + + A tłoki kołami ruszają z dwóch boków + + I gnają, i pchają, i pociąg się toczy, + + Bo para te tłoki wciąż tłoczy i tłoczy,, + + I koła turkocą, i puka, i stuka to: + + Tak to to, tak to to, tak to to, tak to to!... + + + + + --- test/odf/odt/block/font_size.fo (revision 0) +++ test/odf/odt/block/font_size.fo (revision 0) @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + Lokomotywa + + + Stoi na stacji lokomotywa, + + Ciężka, ogromna i pot z niej spływa - + + Tłusta oliwa. + + Stoi i sapie, dyszy i dmucha, + + Żar z rozgrzanego jej brzucha bucha: + + Buch - jak gorąco! + + Uch - jak gorąco! + + Puff - jak gorąco! + + Uff - jak gorąco! + + Już ledwo sapie, już ledwo zipie, + + A jeszcze palacz węgiel w nią sypie. + + Wagony do niej podoczepiali + + Wielkie i ciężkie, z żelaza, stali, + + I pełno ludzi w każdym wagonie, + + A w jednym krowy, a w drugim konie, + + A w trzecim siedzą same grubasy, + + Siedzą i jedzą tłuste kiełbasy. + + A czwarty wagon pełen bananów, + + A w piątym stoi sześć fortepianów, + + W szóstym armata, o! jaka wielka! + + Pod każdym kołem żelazna belka! + + W siódmym dębowe stoły i szafy, + + W ósmym słoń, niedźwiedź i dwie żyrafy, + + W dziewiątym - same tuczone świnie, + + W dziesiątym - kufry, paki i skrzynie, + + A tych wagonów jest ze czterdzieści, + + Sam nie wiem, co się w nich jeszcze mieści. + + + Lecz choćby przyszło tysiąc atletów + + I każdy zjadłby tysiąc kotletów, + + I każdy nie wiem jak się natężał, + + To nie udźwigną - taki to ciężar! + + + Nagle - gwizd! + + Nagle - świst! + + Para - buch! + + Koła - w ruch! + + + Najpierw + + powoli + + jak żółw + + ociężale + + Ruszyła + + maszyna + + po szynach + + ospale. + + Szarpnęła wagony i ciągnie z mozołem, + + I kręci się, kręci się koło za kołem, + + I biegu przyspiesza, i gna coraz prędzej, + + I dudni, i stuka, łomoce i pędzi. + + + A dokąd? A dokąd? A dokąd? Na wprost! + + Po torze, po torze, po torze, przez most, + + Przez góry, przez tunel, przez pola, przez las + + I spieszy się, spieszy, by zdążyć na czas, + + Do taktu turkoce i puka, i stuka to: + + Tak to to, tak to to, tak to to, tak to to, + + Gładko tak, lekko tak toczy się w dal, + + Jak gdyby to była piłeczka, nie stal, + + Nie ciężka maszyna zziajana, zdyszana, + + Lecz raszka, igraszka, zabawka blaszana. + + + A skądże to, jakże to, czemu tak gna? + + A co to to, co to to, kto to tak pcha? + + Że pędzi, że wali, że bucha, buch-buch? + + To para gorąca wprawiła to w ruch, + + To para, co z kotła rurami do tłoków, + + A tłoki kołami ruszają z dwóch boków + + I gnają, i pchają, i pociąg się toczy, + + Bo para te tłoki wciąż tłoczy i tłoczy,, + + I koła turkocą, i puka, i stuka to: + + Tak to to, tak to to, tak to to, tak to to!... + + + + + --- test/odf/odt/block/font_style.fo (revision 0) +++ test/odf/odt/block/font_style.fo (revision 0) @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + O KOCIE + + + Słyszał kto kiedy jako ciągą kota? + + Nie zawżdy szuka wody ta robota, + + Ciągnie go drugi nadobnie na suszy, + + Sukniej nie zmacza, ale wżdy mdło duszy. + + + + + --- test/odf/odt/block/font_weight.fo (revision 0) +++ test/odf/odt/block/font_weight.fo (revision 0) @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + DO PANIEJ + + + Co usty mówisz byś w sercu myśliła, + + Barzo byś mię tym, Pani, zniewoliła. + + Ale kiedy mię swym miłym mianujesz, + + Podobno dawnym zwyczajom folgujesz. + + + + + --- test/odf/odt/block/space_before_after.fo (revision 0) +++ test/odf/odt/block/space_before_after.fo (revision 0) @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + Joad had moved + into the imperfect shade of the molting leaves before + the man heard + him coming, stopped his song, and turned his head. It was a long + head, + bony; tight of + skin, and set on a neck as stringy and muscular + as a celery stalk. His + eyeballs were + heavy and protruding; the lids + stretched to cover them, and the lids + were raw and red. + His cheeks + were brown and shiny and hairless and his mouth + full—humorous or + sensual. The nose, beaked and hard, stretched the skin so tightly + that the + bridge showed + white. There was no perspiration on the face, + not even on the tall pale + forehead. It was + an abnormally high + forehead, lined with delicate blue veins at the + temples. Fully half + of the face was above the eyes. His stiff gray hair was mussed back + from his brow as + though he had combed it back with his fingers. For + clothes he wore + overalls and a blue + shirt. A denim coat with brass + buttons and a spotted brown hat creased + like a pork pie + lay on the + ground beside him. Canvas sneakers, gray with dust, lay + near by + where they + had fallen when they were kicked off. + + + The man looked long at Joad. The light seemed to go far into his brown + eyes, and it + picked out little golden specks deep in the irises. The strained bundle + of neck muscles + stood out. + + + + + --- test/odf/odt/block/text_align.fo (revision 0) +++ test/odf/odt/block/text_align.fo (revision 0) @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + Joad rolled the coat up more tightly. "An old turtle," he said. "Picked + him up on the + road. An old bulldozer. Thought I'd take 'im to my little brother. Kids + like turtles." + + + The preacher nodded his head slowly. "Every kid got a turtle some time + or other. + Nobody can't keep a turtle though. They work at it and work at it, and at + last one day + they get out and away they go—off somewheres. It's like me. I wouldn't + take the good + ol' gospel that was just layin' there to my hand. I got to be pickin' + at it an' workin' at it + until I got it all tore down. Here I got the sperit sometimes an' + nothin' to preach about. I + got the call to lead people, an' no place to lead 'em." + + + "Lead 'em around and around," said Joad. "Sling 'em in the irrigation + ditch. Tell 'em + they'll burn in hell if they don't think like you. What the hell you want + to lead 'em + someplace for? Jus' lead 'em." + + + The straight trunk shade had stretched out along the ground. Joad + moved gratefully + into it and squatted on his hams and made a new smooth place on which + to draw his + thoughts with a stick. A thick-furred yellow shepherd dog came trotting + down the road, + head low, tongue lolling and dripping. Its tail hung limply curled, and + it panted loudly. + Joad whistled at it, but it only dropped its head an inch and trotted + fast toward some + definite destination. "Goin' someplace," Joad explained, a little piqued. + "Goin' for + home maybe." + + + The preacher could not be thrown from his subject. "Goin' someplace," + he repeated. + "That's right, he's goin' someplace. Me—I don't know where I'm goin'. Tell + you what— + I used ta get the people jumpin' an' talkin' in tongues and + glory-shoutin' till they just + fell down an' passed out. An' some I'd baptize to bring 'em to. An' + then—you know + what I'd do? I'd take one of them girls out in the grass, an' I'd lay + with her. Done it + ever' time. Then I'd feel bad, an' I'd pray an' pray, but it didn't do + no good. Come the + next time, them an' me was full of the sperit, I'd do it again. I + figgered there just wasn't + no hope for me, an' I was a damned ol' hypocrite. But I didn't mean + to be." + + + + + --- test/odf/odt/external_graphic/simple.fo (revision 0) +++ test/odf/odt/external_graphic/simple.fo (revision 0) @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + Joad rolled the coat up more tightly. "An old turtle," he said. "Picked + him up on the + road. An old bulldozer. Thought I'd take 'im to my little brother. Kids + like turtles." + + + + + + + + --- test/odf/odt/general/basic.fo (revision 0) +++ test/odf/odt/general/basic.fo (revision 0) @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + This is simple text. + + + --- test/odf/odt/inline/color_font_size_style_weight.fo (revision 0) +++ test/odf/odt/inline/color_font_size_style_weight.fo (revision 0) @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + Joad rolled the coat up more tightly. "An old turtle," he said. "Picked + him up on the + road. An old bulldozer. Thought I'd take 'im to my little brother. Kids + like turtles." + + + + + --- test/odf/odt/inline/with_basiclink.fo (revision 0) +++ test/odf/odt/inline/with_basiclink.fo (revision 0) @@ -0,0 +1,104 @@ + + + + + + + + + + + + + Titre 3 : IF - Imposition + forfaitaire sur les pylônes + + + + + + + + 1. Agrément de l’exploitant de la + résidence hôtelière à vocation sociale et délai de + mise en location + + + + 2. Changement de l’exploitant de la résidence à l’initiative du + propriétaire + ( + + CCH, + article R + . 631-13, I + + + + + + 3. Abandon de l’exploitation à l’initiative de l’exploitant de la + résidence + ( + CCH, article R. 631-13, III + ) + + + + + 4. Retrait de l’agrément de l’exploitant de la résidence (CCH, + articles + + R. + 63 + 1-17 + + et + R. 451-7 + ) + + + 1 Dans ce cas, le propriétaire de la + résidence prend les dispositions nécessaires pour assurer le + respect + de ses engagements (prix de nuitée maximal et pourcentage + des + logements réservés aux personnes en difficulté, notamment) ainsi + que la continuité de l’exploitation de la résidence au bénéfice des + occupants de celle-ci. + + 5. Défaillance de l’exploitant + + + + + + --- test/odf/odt/list_block/simple.fo (revision 0) +++ test/odf/odt/list_block/simple.fo (revision 0) @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + Joad rolled the coat up more tightly. + "An old turtle," he said. "Picked + him up on the + road. An old + bulldozer. Thought I'd take 'im to my little brother. Kids + like + turtles." + + + + + + + + item1 + + + + + + + + item2 + + + + + + + + item3 + + + + + + + --- test/odf/odt/table/simple.fo (revision 0) +++ test/odf/odt/table/simple.fo (revision 0) @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + Joad rolled the coat up more tightly. + "An old turtle," he said. "Picked + him up on the + road. An old + bulldozer. Thought I'd take 'im to my little brother. Kids + like + turtles." + + + + + + + + aa + + + + + bb + + + + + cc + + + + + dd + + + + + + + ff + + + + + gg + + + + + hh + + + + + ii + + + + + + + jj + + + + + kk + + + + + + + + + + + + + + + + + + + + + + + +