/**
* Copies nodes from one POIFS to the other minus the excepts
- * @param source is the source POIFS to copy from
- * @param target is the target POIFS to copy to
+ * @param sourceRoot is the source POIFS to copy from
+ * @param targetRoot is the target POIFS to copy to
* @param excepts is a list of Strings specifying what nodes NOT to copy
*/
@Deprecated
* @param sheetIx number (0 based)
* @throws IllegalArgumentException if the name is null or invalid
* or workbook already contains a sheet with this name
- * @see {@link #createSheet(String)}
- * @see {@link org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)}
- * for a safe way to create valid names
+ * @see #createSheet(String)
+ * @see org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)
*/
public void setSheetName(int sheetIx, String name) {
if (name == null) {
* @return Sheet representing the new sheet.
* @throws IllegalArgumentException if the name is null or invalid
* or workbook already contains a sheet with this name
- * @see {@link org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)}
- * for a safe way to create valid names
+ * @see org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)
*/
public HSSFSheet createSheet(String sheetname)
{
/**
* Copies all the nodes from one POIFS Directory to another
*
- * @param source
+ * @param sourceRoot
* is the source Directory to copy from
- * @param target
+ * @param targetRoot
* is the target Directory to copy to
- * @param excepts
- * is a list of Strings specifying what nodes NOT to copy
*/
public static void copyNodes(DirectoryEntry sourceRoot,
DirectoryEntry targetRoot) throws IOException
/**
* Copies nodes from one Directory to the other minus the excepts
*
- * @param source The filtering source Directory to copy from
- * @param target The filtering target Directory to copy to
+ * @param filteredSource The filtering source Directory to copy from
+ * @param filteredTarget The filtering target Directory to copy to
*/
public static void copyNodes( FilteringDirectoryNode filteredSource,
FilteringDirectoryNode filteredTarget ) throws IOException
/**
* Copies nodes from one Directory to the other minus the excepts
*
- * @param source
+ * @param sourceRoot
* is the source Directory to copy from
- * @param target
+ * @param targetRoot
* is the target Directory to copy to
* @param excepts
* is a list of Strings specifying what nodes NOT to copy
* will exclude entries such as "MyNode" and "MyDir/IgnoreNode".
* The excludes can stretch into children, if they contain a /.
*
- * @param entry The Directory to filter
+ * @param directory The Directory to filter
* @param excludes The Entries to exclude
*/
public FilteringDirectoryNode(DirectoryEntry directory, Collection<String> excludes) {
* to include a stream "{01}Ole10Native" which contains the actual\r
* data relevant for this class.\r
*\r
- * @param poifs POI Filesystem object\r
+ * @param directory POI Filesystem object\r
* @return Returns an instance of this class\r
* @throws IOException on IO error\r
* @throws Ole10NativeException on invalid or unexcepted data format\r
* </LI>\r
* </UL>\r
*\r
- * Use {@link org.apache.poi.hssf.usermodel.Sheet#getSheetConditionalFormatting()} to get access to an instance of this class.\r
+ * Use {@link org.apache.poi.ss.usermodel.Sheet#getSheetConditionalFormatting()}\r
+ * to get access to an instance of this class.\r
* <P>\r
* To create a new Conditional Formatting set use the following approach:\r
*\r
*\r
* @param regions - list of rectangular regions to apply conditional formatting rules\r
* @param rule1 - the first rule\r
- * @param rule1 - the second rule\r
+ * @param rule2 - the second rule\r
*\r
* @return index of the newly created Conditional Formatting object\r
*/\r
/**
* Set the sheet name.
- *
+ * <p>
+ * See {@link org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)}
+ * for a safe way to create valid names
+ * </p>
* @param sheet number (0 based)
* @throws IllegalArgumentException if the name is null or invalid
* or workbook already contains a sheet with this name
- * @see {@link #createSheet(String)}
- * @see {@link org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)}
- * for a safe way to create valid names
+ * @see #createSheet(String)
+ * @see org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)
*/
void setSheetName(int sheet, String name);
* The string MUST NOT begin or end with the single quote (') character.
* </p>
*
+ * <p>
+ * See {@link org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)}
+ * for a safe way to create valid names
+ * </p>
* @param sheetname sheetname to set for the sheet.
* @return Sheet representing the new sheet.
* @throws IllegalArgumentException if the name is null or invalid
* or workbook already contains a sheet with this name
- * @see {@link org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)}
- * for a safe way to create valid names
+ * @see org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)
*/
Sheet createSheet(String sheetname);
*
* @param data
* the byte array
- * @param offset
+ * @param startOffset
* a starting offset into the byte array
* @param value
* the short (16-bit) values
import java.util.Arrays;\r
import java.util.Collection;\r
import java.util.Comparator;\r
-import java.util.List;\r
\r
/**\r
* Encapsulates logic to translate DrawingML objects to Java2D\r
String blipId = blip.getEmbed();\r
PackageRelationship rel = parentPart.getRelationship(blipId);\r
if (rel != null) {\r
- XSLFImageRendener renderer = null;\r
+ XSLFImageRenderer renderer = null;\r
if (graphics != null)\r
- renderer = (XSLFImageRendener) graphics.getRenderingHint(XSLFRenderingHint.IMAGE_RENDERER);\r
- if (renderer == null) renderer = new XSLFImageRendener();\r
+ renderer = (XSLFImageRenderer) graphics.getRenderingHint(XSLFRenderingHint.IMAGE_RENDERER);\r
+ if (renderer == null) renderer = new XSLFImageRenderer();\r
\r
try {\r
BufferedImage img = renderer.readImage(parentPart.getRelatedPart(rel));\r
\r
\r
/**\r
- * YK: dashing of lines is suppressed for now.\r
- * @return\r
+ * YK: shadows of lines are suppressed for now.\r
*/\r
@Override\r
public XSLFShadow getShadow() {\r
/**\r
* select a font to be used to paint text\r
*\r
- * @param family the font family as defined in the .pptx file.\r
+ * @param typeface the font family as defined in the .pptx file.\r
* This can be unknown or missing in the graphic environment.\r
*\r
* @return the font to be used to paint text\r
+++ /dev/null
-/*\r
- * ====================================================================\r
- * Licensed to the Apache Software Foundation (ASF) under one or more\r
- * contributor license agreements. See the NOTICE file distributed with\r
- * this work for additional information regarding copyright ownership.\r
- * The ASF licenses this file to You under the Apache License, Version 2.0\r
- * (the "License"); you may not use this file except in compliance with\r
- * the License. You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ====================================================================\r
- */\r
-\r
-package org.apache.poi.xslf.usermodel;\r
-\r
-import org.apache.poi.openxml4j.opc.PackagePart;\r
-import org.apache.poi.util.Beta;\r
-\r
-import javax.imageio.ImageIO;\r
-import java.awt.Graphics2D;\r
-import java.awt.Image;\r
-import java.awt.geom.AffineTransform;\r
-import java.awt.geom.Rectangle2D;\r
-import java.awt.image.BufferedImage;\r
-import java.io.ByteArrayInputStream;\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-\r
-/**\r
- * For now this class renders only images supported by the javax.imageio.ImageIO\r
- * framework. Subclasses can override this class to support other formats, for\r
- * example, Use Apache batik to render WMF:\r
- * \r
- * <pre>\r
- * <code>\r
- * @Override\r
- * public class MyImageRendener extends XSLFImageRendener{\r
- * public boolean drawImage(Graphics2D graphics, XSLFPictureData data, Rectangle2D anchor){\r
- * boolean ok = super.drawImage(graphics, data, anchor);\r
- * if(!ok){\r
- * // see what type of image we are\r
- * String contentType = data.getPackagePart().getContentType();\r
- * if(contentType.equals("image/wmf")){\r
- * // use Apache Batik to handle WMF\r
- * // see http://xmlgraphics.apache.org/batik/\r
- * }\r
- * \r
- * }\r
- * return ok;\r
- * }\r
- * }\r
- * </code>\r
- * </pre>\r
- * \r
- * and then pass this class to your instance of java.awt.Graphics2D:\r
- * \r
- * <pre>\r
- * <code>\r
- * graphics.setRenderingHint(XSLFRenderingHint.IMAGE_RENDERER, new MyImageRendener());\r
- * </code>\r
- * </pre>\r
- * \r
- * @author Yegor Kozlov\r
- */\r
-@Beta\r
-public class XSLFImageRendener {\r
-\r
- /**\r
- * Render picture data into the supplied graphics\r
- * \r
- * @return true if the picture data was succesfully renderered\r
- */\r
- public boolean drawImage(Graphics2D graphics, XSLFPictureData data,\r
- Rectangle2D anchor) {\r
- try {\r
- BufferedImage img = ImageIO.read(data.getPackagePart().getInputStream());\r
- double sx = anchor.getWidth()/img.getWidth();\r
- double sy = anchor.getHeight()/img.getHeight();\r
- double tx = anchor.getX();\r
- double ty = anchor.getY();\r
- AffineTransform at = new AffineTransform(sx, 0, 0, sy, tx, ty) ;\r
-\r
- graphics.drawRenderedImage(img, at);\r
-\r
- return true;\r
- } catch (Exception e) {\r
- return false;\r
- }\r
-\r
- }\r
-\r
- /**\r
- * Create a buffered image from the supplied package part.\r
- * This method is called to create texture paints.\r
- *\r
- * @return a <code>BufferedImage</code> containing the decoded\r
- * contents of the input, or <code>null</code>.\r
- */\r
- public BufferedImage readImage(PackagePart packagePart) throws IOException {\r
- return ImageIO.read(packagePart.getInputStream());\r
- }\r
-}
\ No newline at end of file
--- /dev/null
+/*\r
+ * ====================================================================\r
+ * Licensed to the Apache Software Foundation (ASF) under one or more\r
+ * contributor license agreements. See the NOTICE file distributed with\r
+ * this work for additional information regarding copyright ownership.\r
+ * The ASF licenses this file to You under the Apache License, Version 2.0\r
+ * (the "License"); you may not use this file except in compliance with\r
+ * the License. You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ====================================================================\r
+ */\r
+\r
+package org.apache.poi.xslf.usermodel;\r
+\r
+import org.apache.poi.openxml4j.opc.PackagePart;\r
+import org.apache.poi.util.Beta;\r
+\r
+import javax.imageio.ImageIO;\r
+import java.awt.Graphics2D;\r
+import java.awt.Image;\r
+import java.awt.geom.AffineTransform;\r
+import java.awt.geom.Rectangle2D;\r
+import java.awt.image.BufferedImage;\r
+import java.io.ByteArrayInputStream;\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+\r
+/**\r
+ * For now this class renders only images supported by the javax.imageio.ImageIO\r
+ * framework. Subclasses can override this class to support other formats, for\r
+ * example, Use Apache batik to render WMF:\r
+ * \r
+ * <pre>\r
+ * <code>\r
+ * public class MyImageRendener extends XSLFImageRendener{\r
+ * public boolean drawImage(Graphics2D graphics, XSLFPictureData data, Rectangle2D anchor){\r
+ * boolean ok = super.drawImage(graphics, data, anchor);\r
+ * if(!ok){\r
+ * // see what type of image we are\r
+ * String contentType = data.getPackagePart().getContentType();\r
+ * if(contentType.equals("image/wmf")){\r
+ * // use Apache Batik to handle WMF\r
+ * // see http://xmlgraphics.apache.org/batik/\r
+ * }\r
+ * \r
+ * }\r
+ * return ok;\r
+ * }\r
+ * }\r
+ * </code>\r
+ * </pre>\r
+ * \r
+ * and then pass this class to your instance of java.awt.Graphics2D:\r
+ * \r
+ * <pre>\r
+ * <code>\r
+ * graphics.setRenderingHint(XSLFRenderingHint.IMAGE_RENDERER, new MyImageRendener());\r
+ * </code>\r
+ * </pre>\r
+ * \r
+ * @author Yegor Kozlov\r
+ */\r
+@Beta\r
+public class XSLFImageRenderer {\r
+\r
+ /**\r
+ * Render picture data into the supplied graphics\r
+ * \r
+ * @return true if the picture data was successfully rendered\r
+ */\r
+ public boolean drawImage(Graphics2D graphics, XSLFPictureData data,\r
+ Rectangle2D anchor) {\r
+ try {\r
+ BufferedImage img = ImageIO.read(data.getPackagePart().getInputStream());\r
+ double sx = anchor.getWidth()/img.getWidth();\r
+ double sy = anchor.getHeight()/img.getHeight();\r
+ double tx = anchor.getX();\r
+ double ty = anchor.getY();\r
+ AffineTransform at = new AffineTransform(sx, 0, 0, sy, tx, ty) ;\r
+\r
+ graphics.drawRenderedImage(img, at);\r
+\r
+ return true;\r
+ } catch (Exception e) {\r
+ return false;\r
+ }\r
+\r
+ }\r
+\r
+ /**\r
+ * Create a buffered image from the supplied package part.\r
+ * This method is called to create texture paints.\r
+ *\r
+ * @return a <code>BufferedImage</code> containing the decoded\r
+ * contents of the input, or <code>null</code>.\r
+ */\r
+ public BufferedImage readImage(PackagePart packagePart) throws IOException {\r
+ return ImageIO.read(packagePart.getInputStream());\r
+ }\r
+}
\ No newline at end of file
import org.apache.poi.POIXMLException;\r
import org.apache.poi.openxml4j.opc.PackagePart;\r
import org.apache.poi.openxml4j.opc.PackageRelationship;\r
-import org.apache.poi.openxml4j.opc.TargetMode;\r
import org.apache.poi.util.Beta;\r
import org.openxmlformats.schemas.drawingml.x2006.main.CTBlip;\r
import org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties;\r
XSLFPictureData data = getPictureData();\r
if(data == null) return;\r
\r
- XSLFImageRendener renderer = (XSLFImageRendener)graphics.getRenderingHint(XSLFRenderingHint.IMAGE_RENDERER);\r
- if(renderer == null) renderer = new XSLFImageRendener();\r
+ XSLFImageRenderer renderer = (XSLFImageRenderer)graphics.getRenderingHint(XSLFRenderingHint.IMAGE_RENDERER);\r
+ if(renderer == null) renderer = new XSLFImageRenderer();\r
\r
RenderableShape rShape = new RenderableShape(this);\r
Rectangle2D anchor = rShape.getAnchor(graphics);\r
/**\r
* Use a custom image rendener\r
*\r
- * @see XSLFImageRendener\r
+ * @see XSLFImageRenderer\r
*/\r
public static final XSLFRenderingHint IMAGE_RENDERER = new XSLFRenderingHint(3);\r
\r
* Create a writer for the sheet data.\r
* \r
* @param fd the file to write to\r
- * @return\r
*/\r
public Writer createWriter(File fd)throws IOException {\r
return new BufferedWriter(new FileWriter(fd));\r
* The string MUST NOT begin or end with the single quote (') character.
* </p>
*
+ * <p>
+ * See {@link org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)}
+ * for a safe way to create valid names
+ * </p>
* @param sheetname sheetname to set for the sheet.
* @return Sheet representing the new sheet.
* @throws IllegalArgumentException if the name is null or invalid
* or workbook already contains a sheet with this name
- * @see {@link org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)}
- * for a safe way to create valid names
+ * @see org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)
*/
public XSSFSheet createSheet(String sheetname) {
if (sheetname == null) {
* @param sheetname the new sheet name
* @throws IllegalArgumentException if the name is null or invalid
* or workbook already contains a sheet with this name
- * @see {@link #createSheet(String)}
- * @see {@link org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)}
- * for a safe way to create valid names
+ * @see #createSheet(String)
+ * @see org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)
*/
public void setSheetName(int sheetIndex, String sheetname) {
validateSheetIndex(sheetIndex);
\r
/**\r
* Create a new SpreadsheetML manual layout.\r
- * @param layout a Spreadsheet ML layout that should be used as base.\r
+ * @param ctLayout a Spreadsheet ML layout that should be used as base.\r
*/\r
public XSSFManualLayout(CTLayout ctLayout) {\r
initLayout(ctLayout);\r
/**
* Add a new paragraph at position of the cursor. The cursor must be on the
- * {@link TokenType#START} tag of an subelement of the documents body. When
- * this method is done, the cursor passed as parameter points to the
- * {@link TokenType#END} of the newly inserted paragraph.
+ * {@link org.apache.xmlbeans.XmlCursor.TokenType#START} tag of an subelement
+ * of the documents body. When this method is done, the cursor passed as
+ * parameter points to the {@link org.apache.xmlbeans.XmlCursor.TokenType#END}
+ * of the newly inserted paragraph.
*
* @param cursor
* @return the {@link XWPFParagraph} object representing the newly inserted
}
/**
- * @param position in table array
+ * @param pos in table array
* @return The table at position pos
* @see org.apache.poi.xwpf.usermodel.IBody#getTableArray(int)
*/
/**
* add a footnote to the document
- * @param footnote
+ * @param note
* @throws IOException
*/
public XWPFFootnote addFootnote(CTFtnEdn note){
/**
* @param mergedRanges
* map of sheet merged ranges built with
- * {@link #buildMergedRangesMap(HSSFSheet)}
+ * {@link ExcelToHtmlUtils#buildMergedRangesMap(HSSFSheet)}
* @return {@link CellRangeAddress} from map if cell with specified row and
* column numbers contained in found range, <tt>null</tt> otherwise
*/
* Constructor used to read a binTable in from a Word document.
*
* @deprecated Use
- * {@link #CHPBinTable(byte[],byte[],int,int,TextPieceTable)}
+ * {@link #CHPBinTable(byte[], byte[], int, int, CharIndexTranslator)}
* instead
*/
public CHPBinTable( byte[] documentStream, byte[] tableStream, int offset,
* read from a Word file).
*
* @deprecated Use
- * {@link #CHPFormattedDiskPage(byte[],int,TextPieceTable)}
+ * {@link #CHPFormattedDiskPage(byte[], int, CharIndexTranslator)}
* instead
*/
@SuppressWarnings( "unused" )
* The {@link FibBase} class, holds the
* first 32 bytes.
* The next part, the fibRgW / FibRgW97, is handled
- * by {@link FIBShortHandler}.
+ * by {@link FibRgW97}.
* The next part, the fibRgLw / The FibRgLw97, is
- * handled by the {@link FIBLongHandler}.
+ * handled by the {@link FibRgLw}.
* Finally, the rest of the fields are handled by
* the {@link FIBFieldHandler}.
*
/**
* @deprecated Use
- * {@link #PAPBinTable(byte[],byte[],byte[],int,int,int,TextPieceTable,boolean)}
+ * {@link #PAPBinTable(byte[], byte[], byte[], int, int, CharIndexTranslator)}
* instead
*/
@SuppressWarnings( "unused" )
* Creates a PAPFormattedDiskPage from a 512 byte array
*
* @deprecated Use
- * {@link #PAPFormattedDiskPage(byte[],byte[],int,int,TextPieceTable,boolean)}
+ * {@link #PAPFormattedDiskPage(byte[], byte[], int, CharIndexTranslator)}
* instead
*/
public PAPFormattedDiskPage( byte[] documentStream, byte[] dataStream,
/**
* Section Descriptor (SED)
*
- * @see page 186 for details
+ * See page 186 for details.
*/
@Internal
public final class SectionDescriptor
}
/**
- * @retrn the vertical aspect ratio for picture provided by user
+ * @return the vertical aspect ratio for picture provided by user
* @deprecated use more precise {@link #getVerticalScalingFactor()}
*/
@Deprecated