aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/rtf/rtflib
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-09-06 12:07:49 +0000
committerJeremias Maerki <jeremias@apache.org>2005-09-06 12:07:49 +0000
commit775a1b4bb3c85586792222c8bd43bdd24acc201d (patch)
treed49f7e430ed1e9c233b51495db20233914d797db /src/java/org/apache/fop/render/rtf/rtflib
parent17bf613fe48290ed49c1097534e71cacab3ff5eb (diff)
downloadxmlgraphics-fop-775a1b4bb3c85586792222c8bd43bdd24acc201d.tar.gz
xmlgraphics-fop-775a1b4bb3c85586792222c8bd43bdd24acc201d.zip
Bugzilla #36508:
Support for padding-before and padding-after in RTF output. Submitted by: Sergey Simonchik <Sergey.Simonchik.at.borland.com> git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@278982 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/rtf/rtflib')
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java
index 26fcbb71b..a9c04b78e 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -147,7 +147,7 @@ implements java.lang.Cloneable {
/**
* Set an attribute that has nested attributes as value
* @param name name of attribute
- * @param type value of the nested attributes
+ * @param value value of the nested attributes
* @return this (which now contains the new entry)
*/
public RtfAttributes set(String name, RtfAttributes value) {
@@ -215,4 +215,17 @@ implements java.lang.Cloneable {
xslAttributes = new org.xml.sax.helpers.AttributesImpl(pAttribs);
}
}
+
+ /**
+ * Add integer value <code>addValue</code> to attribute with name <code>name</code>.
+ * If there is no such setted attribute, then value of this attribure is equal to
+ * <code>addValue</code>.
+ * @param addValue the increment of value
+ * @param name the name of attribute
+ */
+ public void addIntegerValue(int addValue, String name) {
+ Integer value = (Integer) getValue(name);
+ int v = (value != null) ? value.intValue() : 0;
+ set(name, v + addValue);
+ }
}