poi/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java

1616 lines
53 KiB
Java
Raw Normal View History

/* ====================================================================
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.
==================================================================== */
/*
* HSSFWorkbook.java
*
* Created on September 30, 2001, 3:37 PM
*/
package org.apache.poi.hssf.usermodel;
import java.io.ByteArrayInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Stack;
import org.apache.poi.POIDocument;
import org.apache.poi.ddf.EscherBSERecord;
import org.apache.poi.ddf.EscherBitmapBlip;
import org.apache.poi.ddf.EscherBlipRecord;
import org.apache.poi.ddf.EscherRecord;
import org.apache.poi.hssf.eventmodel.EventRecordFactory;
import org.apache.poi.hssf.model.Sheet;
import org.apache.poi.hssf.model.Workbook;
import org.apache.poi.hssf.record.AbstractEscherHolderRecord;
import org.apache.poi.hssf.record.BackupRecord;
import org.apache.poi.hssf.record.DrawingGroupRecord;
import org.apache.poi.hssf.record.EmbeddedObjectRefSubRecord;
import org.apache.poi.hssf.record.ExtendedFormatRecord;
import org.apache.poi.hssf.record.FontRecord;
import org.apache.poi.hssf.record.LabelRecord;
import org.apache.poi.hssf.record.LabelSSTRecord;
import org.apache.poi.hssf.record.NameRecord;
import org.apache.poi.hssf.record.ObjRecord;
import org.apache.poi.hssf.record.Record;
import org.apache.poi.hssf.record.RecordFactory;
import org.apache.poi.hssf.record.SSTRecord;
import org.apache.poi.hssf.record.UnicodeString;
import org.apache.poi.hssf.record.UnknownRecord;
import org.apache.poi.hssf.record.WindowTwoRecord;
import org.apache.poi.hssf.record.formula.Area3DPtg;
import org.apache.poi.hssf.record.formula.MemFuncPtg;
import org.apache.poi.hssf.record.formula.UnionPtg;
import org.apache.poi.hssf.util.CellReference;
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648417 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r648156 | yegor | 2008-04-15 08:54:20 +0100 (Tue, 15 Apr 2008) | 1 line TextShape is a common superclass of all shapes that can hold text. The subclasses are TextBox and AutoShape. ........ r648203 | yegor | 2008-04-15 11:05:22 +0100 (Tue, 15 Apr 2008) | 1 line start improving handling of resources in HSLF. PPFont object represents a font in a presenatation. ........ r648274 | yegor | 2008-04-15 16:11:13 +0100 (Tue, 15 Apr 2008) | 1 line TextSpecInfoAtom is present in PPT 2003+. When the text is changed we must update this record, otherwise the ppt becomes corrupted ........ r648276 | yegor | 2008-04-15 16:12:58 +0100 (Tue, 15 Apr 2008) | 1 line Improved factoring of ppt objects. For ppt tabels Slide.getShapes() returns the Table object (was ShapeGroup) ........ r648303 | nick | 2008-04-15 17:00:50 +0100 (Tue, 15 Apr 2008) | 1 line Nice and small change here... Update the formula parser code to use usermodel.HSSFWorkbook instead of model.Workbook. This should keep things a bit cleaner, and make it much easier for the formula code to work with XSSF ........ r648334 | josh | 2008-04-15 18:07:06 +0100 (Tue, 15 Apr 2008) | 1 line Conditional Formatting (30311) - API improvements, added HSSFSheetConditionalFormatting ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@648444 13f79535-47bb-0310-9956-ffa450edef68
2008-04-15 18:47:30 -04:00
import org.apache.poi.hssf.util.SheetReferences;
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-647199 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r646854 | nick | 2008-04-10 16:54:02 +0100 (Thu, 10 Apr 2008) | 1 line Initial support for getting and changing chart titles and series titles ........ r646870 | nick | 2008-04-10 17:59:10 +0100 (Thu, 10 Apr 2008) | 1 line Improve how POIFS works with directory entries, and update HWPFDocument to support reading an embeded word document ........ r647152 | nick | 2008-04-11 14:04:11 +0100 (Fri, 11 Apr 2008) | 1 line Update the sample embeded documents to be from know sources, so we can test better ........ r647186 | nick | 2008-04-11 15:43:05 +0100 (Fri, 11 Apr 2008) | 1 line Update HSLFSlideShow and HSSFWorkbook to take advantage of POIFS updates, and allow reading embeded documents ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@647203 13f79535-47bb-0310-9956-ffa450edef68
2008-04-11 11:52:17 -04:00
import org.apache.poi.poifs.filesystem.DirectoryNode;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.ss.usermodel.CreationHelper;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
/**
* High level representation of a workbook. This is the first object most users
* will construct whether they are reading or writing a workbook. It is also the
* top level object for creating new sheets/etc.
*
* @see org.apache.poi.hssf.model.Workbook
* @see org.apache.poi.hssf.usermodel.HSSFSheet
* @author Andrew C. Oliver (acoliver at apache dot org)
* @author Glen Stampoultzis (glens at apache.org)
* @author Shawn Laubach (slaubach at apache dot org)
* @version 2.0-pre
*/
public class HSSFWorkbook extends POIDocument implements org.apache.poi.ss.usermodel.Workbook
{
private static final int DEBUG = POILogger.DEBUG;
/**
* used for compile-time performance/memory optimization. This determines the
* initial capacity for the sheet collection. Its currently set to 3.
* Changing it in this release will decrease performance
* since you're never allowed to have more or less than three sheets!
*/
public final static int INITIAL_CAPACITY = 3;
/**
* this is the reference to the low level Workbook object
*/
private Workbook workbook;
/**
* this holds the HSSFSheet objects attached to this workbook
*/
protected ArrayList sheets;
/**
* this holds the HSSFName objects attached to this workbook
*/
private ArrayList names;
/**
* holds whether or not to preserve other nodes in the POIFS. Used
* for macros and embedded objects.
*/
private boolean preserveNodes;
/**
* Used to keep track of the data formatter so that all
* createDataFormatter calls return the same one for a given
* book. This ensures that updates from one places is visible
* someplace else.
*/
private HSSFDataFormat formatter;
/** Extended windows meta file */
public static final int PICTURE_TYPE_EMF = 2;
/** Windows Meta File */
public static final int PICTURE_TYPE_WMF = 3;
/** Mac PICT format */
public static final int PICTURE_TYPE_PICT = 4;
/** JPEG format */
public static final int PICTURE_TYPE_JPEG = 5;
/** PNG format */
public static final int PICTURE_TYPE_PNG = 6;
/** Device independant bitmap */
public static final int PICTURE_TYPE_DIB = 7;
private static POILogger log = POILogFactory.getLogger(HSSFWorkbook.class);
/**
* Creates new HSSFWorkbook from scratch (start here!)
*
*/
public HSSFWorkbook()
{
this(Workbook.createWorkbook());
}
protected HSSFWorkbook( Workbook book )
{
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-647199 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r646854 | nick | 2008-04-10 16:54:02 +0100 (Thu, 10 Apr 2008) | 1 line Initial support for getting and changing chart titles and series titles ........ r646870 | nick | 2008-04-10 17:59:10 +0100 (Thu, 10 Apr 2008) | 1 line Improve how POIFS works with directory entries, and update HWPFDocument to support reading an embeded word document ........ r647152 | nick | 2008-04-11 14:04:11 +0100 (Fri, 11 Apr 2008) | 1 line Update the sample embeded documents to be from know sources, so we can test better ........ r647186 | nick | 2008-04-11 15:43:05 +0100 (Fri, 11 Apr 2008) | 1 line Update HSLFSlideShow and HSSFWorkbook to take advantage of POIFS updates, and allow reading embeded documents ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@647203 13f79535-47bb-0310-9956-ffa450edef68
2008-04-11 11:52:17 -04:00
super(null, null);
workbook = book;
sheets = new ArrayList( INITIAL_CAPACITY );
names = new ArrayList( INITIAL_CAPACITY );
}
public HSSFWorkbook(POIFSFileSystem fs) throws IOException {
this(fs,true);
}
/**
* given a POI POIFSFileSystem object, read in its Workbook and populate the high and
* low level models. If you're reading in a workbook...start here.
*
* @param fs the POI filesystem that contains the Workbook stream.
* @param preserveNodes whether to preseve other nodes, such as
* macros. This takes more memory, so only say yes if you
* need to. If set, will store all of the POIFSFileSystem
* in memory
* @see org.apache.poi.poifs.filesystem.POIFSFileSystem
* @exception IOException if the stream cannot be read
*/
public HSSFWorkbook(POIFSFileSystem fs, boolean preserveNodes)
throws IOException
{
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
this(fs.getRoot(), fs, preserveNodes);
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-647199 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r646854 | nick | 2008-04-10 16:54:02 +0100 (Thu, 10 Apr 2008) | 1 line Initial support for getting and changing chart titles and series titles ........ r646870 | nick | 2008-04-10 17:59:10 +0100 (Thu, 10 Apr 2008) | 1 line Improve how POIFS works with directory entries, and update HWPFDocument to support reading an embeded word document ........ r647152 | nick | 2008-04-11 14:04:11 +0100 (Fri, 11 Apr 2008) | 1 line Update the sample embeded documents to be from know sources, so we can test better ........ r647186 | nick | 2008-04-11 15:43:05 +0100 (Fri, 11 Apr 2008) | 1 line Update HSLFSlideShow and HSSFWorkbook to take advantage of POIFS updates, and allow reading embeded documents ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@647203 13f79535-47bb-0310-9956-ffa450edef68
2008-04-11 11:52:17 -04:00
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
/**
* Normally, the Workbook will be in a POIFS Stream
* called "Workbook". However, some weird XLS generators use "WORKBOOK"
*/
private static final String[] WORKBOOK_DIR_ENTRY_NAMES = {
"Workbook", // as per BIFF8 spec
"WORKBOOK",
};
private static String getWorkbookDirEntryName(DirectoryNode directory) {
String[] potentialNames = WORKBOOK_DIR_ENTRY_NAMES;
for (int i = 0; i < potentialNames.length; i++) {
String wbName = potentialNames[i];
try {
directory.getEntry(wbName);
return wbName;
} catch (FileNotFoundException e) {
// continue - to try other options
}
}
// check for previous version of file format
try {
directory.getEntry("Book");
throw new IllegalArgumentException("The supplied spreadsheet seems to be Excel 5.0/7.0 (BIFF5) format. "
+ "POI only supports BIFF8 format (from Excel versions 97/2000/XP/2003)");
} catch (FileNotFoundException e) {
// fall through
}
throw new IllegalArgumentException("The supplied POIFSFileSystem does not contain a BIFF8 'Workbook' entry. "
+ "Is it really an excel file?");
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-647199 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r646854 | nick | 2008-04-10 16:54:02 +0100 (Thu, 10 Apr 2008) | 1 line Initial support for getting and changing chart titles and series titles ........ r646870 | nick | 2008-04-10 17:59:10 +0100 (Thu, 10 Apr 2008) | 1 line Improve how POIFS works with directory entries, and update HWPFDocument to support reading an embeded word document ........ r647152 | nick | 2008-04-11 14:04:11 +0100 (Fri, 11 Apr 2008) | 1 line Update the sample embeded documents to be from know sources, so we can test better ........ r647186 | nick | 2008-04-11 15:43:05 +0100 (Fri, 11 Apr 2008) | 1 line Update HSLFSlideShow and HSSFWorkbook to take advantage of POIFS updates, and allow reading embeded documents ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@647203 13f79535-47bb-0310-9956-ffa450edef68
2008-04-11 11:52:17 -04:00
/**
* given a POI POIFSFileSystem object, and a specific directory
* within it, read in its Workbook and populate the high and
* low level models. If you're reading in a workbook...start here.
*
* @param directory the POI filesystem directory to process from
* @param fs the POI filesystem that contains the Workbook stream.
* @param preserveNodes whether to preseve other nodes, such as
* macros. This takes more memory, so only say yes if you
* need to. If set, will store all of the POIFSFileSystem
* in memory
* @see org.apache.poi.poifs.filesystem.POIFSFileSystem
* @exception IOException if the stream cannot be read
*/
public HSSFWorkbook(DirectoryNode directory, POIFSFileSystem fs, boolean preserveNodes)
throws IOException
{
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
super(directory, fs);
String workbookName = getWorkbookDirEntryName(directory);
this.preserveNodes = preserveNodes;
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
// If we're not preserving nodes, don't track the
// POIFS any more
if(! preserveNodes) {
this.filesystem = null;
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-647199 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r646854 | nick | 2008-04-10 16:54:02 +0100 (Thu, 10 Apr 2008) | 1 line Initial support for getting and changing chart titles and series titles ........ r646870 | nick | 2008-04-10 17:59:10 +0100 (Thu, 10 Apr 2008) | 1 line Improve how POIFS works with directory entries, and update HWPFDocument to support reading an embeded word document ........ r647152 | nick | 2008-04-11 14:04:11 +0100 (Fri, 11 Apr 2008) | 1 line Update the sample embeded documents to be from know sources, so we can test better ........ r647186 | nick | 2008-04-11 15:43:05 +0100 (Fri, 11 Apr 2008) | 1 line Update HSLFSlideShow and HSSFWorkbook to take advantage of POIFS updates, and allow reading embeded documents ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@647203 13f79535-47bb-0310-9956-ffa450edef68
2008-04-11 11:52:17 -04:00
this.directory = null;
}
sheets = new ArrayList(INITIAL_CAPACITY);
names = new ArrayList(INITIAL_CAPACITY);
// Grab the data from the workbook stream, however
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
// it happens to be spelled.
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-647199 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r646854 | nick | 2008-04-10 16:54:02 +0100 (Thu, 10 Apr 2008) | 1 line Initial support for getting and changing chart titles and series titles ........ r646870 | nick | 2008-04-10 17:59:10 +0100 (Thu, 10 Apr 2008) | 1 line Improve how POIFS works with directory entries, and update HWPFDocument to support reading an embeded word document ........ r647152 | nick | 2008-04-11 14:04:11 +0100 (Fri, 11 Apr 2008) | 1 line Update the sample embeded documents to be from know sources, so we can test better ........ r647186 | nick | 2008-04-11 15:43:05 +0100 (Fri, 11 Apr 2008) | 1 line Update HSLFSlideShow and HSSFWorkbook to take advantage of POIFS updates, and allow reading embeded documents ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@647203 13f79535-47bb-0310-9956-ffa450edef68
2008-04-11 11:52:17 -04:00
InputStream stream = directory.createDocumentInputStream(workbookName);
EventRecordFactory factory = new EventRecordFactory();
List records = RecordFactory.createRecords(stream);
workbook = Workbook.createWorkbook(records);
setPropertiesFromWorkbook(workbook);
int recOffset = workbook.getNumRecords();
int sheetNum = 0;
// convert all LabelRecord records to LabelSSTRecord
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
convertLabelRecords(records, recOffset);
while (recOffset < records.size())
{
Sheet sheet = Sheet.createSheet(records, sheetNum++, recOffset );
recOffset = sheet.getEofLoc()+1;
if (recOffset == 1)
{
break;
}
HSSFSheet hsheet = new HSSFSheet(this, sheet);
sheets.add(hsheet);
// workbook.setSheetName(sheets.size() -1, "Sheet"+sheets.size());
}
for (int i = 0 ; i < workbook.getNumNames() ; ++i){
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648417 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r648156 | yegor | 2008-04-15 08:54:20 +0100 (Tue, 15 Apr 2008) | 1 line TextShape is a common superclass of all shapes that can hold text. The subclasses are TextBox and AutoShape. ........ r648203 | yegor | 2008-04-15 11:05:22 +0100 (Tue, 15 Apr 2008) | 1 line start improving handling of resources in HSLF. PPFont object represents a font in a presenatation. ........ r648274 | yegor | 2008-04-15 16:11:13 +0100 (Tue, 15 Apr 2008) | 1 line TextSpecInfoAtom is present in PPT 2003+. When the text is changed we must update this record, otherwise the ppt becomes corrupted ........ r648276 | yegor | 2008-04-15 16:12:58 +0100 (Tue, 15 Apr 2008) | 1 line Improved factoring of ppt objects. For ppt tabels Slide.getShapes() returns the Table object (was ShapeGroup) ........ r648303 | nick | 2008-04-15 17:00:50 +0100 (Tue, 15 Apr 2008) | 1 line Nice and small change here... Update the formula parser code to use usermodel.HSSFWorkbook instead of model.Workbook. This should keep things a bit cleaner, and make it much easier for the formula code to work with XSSF ........ r648334 | josh | 2008-04-15 18:07:06 +0100 (Tue, 15 Apr 2008) | 1 line Conditional Formatting (30311) - API improvements, added HSSFSheetConditionalFormatting ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@648444 13f79535-47bb-0310-9956-ffa450edef68
2008-04-15 18:47:30 -04:00
HSSFName name = new HSSFName(this, workbook.getNameRecord(i));
names.add(name);
}
}
public HSSFWorkbook(InputStream s) throws IOException {
this(s,true);
}
/**
* Companion to HSSFWorkbook(POIFSFileSystem), this constructs the POI filesystem around your
* inputstream.
*
* @param s the POI filesystem that contains the Workbook stream.
* @param preserveNodes whether to preseve other nodes, such as
* macros. This takes more memory, so only say yes if you
* need to.
* @see org.apache.poi.poifs.filesystem.POIFSFileSystem
* @see #HSSFWorkbook(POIFSFileSystem)
* @exception IOException if the stream cannot be read
*/
public HSSFWorkbook(InputStream s, boolean preserveNodes)
throws IOException
{
this(new POIFSFileSystem(s), preserveNodes);
}
/**
* used internally to set the workbook properties.
*/
private void setPropertiesFromWorkbook(Workbook book)
{
this.workbook = book;
// none currently
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
/**
* This is basically a kludge to deal with the now obsolete Label records. If
* you have to read in a sheet that contains Label records, be aware that the rest
* of the API doesn't deal with them, the low level structure only provides read-only
* semi-immutable structures (the sets are there for interface conformance with NO
* impelmentation). In short, you need to call this function passing it a reference
* to the Workbook object. All labels will be converted to LabelSST records and their
* contained strings will be written to the Shared String tabel (SSTRecord) within
* the Workbook.
*
* @param wb sheet's matching low level Workbook structure containing the SSTRecord.
* @see org.apache.poi.hssf.record.LabelRecord
* @see org.apache.poi.hssf.record.LabelSSTRecord
* @see org.apache.poi.hssf.record.SSTRecord
*/
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
private void convertLabelRecords(List records, int offset)
{
if (log.check( POILogger.DEBUG ))
log.log(POILogger.DEBUG, "convertLabelRecords called");
for (int k = offset; k < records.size(); k++)
{
Record rec = ( Record ) records.get(k);
if (rec.getSid() == LabelRecord.sid)
{
LabelRecord oldrec = ( LabelRecord ) rec;
records.remove(k);
LabelSSTRecord newrec = new LabelSSTRecord();
int stringid =
workbook.addSSTString(new UnicodeString(oldrec.getValue()));
newrec.setRow(oldrec.getRow());
newrec.setColumn(oldrec.getColumn());
newrec.setXFIndex(oldrec.getXFIndex());
newrec.setSSTIndex(stringid);
records.add(k, newrec);
}
}
if (log.check( POILogger.DEBUG ))
log.log(POILogger.DEBUG, "convertLabelRecords exit");
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
/**
* sets the order of appearance for a given sheet.
*
* @param sheetname the name of the sheet to reorder
* @param pos the position that we want to insert the sheet into (0 based)
*/
public void setSheetOrder(String sheetname, int pos ) {
sheets.add(pos,sheets.remove(getSheetIndex(sheetname)));
workbook.setSheetOrder(sheetname, pos);
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
private void validateSheetIndex(int index) {
int lastSheetIx = sheets.size() - 1;
if (index < 0 || index > lastSheetIx) {
throw new IllegalArgumentException("Sheet index ("
+ index +") is out of range (0.." + lastSheetIx + ")");
}
}
/**
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
* Selects a single sheet. This may be different to
* the 'active' sheet (which is the sheet with focus).
*/
public void setSelectedTab(int index) {
validateSheetIndex(index);
int nSheets = sheets.size();
for (int i=0; i<nSheets; i++) {
getSheetAt(i).setSelected(i == index);
}
workbook.getWindowOne().setNumSelectedTabs((short)1);
}
/**
* deprecated May 2008
* @deprecated use setSelectedTab(int)
*/
public void setSelectedTab(short index) {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
setSelectedTab((int)index);
}
public void setSelectedTabs(int[] indexes) {
for (int i = 0; i < indexes.length; i++) {
validateSheetIndex(indexes[i]);
}
int nSheets = sheets.size();
for (int i=0; i<nSheets; i++) {
boolean bSelect = false;
for (int j = 0; j < indexes.length; j++) {
if (indexes[j] == i) {
bSelect = true;
break;
}
}
getSheetAt(i).setSelected(bSelect);
}
workbook.getWindowOne().setNumSelectedTabs((short)indexes.length);
}
/**
* Convenience method to set the active sheet. The active sheet is is the sheet
* which is currently displayed when the workbook is viewed in Excel.
* 'Selected' sheet(s) is a distinct concept.
*/
public void setActiveSheet(int index) {
validateSheetIndex(index);
int nSheets = sheets.size();
for (int i=0; i<nSheets; i++) {
getSheetAt(i).setActive(i == index);
}
workbook.getWindowOne().setActiveSheetIndex(index);
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
/**
* gets the tab whose data is actually seen when the sheet is opened.
* This may be different from the "selected sheet" since excel seems to
* allow you to show the data of one sheet when another is seen "selected"
* in the tabs (at the bottom).
* @see org.apache.poi.hssf.usermodel.HSSFSheet#setSelected(boolean)
*/
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
public int getActiveSheetIndex() {
return workbook.getWindowOne().getActiveSheetIndex();
}
/**
* deprecated May 2008
* @deprecated - Misleading name - use getActiveSheetIndex()
*/
public short getSelectedTab() {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
return (short) getActiveSheetIndex();
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
/**
* sets the first tab that is displayed in the list of tabs
* in excel.
* @param index
*/
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
public void setFirstVisibleTab(int index) {
workbook.getWindowOne().setFirstVisibleTab(index);
}
/**
* deprecated May 2008
* @deprecated - Misleading name - use setFirstVisibleTab()
*/
public void setDisplayedTab(short index) {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
setFirstVisibleTab(index);
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
/**
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
* sets the first tab that is displayed in the list of tabs in excel.
*/
public int getFirstVisibleTab() {
return workbook.getWindowOne().getFirstVisibleTab();
}
/**
* deprecated May 2008
* @deprecated - Misleading name - use getFirstVisibleTab()
*/
public short getDisplayedTab() {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
return (short) getFirstVisibleTab();
}
/**
* @deprecated POI will now properly handle unicode strings without
* forceing an encoding
*/
public final static byte ENCODING_COMPRESSED_UNICODE = 0;
/**
* @deprecated POI will now properly handle unicode strings without
* forceing an encoding
*/
public final static byte ENCODING_UTF_16 = 1;
/**
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
* set the sheet name.
* Will throw IllegalArgumentException if the name is greater than 31 chars
* or contains /\?*[]
* @param sheet number (0 based)
*/
public void setSheetName(int sheet, String name)
{
if (workbook.doesContainsSheetName( name, sheet ))
throw new IllegalArgumentException( "The workbook already contains a sheet with this name" );
if (sheet > (sheets.size() - 1))
{
throw new RuntimeException("Sheet out of bounds");
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
workbook.setSheetName( sheet, name);
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
/**
* set the sheet name forcing the encoding. Forcing the encoding IS A BAD IDEA!!!
* @deprecated 3-Jan-2006 POI now automatically detects unicode and sets the encoding
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
* appropriately. Simply use setSheetName(int sheet, String encoding)
* @throws IllegalArgumentException if the name is greater than 31 chars
* or contains /\?*[]
* @param sheet number (0 based)
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
*/
public void setSheetName( int sheet, String name, short encoding )
{
if (workbook.doesContainsSheetName( name, sheet ))
throw new IllegalArgumentException( "The workbook already contains a sheet with this name" );
if (sheet > (sheets.size() - 1))
{
throw new RuntimeException("Sheet out of bounds");
}
switch ( encoding ) {
case ENCODING_COMPRESSED_UNICODE:
case ENCODING_UTF_16:
break;
default:
// TODO java.io.UnsupportedEncodingException
throw new RuntimeException( "Unsupported encoding" );
}
workbook.setSheetName( sheet, name, encoding );
}
/**
* get the sheet name
* @param sheet Number
* @return Sheet name
*/
public String getSheetName(int sheet)
{
if (sheet > (sheets.size() - 1))
{
throw new RuntimeException("Sheet out of bounds");
}
return workbook.getSheetName(sheet);
}
/**
* check whether a sheet is hidden
* @param sheet Number
* @return True if sheet is hidden
*/
public boolean isSheetHidden(int sheet) {
if (sheet > (sheets.size() - 1))
{
throw new RuntimeException("Sheet out of bounds");
}
return workbook.isSheetHidden(sheet);
}
/**
* Hide or unhide a sheet
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
*
* @param sheetnum The sheet number
* @param hidden True to mark the sheet as hidden, false otherwise
*/
public void setSheetHidden(int sheet, boolean hidden) {
if (sheet > (sheets.size() - 1))
{
throw new RuntimeException("Sheet out of bounds");
}
workbook.setSheetHidden(sheet,hidden);
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
/*
* get the sheet's index
* @param name sheet name
* @return sheet index or -1 if it was not found.
*/
/** Returns the index of the sheet by his name
* @param name the sheet name
* @return index of the sheet (0 based)
*/
public int getSheetIndex(String name)
{
int retval = workbook.getSheetIndex(name);
return retval;
}
/** Returns the index of the given sheet
* @param sheet the sheet to look up
* @return index of the sheet (0 based)
*/
public int getSheetIndex(org.apache.poi.ss.usermodel.Sheet sheet)
{
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
for(int i=0; i<sheets.size(); i++) {
if(sheets.get(i) == sheet) {
return i;
}
}
return -1;
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648417 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r648156 | yegor | 2008-04-15 08:54:20 +0100 (Tue, 15 Apr 2008) | 1 line TextShape is a common superclass of all shapes that can hold text. The subclasses are TextBox and AutoShape. ........ r648203 | yegor | 2008-04-15 11:05:22 +0100 (Tue, 15 Apr 2008) | 1 line start improving handling of resources in HSLF. PPFont object represents a font in a presenatation. ........ r648274 | yegor | 2008-04-15 16:11:13 +0100 (Tue, 15 Apr 2008) | 1 line TextSpecInfoAtom is present in PPT 2003+. When the text is changed we must update this record, otherwise the ppt becomes corrupted ........ r648276 | yegor | 2008-04-15 16:12:58 +0100 (Tue, 15 Apr 2008) | 1 line Improved factoring of ppt objects. For ppt tabels Slide.getShapes() returns the Table object (was ShapeGroup) ........ r648303 | nick | 2008-04-15 17:00:50 +0100 (Tue, 15 Apr 2008) | 1 line Nice and small change here... Update the formula parser code to use usermodel.HSSFWorkbook instead of model.Workbook. This should keep things a bit cleaner, and make it much easier for the formula code to work with XSSF ........ r648334 | josh | 2008-04-15 18:07:06 +0100 (Tue, 15 Apr 2008) | 1 line Conditional Formatting (30311) - API improvements, added HSSFSheetConditionalFormatting ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@648444 13f79535-47bb-0310-9956-ffa450edef68
2008-04-15 18:47:30 -04:00
/**
* Returns the external sheet index of the sheet
* with the given internal index, creating one
* if needed.
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
* Used by some of the more obscure formula and
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648417 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r648156 | yegor | 2008-04-15 08:54:20 +0100 (Tue, 15 Apr 2008) | 1 line TextShape is a common superclass of all shapes that can hold text. The subclasses are TextBox and AutoShape. ........ r648203 | yegor | 2008-04-15 11:05:22 +0100 (Tue, 15 Apr 2008) | 1 line start improving handling of resources in HSLF. PPFont object represents a font in a presenatation. ........ r648274 | yegor | 2008-04-15 16:11:13 +0100 (Tue, 15 Apr 2008) | 1 line TextSpecInfoAtom is present in PPT 2003+. When the text is changed we must update this record, otherwise the ppt becomes corrupted ........ r648276 | yegor | 2008-04-15 16:12:58 +0100 (Tue, 15 Apr 2008) | 1 line Improved factoring of ppt objects. For ppt tabels Slide.getShapes() returns the Table object (was ShapeGroup) ........ r648303 | nick | 2008-04-15 17:00:50 +0100 (Tue, 15 Apr 2008) | 1 line Nice and small change here... Update the formula parser code to use usermodel.HSSFWorkbook instead of model.Workbook. This should keep things a bit cleaner, and make it much easier for the formula code to work with XSSF ........ r648334 | josh | 2008-04-15 18:07:06 +0100 (Tue, 15 Apr 2008) | 1 line Conditional Formatting (30311) - API improvements, added HSSFSheetConditionalFormatting ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@648444 13f79535-47bb-0310-9956-ffa450edef68
2008-04-15 18:47:30 -04:00
* named range things.
*/
public int getExternalSheetIndex(int internalSheetIndex) {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
return workbook.checkExternSheet(internalSheetIndex);
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648417 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r648156 | yegor | 2008-04-15 08:54:20 +0100 (Tue, 15 Apr 2008) | 1 line TextShape is a common superclass of all shapes that can hold text. The subclasses are TextBox and AutoShape. ........ r648203 | yegor | 2008-04-15 11:05:22 +0100 (Tue, 15 Apr 2008) | 1 line start improving handling of resources in HSLF. PPFont object represents a font in a presenatation. ........ r648274 | yegor | 2008-04-15 16:11:13 +0100 (Tue, 15 Apr 2008) | 1 line TextSpecInfoAtom is present in PPT 2003+. When the text is changed we must update this record, otherwise the ppt becomes corrupted ........ r648276 | yegor | 2008-04-15 16:12:58 +0100 (Tue, 15 Apr 2008) | 1 line Improved factoring of ppt objects. For ppt tabels Slide.getShapes() returns the Table object (was ShapeGroup) ........ r648303 | nick | 2008-04-15 17:00:50 +0100 (Tue, 15 Apr 2008) | 1 line Nice and small change here... Update the formula parser code to use usermodel.HSSFWorkbook instead of model.Workbook. This should keep things a bit cleaner, and make it much easier for the formula code to work with XSSF ........ r648334 | josh | 2008-04-15 18:07:06 +0100 (Tue, 15 Apr 2008) | 1 line Conditional Formatting (30311) - API improvements, added HSSFSheetConditionalFormatting ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@648444 13f79535-47bb-0310-9956-ffa450edef68
2008-04-15 18:47:30 -04:00
}
/**
* create an HSSFSheet for this HSSFWorkbook, adds it to the sheets and returns
* the high level representation. Use this to create new sheets.
*
* @return HSSFSheet representing the new sheet.
*/
public HSSFSheet createSheet()
{
HSSFSheet sheet = new HSSFSheet(this);
sheets.add(sheet);
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
workbook.setSheetName(sheets.size() - 1, "Sheet" + (sheets.size() - 1));
boolean isOnlySheet = sheets.size() == 1;
sheet.setSelected(isOnlySheet);
sheet.setActive(isOnlySheet);
return sheet;
}
/**
* create an HSSFSheet from an existing sheet in the HSSFWorkbook.
*
* @return HSSFSheet representing the cloned sheet.
*/
public HSSFSheet cloneSheet(int sheetNum) {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
validateSheetIndex(sheetNum);
HSSFSheet srcSheet = (HSSFSheet) sheets.get(sheetNum);
String srcName = workbook.getSheetName(sheetNum);
HSSFSheet clonedSheet = srcSheet.cloneSheet(this);
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
clonedSheet.setSelected(false);
clonedSheet.setActive(false);
sheets.add(clonedSheet);
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
int i = 1;
while (true) {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
// Try and find the next sheet name that is unique
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
String name = srcName;
String index = Integer.toString(i++);
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
if (name.length() + index.length() + 2 < 31) {
name = name + "(" + index + ")";
} else {
name = name.substring(0, 31 - index.length() - 2) + "(" + index + ")";
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
//If the sheet name is unique, then set it otherwise move on to the next number.
if (workbook.getSheetIndex(name) == -1) {
workbook.setSheetName(sheets.size()-1, name);
break;
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
}
}
return clonedSheet;
}
/**
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
* create an HSSFSheet for this HSSFWorkbook, adds it to the sheets and
* returns the high level representation. Use this to create new sheets.
*
* @param sheetname
* sheetname to set for the sheet.
* @return HSSFSheet representing the new sheet.
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
* @throws IllegalArgumentException
* if there is already a sheet present with a case-insensitive
* match for the specified name.
*/
public HSSFSheet createSheet(String sheetname)
{
if (workbook.doesContainsSheetName( sheetname, sheets.size() ))
throw new IllegalArgumentException( "The workbook already contains a sheet of this name" );
HSSFSheet sheet = new HSSFSheet(this);
sheets.add(sheet);
workbook.setSheetName(sheets.size() - 1, sheetname);
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
boolean isOnlySheet = sheets.size() == 1;
sheet.setSelected(isOnlySheet);
sheet.setActive(isOnlySheet);
return sheet;
}
/**
* get the number of spreadsheets in the workbook (this will be three after serialization)
* @return number of sheets
*/
public int getNumberOfSheets()
{
return sheets.size();
}
public int getSheetIndexFromExternSheetIndex(int externSheetNumber) {
return workbook.getSheetIndexFromExternSheetIndex(externSheetNumber);
}
/**
* Get the HSSFSheet object at the given index.
* @param index of the sheet number (0-based physical & logical)
* @return HSSFSheet at the provided index
*/
public HSSFSheet getSheetAt(int index)
{
return (HSSFSheet) sheets.get(index);
}
/**
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
* Get sheet with the given name (case insensitive match)
* @param name of the sheet
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
* @return HSSFSheet with the name provided or <code>null</code> if it does not exist
*/
public HSSFSheet getSheet(String name)
{
HSSFSheet retval = null;
for (int k = 0; k < sheets.size(); k++)
{
String sheetname = workbook.getSheetName(k);
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
if (sheetname.equalsIgnoreCase(name))
{
retval = (HSSFSheet) sheets.get(k);
}
}
return retval;
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648417 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r648156 | yegor | 2008-04-15 08:54:20 +0100 (Tue, 15 Apr 2008) | 1 line TextShape is a common superclass of all shapes that can hold text. The subclasses are TextBox and AutoShape. ........ r648203 | yegor | 2008-04-15 11:05:22 +0100 (Tue, 15 Apr 2008) | 1 line start improving handling of resources in HSLF. PPFont object represents a font in a presenatation. ........ r648274 | yegor | 2008-04-15 16:11:13 +0100 (Tue, 15 Apr 2008) | 1 line TextSpecInfoAtom is present in PPT 2003+. When the text is changed we must update this record, otherwise the ppt becomes corrupted ........ r648276 | yegor | 2008-04-15 16:12:58 +0100 (Tue, 15 Apr 2008) | 1 line Improved factoring of ppt objects. For ppt tabels Slide.getShapes() returns the Table object (was ShapeGroup) ........ r648303 | nick | 2008-04-15 17:00:50 +0100 (Tue, 15 Apr 2008) | 1 line Nice and small change here... Update the formula parser code to use usermodel.HSSFWorkbook instead of model.Workbook. This should keep things a bit cleaner, and make it much easier for the formula code to work with XSSF ........ r648334 | josh | 2008-04-15 18:07:06 +0100 (Tue, 15 Apr 2008) | 1 line Conditional Formatting (30311) - API improvements, added HSSFSheetConditionalFormatting ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@648444 13f79535-47bb-0310-9956-ffa450edef68
2008-04-15 18:47:30 -04:00
public SheetReferences getSheetReferences() {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
return workbook.getSheetReferences();
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648417 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r648156 | yegor | 2008-04-15 08:54:20 +0100 (Tue, 15 Apr 2008) | 1 line TextShape is a common superclass of all shapes that can hold text. The subclasses are TextBox and AutoShape. ........ r648203 | yegor | 2008-04-15 11:05:22 +0100 (Tue, 15 Apr 2008) | 1 line start improving handling of resources in HSLF. PPFont object represents a font in a presenatation. ........ r648274 | yegor | 2008-04-15 16:11:13 +0100 (Tue, 15 Apr 2008) | 1 line TextSpecInfoAtom is present in PPT 2003+. When the text is changed we must update this record, otherwise the ppt becomes corrupted ........ r648276 | yegor | 2008-04-15 16:12:58 +0100 (Tue, 15 Apr 2008) | 1 line Improved factoring of ppt objects. For ppt tabels Slide.getShapes() returns the Table object (was ShapeGroup) ........ r648303 | nick | 2008-04-15 17:00:50 +0100 (Tue, 15 Apr 2008) | 1 line Nice and small change here... Update the formula parser code to use usermodel.HSSFWorkbook instead of model.Workbook. This should keep things a bit cleaner, and make it much easier for the formula code to work with XSSF ........ r648334 | josh | 2008-04-15 18:07:06 +0100 (Tue, 15 Apr 2008) | 1 line Conditional Formatting (30311) - API improvements, added HSSFSheetConditionalFormatting ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@648444 13f79535-47bb-0310-9956-ffa450edef68
2008-04-15 18:47:30 -04:00
}
/**
* removes sheet at the given index
* @param index of the sheet (0-based)
*/
public void removeSheetAt(int index)
{
sheets.remove(index);
workbook.removeSheet(index);
}
/**
* determine whether the Excel GUI will backup the workbook when saving.
*
* @param backupValue true to indicate a backup will be performed.
*/
public void setBackupFlag(boolean backupValue)
{
BackupRecord backupRecord = workbook.getBackupRecord();
backupRecord.setBackup(backupValue ? (short) 1
: (short) 0);
}
/**
* determine whether the Excel GUI will backup the workbook when saving.
*
* @return the current setting for backups.
*/
public boolean getBackupFlag()
{
BackupRecord backupRecord = workbook.getBackupRecord();
return (backupRecord.getBackup() == 0) ? false
: true;
}
/**
* Sets the repeating rows and columns for a sheet (as found in
* File->PageSetup->Sheet). This is function is included in the workbook
* because it creates/modifies name records which are stored at the
* workbook level.
* <p>
* To set just repeating columns:
* <pre>
* workbook.setRepeatingRowsAndColumns(0,0,1,-1-1);
* </pre>
* To set just repeating rows:
* <pre>
* workbook.setRepeatingRowsAndColumns(0,-1,-1,0,4);
* </pre>
* To remove all repeating rows and columns for a sheet.
* <pre>
* workbook.setRepeatingRowsAndColumns(0,-1,-1,-1,-1);
* </pre>
*
* @param sheetIndex 0 based index to sheet.
* @param startColumn 0 based start of repeating columns.
* @param endColumn 0 based end of repeating columns.
* @param startRow 0 based start of repeating rows.
* @param endRow 0 based end of repeating rows.
*/
public void setRepeatingRowsAndColumns(int sheetIndex,
int startColumn, int endColumn,
int startRow, int endRow)
{
// Check arguments
if (startColumn == -1 && endColumn != -1) throw new IllegalArgumentException("Invalid column range specification");
if (startRow == -1 && endRow != -1) throw new IllegalArgumentException("Invalid row range specification");
if (startColumn < -1 || startColumn >= 0xFF) throw new IllegalArgumentException("Invalid column range specification");
if (endColumn < -1 || endColumn >= 0xFF) throw new IllegalArgumentException("Invalid column range specification");
if (startRow < -1 || startRow > 65535) throw new IllegalArgumentException("Invalid row range specification");
if (endRow < -1 || endRow > 65535) throw new IllegalArgumentException("Invalid row range specification");
if (startColumn > endColumn) throw new IllegalArgumentException("Invalid column range specification");
if (startRow > endRow) throw new IllegalArgumentException("Invalid row range specification");
HSSFSheet sheet = getSheetAt(sheetIndex);
short externSheetIndex = getWorkbook().checkExternSheet(sheetIndex);
boolean settingRowAndColumn =
startColumn != -1 && endColumn != -1 && startRow != -1 && endRow != -1;
boolean removingRange =
startColumn == -1 && endColumn == -1 && startRow == -1 && endRow == -1;
boolean isNewRecord = false;
NameRecord nameRecord;
nameRecord = findExistingRowColHeaderNameRecord(sheetIndex);
if (removingRange )
{
if (nameRecord != null)
workbook.removeName(findExistingRowColHeaderNameRecordIdx(sheetIndex+1));
return;
}
if ( nameRecord == null )
{
nameRecord = workbook.createBuiltInName(NameRecord.BUILTIN_PRINT_TITLE, sheetIndex+1);
//does a lot of the house keeping for builtin records, like setting lengths to zero etc
isNewRecord = true;
}
short definitionTextLength = settingRowAndColumn ? (short)0x001a : (short)0x000b;
nameRecord.setDefinitionTextLength(definitionTextLength);
Stack ptgs = new Stack();
if (settingRowAndColumn)
{
MemFuncPtg memFuncPtg = new MemFuncPtg();
memFuncPtg.setLenRefSubexpression(23);
ptgs.add(memFuncPtg);
}
if (startColumn >= 0)
{
Area3DPtg area3DPtg1 = new Area3DPtg();
area3DPtg1.setExternSheetIndex(externSheetIndex);
area3DPtg1.setFirstColumn((short)startColumn);
area3DPtg1.setLastColumn((short)endColumn);
area3DPtg1.setFirstRow((short)0);
area3DPtg1.setLastRow((short)0xFFFF);
ptgs.add(area3DPtg1);
}
if (startRow >= 0)
{
Area3DPtg area3DPtg2 = new Area3DPtg();
area3DPtg2.setExternSheetIndex(externSheetIndex);
area3DPtg2.setFirstColumn((short)0);
area3DPtg2.setLastColumn((short)0x00FF);
area3DPtg2.setFirstRow((short)startRow);
area3DPtg2.setLastRow((short)endRow);
ptgs.add(area3DPtg2);
}
if (settingRowAndColumn)
{
UnionPtg unionPtg = new UnionPtg();
ptgs.add(unionPtg);
}
nameRecord.setNameDefinition(ptgs);
if (isNewRecord)
{
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648417 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r648156 | yegor | 2008-04-15 08:54:20 +0100 (Tue, 15 Apr 2008) | 1 line TextShape is a common superclass of all shapes that can hold text. The subclasses are TextBox and AutoShape. ........ r648203 | yegor | 2008-04-15 11:05:22 +0100 (Tue, 15 Apr 2008) | 1 line start improving handling of resources in HSLF. PPFont object represents a font in a presenatation. ........ r648274 | yegor | 2008-04-15 16:11:13 +0100 (Tue, 15 Apr 2008) | 1 line TextSpecInfoAtom is present in PPT 2003+. When the text is changed we must update this record, otherwise the ppt becomes corrupted ........ r648276 | yegor | 2008-04-15 16:12:58 +0100 (Tue, 15 Apr 2008) | 1 line Improved factoring of ppt objects. For ppt tabels Slide.getShapes() returns the Table object (was ShapeGroup) ........ r648303 | nick | 2008-04-15 17:00:50 +0100 (Tue, 15 Apr 2008) | 1 line Nice and small change here... Update the formula parser code to use usermodel.HSSFWorkbook instead of model.Workbook. This should keep things a bit cleaner, and make it much easier for the formula code to work with XSSF ........ r648334 | josh | 2008-04-15 18:07:06 +0100 (Tue, 15 Apr 2008) | 1 line Conditional Formatting (30311) - API improvements, added HSSFSheetConditionalFormatting ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@648444 13f79535-47bb-0310-9956-ffa450edef68
2008-04-15 18:47:30 -04:00
HSSFName newName = new HSSFName(this, nameRecord);
names.add(newName);
}
HSSFPrintSetup printSetup = sheet.getPrintSetup();
printSetup.setValidSettings(false);
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-651991,651993-652284,652286-652287,652289,652291,652293-652297,652299-652328,652330-652425,652427-652445,652447-652560,652562-652933,652935,652937-652993,652995-653116,653118-653124,653126-653483,653487-653519,653522-653550,653552-653607,653609-653667,653669-653674,653676-653814,653817-653830,653832-657131 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r653892 | josh | 2008-05-06 20:48:55 +0100 (Tue, 06 May 2008) | 1 line Another attempt to fix unicode problems in functionMetadata.txt. Made that file pure ascii. ........ r653945 | nick | 2008-05-06 23:51:28 +0100 (Tue, 06 May 2008) | 1 line Add disabled test for bug #44898, and slightly improve a few poifs related error messages ........ r654056 | nick | 2008-05-07 10:41:03 +0100 (Wed, 07 May 2008) | 1 line Update a test to match the new warning on short files ........ r654356 | josh | 2008-05-08 01:52:05 +0100 (Thu, 08 May 2008) | 1 line 44950 - fixed HSSFFormulaEvaluator.evaluateInCell() and Area3DEval.getValue() also added validation for number of elements in AreaEvals ........ r654366 | josh | 2008-05-08 02:06:56 +0100 (Thu, 08 May 2008) | 1 line tiny clean-up after r654356 (bug 44950) ........ r654649 | josh | 2008-05-09 00:02:43 +0100 (Fri, 09 May 2008) | 1 line fixed mistake in FuncPtg.clone(), added test case, cleaned up outdated (since bug 13292) test method. ........ r654650 | josh | 2008-05-09 00:06:30 +0100 (Fri, 09 May 2008) | 1 line removed unused constructor and old comment after r654649 ........ r655216 | josh | 2008-05-11 02:30:56 +0100 (Sun, 11 May 2008) | 1 line bug 23630 - fixed spelling mistake in constant name ........ r655278 | josh | 2008-05-11 09:15:39 +0100 (Sun, 11 May 2008) | 1 line 41187 - fixed HSSFSheet to properly read xls files without ROW records ........ r655282 | yegor | 2008-05-11 10:03:24 +0100 (Sun, 11 May 2008) | 1 line Added boolean flag to turn on use of merged columns in autosize ........ r655912 | josh | 2008-05-13 16:25:51 +0100 (Tue, 13 May 2008) | 1 line added test case for reported bug 44987 ........ r656213 | yegor | 2008-05-14 11:15:00 +0100 (Wed, 14 May 2008) | 1 line properly update TextSpecInfoAtom when parent text is changed ........ r656215 | yegor | 2008-05-14 11:18:00 +0100 (Wed, 14 May 2008) | 1 line Support for embedded ActiveX objects: PowerPoint references them similar to embedded documents but in a different container: ExControl instead of ExEmbed ........ r656252 | yegor | 2008-05-14 13:42:30 +0100 (Wed, 14 May 2008) | 1 line convert line breaks into internal ppt represenatation when changing text ........ r656699 | yegor | 2008-05-15 16:23:38 +0100 (Thu, 15 May 2008) | 1 line added a set accessor for embedded ole data ........ r656757 | josh | 2008-05-15 18:49:23 +0100 (Thu, 15 May 2008) | 1 line bug 45000 - Fixed NPE in ListLevel when numberText is null ........ r656893 | josh | 2008-05-16 00:30:08 +0100 (Fri, 16 May 2008) | 1 line 44523 - fixed workbook sheet selection and focus ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@657135 13f79535-47bb-0310-9956-ffa450edef68
2008-05-16 13:08:40 -04:00
sheet.setActive(true);
}
private NameRecord findExistingRowColHeaderNameRecord( int sheetIndex )
{
int index = findExistingRowColHeaderNameRecordIdx(sheetIndex);
if (index == -1)
return null;
else
return (NameRecord)workbook.findNextRecordBySid(NameRecord.sid, index);
}
private int findExistingRowColHeaderNameRecordIdx( int sheetIndex )
{
int index = 0;
NameRecord r = null;
while ((r = (NameRecord) workbook.findNextRecordBySid(NameRecord.sid, index)) != null)
{
int indexToSheet = r.getEqualsToIndexToSheet() -1;
if(indexToSheet > -1) { //ignore "GLOBAL" name records
int nameRecordSheetIndex = workbook.getSheetIndexFromExternSheetIndex(indexToSheet);
if (isRowColHeaderRecord( r ) && nameRecordSheetIndex == sheetIndex)
{
return index;
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
}
index++;
}
return -1;
}
private boolean isRowColHeaderRecord( NameRecord r )
{
return r.getOptionFlag() == 0x20 && ("" + ((char)7)).equals(r.getNameText());
}
/**
* create a new Font and add it to the workbook's font table
* @return new font object
*/
public HSSFFont createFont()
{
FontRecord font = workbook.createNewFont();
short fontindex = (short) (getNumberOfFonts() - 1);
if (fontindex > 3)
{
fontindex++; // THERE IS NO FOUR!!
}
if(fontindex == Short.MAX_VALUE){
throw new IllegalArgumentException("Maximum number of fonts was exceeded");
}
HSSFFont retval = new HSSFFont(fontindex, font);
return retval;
}
/**
* Finds a font that matches the one with the supplied attributes
*/
public HSSFFont findFont(short boldWeight, short color, short fontHeight,
String name, boolean italic, boolean strikeout,
short typeOffset, byte underline)
{
// System.out.println( boldWeight + ", " + color + ", " + fontHeight + ", " + name + ", " + italic + ", " + strikeout + ", " + typeOffset + ", " + underline );
for (short i = 0; i < workbook.getNumberOfFontRecords(); i++)
{
if (i == 4)
continue;
FontRecord font = workbook.getFontRecordAt(i);
HSSFFont hssfFont = new HSSFFont(i, font);
// System.out.println( hssfFont.getBoldweight() + ", " + hssfFont.getColor() + ", " + hssfFont.getFontHeight() + ", " + hssfFont.getFontName() + ", " + hssfFont.getItalic() + ", " + hssfFont.getStrikeout() + ", " + hssfFont.getTypeOffset() + ", " + hssfFont.getUnderline() );
if (hssfFont.getBoldweight() == boldWeight
&& hssfFont.getColor() == color
&& hssfFont.getFontHeight() == fontHeight
&& hssfFont.getFontName().equals(name)
&& hssfFont.getItalic() == italic
&& hssfFont.getStrikeout() == strikeout
&& hssfFont.getTypeOffset() == typeOffset
&& hssfFont.getUnderline() == underline)
{
// System.out.println( "Found font" );
return hssfFont;
}
}
// System.out.println( "No font found" );
return null;
}
/**
* get the number of fonts in the font table
* @return number of fonts
*/
public short getNumberOfFonts()
{
return (short) workbook.getNumberOfFontRecords();
}
/**
* get the font at the given index number
* @param idx index number
* @return HSSFFont at the index
*/
public HSSFFont getFontAt(short idx)
{
FontRecord font = workbook.getFontRecordAt(idx);
HSSFFont retval = new HSSFFont(idx, font);
return retval;
}
/**
* create a new Cell style and add it to the workbook's style table
* @return the new Cell Style object
*/
public HSSFCellStyle createCellStyle()
{
ExtendedFormatRecord xfr = workbook.createCellXF();
short index = (short) (getNumCellStyles() - 1);
HSSFCellStyle style = new HSSFCellStyle(index, xfr, this);
return style;
}
/**
* get the number of styles the workbook contains
* @return count of cell styles
*/
public short getNumCellStyles()
{
return (short) workbook.getNumExFormats();
}
/**
* get the cell style object at the given index
* @param idx index within the set of styles
* @return HSSFCellStyle object at the index
*/
public HSSFCellStyle getCellStyleAt(short idx)
{
ExtendedFormatRecord xfr = workbook.getExFormatAt(idx);
HSSFCellStyle style = new HSSFCellStyle(idx, xfr, this);
return style;
}
/**
* Method write - write out this workbook to an Outputstream. Constructs
* a new POI POIFSFileSystem, passes in the workbook binary representation and
* writes it out.
*
* @param stream - the java OutputStream you wish to write the XLS to
*
* @exception IOException if anything can't be written.
* @see org.apache.poi.poifs.filesystem.POIFSFileSystem
*/
public void write(OutputStream stream)
throws IOException
{
byte[] bytes = getBytes();
POIFSFileSystem fs = new POIFSFileSystem();
// For tracking what we've written out, used if we're
// going to be preserving nodes
List excepts = new ArrayList(1);
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
// Write out the Workbook stream
fs.createDocument(new ByteArrayInputStream(bytes), "Workbook");
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
// Write out our HPFS properties, if we have them
writeProperties(fs, excepts);
if (preserveNodes) {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
// Don't write out the old Workbook, we'll be doing our new one
excepts.add("Workbook");
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
// If the file had WORKBOOK instead of Workbook, we'll write it
// out correctly shortly, so don't include the old one
excepts.add("WORKBOOK");
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
// Copy over all the other nodes to our new poifs
copyNodes(this.filesystem,fs,excepts);
}
fs.writeFilesystem(stream);
//poifs.writeFilesystem(stream);
}
/**
* Method getBytes - get the bytes of just the HSSF portions of the XLS file.
* Use this to construct a POI POIFSFileSystem yourself.
*
*
* @return byte[] array containing the binary representation of this workbook and all contained
* sheets, rows, cells, etc.
*
* @see org.apache.poi.hssf.model.Workbook
* @see org.apache.poi.hssf.model.Sheet
*/
public byte[] getBytes()
{
if (log.check( POILogger.DEBUG ))
log.log(DEBUG, "HSSFWorkbook.getBytes()");
// before getting the workbook size we must tell the sheets that
// serialization is about to occur.
for (int k = 0; k < sheets.size(); k++)
((HSSFSheet) sheets.get(k)).getSheet().preSerialize();
int wbsize = workbook.getSize();
// log.debug("REMOVEME: old sizing method "+workbook.serialize().length);
// ArrayList sheetbytes = new ArrayList(sheets.size());
int totalsize = wbsize;
for (int k = 0; k < sheets.size(); k++)
{
workbook.setSheetBof(k, totalsize);
totalsize += ((HSSFSheet) sheets.get(k)).getSheet().getSize();
}
/* if (totalsize < 4096)
{
totalsize = 4096;
}*/
byte[] retval = new byte[totalsize];
int pos = workbook.serialize(0, retval);
// System.arraycopy(wb, 0, retval, 0, wb.length);
for (int k = 0; k < sheets.size(); k++)
{
// byte[] sb = (byte[])sheetbytes.get(k);
// System.arraycopy(sb, 0, retval, pos, sb.length);
int len = ((HSSFSheet) sheets.get(k)).getSheet().serialize(pos,
retval);
pos += len; // sb.length;
}
/* for (int k = pos; k < totalsize; k++)
{
retval[k] = 0;
}*/
return retval;
}
/** @deprecated Do not call this method from your applications. Use the methods
* available in the HSSFRow to add string HSSFCells
*/
public int addSSTString(String string)
{
return workbook.addSSTString(new UnicodeString(string));
}
/** @deprecated Do not call this method from your applications. Use the methods
* available in the HSSFRow to get string HSSFCells
*/
public String getSSTString(int index)
{
return workbook.getSSTString(index).getString();
}
protected Workbook getWorkbook()
{
return workbook;
}
/** gets the total number of named ranges in the workboko
* @return number of named ranges
*/
public int getNumberOfNames(){
int result = names.size();
return result;
}
/** gets the Named range
* @param index position of the named range
* @return named range high level
*/
public HSSFName getNameAt(int index){
HSSFName result = (HSSFName) names.get(index);
return result;
}
/** gets the named range name
* @param index the named range index (0 based)
* @return named range name
*/
public String getNameName(int index){
String result = getNameAt(index).getNameName();
return result;
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648417 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r648156 | yegor | 2008-04-15 08:54:20 +0100 (Tue, 15 Apr 2008) | 1 line TextShape is a common superclass of all shapes that can hold text. The subclasses are TextBox and AutoShape. ........ r648203 | yegor | 2008-04-15 11:05:22 +0100 (Tue, 15 Apr 2008) | 1 line start improving handling of resources in HSLF. PPFont object represents a font in a presenatation. ........ r648274 | yegor | 2008-04-15 16:11:13 +0100 (Tue, 15 Apr 2008) | 1 line TextSpecInfoAtom is present in PPT 2003+. When the text is changed we must update this record, otherwise the ppt becomes corrupted ........ r648276 | yegor | 2008-04-15 16:12:58 +0100 (Tue, 15 Apr 2008) | 1 line Improved factoring of ppt objects. For ppt tabels Slide.getShapes() returns the Table object (was ShapeGroup) ........ r648303 | nick | 2008-04-15 17:00:50 +0100 (Tue, 15 Apr 2008) | 1 line Nice and small change here... Update the formula parser code to use usermodel.HSSFWorkbook instead of model.Workbook. This should keep things a bit cleaner, and make it much easier for the formula code to work with XSSF ........ r648334 | josh | 2008-04-15 18:07:06 +0100 (Tue, 15 Apr 2008) | 1 line Conditional Formatting (30311) - API improvements, added HSSFSheetConditionalFormatting ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@648444 13f79535-47bb-0310-9956-ffa450edef68
2008-04-15 18:47:30 -04:00
/**
* TODO - make this less cryptic / move elsewhere
* @param refIndex Index to REF entry in EXTERNSHEET record in the Link Table
* @param definedNameIndex zero-based to DEFINEDNAME or EXTERNALNAME record
* @return the string representation of the defined or external name
*/
public String resolveNameXText(int refIndex, int definedNameIndex) {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
return workbook.resolveNameXText(refIndex, definedNameIndex);
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648417 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r648156 | yegor | 2008-04-15 08:54:20 +0100 (Tue, 15 Apr 2008) | 1 line TextShape is a common superclass of all shapes that can hold text. The subclasses are TextBox and AutoShape. ........ r648203 | yegor | 2008-04-15 11:05:22 +0100 (Tue, 15 Apr 2008) | 1 line start improving handling of resources in HSLF. PPFont object represents a font in a presenatation. ........ r648274 | yegor | 2008-04-15 16:11:13 +0100 (Tue, 15 Apr 2008) | 1 line TextSpecInfoAtom is present in PPT 2003+. When the text is changed we must update this record, otherwise the ppt becomes corrupted ........ r648276 | yegor | 2008-04-15 16:12:58 +0100 (Tue, 15 Apr 2008) | 1 line Improved factoring of ppt objects. For ppt tabels Slide.getShapes() returns the Table object (was ShapeGroup) ........ r648303 | nick | 2008-04-15 17:00:50 +0100 (Tue, 15 Apr 2008) | 1 line Nice and small change here... Update the formula parser code to use usermodel.HSSFWorkbook instead of model.Workbook. This should keep things a bit cleaner, and make it much easier for the formula code to work with XSSF ........ r648334 | josh | 2008-04-15 18:07:06 +0100 (Tue, 15 Apr 2008) | 1 line Conditional Formatting (30311) - API improvements, added HSSFSheetConditionalFormatting ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@648444 13f79535-47bb-0310-9956-ffa450edef68
2008-04-15 18:47:30 -04:00
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
/**
* Sets the printarea for the sheet provided
* <p>
* i.e. Reference = $A$1:$B$2
* @param sheetIndex Zero-based sheet index (0 Represents the first sheet to keep consistent with java)
* @param reference Valid name Reference for the Print Area
*/
public void setPrintArea(int sheetIndex, String reference)
{
NameRecord name = workbook.getSpecificBuiltinRecord(NameRecord.BUILTIN_PRINT_AREA, sheetIndex+1);
if (name == null)
name = workbook.createBuiltInName(NameRecord.BUILTIN_PRINT_AREA, sheetIndex+1);
//adding one here because 0 indicates a global named region; doesnt make sense for print areas
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
short externSheetIndex = getWorkbook().checkExternSheet(sheetIndex);
name.setExternSheetNumber(externSheetIndex);
name.setAreaReference(reference);
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
/**
* For the Convenience of Java Programmers maintaining pointers.
* @see #setPrintArea(int, String)
* @param sheetIndex Zero-based sheet index (0 = First Sheet)
* @param startColumn Column to begin printarea
* @param endColumn Column to end the printarea
* @param startRow Row to begin the printarea
* @param endRow Row to end the printarea
*/
public void setPrintArea(int sheetIndex, int startColumn, int endColumn,
int startRow, int endRow) {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
//using absolute references because they don't get copied and pasted anyway
CellReference cell = new CellReference(startRow, startColumn, true, true);
String reference = cell.formatAsString();
cell = new CellReference(endRow, endColumn, true, true);
reference = reference+":"+cell.formatAsString();
setPrintArea(sheetIndex, reference);
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
/**
* Retrieves the reference for the printarea of the specified sheet, the sheet name is appended to the reference even if it was not specified.
* @param sheetIndex Zero-based sheet index (0 Represents the first sheet to keep consistent with java)
* @return String Null if no print area has been defined
*/
public String getPrintArea(int sheetIndex)
{
NameRecord name = workbook.getSpecificBuiltinRecord(NameRecord.BUILTIN_PRINT_AREA, sheetIndex+1);
if (name == null) return null;
//adding one here because 0 indicates a global named region; doesnt make sense for print areas
return name.getAreaReference(this);
}
/**
* Delete the printarea for the sheet specified
* @param sheetIndex Zero-based sheet index (0 = First Sheet)
*/
public void removePrintArea(int sheetIndex) {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
getWorkbook().removeBuiltinRecord(NameRecord.BUILTIN_PRINT_AREA, sheetIndex+1);
}
/** creates a new named range and add it to the model
* @return named range high level
*/
public HSSFName createName(){
NameRecord nameRecord = workbook.createName();
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648417 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r648156 | yegor | 2008-04-15 08:54:20 +0100 (Tue, 15 Apr 2008) | 1 line TextShape is a common superclass of all shapes that can hold text. The subclasses are TextBox and AutoShape. ........ r648203 | yegor | 2008-04-15 11:05:22 +0100 (Tue, 15 Apr 2008) | 1 line start improving handling of resources in HSLF. PPFont object represents a font in a presenatation. ........ r648274 | yegor | 2008-04-15 16:11:13 +0100 (Tue, 15 Apr 2008) | 1 line TextSpecInfoAtom is present in PPT 2003+. When the text is changed we must update this record, otherwise the ppt becomes corrupted ........ r648276 | yegor | 2008-04-15 16:12:58 +0100 (Tue, 15 Apr 2008) | 1 line Improved factoring of ppt objects. For ppt tabels Slide.getShapes() returns the Table object (was ShapeGroup) ........ r648303 | nick | 2008-04-15 17:00:50 +0100 (Tue, 15 Apr 2008) | 1 line Nice and small change here... Update the formula parser code to use usermodel.HSSFWorkbook instead of model.Workbook. This should keep things a bit cleaner, and make it much easier for the formula code to work with XSSF ........ r648334 | josh | 2008-04-15 18:07:06 +0100 (Tue, 15 Apr 2008) | 1 line Conditional Formatting (30311) - API improvements, added HSSFSheetConditionalFormatting ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@648444 13f79535-47bb-0310-9956-ffa450edef68
2008-04-15 18:47:30 -04:00
HSSFName newName = new HSSFName(this, nameRecord);
names.add(newName);
return newName;
}
/** gets the named range index by his name
* <i>Note:</i>Excel named ranges are case-insensitive and
* this method performs a case-insensitive search.
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
*
* @param name named range name
* @return named range index
*/
public int getNameIndex(String name)
{
int retval = -1;
for (int k = 0; k < names.size(); k++)
{
String nameName = getNameName(k);
if (nameName.equalsIgnoreCase(name))
{
retval = k;
break;
}
}
return retval;
}
/** remove the named range by his index
* @param index named range index (0 based)
*/
public void removeName(int index){
names.remove(index);
workbook.removeName(index);
}
/**
* Returns the instance of HSSFDataFormat for this workbook.
* @return the HSSFDataFormat object
* @see org.apache.poi.hssf.record.FormatRecord
* @see org.apache.poi.hssf.record.Record
*/
public HSSFDataFormat createDataFormat() {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
if (formatter == null)
formatter = new HSSFDataFormat(workbook);
return formatter;
}
/** remove the named range by his name
* @param name named range name
*/
public void removeName(String name){
int index = getNameIndex(name);
removeName(index);
}
public HSSFPalette getCustomPalette()
{
return new HSSFPalette(workbook.getCustomPalette());
}
/** Test only. Do not use */
public void insertChartRecord()
{
int loc = workbook.findFirstRecordLocBySid(SSTRecord.sid);
byte[] data = {
(byte)0x0F, (byte)0x00, (byte)0x00, (byte)0xF0, (byte)0x52,
(byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
(byte)0x06, (byte)0xF0, (byte)0x18, (byte)0x00, (byte)0x00,
(byte)0x00, (byte)0x01, (byte)0x08, (byte)0x00, (byte)0x00,
(byte)0x02, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x02,
(byte)0x00, (byte)0x00, (byte)0x00, (byte)0x01, (byte)0x00,
(byte)0x00, (byte)0x00, (byte)0x01, (byte)0x00, (byte)0x00,
(byte)0x00, (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x00,
(byte)0x33, (byte)0x00, (byte)0x0B, (byte)0xF0, (byte)0x12,
(byte)0x00, (byte)0x00, (byte)0x00, (byte)0xBF, (byte)0x00,
(byte)0x08, (byte)0x00, (byte)0x08, (byte)0x00, (byte)0x81,
(byte)0x01, (byte)0x09, (byte)0x00, (byte)0x00, (byte)0x08,
(byte)0xC0, (byte)0x01, (byte)0x40, (byte)0x00, (byte)0x00,
(byte)0x08, (byte)0x40, (byte)0x00, (byte)0x1E, (byte)0xF1,
(byte)0x10, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x0D,
(byte)0x00, (byte)0x00, (byte)0x08, (byte)0x0C, (byte)0x00,
(byte)0x00, (byte)0x08, (byte)0x17, (byte)0x00, (byte)0x00,
(byte)0x08, (byte)0xF7, (byte)0x00, (byte)0x00, (byte)0x10,
};
UnknownRecord r = new UnknownRecord((short)0x00EB, data);
workbook.getRecords().add(loc, r);
}
/**
* Spits out a list of all the drawing records in the workbook.
*/
public void dumpDrawingGroupRecords(boolean fat)
{
DrawingGroupRecord r = (DrawingGroupRecord) workbook.findFirstRecordBySid( DrawingGroupRecord.sid );
r.decode();
List escherRecords = r.getEscherRecords();
PrintWriter w = new PrintWriter(System.out);
for ( Iterator iterator = escherRecords.iterator(); iterator.hasNext(); )
{
EscherRecord escherRecord = (EscherRecord) iterator.next();
if (fat)
System.out.println(escherRecord.toString());
else
escherRecord.display(w, 0);
}
w.flush();
}
/**
* Adds a picture to the workbook.
*
* @param pictureData The bytes of the picture
* @param format The format of the picture. One of <code>PICTURE_TYPE_*</code>
*
* @return the index to this picture (1 based).
*/
public int addPicture(byte[] pictureData, int format)
{
byte[] uid = newUID();
EscherBitmapBlip blipRecord = new EscherBitmapBlip();
blipRecord.setRecordId( (short) ( EscherBitmapBlip.RECORD_ID_START + format ) );
switch (format)
{
case PICTURE_TYPE_EMF:
blipRecord.setOptions(HSSFPictureData.MSOBI_EMF);
break;
case PICTURE_TYPE_WMF:
blipRecord.setOptions(HSSFPictureData.MSOBI_WMF);
break;
case PICTURE_TYPE_PICT:
blipRecord.setOptions(HSSFPictureData.MSOBI_PICT);
break;
case PICTURE_TYPE_PNG:
blipRecord.setOptions(HSSFPictureData.MSOBI_PNG);
break;
case HSSFWorkbook.PICTURE_TYPE_JPEG:
blipRecord.setOptions(HSSFPictureData.MSOBI_JPEG);
break;
case HSSFWorkbook.PICTURE_TYPE_DIB:
blipRecord.setOptions(HSSFPictureData.MSOBI_DIB);
break;
}
blipRecord.setUID( uid );
blipRecord.setMarker( (byte) 0xFF );
blipRecord.setPictureData( pictureData );
EscherBSERecord r = new EscherBSERecord();
r.setRecordId( EscherBSERecord.RECORD_ID );
r.setOptions( (short) ( 0x0002 | ( format << 4 ) ) );
r.setBlipTypeMacOS( (byte) format );
r.setBlipTypeWin32( (byte) format );
r.setUid( uid );
r.setTag( (short) 0xFF );
r.setSize( pictureData.length + 25 );
r.setRef( 1 );
r.setOffset( 0 );
r.setBlipRecord( blipRecord );
return workbook.addBSERecord( r );
}
/**
* Gets all pictures from the Workbook.
*
* @return the list of pictures (a list of {@link HSSFPictureData} objects.)
*/
public List getAllPictures()
{
// The drawing group record always exists at the top level, so we won't need to do this recursively.
List pictures = new ArrayList();
Iterator recordIter = workbook.getRecords().iterator();
while (recordIter.hasNext())
{
Object obj = recordIter.next();
if (obj instanceof AbstractEscherHolderRecord)
{
((AbstractEscherHolderRecord) obj).decode();
List escherRecords = ((AbstractEscherHolderRecord) obj).getEscherRecords();
searchForPictures(escherRecords, pictures);
}
}
return pictures;
}
/**
* Performs a recursive search for pictures in the given list of escher records.
*
* @param escherRecords the escher records.
* @param pictures the list to populate with the pictures.
*/
private void searchForPictures(List escherRecords, List pictures)
{
Iterator recordIter = escherRecords.iterator();
while (recordIter.hasNext())
{
Object obj = recordIter.next();
if (obj instanceof EscherRecord)
{
EscherRecord escherRecord = (EscherRecord) obj;
if (escherRecord instanceof EscherBSERecord)
{
EscherBlipRecord blip = ((EscherBSERecord) escherRecord).getBlipRecord();
if (blip != null)
{
// TODO: Some kind of structure.
pictures.add(new HSSFPictureData(blip));
}
}
// Recursive call.
searchForPictures(escherRecord.getChildRecords(), pictures);
}
}
}
Merged revisions 627779-634630 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r627779 | nick | 2008-02-14 16:32:49 +0100 (Thu, 14 Feb 2008) | 1 line In the interests of sanity, stop having hssf test data files in scratchpad and main, go to just having them in main ........ r627788 | nick | 2008-02-14 17:01:10 +0100 (Thu, 14 Feb 2008) | 1 line Big formula update from Josh from bug #44364 - support for Match, NA and SumProduct functions, and initial error support in functions ........ r627999 | nick | 2008-02-15 11:30:10 +0100 (Fri, 15 Feb 2008) | 1 line To avoid confusion and repeated changes in svn, update the TestDataValidation test to output its file (that needs opening in excel to check to output) into the system tmp directory ........ r628027 | nick | 2008-02-15 12:45:13 +0100 (Fri, 15 Feb 2008) | 1 line Fix for bug #44403 - Have mid use the third argument properly, and test ........ r628029 | nick | 2008-02-15 12:53:25 +0100 (Fri, 15 Feb 2008) | 1 line Fix for bug #44413 from Josh - Fix for circular references in INDEX, OFFSET, VLOOKUP formulas, where a cell is actually allowed to reference itself ........ r628033 | nick | 2008-02-15 13:04:42 +0100 (Fri, 15 Feb 2008) | 1 line Fix from Josh from bug #44417 - Improved handling of references for the need to quote the sheet name for some formulas, but not when fetching a sheet by name ........ r628035 | nick | 2008-02-15 13:13:25 +0100 (Fri, 15 Feb 2008) | 1 line Fix from Josh from bug #44421 - Update Match function to properly support Area references ........ r628044 | nick | 2008-02-15 13:59:40 +0100 (Fri, 15 Feb 2008) | 1 line Partial fix for bug #44410 - support whole column ranges such as C:C in the formula evaluator (so SUM(D:D) will now work). However, the formula string will still be displayed wrong ........ r628065 | nick | 2008-02-15 14:50:38 +0100 (Fri, 15 Feb 2008) | 1 line Further support for whole-column references, including formula strings and the evaluator. Also has some new tests for it ........ r628714 | nick | 2008-02-18 14:08:16 +0100 (Mon, 18 Feb 2008) | 1 line Update notice for latest guidance on ooxml xsd licence, and update getting involved to link to the newly released binary file format docs ........ r629552 | nick | 2008-02-20 19:14:30 +0100 (Wed, 20 Feb 2008) | 1 line Patch from Josh from bug #44403 - Further support for unusual, but valid, arguments to the Mid function ........ r629738 | nick | 2008-02-21 11:36:08 +0100 (Thu, 21 Feb 2008) | 1 line Fix from Josh from bug #44456 - Update contrib SViewer to not fail if a HSSFRow is null ........ r629742 | nick | 2008-02-21 11:49:25 +0100 (Thu, 21 Feb 2008) | 1 line Use the right way to figure out how many rows on a sheet, so we display the row number for all of them on the left hand side. Also, tidy up some imports ........ r629755 | nick | 2008-02-21 12:34:25 +0100 (Thu, 21 Feb 2008) | 1 line Fix bug 38921, where HSSFPalette.findSimilar() wasn't working properly, and add tests for it ........ r629821 | nick | 2008-02-21 16:08:44 +0100 (Thu, 21 Feb 2008) | 1 line Patch from Josh from bug #44371 - support for OFFSET function, and various tweaks to the formula evaluator to support this ........ r629829 | nick | 2008-02-21 16:35:59 +0100 (Thu, 21 Feb 2008) | 1 line Patch from Josh from bug #44366 - InputStreams passed to POIFSFileSystem are now automatically closed. A warning is generated for people who might've relied on them not being closed before, and a wrapper to restore the old behaviour is supplied ........ r629831 | nick | 2008-02-21 16:40:34 +0100 (Thu, 21 Feb 2008) | 1 line Patch from Josh from bug #44437 - improved unit test for poifs ........ r629832 | nick | 2008-02-21 16:42:06 +0100 (Thu, 21 Feb 2008) | 1 line Patch from Josh from bug #44437 - improved unit test for poifs ........ r629837 | nick | 2008-02-21 16:48:52 +0100 (Thu, 21 Feb 2008) | 1 line Patch from Josh from bug #44449 - Handle SharedFormulas better, for where there are formulas for the same area on two sheets, and when the shared formula flag is set incorrectly ........ r629849 | nick | 2008-02-21 17:22:18 +0100 (Thu, 21 Feb 2008) | 1 line Add a disabled test for a file with whacky StyleRecords that trigger an AIOOB ........ r629865 | nick | 2008-02-21 17:44:46 +0100 (Thu, 21 Feb 2008) | 1 line At the request of legal-discuss, shuffle the ooxml xsd licence details into LICENSE from NOTICE ........ r630160 | nick | 2008-02-22 12:23:50 +0100 (Fri, 22 Feb 2008) | 1 line Patch from Josh from bug #44450 - VLookup and HLookup support, and improvements to Lookup and Offset ........ r630164 | nick | 2008-02-22 12:40:00 +0100 (Fri, 22 Feb 2008) | 1 line Bug #44471 - Crystal Reports generates files with short StyleRecords, which isn't allowed in the spec. Work around this ........ r633114 | nick | 2008-03-03 16:01:18 +0100 (Mon, 03 Mar 2008) | 1 line Patch from Paolo from bug #44481 - getVerticallyCenter shouldn't take a parameter, but leave the old version in as deprecated for now ........ r633118 | nick | 2008-03-03 16:10:46 +0100 (Mon, 03 Mar 2008) | 1 line Fix from Yegor from bug #44491 - don't have the new style handy POIDocument property stuff break old style hpsf+hssf use ........ r633126 | nick | 2008-03-03 16:26:38 +0100 (Mon, 03 Mar 2008) | 1 line Patch from Josh from bug #44495 - Handle named cell ranges in formulas that have lower case parts ........ r633151 | nick | 2008-03-03 17:09:02 +0100 (Mon, 03 Mar 2008) | 1 line Patch from Josh from bug #44510 - Fix how DVALRecord works with dropdowns ........ r633169 | nick | 2008-03-03 17:55:00 +0100 (Mon, 03 Mar 2008) | 1 line Patch from Josh from bug #44508 - Fix formula evaluation with evaluateInCell on boolean formulas ........ r633205 | nick | 2008-03-03 18:47:36 +0100 (Mon, 03 Mar 2008) | 1 line Fix indent, add more documentation, and make the error message more helpful ........ r633505 | nick | 2008-03-04 16:06:29 +0100 (Tue, 04 Mar 2008) | 1 line Problem files from bug #44501 ........ r633547 | nick | 2008-03-04 17:53:32 +0100 (Tue, 04 Mar 2008) | 1 line Big patch from Josh from bug #44504 - lots of formula parser improvements ........ r633548 | nick | 2008-03-04 17:59:02 +0100 (Tue, 04 Mar 2008) | 1 line Changelog update for last patch ........ r634318 | nick | 2008-03-06 16:54:06 +0100 (Thu, 06 Mar 2008) | 1 line Change the behaviour on short last blocks to be a warning not an exception, as some people seem to have "real" valid files that trigger this. Fixed bug #28231 ........ r634371 | nick | 2008-03-06 19:06:48 +0100 (Thu, 06 Mar 2008) | 1 line Embeded files from bug #44524 ........ r634372 | nick | 2008-03-06 19:13:47 +0100 (Thu, 06 Mar 2008) | 1 line Add broken test for bug #43901 ........ r634617 | nick | 2008-03-07 12:18:02 +0100 (Fri, 07 Mar 2008) | 1 line Patch from Josh from bug #43901 - Correctly update the internal last cell number when adding and removing cells (previously sometimes off-by-one) ........ r634619 | nick | 2008-03-07 12:36:14 +0100 (Fri, 07 Mar 2008) | 1 line Improved support for read-only recommended workbooks, fixing bug #44536 ........ r634630 | nick | 2008-03-07 13:06:18 +0100 (Fri, 07 Mar 2008) | 1 line Patch largely from Josh from bug #44539 - Support for area references in formulas of rows >= 32768 ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@634936 13f79535-47bb-0310-9956-ffa450edef68
2008-03-08 06:49:00 -05:00
/**
* Is the workbook protected with a password (not encrypted)?
*/
public boolean isWriteProtected() {
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
return this.workbook.isWriteProtected();
Merged revisions 627779-634630 via svnmerge from https://svn.apache.org/repos/asf/poi/trunk ........ r627779 | nick | 2008-02-14 16:32:49 +0100 (Thu, 14 Feb 2008) | 1 line In the interests of sanity, stop having hssf test data files in scratchpad and main, go to just having them in main ........ r627788 | nick | 2008-02-14 17:01:10 +0100 (Thu, 14 Feb 2008) | 1 line Big formula update from Josh from bug #44364 - support for Match, NA and SumProduct functions, and initial error support in functions ........ r627999 | nick | 2008-02-15 11:30:10 +0100 (Fri, 15 Feb 2008) | 1 line To avoid confusion and repeated changes in svn, update the TestDataValidation test to output its file (that needs opening in excel to check to output) into the system tmp directory ........ r628027 | nick | 2008-02-15 12:45:13 +0100 (Fri, 15 Feb 2008) | 1 line Fix for bug #44403 - Have mid use the third argument properly, and test ........ r628029 | nick | 2008-02-15 12:53:25 +0100 (Fri, 15 Feb 2008) | 1 line Fix for bug #44413 from Josh - Fix for circular references in INDEX, OFFSET, VLOOKUP formulas, where a cell is actually allowed to reference itself ........ r628033 | nick | 2008-02-15 13:04:42 +0100 (Fri, 15 Feb 2008) | 1 line Fix from Josh from bug #44417 - Improved handling of references for the need to quote the sheet name for some formulas, but not when fetching a sheet by name ........ r628035 | nick | 2008-02-15 13:13:25 +0100 (Fri, 15 Feb 2008) | 1 line Fix from Josh from bug #44421 - Update Match function to properly support Area references ........ r628044 | nick | 2008-02-15 13:59:40 +0100 (Fri, 15 Feb 2008) | 1 line Partial fix for bug #44410 - support whole column ranges such as C:C in the formula evaluator (so SUM(D:D) will now work). However, the formula string will still be displayed wrong ........ r628065 | nick | 2008-02-15 14:50:38 +0100 (Fri, 15 Feb 2008) | 1 line Further support for whole-column references, including formula strings and the evaluator. Also has some new tests for it ........ r628714 | nick | 2008-02-18 14:08:16 +0100 (Mon, 18 Feb 2008) | 1 line Update notice for latest guidance on ooxml xsd licence, and update getting involved to link to the newly released binary file format docs ........ r629552 | nick | 2008-02-20 19:14:30 +0100 (Wed, 20 Feb 2008) | 1 line Patch from Josh from bug #44403 - Further support for unusual, but valid, arguments to the Mid function ........ r629738 | nick | 2008-02-21 11:36:08 +0100 (Thu, 21 Feb 2008) | 1 line Fix from Josh from bug #44456 - Update contrib SViewer to not fail if a HSSFRow is null ........ r629742 | nick | 2008-02-21 11:49:25 +0100 (Thu, 21 Feb 2008) | 1 line Use the right way to figure out how many rows on a sheet, so we display the row number for all of them on the left hand side. Also, tidy up some imports ........ r629755 | nick | 2008-02-21 12:34:25 +0100 (Thu, 21 Feb 2008) | 1 line Fix bug 38921, where HSSFPalette.findSimilar() wasn't working properly, and add tests for it ........ r629821 | nick | 2008-02-21 16:08:44 +0100 (Thu, 21 Feb 2008) | 1 line Patch from Josh from bug #44371 - support for OFFSET function, and various tweaks to the formula evaluator to support this ........ r629829 | nick | 2008-02-21 16:35:59 +0100 (Thu, 21 Feb 2008) | 1 line Patch from Josh from bug #44366 - InputStreams passed to POIFSFileSystem are now automatically closed. A warning is generated for people who might've relied on them not being closed before, and a wrapper to restore the old behaviour is supplied ........ r629831 | nick | 2008-02-21 16:40:34 +0100 (Thu, 21 Feb 2008) | 1 line Patch from Josh from bug #44437 - improved unit test for poifs ........ r629832 | nick | 2008-02-21 16:42:06 +0100 (Thu, 21 Feb 2008) | 1 line Patch from Josh from bug #44437 - improved unit test for poifs ........ r629837 | nick | 2008-02-21 16:48:52 +0100 (Thu, 21 Feb 2008) | 1 line Patch from Josh from bug #44449 - Handle SharedFormulas better, for where there are formulas for the same area on two sheets, and when the shared formula flag is set incorrectly ........ r629849 | nick | 2008-02-21 17:22:18 +0100 (Thu, 21 Feb 2008) | 1 line Add a disabled test for a file with whacky StyleRecords that trigger an AIOOB ........ r629865 | nick | 2008-02-21 17:44:46 +0100 (Thu, 21 Feb 2008) | 1 line At the request of legal-discuss, shuffle the ooxml xsd licence details into LICENSE from NOTICE ........ r630160 | nick | 2008-02-22 12:23:50 +0100 (Fri, 22 Feb 2008) | 1 line Patch from Josh from bug #44450 - VLookup and HLookup support, and improvements to Lookup and Offset ........ r630164 | nick | 2008-02-22 12:40:00 +0100 (Fri, 22 Feb 2008) | 1 line Bug #44471 - Crystal Reports generates files with short StyleRecords, which isn't allowed in the spec. Work around this ........ r633114 | nick | 2008-03-03 16:01:18 +0100 (Mon, 03 Mar 2008) | 1 line Patch from Paolo from bug #44481 - getVerticallyCenter shouldn't take a parameter, but leave the old version in as deprecated for now ........ r633118 | nick | 2008-03-03 16:10:46 +0100 (Mon, 03 Mar 2008) | 1 line Fix from Yegor from bug #44491 - don't have the new style handy POIDocument property stuff break old style hpsf+hssf use ........ r633126 | nick | 2008-03-03 16:26:38 +0100 (Mon, 03 Mar 2008) | 1 line Patch from Josh from bug #44495 - Handle named cell ranges in formulas that have lower case parts ........ r633151 | nick | 2008-03-03 17:09:02 +0100 (Mon, 03 Mar 2008) | 1 line Patch from Josh from bug #44510 - Fix how DVALRecord works with dropdowns ........ r633169 | nick | 2008-03-03 17:55:00 +0100 (Mon, 03 Mar 2008) | 1 line Patch from Josh from bug #44508 - Fix formula evaluation with evaluateInCell on boolean formulas ........ r633205 | nick | 2008-03-03 18:47:36 +0100 (Mon, 03 Mar 2008) | 1 line Fix indent, add more documentation, and make the error message more helpful ........ r633505 | nick | 2008-03-04 16:06:29 +0100 (Tue, 04 Mar 2008) | 1 line Problem files from bug #44501 ........ r633547 | nick | 2008-03-04 17:53:32 +0100 (Tue, 04 Mar 2008) | 1 line Big patch from Josh from bug #44504 - lots of formula parser improvements ........ r633548 | nick | 2008-03-04 17:59:02 +0100 (Tue, 04 Mar 2008) | 1 line Changelog update for last patch ........ r634318 | nick | 2008-03-06 16:54:06 +0100 (Thu, 06 Mar 2008) | 1 line Change the behaviour on short last blocks to be a warning not an exception, as some people seem to have "real" valid files that trigger this. Fixed bug #28231 ........ r634371 | nick | 2008-03-06 19:06:48 +0100 (Thu, 06 Mar 2008) | 1 line Embeded files from bug #44524 ........ r634372 | nick | 2008-03-06 19:13:47 +0100 (Thu, 06 Mar 2008) | 1 line Add broken test for bug #43901 ........ r634617 | nick | 2008-03-07 12:18:02 +0100 (Fri, 07 Mar 2008) | 1 line Patch from Josh from bug #43901 - Correctly update the internal last cell number when adding and removing cells (previously sometimes off-by-one) ........ r634619 | nick | 2008-03-07 12:36:14 +0100 (Fri, 07 Mar 2008) | 1 line Improved support for read-only recommended workbooks, fixing bug #44536 ........ r634630 | nick | 2008-03-07 13:06:18 +0100 (Fri, 07 Mar 2008) | 1 line Patch largely from Josh from bug #44539 - Support for area references in formulas of rows >= 32768 ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@634936 13f79535-47bb-0310-9956-ffa450edef68
2008-03-08 06:49:00 -05:00
}
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-648588,648590-648622,648625-648673,648675-649141,649144,649146-649556,649558-649795,649799,649801-649910,649912-649913,649915-650128,650131-650132,650134-650137,650140-650914,650916-653812 via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk ........ r651992 | nick | 2008-04-27 19:02:13 +0100 (Sun, 27 Apr 2008) | 1 line Fix from Trejkaz from bug #44857 - Avoid OOM on unknown escher records when EscherMetafileBlip is incorrect ........ r652285 | yegor | 2008-04-30 07:18:05 +0100 (Wed, 30 Apr 2008) | 1 line start a new section for 3.1-beta2 ........ r652288 | yegor | 2008-04-30 07:19:38 +0100 (Wed, 30 Apr 2008) | 1 line correctly process PICT blips (see bug #44886) ........ r652290 | yegor | 2008-04-30 07:21:04 +0100 (Wed, 30 Apr 2008) | 1 line more flexible creation of a cluster ........ r652292 | yegor | 2008-04-30 07:22:02 +0100 (Wed, 30 Apr 2008) | 1 line a few more words in the release guide ........ r652298 | yegor | 2008-04-30 07:29:11 +0100 (Wed, 30 Apr 2008) | 1 line more work on rendering ppt slides ........ r652329 | nick | 2008-04-30 12:10:49 +0100 (Wed, 30 Apr 2008) | 1 line Tests to show that bugs 44891 and 44861 were both already fixed ........ r652426 | josh | 2008-05-01 04:25:37 +0100 (Thu, 01 May 2008) | 1 line fixed bug 44892 - made HSSFWorkbook.getSheet(String) case insensitive ........ r652446 | josh | 2008-05-01 08:42:18 +0100 (Thu, 01 May 2008) | 1 line 44914 - Fix/suppress warning message - WARN. Unread n bytes of record 0xNN ........ r652561 | josh | 2008-05-01 16:46:21 +0100 (Thu, 01 May 2008) | 1 line added disabled junit for bug 44916 ........ r652934 | josh | 2008-05-02 23:36:49 +0100 (Fri, 02 May 2008) | 1 line 44921 - allow Ptg.writeBytes() to be called on relative ref Ptgs (RefN* and AreaN*) ........ r652936 | josh | 2008-05-02 23:49:38 +0100 (Fri, 02 May 2008) | 1 line should have been submitted with r652934 ........ r652994 | josh | 2008-05-03 04:59:32 +0100 (Sat, 03 May 2008) | 1 line Fixed 44675 - Parameter operand classes (function metadata) required to encode SUM() etc properly. Added parse validation for number of parameters ........ r653117 | josh | 2008-05-03 20:53:38 +0100 (Sat, 03 May 2008) | 1 line 44929 - Improved error handling in HSSFWorkbook when attempting to read a BIFF5 file ........ r653125 | josh | 2008-05-03 21:13:56 +0100 (Sat, 03 May 2008) | 1 line Swapped ArrayIndexOutOfBoundsException for plain array length check in AbstractFunctionPtg.getParameterClass(). (To help debugging when trying to find a real AIOOB) ........ r653484 | yegor | 2008-05-05 14:59:11 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653485 | yegor | 2008-05-05 14:59:38 +0100 (Mon, 05 May 2008) | 1 line take into account indentation in HSSFSheet.autosizeColumn ........ r653486 | yegor | 2008-05-05 15:00:30 +0100 (Mon, 05 May 2008) | 1 line getting ready to 3.1-beta2 ........ r653520 | yegor | 2008-05-05 17:12:21 +0100 (Mon, 05 May 2008) | 1 line bug #44235 is not reproducible in 3.1-beta1 ........ r653521 | yegor | 2008-05-05 17:13:24 +0100 (Mon, 05 May 2008) | 1 line restored mistakenly commented line ........ r653551 | josh | 2008-05-05 19:30:49 +0100 (Mon, 05 May 2008) | 1 line Added test case method javadoc for old bug 44675 ........ r653608 | josh | 2008-05-05 22:38:07 +0100 (Mon, 05 May 2008) | 1 line Follow-on from 28754 - StringPtg.toFormulaString() should escape double quotes ........ r653668 | josh | 2008-05-06 03:02:41 +0100 (Tue, 06 May 2008) | 1 line 42564 - fixed ArrayPtg to use ConstantValueParser. Fixed a few other ArrayPtg encoding issues. ........ r653675 | josh | 2008-05-06 04:57:15 +0100 (Tue, 06 May 2008) | 1 line 42570 - fixed LabelRecord to use empty string instead of null when the length is zero. ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@653822 13f79535-47bb-0310-9956-ffa450edef68
2008-05-06 12:00:36 -04:00
/**
* protect a workbook with a password (not encypted, just sets writeprotect
* flags and the password.
* @param password to set
*/
public void writeProtectWorkbook( String password, String username ) {
this.workbook.writeProtectWorkbook(password, username);
}
/**
* removes the write protect flag
*/
public void unwriteProtectWorkbook() {
this.workbook.unwriteProtectWorkbook();
}
/**
* Gets all embedded OLE2 objects from the Workbook.
*
* @return the list of embedded objects (a list of {@link HSSFObjectData} objects.)
*/
public List getAllEmbeddedObjects()
{
List objects = new ArrayList();
for (int i = 0; i < getNumberOfSheets(); i++)
{
getAllEmbeddedObjects(getSheetAt(i).getSheet().getRecords(), objects);
}
return objects;
}
/**
* Gets all embedded OLE2 objects from the Workbook.
*
* @param records the list of records to search.
* @param objects the list of embedded objects to populate.
*/
private void getAllEmbeddedObjects(List records, List objects)
{
Iterator recordIter = records.iterator();
while (recordIter.hasNext())
{
Object obj = recordIter.next();
if (obj instanceof ObjRecord)
{
// TODO: More convenient way of determining if there is stored binary.
// TODO: Link to the data stored in the other stream.
Iterator subRecordIter = ((ObjRecord) obj).getSubRecords().iterator();
while (subRecordIter.hasNext())
{
Object sub = subRecordIter.next();
if (sub instanceof EmbeddedObjectRefSubRecord)
{
objects.add(new HSSFObjectData((ObjRecord) obj, filesystem));
}
}
}
}
}
public CreationHelper getCreationHelper() {
return new HSSFCreationHelper(this);
}
private byte[] newUID()
{
byte[] bytes = new byte[16];
return bytes;
}
}