1 17 18 19 20 package org.apache.fop.render.rtf.rtflib.rtfdoc; 21 22 28 29 import java.io.IOException ; 31 32 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement; 34 35 38 public class RtfListStyleNumber extends RtfListStyle { 39 40 46 public void writeListPrefix(RtfListItem item) 47 throws IOException { 48 item.writeControlWord("pnlvlbody"); 49 item.writeControlWord("ilvl0"); 50 item.writeOneAttribute(RtfListTable.LIST_NUMBER, "0"); 51 item.writeControlWord("pndec"); 52 item.writeOneAttribute("pnstart", new Integer (1)); 53 item.writeOneAttribute("pnindent", 54 item.attrib.getValue(RtfListTable.LIST_INDENT)); 55 item.writeControlWord("pntxta."); 56 } 57 58 65 public void writeParagraphPrefix(RtfElement element) 66 throws IOException { 67 element.writeGroupMark(true); 68 element.writeControlWord("pntext"); 69 element.writeControlWord("f" + RtfFontManager.getInstance().getFontNumber("Symbol")); 70 element.writeControlWord("'b7"); 71 element.writeControlWord("tab"); 72 element.writeGroupMark(false); 73 } 74 75 82 public void writeLevelGroup(RtfElement element) 83 throws IOException { 84 element.writeOneAttributeNS( 85 RtfListTable.LIST_START_AT, new Integer (1)); 86 element.attrib.set(RtfListTable.LIST_NUMBER_TYPE, 0); 87 88 element.writeGroupMark(true); 89 element.writeOneAttributeNS( 90 RtfListTable.LIST_TEXT_FORM, "\\'03\\\'00. ;"); 91 element.writeGroupMark(false); 92 93 element.writeGroupMark(true); 94 element.writeOneAttributeNS( 95 RtfListTable.LIST_NUM_POSITION, "\\'01;"); 96 element.writeGroupMark(false); 97 98 element.writeOneAttribute(RtfListTable.LIST_FONT_TYPE, new Integer (0)); 99 } 100 } 101 | Popular Tags |