Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
What Is poi-ooxml-5.2.3.jar?
What Is poi-ooxml-5.2.3.jar?
✍: FYIcenter.com
poi-ooxml-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which
provides an API for Microsoft document files of Word, Excel, PowerPoint, and Visio.
poi-ooxml-5.2.3.jar supports Apache POI components that read and write Microsoft's Open Office XML document format, which is used in recent versions of Microsoft Office tools like Word 2007, Excel 2007, PowerPoint 2007, etc.
poi-ooxml-5.2.3.jar is distributed as part of the poi-bin-5.2.3-20220909.zip download file.
JAR File Size and Download Location:
JAR name: poi-ooxml-5.2.3.jar Target JDK version: 9 Dependency: poi.jar xmlbeans.jar ooxml-schemas.jar commons-collections.jar junit.jar File name: poi-ooxml.jar, poi-ooxml-5.2.3.jar File size: 2010497 bytes Release date: 09-09-2022 Download: Apache POI Website
Here are Java Source Code files for poi-ooxml-5.2.3.jar:
⏎ org/apache/poi/xssf/usermodel/XSSFObjectData.java
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.xssf.usermodel;
import java.io.IOException;
import java.io.InputStream;
import javax.xml.namespace.QName;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.poi.ooxml.POIXMLDocumentPart;
import org.apache.poi.ooxml.POIXMLException;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackageRelationshipTypes;
import org.apache.poi.poifs.filesystem.DirectoryEntry;
import org.apache.poi.poifs.filesystem.FileMagic;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.ss.usermodel.ObjectData;
import org.apache.poi.util.IOUtils;
import org.apache.xmlbeans.XmlCursor;
import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps;
import org.openxmlformats.schemas.drawingml.x2006.main.CTOfficeArtExtension;
import org.openxmlformats.schemas.drawingml.x2006.main.CTOfficeArtExtensionList;
import org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D;
import org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D;
import org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D;
import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;
import org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D;
import org.openxmlformats.schemas.drawingml.x2006.main.STShapeType;
import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape;
import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShapeNonVisual;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTOleObject;
/**
* Represents binary object (i.e. OLE) data stored in the file. Eg. A GIF, JPEG etc...
*/
public class XSSFObjectData extends XSSFSimpleShape implements ObjectData {
private static final Logger LOG = LogManager.getLogger(XSSFObjectData.class);
/**
* A default instance of CTShape used for creating new shapes.
*/
private static CTShape prototype;
private CTOleObject oleObject;
protected XSSFObjectData(XSSFDrawing drawing, CTShape ctShape) {
super(drawing, ctShape);
}
/**
* Prototype with the default structure of a new auto-shape.
*/
protected static CTShape prototype() {
final String drawNS = "http://schemas.microsoft.com/office/drawing/2010/main";
if(prototype == null) {
CTShape shape = CTShape.Factory.newInstance();
CTShapeNonVisual nv = shape.addNewNvSpPr();
CTNonVisualDrawingProps nvp = nv.addNewCNvPr();
nvp.setId(1);
nvp.setName("Shape 1");
// nvp.setHidden(true);
CTOfficeArtExtensionList extLst = nvp.addNewExtLst();
// https://msdn.microsoft.com/en-us/library/dd911027(v=office.12).aspx
CTOfficeArtExtension ext = extLst.addNewExt();
ext.setUri("{63B3BB69-23CF-44E3-9099-C40C66FF867C}");
try (XmlCursor cur = ext.newCursor()) {
cur.toEndToken();
cur.beginElement(new QName(drawNS, "compatExt", "a14"));
cur.insertNamespace("a14", drawNS);
cur.insertAttributeWithValue("spid", "_x0000_s1");
}
nv.addNewCNvSpPr();
CTShapeProperties sp = shape.addNewSpPr();
CTTransform2D t2d = sp.addNewXfrm();
CTPositiveSize2D p1 = t2d.addNewExt();
p1.setCx(0);
p1.setCy(0);
CTPoint2D p2 = t2d.addNewOff();
p2.setX(0);
p2.setY(0);
CTPresetGeometry2D geom = sp.addNewPrstGeom();
geom.setPrst(STShapeType.RECT);
geom.addNewAvLst();
prototype = shape;
}
return prototype;
}
@Override
public String getOLE2ClassName() {
return getOleObject().getProgId();
}
/**
* @return the CTOleObject associated with the shape
*/
public CTOleObject getOleObject() {
if (oleObject == null) {
long shapeId = getCTShape().getNvSpPr().getCNvPr().getId();
oleObject = getSheet().readOleObject(shapeId);
if (oleObject == null) {
throw new POIXMLException("Ole object not found in sheet container - it's probably a control element");
}
}
return oleObject;
}
@Override
public byte[] getObjectData() throws IOException {
try (InputStream is = getObjectPart().getInputStream()) {
return IOUtils.toByteArray(is);
}
}
/**
* @return the package part of the object data
*/
public PackagePart getObjectPart() {
if (!getOleObject().isSetId()) {
throw new POIXMLException("Invalid ole object found in sheet container");
}
POIXMLDocumentPart pdp = getSheet().getRelationById(getOleObject().getId());
return (pdp == null) ? null : pdp.getPackagePart();
}
@Override
public boolean hasDirectoryEntry() {
InputStream is = null;
try {
is = getObjectPart().getInputStream();
is = FileMagic.prepareToCheckMagic(is);
return FileMagic.valueOf(is) == FileMagic.OLE2;
} catch (IOException e) {
LOG.atWarn().withThrowable(e).log("can't determine if directory entry exists");
return false;
} finally {
IOUtils.closeQuietly(is);
}
}
@Override
public DirectoryEntry getDirectory() throws IOException {
try (InputStream is = getObjectPart().getInputStream()) {
return new POIFSFileSystem(is).getRoot();
}
}
/**
* The filename of the embedded image
*/
@Override
public String getFileName() {
return getObjectPart().getPartName().getName();
}
protected XSSFSheet getSheet() {
return (XSSFSheet)getDrawing().getParent();
}
@Override
public XSSFPictureData getPictureData() {
try (XmlCursor cur = getOleObject().newCursor()) {
if (cur.toChild(XSSFRelation.NS_SPREADSHEETML, "objectPr")) {
String blipId = cur.getAttributeText(new QName(PackageRelationshipTypes.CORE_PROPERTIES_ECMA376_NS, "id"));
return (XSSFPictureData)getSheet().getRelationById(blipId);
}
return null;
}
}
@Override
public String getContentType() {
return getObjectPart().getContentType();
}
}
⏎ org/apache/poi/xssf/usermodel/XSSFObjectData.java
Or download all of them as a single archive file:
File name: poi-ooxml-5.2.3-src.zip File size: 1396572 bytes Release date: 2022-09-09 Download
⇒ What Is poi-excelant-5.2.3.jar?
2017-04-01, ≈147🔥, 0💬
Popular Posts:
What Is mail.jar of JavaMail 1.4? I got the JAR file from javamail-1_4.zip. mail.jar in javamail-1_4...
JDK 11 jdk.crypto.mscapi.jmod is the JMOD file for JDK 11 Crypto MSCAPI module. JDK 11 Crypto MSCAPI...
HttpComponents Client Source Code Files are provided in the source package file, httpcomponents-clie...
What Is wstx-asl-3.2.8.jar? wstx-asl-3.2.8.jar is JAR file for the ASL component of Woodstox 3.2.8. ...
How to merge two JAR files with "jar" commands? I am tired of specifying multiple JAR files in the c...