コード例 #1
0
 protected void doAtStart(XHTMLReader reader, ZLStringMap xmlattributes) {
   final BookReader modelReader = reader.getModelReader();
   modelReader.endParagraph();
   // TODO: increase left indent
   modelReader.beginParagraph();
   // TODO: replace bullet sign by number inside OL tag
   modelReader.addData(BULLET);
 }
コード例 #2
0
 protected void doAtStart(XHTMLReader reader, ZLStringMap xmlattributes) {
   String fileName = reader.getAttributeValue(xmlattributes, myNamespace, myNameAttribute);
   if (fileName != null) {
     fileName = MiscUtil.decodeHtmlReference(fileName);
     final ZLFile imageFile = ZLFile.createFileByPath(reader.myPathPrefix + fileName);
     if (imageFile != null) {
       final BookReader modelReader = reader.getModelReader();
       boolean flag = modelReader.paragraphIsOpen() && !modelReader.paragraphIsNonEmpty();
       if (flag) {
         modelReader.endParagraph();
       }
       final String imageName = imageFile.getLongName();
       modelReader.addImageReference(imageName, (short) 0);
       modelReader.addImage(imageName, new ZLFileImage(MimeTypes.MIME_IMAGE_AUTO, imageFile));
       if (flag) {
         modelReader.beginParagraph();
       }
     }
   }
 }