Examples of OLEShape


Examples of org.apache.poi.hslf.model.OLEShape

   private void handleSlideEmbeddedResources(Slide slide, XHTMLContentHandler xhtml)
                throws TikaException, SAXException, IOException {
      for( Shape shape : slide.getShapes() ) {
         if( shape instanceof OLEShape ) {
            OLEShape oleShape = (OLEShape)shape;
           
            try {
               ObjectData data = oleShape.getObjectData();

               if(data != null) {
                  TikaInputStream stream =
                     TikaInputStream.get(data.getData());
                  try {
                     String mediaType = null;
                     if ("Excel.Chart.8".equals(oleShape.getProgID())) {
                        mediaType = "application/vnd.ms-excel";
                     }
                     handleEmbeddedResource(
                           stream, Integer.toString(oleShape.getObjectID()),
                           mediaType, xhtml, false);
                  } finally {
                     stream.close();
                  }
               }
View Full Code Here

Examples of org.apache.poi.hslf.model.OLEShape

         return;
      }
     
      for( Shape shape : shapes ) {
         if( shape instanceof OLEShape ) {
            OLEShape oleShape = (OLEShape)shape;
           
            try {
               ObjectData data = oleShape.getObjectData();

               if(data != null) {
                  TikaInputStream stream =
                     TikaInputStream.get(data.getData());
                  try {
                     String mediaType = null;
                     if ("Excel.Chart.8".equals(oleShape.getProgID())) {
                        mediaType = "application/vnd.ms-excel";
                     }
                     handleEmbeddedResource(
                           stream, Integer.toString(oleShape.getObjectID()),
                           mediaType, xhtml, false);
                  } finally {
                     stream.close();
                  }
               }
View Full Code Here

Examples of org.apache.poi.hslf.model.OLEShape

         return;
      }
     
      for( Shape shape : shapes ) {
         if( shape instanceof OLEShape ) {
            OLEShape oleShape = (OLEShape)shape;
            ObjectData data = null;
            try {
                data = oleShape.getObjectData();
            } catch( NullPointerException e ) {
                /* getObjectData throws NPE some times. */
            }
            if (data != null) {
               String objID = Integer.toString(oleShape.getObjectID());

               // Embedded Object: add a <div
               // class="embedded" id="X"/> so consumer can see where
               // in the main text each embedded document
               // occurred:
               AttributesImpl attributes = new AttributesImpl();
               attributes.addAttribute("", "class", "class", "CDATA", "embedded");
               attributes.addAttribute("", "id", "id", "CDATA", objID);
               xhtml.startElement("div", attributes);
               xhtml.endElement("div");

               TikaInputStream stream =
                    TikaInputStream.get(data.getData());
               try {
                  String mediaType = null;
                  if ("Excel.Chart.8".equals(oleShape.getProgID())) {
                     mediaType = "application/vnd.ms-excel";
                  }
                  handleEmbeddedResource(
                        stream, objID, objID,
                        mediaType, xhtml, false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.