Esempio n. 1
0
        protected void ProcessDrawnObject(HWPFDocument doc,
                                          CharacterRun characterRun, XmlElement block)
        {
            if (GetPicturesManager() == null)
            {
                return;
            }
            // TODO: support headers
            OfficeDrawing officeDrawing = doc.GetOfficeDrawingsMain().GetOfficeDrawingAt(characterRun.StartOffset);

            if (officeDrawing == null)
            {
                logger.Log(POILogger.WARN, "Characters #" + characterRun
                           + " references missing drawn object");
                return;
            }

            byte[] pictureData = officeDrawing.GetPictureData();
            if (pictureData == null)
            {
                // usual shape?
                return;
            }

            PictureType type = PictureType.FindMatchingType(pictureData);
            String      path = GetPicturesManager().SavePicture(pictureData, type,
                                                                "s" + characterRun.StartOffset + "." + type);

            ProcessDrawnObject(doc, characterRun, officeDrawing, path, block);
        }
Esempio n. 2
0
        protected override void ProcessDrawnObject(HWPFDocument doc,
                                                   CharacterRun characterRun, OfficeDrawing officeDrawing,
                                                   String path, XmlElement block)
        {
            XmlElement externalGraphic = foDocumentFacade.CreateExternalGraphic(path);

            block.AppendChild(externalGraphic);
        }
Esempio n. 3
0
 protected abstract void ProcessDrawnObject(HWPFDocument doc,
                                            CharacterRun characterRun, OfficeDrawing officeDrawing,
                                            String path, XmlElement block);
Esempio n. 4
0
 protected override void ProcessDrawnObject(HWPFDocument doc,
         CharacterRun characterRun, OfficeDrawing officeDrawing,
         String path, XmlElement block)
 {
     XmlElement externalGraphic = foDocumentFacade.CreateExternalGraphic(path);
     block.AppendChild(externalGraphic);
 }
Esempio n. 5
0
 protected override void ProcessDrawnObject(HWPFDocument doc, CharacterRun characterRun, OfficeDrawing officeDrawing, string path, XmlElement block)
 {
     XmlElement img = htmlDocumentFacade.CreateImage(path);
     block.AppendChild(img);
 }
Esempio n. 6
0
 protected override void ProcessDrawnObject(HWPFDocument doc,
                                            CharacterRun characterRun, OfficeDrawing officeDrawing,
                                            String path, XmlElement block)
 {
     // ignore
 }
Esempio n. 7
0
        protected override void ProcessDrawnObject(HWPFDocument doc, CharacterRun characterRun, OfficeDrawing officeDrawing, string path, XmlElement block)
        {
            XmlElement img = htmlDocumentFacade.CreateImage(path);

            block.AppendChild(img);
        }
 protected override void ProcessDrawnObject(HWPFDocument doc,
         CharacterRun characterRun, OfficeDrawing officeDrawing,
         String path, XmlElement block)
 {
     // ignore
 }