* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.exceptions;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.exceptions;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.interfaces;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
/** Constants for RTF table attribute names */
public interface IBorderAttributes {
-
+
String BORDER_SINGLE_THICKNESS = "brdrs";
String BORDER_DOUBLE_THICKNESS = "brdrth";
String BORDER_SHADOWED ="brdrsh";
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.IOException;
-
+
/** interface for RTF objects that can contain footers */
public interface IRtfAfterContainer
{
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.IOException;
-
+
public interface IRtfBeforeContainer
{
public RtfBefore newBefore(RtfAttributes attrs) throws IOException;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
{
/** close current paragraph if any and start a new one with default attributes */
public RtfParagraph newParagraph() throws IOException;
-
+
/** close current paragraph if any and start a new one with specified attributes */
public RtfParagraph newParagraph(RtfAttributes attr) throws IOException;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.IOException;
public interface IRtfParagraphKeepTogetherContainer {
-
+
/** close current paragraph if any and start a new one */
public RtfParagraphKeepTogether newParagraphKeepTogether() throws IOException;
}
\ No newline at end of file
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.IOException;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* @param str if not null, added to the RtfText created
*/
public RtfText newText(String str,RtfAttributes attr) throws IOException;
-
+
/** close current text run if any and start a new one with default attributes
* @param str if not null, added to the RtfText created
*/
/** add a line break */
public void newLineBreak() throws IOException;
-
+
/** text containers usually provide default attributes for all texts that they contain.
* This returns a copy of the container's attributes
*/
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
public interface IrtfTemplateContainer {
-
+
/**
* Creates a new Template.
*
* @exception IOException on error
*/
public RtfTemplate newTemplate (String str, RtfAttributes attr) throws IOException;
-
-
+
+
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
/**
- *
+ *
* This context is used to manage the "keepn" RTF attribute
- * Used by ParagraphBuilder and JforCmd
+ * Used by ParagraphBuilder and JforCmd
*
*/
private static int m_paraKeepTogetherOpen=0;
private static boolean m_paraResetProperties=false;
private static ParagraphKeeptogetherContext m_instance = null;
-
+
ParagraphKeeptogetherContext() {
}
-
-
+
+
/**
* Singelton.
*
if (m_instance==null) m_instance = new ParagraphKeeptogetherContext();
return m_instance;
}
-
+
/** Return the level of current "keep whith next" paragraph */
public static int getKeepTogetherOpenValue() {
return m_paraKeepTogetherOpen;
/** Open a new "keep whith next" paragraph */
public static void KeepTogetherOpen() {
- m_paraKeepTogetherOpen++;
+ m_paraKeepTogetherOpen++;
}
/** Close a "keep whith next" paragraph */
public static void KeepTogetherClose() {
if(m_paraKeepTogetherOpen > 0) {
m_paraKeepTogetherOpen--;
-
- //If the \pard control word is not present, the current paragraph inherits all paragraph properties.
+
+ //If the \pard control word is not present, the current paragraph inherits all paragraph properties.
//Also the next paragraph must reset the properties otherwise the \keepn don't stop.
m_paraResetProperties= (m_paraKeepTogetherOpen==0);
}
}
-
+
/** Determine if the next paragraph must reset the properites */
public static boolean paragraphResetProperties() {
- return m_paraResetProperties;
+ return m_paraResetProperties;
}
-
+
/** Reset the flag if the paragraph properties have been resested */
public static void setParagraphResetPropertiesUsed() {
m_paraResetProperties=false;
}
-
+
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
public final static String[] FOOTER_ATTR = new String[]{
FOOTER
};
-
+
RtfAfter(RtfSection parent, Writer w, RtfAttributes attrs) throws IOException {
super(parent,w,attrs);
}
-
+
protected void writeMyAttributes() throws IOException {
writeAttributes(m_attrib,FOOTER_ATTR);
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.util.*;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
public class RtfBefore extends RtfAfterBeforeBase {
/**RtfBefore attributes*/
public final static String HEADER = "header";
-
+
public final static String[] HEADER_ATTR = new String[]{
HEADER
};
-
+
RtfBefore(RtfSection parent, Writer w, RtfAttributes attrs) throws IOException {
super(parent,w,attrs);
}
-
+
protected void writeMyAttributes() throws IOException {
writeAttributes(m_attrib,HEADER_ATTR);
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.util.Vector;
getColorNumber (192, 192, 192);
}
-
+
/** define a named color for getColorNumber(String) */
private void addNamedColor(String name,int colorNumber)
{
//////////////////////////////////////////////////
// @@ Public methods
//////////////////////////////////////////////////
-
+
/** get the RTF number of a named color
* @return null if name not found
*/
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
extends RtfContainer
{
private RtfSection m_currentSection;
-
+
/** Create an RTF element as a child of given container */
RtfDocumentArea(RtfFile f,Writer w) throws IOException
{
super(f,w);
}
-
+
/** close current RtfSection if any and create a new one */
public RtfSection newSection() throws IOException
{
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.*;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import org.apache.fop.rtf.rtflib.rtfdoc.RtfElement;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.*;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import org.apache.fop.rtf.rtflib.exceptions.RtfStructureException;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.IOException;
*/
public int getFontNumber (String family)
{
-
+
family = family.toLowerCase ();
Object o = fontIndex.get (family);
int retVal;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
{
RtfFontManager.getInstance ().writeFonts ((RtfHeader)m_parent);
}
-
+
/** true if this element would generate no "useful" RTF content */
public boolean isEmpty()
{
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.util.*;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
{
super((RtfContainer)parent,w);
}
-
+
/** overridden to write our attributes before our content */
protected void writeRtfContent() throws IOException
{
writeControlWord("line");
- }
-
+ }
+
/** true if this element would generate no "useful" RTF content */
public boolean isEmpty()
{
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
private RtfListItem m_item;
private RtfListTable m_listTable;
private final boolean m_hasTableParent;
-
+
/** list numbering style.
* Could add more variables, for now we simply differentiate between bullets and numbering
*/
public static class NumberingStyle {
public boolean isBulletedList = true;
}
-
+
/** Create an RTF list as a child of given container with given attributes */
RtfList(RtfContainer parent, Writer w, RtfAttributes attr) throws IOException {
super((RtfContainer)parent,w,attr);
//create a new list table entry for the list
m_listTable = (getRtfFile()).startListTable(attr);
m_listTable.setParentList(this);
-
+
// find out if we are nested in a table
m_hasTableParent = this.getParentOfClass(RtfTable.class) != null;
}
-
+
/** change numbering style */
public void setNumberingStyle(NumberingStyle ns) {
m_numberingStyle = ns;
}
-
+
/** overridden to setup the list: start a group with appropriate attributes */
protected void writeRtfPrefix() throws IOException {
// pard causes word97 (and sometimes 2000 too) to crash if the list is nested in a table
if(!m_hasTableParent) writeControlWord("pard");
-
+
writeOneAttribute(RtfText.LEFT_INDENT_FIRST,m_attrib.getValue(RtfListTable.LIST_INDENT));
writeOneAttribute(RtfText.LEFT_INDENT_BODY,m_attrib.getValue(RtfText.LEFT_INDENT_BODY));
-
+
// put the whole list in a group
writeGroupMark(true);
-
+
// group for list setup info
writeGroupMark(true);
-
+
writeStarControlWord("pn");
//Modified by Chris Scott
//fixes second line indentation
-
+
if(m_numberingStyle.isBulletedList) {
// bulleted list
writeControlWord("pnlvlblt");
m_attrib.getValue(RtfListTable.LIST_INDENT));
writeControlWord("pntxta.");
}
-
+
writeGroupMark(false);
writeOneAttribute(RtfListTable.LIST_NUMBER,
(m_listTable.getListNumber()).toString());
}
-
+
/** end the list group */
protected void writeRtfSuffix() throws IOException {
// close group that encloses the whole list
writeGroupMark(false);
-
+
// reset paragraph defaults to make sure list ends
// but pard causes word97 (and sometimes 2000 too) to crash if the list is nested in a table
if(!m_hasTableParent) writeControlWord("pard");
}
-
+
/** close current list item and start a new one */
public RtfListItem newListItem() throws IOException {
if(m_item != null) m_item.close();
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
implements IRtfParagraphContainer {
private RtfList m_parentList;
private RtfParagraph m_paragraph;
-
+
/** special RtfParagraph that writes list item setup code before its content */
private class RtfListItemParagraph extends RtfParagraph {
-
+
RtfListItemParagraph(RtfListItem rli,RtfAttributes attrs)
throws IOException {
super(rli,rli.m_writer,attrs);
}
-
+
protected void writeRtfPrefix() throws IOException {
- super.writeRtfPrefix();
+ super.writeRtfPrefix();
// for bulleted list, add list item setup group before paragraph contents
if(m_parentList.isBulletedList()) {
writeGroupMark(true);
writeGroupMark(false);
}
}
-
+
}
-
+
/** Create an RTF list item as a child of given container with default attributes */
RtfListItem(RtfList parent, Writer w) throws IOException {
super((RtfContainer)parent,w);
m_parentList = parent;
}
-
+
/** Create an RTF list item as a child of given container with given attributes */
RtfListItem(RtfList parent, Writer w, RtfAttributes attr) throws IOException {
super((RtfContainer)parent,w,attr);
m_parentList = parent;
}
-
+
/** close current paragraph and start a new one */
/** close current paragraph if any and start a new one */
public RtfParagraph newParagraph(RtfAttributes attrs) throws IOException {
m_paragraph = new RtfListItemParagraph(this,attrs);
return m_paragraph;
}
-
+
/** close current paragraph if any and start a new one with default attributes */
public RtfParagraph newParagraph() throws IOException {
return newParagraph(null);
}
-
+
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.util.*;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
public class RtfNull
extends RtfContainer{
-
+
RtfNull(RtfPage parent, Writer w) throws IOException {
super((RtfContainer)parent,w);
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
{
/** if true, RtfParagraphs that have no children do not generate any RTF code */
public boolean ignoreEmptyParagraphs() { return true; }
-
+
/** RtfContainer does not generate any RTF is this returns false */
public boolean renderContainer(RtfContainer c) { return true; }
}
\ No newline at end of file
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
/**RtfPage attributes*/
public final static String PAGE_WIDTH = "paperw";
public final static String PAGE_HEIGHT = "paperh";
-
+
public final static String MARGIN_TOP = "margt";
public final static String MARGIN_BOTTOM = "margb";
public final static String MARGIN_LEFT = "margl";
public final static String MARGIN_RIGHT = "margr";
-
+
public final static String[] PAGE_ATTR = new String[]{
PAGE_WIDTH, PAGE_HEIGHT, MARGIN_TOP, MARGIN_BOTTOM,
MARGIN_LEFT, MARGIN_RIGHT
};
-
+
/** RtfPage creates new page attributes with the parent container, the writer
- and the attributes*/
+ and the attributes*/
RtfPage(RtfPageArea parent, Writer w, RtfAttributes attrs) throws IOException {
super((RtfContainer)parent,w);
m_attrib = attrs;
PAGE_ATTR, if not null */
protected void writeRtfContent() throws IOException {
writeAttributes(m_attrib, PAGE_ATTR);
-
+
if (m_attrib != null)
{
Object widthRaw = m_attrib.getValue( PAGE_WIDTH );
Object heightRaw = m_attrib.getValue( PAGE_HEIGHT );
-
+
if ((widthRaw instanceof Integer) && (heightRaw instanceof Integer) &&
((Integer) widthRaw).intValue() > ((Integer) heightRaw).intValue())
{
writeControlWord( "landscape" );
}
- }
+ }
}
-
+
/** RtfPage - attributes accessor */
public RtfAttributes getAttributes(){
return m_attrib;
}
-
+
/** RtfPage - is overwritten here because page attributes have no content
- only attributes. RtfContainer is defined not to write when empty.
+ only attributes. RtfContainer is defined not to write when empty.
Therefore must make this true to print.*/
protected boolean okToWriteRtf()
{
return true;
}
-
+
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
private RtfPage m_currentPage;
private RtfNull nullChild;
private RtfAttributes childAttributes;
-
+
/** Create an RTF element as a child of given container */
RtfPageArea(RtfFile f,Writer w) throws IOException
{
super(f,w);
}
-
+
/** close current Rtfpage if any and create a new one */
public RtfPage newPage(RtfAttributes attr) throws IOException
{
return m_currentPage;
}
-
+
protected boolean okToWriteRtf()
{
return true;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
{
super((RtfContainer)parent,w);
}
-
+
/** overridden to write our attributes before our content */
protected void writeRtfContent() throws IOException
{
writeControlWord("page");
- }
-
+ }
+
/** true if this element would generate no "useful" RTF content */
public boolean isEmpty()
{
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.IOException;
public class RtfParagraphKeepTogether extends RtfContainer{
-
+
public static final int STATUS_NULL=0;
public static final int STATUS_OPEN_PARAGRAPH=1;
public static final int STATUS_CLOSE_PARAGRAPH=2;
private int m_status =STATUS_NULL;
-
- /** RtfParagraphKeepTogether*/
+
+ /** RtfParagraphKeepTogether*/
RtfParagraphKeepTogether(IRtfParagraphContainer parent, Writer w) throws IOException {
super((RtfContainer)parent,w);
}
writeControlWord("pard");
writeControlWord("par");
writeControlWord("keepn");
- writeGroupMark(true);
+ writeGroupMark(true);
m_status = STATUS_NULL;
}
if (m_status == STATUS_CLOSE_PARAGRAPH) {
writeGroupMark(false);
- m_status = STATUS_NULL;
+ m_status = STATUS_NULL;
}
}
-
-
+
+
public void setStatus(int status) {
- m_status = status;
- }
+ m_status = status;
+ }
/** true if this element would generate no "useful" RTF content */
public boolean isEmpty()
{
return false;
}
-
+
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.Writer;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
public class RtfStringConverter {
private static final RtfStringConverter m_instance = new RtfStringConverter();
-
+
private static final Map m_specialChars;
private static final Character DBLQUOTE = new Character('\"');
private static final Character QUOTE = new Character('\'');
private static final Character SPACE = new Character(' ');
-
+
/** List of characters to escape with corresponding replacement strings */
static {
m_specialChars = new HashMap();
m_specialChars.put(new Character('{'),"{");
m_specialChars.put(new Character('}'),"}");
}
-
+
/** singleton pattern */
private RtfStringConverter() {
}
-
+
/** use this to get an object of this class */
public static RtfStringConverter getInstance() {
return m_instance;
}
-
+
/** write given String to given Writer, converting characters as required by RTF spec */
public void writeRtfString(Writer w,String str) throws IOException {
if(str == null) return;
-
+
// TODO: could be made more efficient (binary lookup, etc.)
for(int i=0; i < str.length(); i++) {
final Character c = new Character(str.charAt(i));
} else {
d=new Character(str.charAt(i));
}
-
+
//This section modified by Chris Scott
//add "smart" quote recognition
if(c.equals((Object)DBLQUOTE) && d.equals((Object)SPACE)) {
} else {
replacement = (String)m_specialChars.get(c);
}
-
+
if(replacement != null) {
// RTF-escaped char
w.write('\\');
}
}
}
-
+
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.util.Vector;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.*;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.rtfdoc;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.util.*;
* Singelton of the RTF style template
* This class belongs to the <jfor:style-template> tag processing.
*/
-
+
public class RtfTemplate {
-
+
/** Singelton instance */
private static RtfTemplate instance = null;
-
+
private String templateFilePath = null;
-
+
/**
* Constructor.
*/
private RtfTemplate ()
{
-
+
}
}
- /**
- *Set the template file and adjust tha path separator
+ /**
+ *Set the template file and adjust tha path separator
*
- *@param templateFilePath The full path of the template
+ *@param templateFilePath The full path of the template
**/
public void setTemplateFilePath(String templateFilePath) throws IOException {
// no validity checks here - leave this to the RTF client
public void writeTemplate (RtfHeader header) throws IOException
{
if (templateFilePath == null || templateFilePath.length() == 0) return;
-
+
header.writeGroupMark (true);
header.writeControlWord ("template");
header.writeRtfString(this.templateFilePath);
header.writeGroupMark (false);
-
+
header.writeGroupMark (true);
header.writeControlWord ("linkstyles");
header.writeGroupMark (false);
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.io.IOException;
* @author Bertrand Delacretaz bdelacretaz@codeconsult.ch
*/
-public class RtfText extends RtfElement
+public class RtfText extends RtfElement
{
// char code for non-breakable space
private static final int CHAR_NBSP = 160;
private static final int CHAR_NEW_LINE = 141;
/* these next two variables are used to encode bold formating in the
* raw xml text. Usefull when specific words or phrases are to be bolded
- * but their placement and length change. Thus the bold formatting becomes
+ * but their placement and length change. Thus the bold formatting becomes
* part of the data. The same method can be used for implementing other types
- * of raw text formatting.
+ * of raw text formatting.
*/
private static final int CHAR_BOLD_START = 130;
private static final int CHAR_BOLD_END = 131;
-
+
/** members */
private String m_text;
private final RtfAttributes m_attr;
-
+
/** RtfText attributes: attribute names are RTF control word names to avoid additional mapping */
public static final String ATTR_BOLD = "b";
public static String ALIGN_RIGHT = "qr";
public static String ALIGN_JUSTIFIED = "qj";
public static String ALIGN_DISTRIBUTED = "qd";
-
+
/** RtfText attributes: border attributes */
//added by Chris Scott
public static String BDR_BOTTOM_SINGLE = "brdrb\\brsp40\\brdrs";
public static String BDR_BOTTOM_EMBOSS = "brdrb\\brsp40\\brdremboss";
public static String BDR_BOTTOM_DOTTED = "brdrb\\brsp40\\brdrdot";
public static String BDR_BOTTOM_DASH = "brdrb\\brsp40\\brdrdash";
-
+
/** RtfText attributes: fields */
//must be carefull of group markings and star control
//ie page field:
public static String RTF_FIELD = "field";
public static String RTF_FIELD_PAGE = "fldinst { PAGE }";
public static String RTF_FIELD_RESULT = "fldrslt";
-
+
/**RtfText attributes: indentation attributes */
//added by Chris Scott
public static String LEFT_INDENT_BODY = "li";
public static String LEFT_INDENT_FIRST = "fi-";
-
+
public static String TAB_CENTER = "tqc\\tx";
public static String TAB_RIGHT = "tqr\\tx";
- public static String TAB_LEADER_DOTS = "tldot";
- public static String TAB_LEADER_HYPHEN = "tlhyph";
+ public static String TAB_LEADER_DOTS = "tldot";
+ public static String TAB_LEADER_HYPHEN = "tlhyph";
public static String TAB_LEADER_UNDER = "tlul";
public static String TAB_LEADER_THICK = "tlth";
public static String TAB_LEADER_EQUALS = "tleq";
-
+
/** Space before/after a paragraph */
//these lines were added by Boris Pouderous
public static final String SPACE_BEFORE = "sb";
{
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_JUSTIFIED, ALIGN_DISTRIBUTED
};
-
+
/** RtfText attributes:: this must contain all border attribute names*/
//this line added by Chris Scott, Westinghouse
public static String[] BORDER = new String []
{
BDR_BOTTOM_SINGLE,BDR_BOTTOM_DOUBLE,BDR_BOTTOM_EMBOSS,BDR_BOTTOM_DOTTED,BDR_BOTTOM_DASH
};
-
+
public static String[] INDENT = new String []
{
LEFT_INDENT_BODY, LEFT_INDENT_FIRST
};
-
+
public static String[] TABS = new String []
{
TAB_CENTER ,TAB_RIGHT,TAB_LEADER_DOTS,TAB_LEADER_HYPHEN,TAB_LEADER_UNDER,
TAB_LEADER_THICK,TAB_LEADER_EQUALS
};
-
+
/** RtfText attributes: this must contain all attribute names */
public static final String [] ATTR_NAMES = {
ATTR_FONT_SIZE,
ATTR_FONT_FAMILY,
ATTR_FONT_COLOR,
- ATTR_BACKGROUND_COLOR
+ ATTR_BACKGROUND_COLOR
};
/** Create an RtfText in given IRtfTextContainer.
public void writeRtfContent() throws IOException
{
writeChars: {
-
+
//these lines were added by Boris Pouderous
if (m_attr != null) {
writeAttributes(m_attr,new String[] {RtfText.SPACE_BEFORE});
writeAttributes(m_attr,new String[] {RtfText.SPACE_AFTER});
- }
-
+ }
+
if(isTab()){
writeControlWord("tab");
}else if(isNewLine()){
RtfStringConverter.getInstance().writeRtfString(m_writer,m_text);
writeGroupMark(false);
}
-
+
}
}
{
return !isEmpty() && !isNbsp();
}
-
+
/** IRtfTextContainer requirement: return a copy of our attributes */
public RtfAttributes getTextContainerAttributes() {
if(m_attrib == null) return null;
return m_text == null || m_text.trim().length() == 0;
}
- /**
+ /**
* True if text contains a single non-breaking space (#160).
* TODO make this more general and/or merge with isEmpty? <-- what happen with empty paragraphs, if they will be removed, than NO, else ok
*
return true;
return false;
}
-
+
public boolean isTab()
{
if(m_text.trim().length()==1 && m_text.charAt(0)== CHAR_TAB)
else
return false;
}
-
+
public boolean isNewLine()
{
if(m_text.trim().length()==1 && m_text.charAt(0)== CHAR_NEW_LINE)
else
return false;
}
-
+
public boolean isBold(boolean isStart)
{
if(isStart){
}
return false;
}
-
+
/** get the attributes of our text */
public RtfAttributes getTextAttributes(){
return m_attr;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.rtfdoc;
import java.util.Iterator;
class WhitespaceCollapser {
private final static String SPACE = " ";
private boolean m_lastEndSpace = true;
-
+
/** remove extra whitespace in RtfText elements that are inside c */
WhitespaceCollapser(RtfContainer c) {
// process all texts
}
}
}
-
+
/** process one RtfText from our container */
private void processText(RtfText txt) {
final String orig = txt.getText();
-
+
// tokenize the text based on whitespace and regenerate it so as
// to collapse multiple spaces into one
if(orig != null && orig.length() > 0) {
final boolean endSpace = allSpaces || Character.isWhitespace(orig.charAt(orig.length() - 1));
final boolean beginSpace = Character.isWhitespace(orig.charAt(0));
final StringBuffer sb = new StringBuffer(orig.length());
-
+
// if text contains spaces only, keep at most one
if(allSpaces) {
if(!m_lastEndSpace) sb.append(SPACE);
sb.append(SPACE);
}
first = false;
-
+
sb.append(stk.nextToken());
if(stk.hasMoreTokens() || endSpace) {
sb.append(SPACE);
}
}
}
-
+
txt.setText(sb.toString());
m_lastEndSpace = endSpace;
}
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import org.apache.fop.rtf.rtflib.rtfdoc.*;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import java.io.File;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import org.apache.fop.rtf.rtflib.interfaces.ITableColumnsInfo;
class DummyTableColumnsInfo implements ITableColumnsInfo
{
-
+
public float getColumnWidth() {
return INVALID_COLUM_WIDTH;
}
-
+
public void selectFirstColumn() {
}
-
+
public int getNumberOfColumns() {
return 0;
}
-
+
public int getColumnIndex() {
return 0;
}
-
+
public void selectNextColumn() {
- }
+ }
}
\ No newline at end of file
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import org.apache.fop.rtf.rtflib.rtfdoc.RtfDocumentArea;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import java.util.Date;
protected void generateDocument(RtfDocumentArea rda,RtfSection sect)
throws IOException {
sect.newParagraph().newText("There must be a table below where the second cell contains a bulleted list mixed with normal paragraphs");
-
+
final RtfTable tbl = sect.newTable(new DummyTableColumnsInfo());
final RtfTableRow row = tbl.newTableRow();
row.newTableCell(RtfTableCell.DEFAULT_CELL_WIDTH).newParagraph().newText("cell A, simple");
-
+
final RtfTableCell c = row.newTableCell(RtfTableCell.DEFAULT_CELL_WIDTH);
c.newParagraph().newText("cell B, contains this paragraph followed by a list and another paragraph");
fillList(c.newList(null),1,3);
c.newParagraph().newText("Normal paragraph, follows the list.");
-
+
row.newTableCell(RtfTableCell.DEFAULT_CELL_WIDTH).newParagraph().newText("cell C, simple");
}
-
+
private void fillList(RtfList list,int listIndex,int nItems)
throws IOException
{
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import java.util.Date;
protected void generateDocument(RtfDocumentArea rda,RtfSection sect)
throws IOException {
sect.newParagraph().newText("This document contains a table with some merged cells.");
-
+
final RtfTable tbl = sect.newTable(new DummyTableColumnsInfo());
final int MM_TO_TWIPS = (int)(1440f / 25.4f);
RtfTableCell c = r.newTableCell(80 * MM_TO_TWIPS);
c.setHMerge(c.MERGE_START);
c.newParagraph().newText("cell 0,0, width 80mm, merge start, followed by two merged cells totalling 80mm width.");
-
+
c = r.newTableCell(40 * MM_TO_TWIPS);
c.setHMerge(c.MERGE_WITH_PREVIOUS);
c.newParagraph().newText("THIS IS IN AN HMERGED CELL, MUST NOT APPEAR IN RTF DOCUMENT");
-
+
c = r.newTableCell(40 * MM_TO_TWIPS);
c.setHMerge(c.MERGE_WITH_PREVIOUS);
c.newParagraph().newText("THIS IS IN AN HMERGED CELL, MUST NOT APPEAR IN RTF DOCUMENT");
}
-
+
// second row, start vertical merging in column 1
{
RtfTableRow r = tbl.newTableRow();
RtfTableCell c = r.newTableCell(40 * MM_TO_TWIPS);
c.setVMerge(c.MERGE_START);
c.newParagraph().newText("cell 1,0, vertical merge start, 40mm, spans three rows.");
-
+
r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText("cell 1,1, no merge, 80mm");
-
+
c = r.newTableCell(40 * MM_TO_TWIPS);
c.setVMerge(c.MERGE_START);
c.newParagraph().newText("cell 1,2, vertical merge start, 40mm, spans two rows.");
}
-
+
// third row, column 1 merged with previous row
{
RtfTableRow r = tbl.newTableRow();
RtfTableCell c = r.newTableCell(40 * MM_TO_TWIPS);
c.setVMerge(c.MERGE_WITH_PREVIOUS);
c.newParagraph().newText("cell 2,0, VMERGED CELL, MUST NOT APPEAR IN RTF DOCUMENT");
-
+
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText("cell 2,1, no merge, 40mm");
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText("cell 2,2, no merge, 40mm");
-
+
c = r.newTableCell(40 * MM_TO_TWIPS);
c.setVMerge(c.MERGE_WITH_PREVIOUS);
c.newParagraph().newText("cell 2,3, VMERGED CELL, MUST NOT APPEAR IN RTF DOCUMENT");
}
-
+
// fourth row, column 1 merged with previous row
{
RtfTableRow r = tbl.newTableRow();
RtfTableCell c = r.newTableCell(40 * MM_TO_TWIPS);
c.setVMerge(c.MERGE_WITH_PREVIOUS);
c.newParagraph().newText("cell 3,0, VMERGED CELL, MUST NOT APPEAR IN RTF DOCUMENT");
-
+
r.newTableCell(10 * MM_TO_TWIPS).newParagraph().newText("cell 3,1, no merge, 10mm");
r.newTableCell(30 * MM_TO_TWIPS).newParagraph().newText("cell 3,2, no merge, 30mm");
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText("cell 3,3, no merge, 40mm");
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText("cell 3,4, no merge, 40mm");
}
-
+
// fifth row, just one cell
{
RtfTableRow r = tbl.newTableRow();
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import java.util.Date;
class NestedTable extends TestDocument {
private static final int MM_TO_TWIPS = (int)(1440f / 25.4f);
-
+
/** generate the body of the test document */
protected void generateDocument(RtfDocumentArea rda,RtfSection sect)
throws IOException {
sect.newParagraph().newText("This document demonstrates pseudo-nested tables created using merged table cells");
-
+
firstTestTable(sect);
RtfParagraph p = sect.newParagraph();
p.newText("Test continues on next page.");
p.newPageBreak();
secondTestTable(sect);
-
+
p = sect.newParagraph();
p.newText("Test continues on next page.");
p.newPageBreak();
thirdTestTable(sect);
-
+
sect.newParagraph().newText("End of nested tables test document");
}
-
+
private void firstTestTable(RtfSection sect)
throws IOException {
-
+
sect.newParagraph().newText("First test: table with one nested table in cell 1,1");
final RtfTable tbl = sect.newTable(new DummyTableColumnsInfo());
// first row, normal
RtfTableCell c = r.newTableCell(160 * MM_TO_TWIPS);
c.newParagraph().newText("cell 0,0, width 160mm, only cell in this row.");
}
-
+
// second row contains nested table
{
RtfTableRow r = tbl.newTableRow();
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText("cell 1,0, width 40mm, to the left of nested table.");
-
+
final RtfTableCell c = r.newTableCell(80 * MM_TO_TWIPS);
c.newParagraph().newText("cell 1,1, width 80mm, this text is followed by a nested table in the same cell, followed by text that says 'AFTER NESTED TABLE'.");
fillNestedTable(c.newTable(new DummyTableColumnsInfo()),1);
c.newParagraph().newText("AFTER NESTED TABLE");
-
+
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText("cell 1,2, width 40mm, to the right of nested table.");
}
-
+
// third row, normal
{
RtfTableRow r = tbl.newTableRow();
r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText("cell 2,0, width 80mm, this row has two cells.");
r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText("cell 2,1, width 80mm, last cell.");
}
-
+
}
-
- private void secondTestTable(RtfSection sect)
+
+ private void secondTestTable(RtfSection sect)
throws IOException {
sect.newParagraph().newText("Second test: table with two nested tables in cell 1,1");
final RtfTable tbl = sect.newTable(new DummyTableColumnsInfo());
RtfTableCell c = r.newTableCell(160 * MM_TO_TWIPS);
c.newParagraph().newText("second test table: cell 0,0, width 160mm, only cell in this row.");
}
-
+
// second row contains nested table
{
RtfTableRow r = tbl.newTableRow();
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText("cell 1,0, width 40mm, to the left of nested tables.");
-
+
final RtfTableCell c = r.newTableCell(80 * MM_TO_TWIPS);
c.newParagraph().newText("cell 1,1, width 80mm, this text is followed by a nested table in the same cell, followed by text that says 'BETWEEN', then another table, then 'AFTER'.");
fillNestedTable(c.newTable(new DummyTableColumnsInfo()),2);
c.newParagraph().newText("BETWEEN");
fillNestedTable(c.newTable(new DummyTableColumnsInfo()),3);
c.newParagraph().newText("AFTER");
-
+
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText("cell 1,2, width 40mm, to the right of nested table.");
}
-
+
// third row, normal
{
RtfTableRow r = tbl.newTableRow();
r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText("cell 2,1, width 80mm, last cell.");
}
}
-
- private void thirdTestTable(RtfSection sect)
+
+ private void thirdTestTable(RtfSection sect)
throws IOException {
sect.newParagraph().newText("Third test: table with two nested tables in cell 1,1 and one nested table in cell 0,1");
final RtfTable tbl = sect.newTable(new DummyTableColumnsInfo());
c = r.newTableCell(80 * MM_TO_TWIPS);
fillNestedTable(c.newTable(new DummyTableColumnsInfo()),4);
}
-
+
// second row contains nested table
{
RtfTableRow r = tbl.newTableRow();
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText("cell 1,0, width 40mm, to the left of nested tables.");
-
+
final RtfTableCell c = r.newTableCell(80 * MM_TO_TWIPS);
c.newParagraph().newText("cell 1,1, width 80mm, this text is followed by a nested table in the same cell, followed by text that says 'BETWEEN', then another table, then 'AFTER'.");
fillNestedTable(c.newTable(new DummyTableColumnsInfo()),5);
c.newParagraph().newText("BETWEEN");
fillNestedTable(c.newTable(new DummyTableColumnsInfo()),6);
c.newParagraph().newText("AFTER");
-
+
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText("cell 1,2, width 40mm, to the right of nested table.");
}
-
+
// third row, normal
{
RtfTableRow r = tbl.newTableRow();
r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText("cell 2,1, width 80mm, last cell.");
}
}
-
+
/** fill the nested table */
private void fillNestedTable(RtfTable tbl, int index)
throws IOException {
id + ":nested cell 0,0. Nested table contains 3 rows with 1,2 and 3 cells respectively"
);
}
-
+
{
RtfTableRow r = tbl.newTableRow();
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText(id + ":nested cell 1,0, 40mm.");
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText(id + ":nested cell 1,1, 40mm.");
}
-
+
{
RtfTableRow r = tbl.newTableRow();
r.newTableCell(30 * MM_TO_TWIPS).newParagraph().newText(id + ":nested cell 2,0, 30mm.");
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import org.apache.fop.rtf.rtflib.rtfdoc.RtfDocumentArea;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import java.util.Date;
* @author Bertrand Delacretaz bdelacretaz@codeconsult.ch
*/
-class SimpleDocument
+class SimpleDocument
extends TestDocument
{
/** generate the body of the test document */
protected void generateDocument(RtfDocumentArea rda,RtfSection sect)
throws IOException {
sect.newParagraph().newText("First paragraph of the simple RTF test document.");
-
+
final RtfParagraph para = sect.newParagraph();
para.newText("Second paragraph of simple RTF test document.\n");
for(int i=0; i < 242; i++) {
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import java.util.Date;
sect.newParagraph().newText("Normal paragraph between lists 1 and 2.");
makeList(sect,2,3,null);
sect.newParagraph().newText("Normal paragraph after list 2.");
-
+
sect.newParagraph().newText("Now a numbered list (4 items):");
final RtfList.NumberingStyle nn = new RtfList.NumberingStyle();
nn.isBulletedList = false;
makeList(sect,3,4,nn);
}
-
+
private void makeList(RtfSection sect,int listIndex,int nItems,RtfList.NumberingStyle ns)
throws IOException
{
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import java.util.Date;
final RtfTable tbl = sect.newTable(new DummyTableColumnsInfo());
final int MAX_ROW = 2;
final int MAX_COL = 3;
-
+
final int INCH_TO_TWIPS = 1440;
final int c1w = 4;
tbl.newTableRow().newTableCell(c1w * INCH_TO_TWIPS).newParagraph().newText("Here's a table row with just one cell, width " + c1w + "''");
-
+
for(int row=0; row < MAX_ROW; row++) {
final RtfTableRow r = tbl.newTableRow();
-
+
for(int col=0; col < MAX_COL; col++) {
final float widthInInches = col / 2f + 1f;
final int widthInTwips = (int)(widthInInches * INCH_TO_TWIPS);
}
}
}
-
+
sect.newParagraph().newText("This paragraph follows the table.");
}
}
\ No newline at end of file
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import java.util.Date;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import java.util.Date;
para.newText("This is bold\n",new RtfAttributes().set(RtfText.ATTR_BOLD));
para.newText("This is italic\n",new RtfAttributes().set(RtfText.ATTR_ITALIC));
para.newText("This is underline\n",new RtfAttributes().set(RtfText.ATTR_UNDERLINE));
-
+
// RTF font sizes are in half-points
para.newText("This is size 48\n",new RtfAttributes().set(RtfText.ATTR_FONT_SIZE,96));
-
+
para.newText(
"This is bold and italic\n",
new RtfAttributes().set(RtfText.ATTR_BOLD).set(RtfText.ATTR_ITALIC)
);
-
+
final RtfAttributes attr = new RtfAttributes();
attr.set(RtfText.ATTR_BOLD).set(RtfText.ATTR_ITALIC);
attr.set(RtfText.ATTR_UNDERLINE);
attr.set(RtfText.ATTR_FONT_SIZE,72);
para.newText("This is bold, italic, underline and size 36\n",attr);
-
+
para.newText("This is back to normal\n");
}
}
\ No newline at end of file
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
*/
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
+ */
+
package org.apache.fop.rtf.rtflib.testdocs;
import java.util.Date;
final RtfParagraph p1 = sect.newParagraph();
p1.newText("\t Each word of this paragraph must be separated\tfrom\t\n\tthe next word with exactly\t \tone");
p1.newText(" space.");
-
+
final RtfParagraph p2 = sect.newParagraph();
p2.newText("");
p2.newText("In this");
p2.newText("exactly");
p2.newText(" one space ");
p2.newText("between each\tword and the next, and no spaces at the beginning or end of the paragraph.");
-
+
final RtfParagraph p3 = sect.newParagraph();
p3.newText("The word 'boomerang' must be written after this with no funny spacing: ");
p3.newText("boo");
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.tools;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
- * The RTF library of the FOP project consists of voluntary contributions made by
- * many individuals on behalf of the Apache Software Foundation and was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and contributors of
- * the jfor project (www.jfor.org), who agreed to donate jfor to the FOP project.
- * For more information on the Apache Software Foundation, please
- * see <http://www.apache.org/>.
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+
+/*
+ * This file is part of the RTF library of the FOP project, which was originally
+ * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
+ * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
+ * the FOP project.
*/
package org.apache.fop.rtf.rtflib.tools;