1 17 18 19 20 package org.apache.fop.render.rtf.rtflib.rtfdoc; 21 22 28 29 import java.io.Writer ; 30 import java.io.IOException ; 31 32 35 public class RtfPageNumber extends RtfContainer { 36 41 42 43 public static final String RTF_FIELD = "field"; 44 45 public static final String RTF_FIELD_PAGE = "fldinst { PAGE }"; 46 47 public static final String RTF_FIELD_RESULT = "fldrslt"; 48 49 50 RtfPageNumber(IRtfPageNumberContainer parent, Writer w) throws IOException { 51 super((RtfContainer)parent, w); 52 } 53 54 55 RtfPageNumber(RtfContainer parent, Writer w, RtfAttributes attrs) throws IOException { 56 super(parent, w, attrs); 58 } 59 60 63 RtfPageNumber(RtfParagraph parent, Writer w) throws IOException { 64 super((RtfContainer)parent, w, parent.attrib); 66 67 if (parent.getTextAttributes() != null) { 69 attrib.set(parent.getTextAttributes()); 70 } 71 } 72 73 77 protected void writeRtfContent() throws IOException { 78 90 writeGroupMark(true); 91 writeAttributes(attrib, RtfText.ATTR_NAMES); 92 writeControlWord("chpgn"); 93 writeGroupMark(false); 94 } 95 96 99 public boolean isEmpty() { 100 return false; 101 } 102 } 103 | Popular Tags |