You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by be...@apache.org on 2012/08/05 15:05:49 UTC
svn commit: r1369572 [1/4] - in /poi/branches/gsoc2012: ./
src/documentation/ src/documentation/content/xdocs/
src/documentation/content/xdocs/spreadsheet/
src/java/org/apache/poi/hssf/model/
src/java/org/apache/poi/hssf/record/aggregates/ src/java/org...
Author: berlog
Date: Sun Aug 5 13:05:44 2012
New Revision: 1369572
URL: http://svn.apache.org/viewvc?rev=1369572&view=rev
Log:
merged with trunk
Added:
poi/branches/gsoc2012/src/java/org/apache/poi/util/PngUtils.java
- copied unchanged from r1369290, poi/trunk/src/java/org/apache/poi/util/PngUtils.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessagePropertiesChunk.java
- copied unchanged from r1369290, poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessagePropertiesChunk.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java
- copied unchanged from r1369290, poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertyValue.java
- copied unchanged from r1369290, poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertyValue.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/StoragePropertiesChunk.java
- copied unchanged from r1369290, poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/StoragePropertiesChunk.java
poi/branches/gsoc2012/test-data/diagram/v6-non-utf16le.vsd
- copied unchanged from r1369290, poi/trunk/test-data/diagram/v6-non-utf16le.vsd
poi/branches/gsoc2012/test-data/document/53446.doc
- copied unchanged from r1369290, poi/trunk/test-data/document/53446.doc
poi/branches/gsoc2012/test-data/slideshow/53446.ppt
- copied unchanged from r1369290, poi/trunk/test-data/slideshow/53446.ppt
poi/branches/gsoc2012/test-data/spreadsheet/53446.xls
- copied unchanged from r1369290, poi/trunk/test-data/spreadsheet/53446.xls
poi/branches/gsoc2012/test-data/spreadsheet/RepeatingRowsCols.xls
- copied unchanged from r1369290, poi/trunk/test-data/spreadsheet/RepeatingRowsCols.xls
poi/branches/gsoc2012/test-data/spreadsheet/RepeatingRowsCols.xlsx
- copied unchanged from r1369290, poi/trunk/test-data/spreadsheet/RepeatingRowsCols.xlsx
Modified:
poi/branches/gsoc2012/ (props changed)
poi/branches/gsoc2012/src/documentation/content/xdocs/casestudies.xml
poi/branches/gsoc2012/src/documentation/content/xdocs/spreadsheet/eval.xml
poi/branches/gsoc2012/src/documentation/content/xdocs/spreadsheet/quick-guide.xml
poi/branches/gsoc2012/src/documentation/content/xdocs/status.xml
poi/branches/gsoc2012/src/documentation/skinconf.xml
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/model/InternalSheet.java
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/aggregates/PageSettingsBlock.java
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AreaFormatRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AreaRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AxisLineFormatRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AxisOptionsRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AxisParentRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AxisRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AxisUsedRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/BarRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/BeginRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/CategorySeriesAxisRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/ChartFormatRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/ChartRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/ChartTitleFormatRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/DatRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/DataFormatRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/DefaultDataLabelTextPropertiesRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/EndRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/FontBasisRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/FontIndexRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/FrameRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/LegendRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/LineFormatRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/LinkedDataRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/NumberFormatIndexRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/ObjectLinkRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/PlotAreaRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/PlotGrowthRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesChartGroupIndexRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesIndexRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesLabelsRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesListRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesTextRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesToChartGroupRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SheetPropertiesRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/TextRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/TickRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/UnitsRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/ValueRangeRecord.java (props changed)
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/usermodel/HSSFName.java
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/usermodel/HSSFPictureData.java
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
poi/branches/gsoc2012/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
poi/branches/gsoc2012/src/java/org/apache/poi/ss/format/CellDateFormatter.java
poi/branches/gsoc2012/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
poi/branches/gsoc2012/src/java/org/apache/poi/ss/usermodel/DataFormatter.java
poi/branches/gsoc2012/src/java/org/apache/poi/ss/usermodel/Sheet.java
poi/branches/gsoc2012/src/java/org/apache/poi/ss/usermodel/Workbook.java
poi/branches/gsoc2012/src/java/org/apache/poi/ss/util/CellRangeAddress.java
poi/branches/gsoc2012/src/java/org/apache/poi/ss/util/CellRangeAddressBase.java
poi/branches/gsoc2012/src/java/org/apache/poi/ss/util/CellReference.java
poi/branches/gsoc2012/src/java/org/apache/poi/util/LittleEndian.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ZipHelper.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/ss/usermodel/WorkbookFactory.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
poi/branches/gsoc2012/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
poi/branches/gsoc2012/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFColor.java
poi/branches/gsoc2012/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSimpleShape.java
poi/branches/gsoc2012/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTableStyles.java
poi/branches/gsoc2012/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java
poi/branches/gsoc2012/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextRun.java
poi/branches/gsoc2012/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java
poi/branches/gsoc2012/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFName.java
poi/branches/gsoc2012/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFDocument.java
poi/branches/gsoc2012/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeaderV11.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeaderV4V5.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeaderV6.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hdgf/streams/ChunkStream.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIStringAttribute.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hslf/blip/PNG.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hslf/model/PPGraphics2D.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/ByteChunk.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunk.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/DirectoryChunk.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MAPIProperty.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/NameIdChunks.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/StringChunk.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Types.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/dev/HSMFDump.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/dev/TypesLister.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java
poi/branches/gsoc2012/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java
poi/branches/gsoc2012/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java
poi/branches/gsoc2012/src/scratchpad/testcases/org/apache/poi/hslf/model/TestPicture.java
poi/branches/gsoc2012/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestChunkData.java
poi/branches/gsoc2012/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestMAPIProperty.java
poi/branches/gsoc2012/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestTypes.java
poi/branches/gsoc2012/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/model/TestSheet.java
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestAreaFormatRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestAreaRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestAxisLineFormatRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestAxisOptionsRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestAxisParentRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestAxisRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestAxisUsedRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestBarRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestCategorySeriesAxisRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestChartRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestChartTitleFormatRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestDatRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestDataFormatRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestDefaultDataLabelTextPropertiesRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestFontBasisRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestFontIndexRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestFrameRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestLegendRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestLineFormatRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestLinkedDataRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestNumberFormatIndexRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestObjectLinkRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestPlotAreaRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestPlotGrowthRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestSeriesChartGroupIndexRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestSeriesIndexRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestSeriesLabelsRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestSeriesListRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestSeriesRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestSeriesTextRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestSeriesToChartGroupRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestSheetPropertiesRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestTextRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestTickRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestUnitsRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/record/chart/TestValueRangeRecord.java (props changed)
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPictureData.java
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
poi/branches/gsoc2012/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java
poi/branches/gsoc2012/src/testcases/org/apache/poi/ss/formula/TestWorkbookEvaluator.java
poi/branches/gsoc2012/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java
poi/branches/gsoc2012/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java
poi/branches/gsoc2012/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java
Propchange: poi/branches/gsoc2012/
------------------------------------------------------------------------------
Merged /poi/trunk:r1342604-1369290
Modified: poi/branches/gsoc2012/src/documentation/content/xdocs/casestudies.xml
URL: http://svn.apache.org/viewvc/poi/branches/gsoc2012/src/documentation/content/xdocs/casestudies.xml?rev=1369572&r1=1369571&r2=1369572&view=diff
==============================================================================
--- poi/branches/gsoc2012/src/documentation/content/xdocs/casestudies.xml (original)
+++ poi/branches/gsoc2012/src/documentation/content/xdocs/casestudies.xml Sun Aug 5 13:05:44 2012
@@ -217,8 +217,13 @@ format,
<section>
<title>iDATA Development Ltd (IDD)</title>
<p>
- <link href="http://www.iexlsoftware.com/">IDD</link> have developed the iEXL product to generate Excel spreadsheets
- directly on the Iseries/AS400 IBM platform. Using RPG, SQL, QUERY, JAVA, COBOL etc. In other words your existing staffs knowledge.
+ <link href="http://www.iexlsoftware.com/">IDD</link> have developed the iEXL product to
+ generate Excel spreadsheets directly on the Iseries/AS400 IBM I on Power platform.
+ </p>
+ <p>
+ Professional spreadsheets created via a menu system. Some basic programming is required for more complex options.
+ When programming is required it can be carried out using RPG, SQL, QUERY, JAVA, COBOL etc.
+ In other words your existing staffs knowledge
</p>
<p>
Design spreadsheets with:
@@ -236,26 +241,34 @@ format,
<li>Page breaks</li>
<li>Sheet breaks</li>
<li>Text insertion and much more</li>
+ <li>Functions/Formula</li>
+ <li>Merge cells</li>
+ <li>Row Height</li>
+ <li>Cell text alignment</li>
+ <li>Text Rotation </li>
+ <li>50 Database files per workbook.</li>
<li>E-mail the spreadsheet</li>
</ul>
<p>
- The product name is âiEXLâ and has been live on both European and North American systems for over three years.
- It is being used in preference to more established commercial products which my clients have already purchased.
+ The product name is 'iEXL' and has been live on both European and North American systems for over four years.
+ It is being used in preference to more established commercial products which our clients have already purchased.
This is due to cost and ease of use.
</p>
<p>
- All spreadsheets can be archived if required so that historical spreadsheets can be retrieved and in the case
- of one client a full external company audit can be approved. The system has benefits for all departments within an organisation.
- Examples of this are accounts department for things such as aged trial balance, distribution department for ASNâs,
- warehousing for stock figures, IS for security reporting etc.
+ All spreadsheets can be archived if required so that historical spreadsheets can be retrieved.
+ </p>
+ <p>
+ The system has benefits for all departments within an organisation.
+ Examples of this are accounts department for things such as aged trial balance,
+ distribution department for ASNâs, warehousing for stock figures, IS for security reporting etc.
</p>
<p>
- Clients have at this point (Nov 2010) created over 200 spreadsheets
- which in turn have generated over 120,000 E-mails. iEXL has a menu driven email system.
+ Clients have at this point (June 2012) created over 300 spreadsheets which in turn have generated over
+ 500,000 E-mails. iEXL has a menu driven email system.
</p>
<p>
Due to the Apache-POI project IDD have been able to create the IEXL product.
- This is a well priced product which allows companies of all sizes access to a product that opens up their reporting capabilities.
+ This is a well priced product which allows companies of all sizes access to a product that opens up their reporting capabilities
</p>
<p>
Within the <link href="http://www.iexlsoftware.com/">iEXLSOFTWARE.COM</link> website you will find a full user manual,
Modified: poi/branches/gsoc2012/src/documentation/content/xdocs/spreadsheet/eval.xml
URL: http://svn.apache.org/viewvc/poi/branches/gsoc2012/src/documentation/content/xdocs/spreadsheet/eval.xml?rev=1369572&r1=1369571&r2=1369572&view=diff
==============================================================================
--- poi/branches/gsoc2012/src/documentation/content/xdocs/spreadsheet/eval.xml (original)
+++ poi/branches/gsoc2012/src/documentation/content/xdocs/spreadsheet/eval.xml Sun Aug 5 13:05:44 2012
@@ -272,28 +272,41 @@ for(int sheetNum = 0; sheetNum < wb.g
</source>
</section>
- <anchor id="Performance"/>
- <section><title>Performance Notes</title>
- <ul>
- <li>Generally you should have to create only one FormulaEvaluator
- instance per sheet, but there really is no overhead in creating
- multiple FormulaEvaluators per sheet other than that of the
- FormulaEvaluator object creation.
- </li>
- <li>Also note that FormulaEvaluator maintains a reference to
- the sheet and workbook, so ensure that the evaluator instance
- is available for garbage collection when you are done with it
- (in other words don't maintain long lived reference to
- FormulaEvaluator if you don't really need to - unless
- all references to the sheet and workbook are removed, these
- don't get garbage collected and continue to occupy potentially
- large amounts of memory).
- </li>
- <li>CellValue instances however do not maintain reference to the
- Cell or the sheet or workbook, so these can be long-lived
- objects without any adverse effect on performance.
- </li>
- </ul>
- </section>
- </body>
+ <anchor id="Performance"/>
+ <section><title>Performance Notes</title>
+ <ul>
+ <li>Generally you should have to create only one FormulaEvaluator
+ instance per Workbook. The FormulaEvaluator will cache
+ evaluations of dependent cells, so if you have multiple
+ formulas all depending on a cell then subsequent evaluations
+ will be faster.
+ </li>
+ <li>You should normally perform all of your updates to cells,
+ before triggering the evaluation, rather than doing one
+ cell at a time. By waiting until all the updates/sets are
+ performed, you'll be able to take best advantage of the caching
+ for complex formulas.
+ </li>
+ <li>If you do end up making changes to cells part way through
+ evaluation, you should call <em>notifySetFormula</em> or
+ <em>notifyUpdateCell</em> to trigger suitable cache clearance.
+ Alternately, you could instantiate a new FormulaEvaluator,
+ which will start with empty caches.
+ </li>
+ <li>Also note that FormulaEvaluator maintains a reference to
+ the sheet and workbook, so ensure that the evaluator instance
+ is available for garbage collection when you are done with it
+ (in other words don't maintain long lived reference to
+ FormulaEvaluator if you don't really need to - unless
+ all references to the sheet and workbook are removed, these
+ don't get garbage collected and continue to occupy potentially
+ large amounts of memory).
+ </li>
+ <li>CellValue instances however do not maintain reference to the
+ Cell or the sheet or workbook, so these can be long-lived
+ objects without any adverse effect on performance.
+ </li>
+ </ul>
+ </section>
+ </body>
</document>
Modified: poi/branches/gsoc2012/src/documentation/content/xdocs/spreadsheet/quick-guide.xml
URL: http://svn.apache.org/viewvc/poi/branches/gsoc2012/src/documentation/content/xdocs/spreadsheet/quick-guide.xml?rev=1369572&r1=1369571&r2=1369572&view=diff
==============================================================================
--- poi/branches/gsoc2012/src/documentation/content/xdocs/spreadsheet/quick-guide.xml (original)
+++ poi/branches/gsoc2012/src/documentation/content/xdocs/spreadsheet/quick-guide.xml Sun Aug 5 13:05:44 2012
@@ -865,26 +865,31 @@ Examples:
<section><title>Repeating rows and columns</title>
<p>
It's possible to set up repeating rows and columns in
- your printouts by using the setRepeatingRowsAndColumns()
- function in the HSSFWorkbook class.
+ your printouts by using the setRepeatingRows() and
+ setRepeatingColumns() methods in the Sheet class.
</p>
<p>
- This function Contains 5 parameters.
- The first parameter is the index to the sheet (0 = first sheet).
- The second and third parameters specify the range for the columns to repreat.
- To stop the columns from repeating pass in -1 as the start and end column.
- The fourth and fifth parameters specify the range for the rows to repeat.
- To stop the columns from repeating pass in -1 as the start and end rows.
+ These methods expect a CellRangeAddress parameter
+ which specifies the range for the rows or columns to
+ repeat.
+ For setRepeatingRows(), it should specify a range of
+ rows to repeat, with the column part spanning all
+ columns.
+ For setRepeatingColums(), it should specify a range of
+ columns to repeat, with the row part spanning all
+ rows.
+ If the parameter is null, the repeating rows or columns
+ will be removed.
</p>
<source>
- Workbook wb = new HSSFWorkbook();
- Sheet sheet1 = wb.createSheet("new sheet");
- Sheet sheet2 = wb.createSheet("second sheet");
-
- // Set the columns to repeat from column 0 to 2 on the first sheet
- wb.setRepeatingRowsAndColumns(0,0,2,-1,-1);
- // Set the the repeating rows and columns on the second sheet.
- wb.setRepeatingRowsAndColumns(1,4,5,1,2);
+ Workbook wb = new HSSFWorkbook(); // or new XSSFWorkbook();
+ Sheet sheet1 = wb.createSheet("Sheet1");
+ Sheet sheet2 = wb.createSheet("Sheet2");
+
+ // Set the rows to repeat from row 4 to 5 on the first sheet.
+ sheet1.setRepeatingRows(CellRangeAddress.valueOf("4:5"));
+ // Set the columns to repeat from column A to C on the second sheet
+ sheet2.setRepeatingColumns(CellRangeAddress.valueOf("A:C"));
FileOutputStream fileOut = new FileOutputStream("workbook.xls");
wb.write(fileOut);
Modified: poi/branches/gsoc2012/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/branches/gsoc2012/src/documentation/content/xdocs/status.xml?rev=1369572&r1=1369571&r2=1369572&view=diff
==============================================================================
--- poi/branches/gsoc2012/src/documentation/content/xdocs/status.xml (original)
+++ poi/branches/gsoc2012/src/documentation/content/xdocs/status.xml Sun Aug 5 13:05:44 2012
@@ -34,7 +34,19 @@
<changes>
<release version="3.9-beta1" date="2012-??-??">
- <action dev="poi-developers" type="add">53302 - Fixed EscherAggregate to correctly handle Continue records in drawing blocks </action>
+ <action dev="poi-developers" type="add">53446 - Fixed some problems extracting PNGs </action>
+ <action dev="poi-developers" type="fix">53205 - Fixed some parsing errors and encoding issues in HDGF </action>
+ <action dev="poi-developers" type="add">53204 - Improved performanceof PageSettingsBlock in HSSF </action>
+ <action dev="poi-developers" type="add">53500 - Getter for repeating rows and columns</action>
+ <action dev="poi-developers" type="fix">53369 - Fixed tests failing on JDK 1.7</action>
+ <action dev="poi-developers" type="fix">53360 - Fixed SXSSF to correctly write text before escaped Unicode control character</action>
+ <action dev="poi-developers" type="add">Change HSMF Types to have full data on ID, Name and Length, rather than just being a simple ID</action>
+ <action dev="poi-developers" type="add">48469 - Updated case study</action>
+ <action dev="poi-developers" type="add">53476 - Support Complex Name in formulas </action>
+ <action dev="poi-developers" type="fix">53414 - properly update sheet dimensions when adding column </action>
+ <action dev="poi-developers" type="add">Add File based constructor to OPCPackage, alongside existing String one (which constructed a File from the string internally)</action>
+ <action dev="poi-developers" type="fix">53389 - Handle formatting General and @ formats even if a locale is prefixed to them</action>
+ <action dev="poi-developers" type="fix">53271 - Removed unconditional asserts in SXSSF</action>
<action dev="poi-developers" type="add">53025 - Updatad documentation and example on using Data Validations </action>
<action dev="poi-developers" type="add">53227 - Corrected AddDimensionedImage.java to support XSSF/SXSSF </action>
<action dev="poi-developers" type="add">53058 - Utility for representing drawings contained in a binary Excel file as a XML tree</action>
Modified: poi/branches/gsoc2012/src/documentation/skinconf.xml
URL: http://svn.apache.org/viewvc/poi/branches/gsoc2012/src/documentation/skinconf.xml?rev=1369572&r1=1369571&r2=1369572&view=diff
==============================================================================
--- poi/branches/gsoc2012/src/documentation/skinconf.xml (original)
+++ poi/branches/gsoc2012/src/documentation/skinconf.xml Sun Aug 5 13:05:44 2012
@@ -82,7 +82,7 @@ be used to configure the chosen Forrest
<!-- Do we want to disable the print link? If enabled, invalid HTML 4.0.1 -->
<disable-print-link>false</disable-print-link>
<!-- Do we want to disable the PDF link? -->
- <disable-pdf-link>false</disable-pdf-link>
+ <disable-pdf-link>true</disable-pdf-link>
<!-- Do we want to disable the xml source link? yes, it avoids disclosing author emails -->
<disable-xml-link>true</disable-xml-link>
<!-- Do we want to disable w3c compliance links? -->
@@ -114,7 +114,7 @@ be used to configure the chosen Forrest
<host-logo></host-logo>
<!-- The following are used to construct a copyright statement -->
- <year>2002-2011</year>
+ <year>2002-2012</year>
<vendor>The Apache Software Foundation</vendor>
<!-- Some skins use this to form a 'breadcrumb trail' of links. If you don't
Modified: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/model/InternalSheet.java
URL: http://svn.apache.org/viewvc/poi/branches/gsoc2012/src/java/org/apache/poi/hssf/model/InternalSheet.java?rev=1369572&r1=1369571&r2=1369572&view=diff
==============================================================================
--- poi/branches/gsoc2012/src/java/org/apache/poi/hssf/model/InternalSheet.java (original)
+++ poi/branches/gsoc2012/src/java/org/apache/poi/hssf/model/InternalSheet.java Sun Aug 5 13:05:44 2012
@@ -597,7 +597,7 @@ public final class InternalSheet {
}
DimensionsRecord d = _dimensions;
- if (col.getColumn() > d.getLastCol()) {
+ if (col.getColumn() >= d.getLastCol()) {
d.setLastCol(( short ) (col.getColumn() + 1));
}
if (col.getColumn() < d.getFirstCol()) {
Modified: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/aggregates/PageSettingsBlock.java
URL: http://svn.apache.org/viewvc/poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/aggregates/PageSettingsBlock.java?rev=1369572&r1=1369571&r2=1369572&view=diff
==============================================================================
--- poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/aggregates/PageSettingsBlock.java (original)
+++ poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/aggregates/PageSettingsBlock.java Sun Aug 5 13:05:44 2012
@@ -18,13 +18,15 @@
package org.apache.poi.hssf.record.aggregates;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Arrays;
+import java.util.Map;
import org.apache.poi.hssf.model.RecordStream;
import org.apache.poi.hssf.model.InternalSheet;
import org.apache.poi.hssf.record.*;
+import org.apache.poi.util.HexDump;
/**
* Groups the page settings records for a worksheet.<p/>
@@ -35,59 +37,59 @@ import org.apache.poi.hssf.record.*;
*/
public final class PageSettingsBlock extends RecordAggregate {
- /**
- * PLS is potentially a <i>continued</i> record, but is currently uninterpreted by POI
- */
- private static final class PLSAggregate extends RecordAggregate {
- private static final ContinueRecord[] EMPTY_CONTINUE_RECORD_ARRAY = { };
- private final Record _pls;
- /**
- * holds any continue records found after the PLS record.<br/>
- * This would not be required if PLS was properly interpreted.
- * Currently, PLS is an {@link UnknownRecord} and does not automatically
- * include any trailing {@link ContinueRecord}s.
- */
- private ContinueRecord[] _plsContinues;
-
- public PLSAggregate(RecordStream rs) {
- _pls = rs.getNext();
- if (rs.peekNextSid()==ContinueRecord.sid) {
- List<ContinueRecord> temp = new ArrayList<ContinueRecord>();
- while (rs.peekNextSid()==ContinueRecord.sid) {
- temp.add((ContinueRecord)rs.getNext());
- }
- _plsContinues = new ContinueRecord[temp.size()];
- temp.toArray(_plsContinues);
- } else {
- _plsContinues = EMPTY_CONTINUE_RECORD_ARRAY;
- }
- }
-
- @Override
- public void visitContainedRecords(RecordVisitor rv) {
- rv.visitRecord(_pls);
- for (int i = 0; i < _plsContinues.length; i++) {
- rv.visitRecord(_plsContinues[i]);
- }
- }
- }
-
- // Every one of these component records is optional
- // (The whole PageSettingsBlock may not be present)
- private PageBreakRecord _rowBreaksRecord;
- private PageBreakRecord _columnBreaksRecord;
- private HeaderRecord _header;
- private FooterRecord _footer;
- private HCenterRecord _hCenter;
- private VCenterRecord _vCenter;
- private LeftMarginRecord _leftMargin;
- private RightMarginRecord _rightMargin;
- private TopMarginRecord _topMargin;
- private BottomMarginRecord _bottomMargin;
- private final List<PLSAggregate> _plsRecords;
- private PrintSetupRecord _printSetup;
- private Record _bitmap;
- private HeaderFooterRecord _headerFooter;
+ /**
+ * PLS is potentially a <i>continued</i> record, but is currently uninterpreted by POI
+ */
+ private static final class PLSAggregate extends RecordAggregate {
+ private static final ContinueRecord[] EMPTY_CONTINUE_RECORD_ARRAY = { };
+ private final Record _pls;
+ /**
+ * holds any continue records found after the PLS record.<br/>
+ * This would not be required if PLS was properly interpreted.
+ * Currently, PLS is an {@link UnknownRecord} and does not automatically
+ * include any trailing {@link ContinueRecord}s.
+ */
+ private ContinueRecord[] _plsContinues;
+
+ public PLSAggregate(RecordStream rs) {
+ _pls = rs.getNext();
+ if (rs.peekNextSid()==ContinueRecord.sid) {
+ List<ContinueRecord> temp = new ArrayList<ContinueRecord>();
+ while (rs.peekNextSid()==ContinueRecord.sid) {
+ temp.add((ContinueRecord)rs.getNext());
+ }
+ _plsContinues = new ContinueRecord[temp.size()];
+ temp.toArray(_plsContinues);
+ } else {
+ _plsContinues = EMPTY_CONTINUE_RECORD_ARRAY;
+ }
+ }
+
+ @Override
+ public void visitContainedRecords(RecordVisitor rv) {
+ rv.visitRecord(_pls);
+ for (int i = 0; i < _plsContinues.length; i++) {
+ rv.visitRecord(_plsContinues[i]);
+ }
+ }
+ }
+
+ // Every one of these component records is optional
+ // (The whole PageSettingsBlock may not be present)
+ private PageBreakRecord _rowBreaksRecord;
+ private PageBreakRecord _columnBreaksRecord;
+ private HeaderRecord _header;
+ private FooterRecord _footer;
+ private HCenterRecord _hCenter;
+ private VCenterRecord _vCenter;
+ private LeftMarginRecord _leftMargin;
+ private RightMarginRecord _rightMargin;
+ private TopMarginRecord _topMargin;
+ private BottomMarginRecord _bottomMargin;
+ private final List<PLSAggregate> _plsRecords;
+ private PrintSetupRecord _printSetup;
+ private Record _bitmap;
+ private HeaderFooterRecord _headerFooter;
/**
* HeaderFooterRecord records belonging to preceding CustomViewSettingsRecordAggregates.
* The indicator of such records is a non-zero GUID,
@@ -96,546 +98,546 @@ public final class PageSettingsBlock ext
private List<HeaderFooterRecord> _sviewHeaderFooters = new ArrayList<HeaderFooterRecord>();
private Record _printSize;
- public PageSettingsBlock(RecordStream rs) {
- _plsRecords = new ArrayList<PLSAggregate>();
- while(true) {
- if (!readARecord(rs)) {
- break;
- }
- }
- }
-
- /**
- * Creates a PageSettingsBlock with default settings
- */
- public PageSettingsBlock() {
- _plsRecords = new ArrayList<PLSAggregate>();
- _rowBreaksRecord = new HorizontalPageBreakRecord();
- _columnBreaksRecord = new VerticalPageBreakRecord();
- _header = new HeaderRecord("");
- _footer = new FooterRecord("");
- _hCenter = createHCenter();
- _vCenter = createVCenter();
- _printSetup = createPrintSetup();
- }
-
- /**
- * @return <code>true</code> if the specified Record sid is one belonging to the
- * 'Page Settings Block'.
- */
- public static boolean isComponentRecord(int sid) {
- switch (sid) {
- case HorizontalPageBreakRecord.sid:
- case VerticalPageBreakRecord.sid:
- case HeaderRecord.sid:
- case FooterRecord.sid:
- case HCenterRecord.sid:
- case VCenterRecord.sid:
- case LeftMarginRecord.sid:
- case RightMarginRecord.sid:
- case TopMarginRecord.sid:
- case BottomMarginRecord.sid:
- case UnknownRecord.PLS_004D:
- case PrintSetupRecord.sid:
- case UnknownRecord.BITMAP_00E9:
- case UnknownRecord.PRINTSIZE_0033:
- case HeaderFooterRecord.sid: // extra header/footer settings supported by Excel 2007
- return true;
- }
- return false;
- }
-
- private boolean readARecord(RecordStream rs) {
- switch (rs.peekNextSid()) {
- case HorizontalPageBreakRecord.sid:
- checkNotPresent(_rowBreaksRecord);
- _rowBreaksRecord = (PageBreakRecord) rs.getNext();
- break;
- case VerticalPageBreakRecord.sid:
- checkNotPresent(_columnBreaksRecord);
- _columnBreaksRecord = (PageBreakRecord) rs.getNext();
- break;
- case HeaderRecord.sid:
- checkNotPresent(_header);
- _header = (HeaderRecord) rs.getNext();
- break;
- case FooterRecord.sid:
- checkNotPresent(_footer);
- _footer = (FooterRecord) rs.getNext();
- break;
- case HCenterRecord.sid:
- checkNotPresent(_hCenter);
- _hCenter = (HCenterRecord) rs.getNext();
- break;
- case VCenterRecord.sid:
- checkNotPresent(_vCenter);
- _vCenter = (VCenterRecord) rs.getNext();
- break;
- case LeftMarginRecord.sid:
- checkNotPresent(_leftMargin);
- _leftMargin = (LeftMarginRecord) rs.getNext();
- break;
- case RightMarginRecord.sid:
- checkNotPresent(_rightMargin);
- _rightMargin = (RightMarginRecord) rs.getNext();
- break;
- case TopMarginRecord.sid:
- checkNotPresent(_topMargin);
- _topMargin = (TopMarginRecord) rs.getNext();
- break;
- case BottomMarginRecord.sid:
- checkNotPresent(_bottomMargin);
- _bottomMargin = (BottomMarginRecord) rs.getNext();
- break;
- case UnknownRecord.PLS_004D:
- _plsRecords.add(new PLSAggregate(rs));
- break;
- case PrintSetupRecord.sid:
- checkNotPresent(_printSetup);
- _printSetup = (PrintSetupRecord)rs.getNext();
- break;
- case UnknownRecord.BITMAP_00E9:
- checkNotPresent(_bitmap);
- _bitmap = rs.getNext();
- break;
- case UnknownRecord.PRINTSIZE_0033:
- checkNotPresent(_printSize);
- _printSize = rs.getNext();
- break;
- case HeaderFooterRecord.sid:
- //there can be multiple HeaderFooterRecord records belonging to different sheet views
- HeaderFooterRecord hf = (HeaderFooterRecord)rs.getNext();
+ public PageSettingsBlock(RecordStream rs) {
+ _plsRecords = new ArrayList<PLSAggregate>();
+ while(true) {
+ if (!readARecord(rs)) {
+ break;
+ }
+ }
+ }
+
+ /**
+ * Creates a PageSettingsBlock with default settings
+ */
+ public PageSettingsBlock() {
+ _plsRecords = new ArrayList<PLSAggregate>();
+ _rowBreaksRecord = new HorizontalPageBreakRecord();
+ _columnBreaksRecord = new VerticalPageBreakRecord();
+ _header = new HeaderRecord("");
+ _footer = new FooterRecord("");
+ _hCenter = createHCenter();
+ _vCenter = createVCenter();
+ _printSetup = createPrintSetup();
+ }
+
+ /**
+ * @return <code>true</code> if the specified Record sid is one belonging to the
+ * 'Page Settings Block'.
+ */
+ public static boolean isComponentRecord(int sid) {
+ switch (sid) {
+ case HorizontalPageBreakRecord.sid:
+ case VerticalPageBreakRecord.sid:
+ case HeaderRecord.sid:
+ case FooterRecord.sid:
+ case HCenterRecord.sid:
+ case VCenterRecord.sid:
+ case LeftMarginRecord.sid:
+ case RightMarginRecord.sid:
+ case TopMarginRecord.sid:
+ case BottomMarginRecord.sid:
+ case UnknownRecord.PLS_004D:
+ case PrintSetupRecord.sid:
+ case UnknownRecord.BITMAP_00E9:
+ case UnknownRecord.PRINTSIZE_0033:
+ case HeaderFooterRecord.sid: // extra header/footer settings supported by Excel 2007
+ return true;
+ }
+ return false;
+ }
+
+ private boolean readARecord(RecordStream rs) {
+ switch (rs.peekNextSid()) {
+ case HorizontalPageBreakRecord.sid:
+ checkNotPresent(_rowBreaksRecord);
+ _rowBreaksRecord = (PageBreakRecord) rs.getNext();
+ break;
+ case VerticalPageBreakRecord.sid:
+ checkNotPresent(_columnBreaksRecord);
+ _columnBreaksRecord = (PageBreakRecord) rs.getNext();
+ break;
+ case HeaderRecord.sid:
+ checkNotPresent(_header);
+ _header = (HeaderRecord) rs.getNext();
+ break;
+ case FooterRecord.sid:
+ checkNotPresent(_footer);
+ _footer = (FooterRecord) rs.getNext();
+ break;
+ case HCenterRecord.sid:
+ checkNotPresent(_hCenter);
+ _hCenter = (HCenterRecord) rs.getNext();
+ break;
+ case VCenterRecord.sid:
+ checkNotPresent(_vCenter);
+ _vCenter = (VCenterRecord) rs.getNext();
+ break;
+ case LeftMarginRecord.sid:
+ checkNotPresent(_leftMargin);
+ _leftMargin = (LeftMarginRecord) rs.getNext();
+ break;
+ case RightMarginRecord.sid:
+ checkNotPresent(_rightMargin);
+ _rightMargin = (RightMarginRecord) rs.getNext();
+ break;
+ case TopMarginRecord.sid:
+ checkNotPresent(_topMargin);
+ _topMargin = (TopMarginRecord) rs.getNext();
+ break;
+ case BottomMarginRecord.sid:
+ checkNotPresent(_bottomMargin);
+ _bottomMargin = (BottomMarginRecord) rs.getNext();
+ break;
+ case UnknownRecord.PLS_004D:
+ _plsRecords.add(new PLSAggregate(rs));
+ break;
+ case PrintSetupRecord.sid:
+ checkNotPresent(_printSetup);
+ _printSetup = (PrintSetupRecord)rs.getNext();
+ break;
+ case UnknownRecord.BITMAP_00E9:
+ checkNotPresent(_bitmap);
+ _bitmap = rs.getNext();
+ break;
+ case UnknownRecord.PRINTSIZE_0033:
+ checkNotPresent(_printSize);
+ _printSize = rs.getNext();
+ break;
+ case HeaderFooterRecord.sid:
+ //there can be multiple HeaderFooterRecord records belonging to different sheet views
+ HeaderFooterRecord hf = (HeaderFooterRecord)rs.getNext();
if(hf.isCurrentSheet()) _headerFooter = hf;
else {
_sviewHeaderFooters.add(hf);
}
break;
- default:
- // all other record types are not part of the PageSettingsBlock
- return false;
- }
- return true;
- }
-
- private void checkNotPresent(Record rec) {
- if (rec != null) {
- throw new RecordFormatException("Duplicate PageSettingsBlock record (sid=0x"
- + Integer.toHexString(rec.getSid()) + ")");
- }
- }
-
- private PageBreakRecord getRowBreaksRecord() {
- if (_rowBreaksRecord == null) {
- _rowBreaksRecord = new HorizontalPageBreakRecord();
- }
- return _rowBreaksRecord;
- }
-
- private PageBreakRecord getColumnBreaksRecord() {
- if (_columnBreaksRecord == null) {
- _columnBreaksRecord = new VerticalPageBreakRecord();
- }
- return _columnBreaksRecord;
- }
-
-
- /**
- * Sets a page break at the indicated column
- *
- */
- public void setColumnBreak(short column, short fromRow, short toRow) {
- getColumnBreaksRecord().addBreak(column, fromRow, toRow);
- }
-
- /**
- * Removes a page break at the indicated column
- *
- */
- public void removeColumnBreak(int column) {
- getColumnBreaksRecord().removeBreak(column);
- }
-
-
-
-
- public void visitContainedRecords(RecordVisitor rv) {
- // Replicates record order from Excel 2007, though this is not critical
-
- visitIfPresent(_rowBreaksRecord, rv);
- visitIfPresent(_columnBreaksRecord, rv);
- // Write out empty header / footer records if these are missing
- if (_header == null) {
- rv.visitRecord(new HeaderRecord(""));
- } else {
- rv.visitRecord(_header);
- }
- if (_footer == null) {
- rv.visitRecord(new FooterRecord(""));
- } else {
- rv.visitRecord(_footer);
- }
- visitIfPresent(_hCenter, rv);
- visitIfPresent(_vCenter, rv);
- visitIfPresent(_leftMargin, rv);
- visitIfPresent(_rightMargin, rv);
- visitIfPresent(_topMargin, rv);
- visitIfPresent(_bottomMargin, rv);
- for (RecordAggregate pls : _plsRecords) {
- pls.visitContainedRecords(rv);
- }
- visitIfPresent(_printSetup, rv);
- visitIfPresent(_printSize, rv);
- visitIfPresent(_headerFooter, rv);
+ default:
+ // all other record types are not part of the PageSettingsBlock
+ return false;
+ }
+ return true;
+ }
+
+ private void checkNotPresent(Record rec) {
+ if (rec != null) {
+ throw new RecordFormatException("Duplicate PageSettingsBlock record (sid=0x"
+ + Integer.toHexString(rec.getSid()) + ")");
+ }
+ }
+
+ private PageBreakRecord getRowBreaksRecord() {
+ if (_rowBreaksRecord == null) {
+ _rowBreaksRecord = new HorizontalPageBreakRecord();
+ }
+ return _rowBreaksRecord;
+ }
+
+ private PageBreakRecord getColumnBreaksRecord() {
+ if (_columnBreaksRecord == null) {
+ _columnBreaksRecord = new VerticalPageBreakRecord();
+ }
+ return _columnBreaksRecord;
+ }
+
+
+ /**
+ * Sets a page break at the indicated column
+ *
+ */
+ public void setColumnBreak(short column, short fromRow, short toRow) {
+ getColumnBreaksRecord().addBreak(column, fromRow, toRow);
+ }
+
+ /**
+ * Removes a page break at the indicated column
+ *
+ */
+ public void removeColumnBreak(int column) {
+ getColumnBreaksRecord().removeBreak(column);
+ }
+
+
+
+
+ public void visitContainedRecords(RecordVisitor rv) {
+ // Replicates record order from Excel 2007, though this is not critical
+
+ visitIfPresent(_rowBreaksRecord, rv);
+ visitIfPresent(_columnBreaksRecord, rv);
+ // Write out empty header / footer records if these are missing
+ if (_header == null) {
+ rv.visitRecord(new HeaderRecord(""));
+ } else {
+ rv.visitRecord(_header);
+ }
+ if (_footer == null) {
+ rv.visitRecord(new FooterRecord(""));
+ } else {
+ rv.visitRecord(_footer);
+ }
+ visitIfPresent(_hCenter, rv);
+ visitIfPresent(_vCenter, rv);
+ visitIfPresent(_leftMargin, rv);
+ visitIfPresent(_rightMargin, rv);
+ visitIfPresent(_topMargin, rv);
+ visitIfPresent(_bottomMargin, rv);
+ for (RecordAggregate pls : _plsRecords) {
+ pls.visitContainedRecords(rv);
+ }
+ visitIfPresent(_printSetup, rv);
+ visitIfPresent(_printSize, rv);
+ visitIfPresent(_headerFooter, rv);
visitIfPresent(_bitmap, rv);
- }
- private static void visitIfPresent(Record r, RecordVisitor rv) {
- if (r != null) {
- rv.visitRecord(r);
- }
- }
- private static void visitIfPresent(PageBreakRecord r, RecordVisitor rv) {
- if (r != null) {
- if (r.isEmpty()) {
- // its OK to not serialize empty page break records
- return;
- }
- rv.visitRecord(r);
- }
- }
-
- /**
- * creates the HCenter Record and sets it to false (don't horizontally center)
- */
- private static HCenterRecord createHCenter() {
- HCenterRecord retval = new HCenterRecord();
-
- retval.setHCenter(false);
- return retval;
- }
-
- /**
- * creates the VCenter Record and sets it to false (don't horizontally center)
- */
- private static VCenterRecord createVCenter() {
- VCenterRecord retval = new VCenterRecord();
-
- retval.setVCenter(false);
- return retval;
- }
-
- /**
- * creates the PrintSetup Record and sets it to defaults and marks it invalid
- * @see org.apache.poi.hssf.record.PrintSetupRecord
- * @see org.apache.poi.hssf.record.Record
- * @return record containing a PrintSetupRecord
- */
- private static PrintSetupRecord createPrintSetup() {
- PrintSetupRecord retval = new PrintSetupRecord();
-
- retval.setPaperSize(( short ) 1);
- retval.setScale(( short ) 100);
- retval.setPageStart(( short ) 1);
- retval.setFitWidth(( short ) 1);
- retval.setFitHeight(( short ) 1);
- retval.setOptions(( short ) 2);
- retval.setHResolution(( short ) 300);
- retval.setVResolution(( short ) 300);
- retval.setHeaderMargin( 0.5);
- retval.setFooterMargin( 0.5);
- retval.setCopies(( short ) 1);
- return retval;
- }
-
-
- /**
- * Returns the HeaderRecord.
- * @return HeaderRecord for the sheet.
- */
- public HeaderRecord getHeader ()
- {
- return _header;
- }
-
- /**
- * Sets the HeaderRecord.
- * @param newHeader The new HeaderRecord for the sheet.
- */
- public void setHeader (HeaderRecord newHeader)
- {
- _header = newHeader;
- }
-
- /**
- * Returns the FooterRecord.
- * @return FooterRecord for the sheet.
- */
- public FooterRecord getFooter ()
- {
- return _footer;
- }
-
- /**
- * Sets the FooterRecord.
- * @param newFooter The new FooterRecord for the sheet.
- */
- public void setFooter (FooterRecord newFooter)
- {
- _footer = newFooter;
- }
-
- /**
- * Returns the PrintSetupRecord.
- * @return PrintSetupRecord for the sheet.
- */
- public PrintSetupRecord getPrintSetup ()
- {
- return _printSetup;
- }
-
- /**
- * Sets the PrintSetupRecord.
- * @param newPrintSetup The new PrintSetupRecord for the sheet.
- */
- public void setPrintSetup (PrintSetupRecord newPrintSetup)
- {
- _printSetup = newPrintSetup;
- }
-
-
- private Margin getMarginRec(int marginIndex) {
- switch (marginIndex) {
- case InternalSheet.LeftMargin: return _leftMargin;
- case InternalSheet.RightMargin: return _rightMargin;
- case InternalSheet.TopMargin: return _topMargin;
- case InternalSheet.BottomMargin: return _bottomMargin;
- }
- throw new IllegalArgumentException( "Unknown margin constant: " + marginIndex );
- }
-
-
- /**
- * Gets the size of the margin in inches.
- * @param margin which margin to get
- * @return the size of the margin
- */
- public double getMargin(short margin) {
- Margin m = getMarginRec(margin);
- if (m != null) {
- return m.getMargin();
- }
- switch (margin) {
- case InternalSheet.LeftMargin: return .75;
- case InternalSheet.RightMargin: return .75;
- case InternalSheet.TopMargin: return 1.0;
- case InternalSheet.BottomMargin: return 1.0;
- }
- throw new IllegalArgumentException( "Unknown margin constant: " + margin );
- }
-
- /**
- * Sets the size of the margin in inches.
- * @param margin which margin to get
- * @param size the size of the margin
- */
- public void setMargin(short margin, double size) {
- Margin m = getMarginRec(margin);
- if (m == null) {
- switch (margin) {
- case InternalSheet.LeftMargin:
- _leftMargin = new LeftMarginRecord();
- m = _leftMargin;
- break;
- case InternalSheet.RightMargin:
- _rightMargin = new RightMarginRecord();
- m = _rightMargin;
- break;
- case InternalSheet.TopMargin:
- _topMargin = new TopMarginRecord();
- m = _topMargin;
- break;
- case InternalSheet.BottomMargin:
- _bottomMargin = new BottomMarginRecord();
- m = _bottomMargin;
- break;
- default :
- throw new IllegalArgumentException( "Unknown margin constant: " + margin );
- }
- }
- m.setMargin( size );
- }
-
- /**
- * Shifts all the page breaks in the range "count" number of rows/columns
- * @param breaks The page record to be shifted
- * @param start Starting "main" value to shift breaks
- * @param stop Ending "main" value to shift breaks
- * @param count number of units (rows/columns) to shift by
- */
- private static void shiftBreaks(PageBreakRecord breaks, int start, int stop, int count) {
-
- Iterator<PageBreakRecord.Break> iterator = breaks.getBreaksIterator();
- List<PageBreakRecord.Break> shiftedBreak = new ArrayList<PageBreakRecord.Break>();
- while(iterator.hasNext())
- {
- PageBreakRecord.Break breakItem = iterator.next();
- int breakLocation = breakItem.main;
- boolean inStart = (breakLocation >= start);
- boolean inEnd = (breakLocation <= stop);
- if(inStart && inEnd)
- shiftedBreak.add(breakItem);
- }
-
- iterator = shiftedBreak.iterator();
- while (iterator.hasNext()) {
- PageBreakRecord.Break breakItem = iterator.next();
- breaks.removeBreak(breakItem.main);
- breaks.addBreak((short)(breakItem.main+count), breakItem.subFrom, breakItem.subTo);
- }
- }
-
-
- /**
- * Sets a page break at the indicated row
- * @param row
- */
- public void setRowBreak(int row, short fromCol, short toCol) {
- getRowBreaksRecord().addBreak((short)row, fromCol, toCol);
- }
-
- /**
- * Removes a page break at the indicated row
- * @param row
- */
- public void removeRowBreak(int row) {
- if (getRowBreaksRecord().getBreaks().length < 1)
- throw new IllegalArgumentException("Sheet does not define any row breaks");
- getRowBreaksRecord().removeBreak((short)row);
- }
-
- /**
- * Queries if the specified row has a page break
- * @param row
- * @return true if the specified row has a page break
- */
- public boolean isRowBroken(int row) {
- return getRowBreaksRecord().getBreak(row) != null;
- }
-
-
- /**
- * Queries if the specified column has a page break
- *
- * @return <code>true</code> if the specified column has a page break
- */
- public boolean isColumnBroken(int column) {
- return getColumnBreaksRecord().getBreak(column) != null;
- }
-
- /**
- * Shifts the horizontal page breaks for the indicated count
- * @param startingRow
- * @param endingRow
- * @param count
- */
- public void shiftRowBreaks(int startingRow, int endingRow, int count) {
- shiftBreaks(getRowBreaksRecord(), startingRow, endingRow, count);
- }
-
- /**
- * Shifts the vertical page breaks for the indicated count
- * @param startingCol
- * @param endingCol
- * @param count
- */
- public void shiftColumnBreaks(short startingCol, short endingCol, short count) {
- shiftBreaks(getColumnBreaksRecord(), startingCol, endingCol, count);
- }
-
- /**
- * @return all the horizontal page breaks, never <code>null</code>
- */
- public int[] getRowBreaks() {
- return getRowBreaksRecord().getBreaks();
- }
-
- /**
- * @return the number of row page breaks
- */
- public int getNumRowBreaks(){
- return getRowBreaksRecord().getNumBreaks();
- }
-
- /**
- * @return all the column page breaks, never <code>null</code>
- */
- public int[] getColumnBreaks(){
- return getColumnBreaksRecord().getBreaks();
- }
-
- /**
- * @return the number of column page breaks
- */
- public int getNumColumnBreaks(){
- return getColumnBreaksRecord().getNumBreaks();
- }
-
- public VCenterRecord getVCenter() {
- return _vCenter;
- }
-
- public HCenterRecord getHCenter() {
- return _hCenter;
- }
-
- /**
- * HEADERFOOTER is new in 2007. Some apps seem to have scattered this record long after
- * the {@link PageSettingsBlock} where it belongs.
- */
- public void addLateHeaderFooter(HeaderFooterRecord rec) {
- if (_headerFooter != null) {
- throw new IllegalStateException("This page settings block already has a header/footer record");
- }
- if (rec.getSid() != HeaderFooterRecord.sid) {
- throw new RecordFormatException("Unexpected header-footer record sid: 0x" + Integer.toHexString(rec.getSid()));
- }
- _headerFooter = rec;
- }
-
- /**
- * This method reads PageSettingsBlock records from the supplied RecordStream until the first
- * non-PageSettingsBlock record is encountered. As each record is read, it is incorporated
- * into this PageSettingsBlock.
- * <p/>
- * The latest Excel version seems to write the PageSettingsBlock uninterrupted. However there
- * are several examples (that Excel reads OK) where these records are not written together:
- * <ul>
- * <li><b>HEADER_FOOTER(0x089C) after WINDOW2</b> - This record is new in 2007. Some apps
- * seem to have scattered this record long after the PageSettingsBlock where it belongs
- * test samples: SharedFormulaTest.xls, ex44921-21902.xls, ex42570-20305.xls</li>
- * <li><b>PLS, WSBOOL, PageSettingsBlock</b> - WSBOOL is not a PSB record.
- * This happens in the test sample file "NoGutsRecords.xls" and "WORKBOOK_in_capitals.xls"</li>
- * <li><b>Margins after DIMENSION</b> - All of PSB should be before DIMENSION. (Bug-47199)</li>
- * </ul>
- * These were probably written by other applications (or earlier versions of Excel). It was
- * decided to not write specific code for detecting each of these cases. POI now tolerates
- * PageSettingsBlock records scattered all over the sheet record stream, and in any order, but
- * does not allow duplicates of any of those records.
- *
- * <p/>
- * <b>Note</b> - when POI writes out this PageSettingsBlock, the records will always be written
- * in one consolidated block (in the standard ordering) regardless of how scattered the records
- * were when they were originally read.
- *
- * @throws RecordFormatException if any PSB record encountered has the same type (sid) as
- * a record that is already part of this PageSettingsBlock
- */
- public void addLateRecords(RecordStream rs) {
- while(true) {
- if (!readARecord(rs)) {
- break;
- }
- }
- }
+ }
+ private static void visitIfPresent(Record r, RecordVisitor rv) {
+ if (r != null) {
+ rv.visitRecord(r);
+ }
+ }
+ private static void visitIfPresent(PageBreakRecord r, RecordVisitor rv) {
+ if (r != null) {
+ if (r.isEmpty()) {
+ // its OK to not serialize empty page break records
+ return;
+ }
+ rv.visitRecord(r);
+ }
+ }
+
+ /**
+ * creates the HCenter Record and sets it to false (don't horizontally center)
+ */
+ private static HCenterRecord createHCenter() {
+ HCenterRecord retval = new HCenterRecord();
+
+ retval.setHCenter(false);
+ return retval;
+ }
+
+ /**
+ * creates the VCenter Record and sets it to false (don't horizontally center)
+ */
+ private static VCenterRecord createVCenter() {
+ VCenterRecord retval = new VCenterRecord();
+
+ retval.setVCenter(false);
+ return retval;
+ }
+
+ /**
+ * creates the PrintSetup Record and sets it to defaults and marks it invalid
+ * @see org.apache.poi.hssf.record.PrintSetupRecord
+ * @see org.apache.poi.hssf.record.Record
+ * @return record containing a PrintSetupRecord
+ */
+ private static PrintSetupRecord createPrintSetup() {
+ PrintSetupRecord retval = new PrintSetupRecord();
+
+ retval.setPaperSize(( short ) 1);
+ retval.setScale(( short ) 100);
+ retval.setPageStart(( short ) 1);
+ retval.setFitWidth(( short ) 1);
+ retval.setFitHeight(( short ) 1);
+ retval.setOptions(( short ) 2);
+ retval.setHResolution(( short ) 300);
+ retval.setVResolution(( short ) 300);
+ retval.setHeaderMargin( 0.5);
+ retval.setFooterMargin( 0.5);
+ retval.setCopies(( short ) 1);
+ return retval;
+ }
+
+
+ /**
+ * Returns the HeaderRecord.
+ * @return HeaderRecord for the sheet.
+ */
+ public HeaderRecord getHeader ()
+ {
+ return _header;
+ }
+
+ /**
+ * Sets the HeaderRecord.
+ * @param newHeader The new HeaderRecord for the sheet.
+ */
+ public void setHeader (HeaderRecord newHeader)
+ {
+ _header = newHeader;
+ }
+
+ /**
+ * Returns the FooterRecord.
+ * @return FooterRecord for the sheet.
+ */
+ public FooterRecord getFooter ()
+ {
+ return _footer;
+ }
+
+ /**
+ * Sets the FooterRecord.
+ * @param newFooter The new FooterRecord for the sheet.
+ */
+ public void setFooter (FooterRecord newFooter)
+ {
+ _footer = newFooter;
+ }
+
+ /**
+ * Returns the PrintSetupRecord.
+ * @return PrintSetupRecord for the sheet.
+ */
+ public PrintSetupRecord getPrintSetup ()
+ {
+ return _printSetup;
+ }
+
+ /**
+ * Sets the PrintSetupRecord.
+ * @param newPrintSetup The new PrintSetupRecord for the sheet.
+ */
+ public void setPrintSetup (PrintSetupRecord newPrintSetup)
+ {
+ _printSetup = newPrintSetup;
+ }
+
+
+ private Margin getMarginRec(int marginIndex) {
+ switch (marginIndex) {
+ case InternalSheet.LeftMargin: return _leftMargin;
+ case InternalSheet.RightMargin: return _rightMargin;
+ case InternalSheet.TopMargin: return _topMargin;
+ case InternalSheet.BottomMargin: return _bottomMargin;
+ }
+ throw new IllegalArgumentException( "Unknown margin constant: " + marginIndex );
+ }
+
+
+ /**
+ * Gets the size of the margin in inches.
+ * @param margin which margin to get
+ * @return the size of the margin
+ */
+ public double getMargin(short margin) {
+ Margin m = getMarginRec(margin);
+ if (m != null) {
+ return m.getMargin();
+ }
+ switch (margin) {
+ case InternalSheet.LeftMargin: return .75;
+ case InternalSheet.RightMargin: return .75;
+ case InternalSheet.TopMargin: return 1.0;
+ case InternalSheet.BottomMargin: return 1.0;
+ }
+ throw new IllegalArgumentException( "Unknown margin constant: " + margin );
+ }
+
+ /**
+ * Sets the size of the margin in inches.
+ * @param margin which margin to get
+ * @param size the size of the margin
+ */
+ public void setMargin(short margin, double size) {
+ Margin m = getMarginRec(margin);
+ if (m == null) {
+ switch (margin) {
+ case InternalSheet.LeftMargin:
+ _leftMargin = new LeftMarginRecord();
+ m = _leftMargin;
+ break;
+ case InternalSheet.RightMargin:
+ _rightMargin = new RightMarginRecord();
+ m = _rightMargin;
+ break;
+ case InternalSheet.TopMargin:
+ _topMargin = new TopMarginRecord();
+ m = _topMargin;
+ break;
+ case InternalSheet.BottomMargin:
+ _bottomMargin = new BottomMarginRecord();
+ m = _bottomMargin;
+ break;
+ default :
+ throw new IllegalArgumentException( "Unknown margin constant: " + margin );
+ }
+ }
+ m.setMargin( size );
+ }
+
+ /**
+ * Shifts all the page breaks in the range "count" number of rows/columns
+ * @param breaks The page record to be shifted
+ * @param start Starting "main" value to shift breaks
+ * @param stop Ending "main" value to shift breaks
+ * @param count number of units (rows/columns) to shift by
+ */
+ private static void shiftBreaks(PageBreakRecord breaks, int start, int stop, int count) {
+
+ Iterator<PageBreakRecord.Break> iterator = breaks.getBreaksIterator();
+ List<PageBreakRecord.Break> shiftedBreak = new ArrayList<PageBreakRecord.Break>();
+ while(iterator.hasNext())
+ {
+ PageBreakRecord.Break breakItem = iterator.next();
+ int breakLocation = breakItem.main;
+ boolean inStart = (breakLocation >= start);
+ boolean inEnd = (breakLocation <= stop);
+ if(inStart && inEnd)
+ shiftedBreak.add(breakItem);
+ }
+
+ iterator = shiftedBreak.iterator();
+ while (iterator.hasNext()) {
+ PageBreakRecord.Break breakItem = iterator.next();
+ breaks.removeBreak(breakItem.main);
+ breaks.addBreak((short)(breakItem.main+count), breakItem.subFrom, breakItem.subTo);
+ }
+ }
+
+
+ /**
+ * Sets a page break at the indicated row
+ * @param row
+ */
+ public void setRowBreak(int row, short fromCol, short toCol) {
+ getRowBreaksRecord().addBreak((short)row, fromCol, toCol);
+ }
+
+ /**
+ * Removes a page break at the indicated row
+ * @param row
+ */
+ public void removeRowBreak(int row) {
+ if (getRowBreaksRecord().getBreaks().length < 1)
+ throw new IllegalArgumentException("Sheet does not define any row breaks");
+ getRowBreaksRecord().removeBreak((short)row);
+ }
+
+ /**
+ * Queries if the specified row has a page break
+ * @param row
+ * @return true if the specified row has a page break
+ */
+ public boolean isRowBroken(int row) {
+ return getRowBreaksRecord().getBreak(row) != null;
+ }
+
+
+ /**
+ * Queries if the specified column has a page break
+ *
+ * @return <code>true</code> if the specified column has a page break
+ */
+ public boolean isColumnBroken(int column) {
+ return getColumnBreaksRecord().getBreak(column) != null;
+ }
+
+ /**
+ * Shifts the horizontal page breaks for the indicated count
+ * @param startingRow
+ * @param endingRow
+ * @param count
+ */
+ public void shiftRowBreaks(int startingRow, int endingRow, int count) {
+ shiftBreaks(getRowBreaksRecord(), startingRow, endingRow, count);
+ }
+
+ /**
+ * Shifts the vertical page breaks for the indicated count
+ * @param startingCol
+ * @param endingCol
+ * @param count
+ */
+ public void shiftColumnBreaks(short startingCol, short endingCol, short count) {
+ shiftBreaks(getColumnBreaksRecord(), startingCol, endingCol, count);
+ }
+
+ /**
+ * @return all the horizontal page breaks, never <code>null</code>
+ */
+ public int[] getRowBreaks() {
+ return getRowBreaksRecord().getBreaks();
+ }
+
+ /**
+ * @return the number of row page breaks
+ */
+ public int getNumRowBreaks(){
+ return getRowBreaksRecord().getNumBreaks();
+ }
+
+ /**
+ * @return all the column page breaks, never <code>null</code>
+ */
+ public int[] getColumnBreaks(){
+ return getColumnBreaksRecord().getBreaks();
+ }
+
+ /**
+ * @return the number of column page breaks
+ */
+ public int getNumColumnBreaks(){
+ return getColumnBreaksRecord().getNumBreaks();
+ }
+
+ public VCenterRecord getVCenter() {
+ return _vCenter;
+ }
+
+ public HCenterRecord getHCenter() {
+ return _hCenter;
+ }
+
+ /**
+ * HEADERFOOTER is new in 2007. Some apps seem to have scattered this record long after
+ * the {@link PageSettingsBlock} where it belongs.
+ */
+ public void addLateHeaderFooter(HeaderFooterRecord rec) {
+ if (_headerFooter != null) {
+ throw new IllegalStateException("This page settings block already has a header/footer record");
+ }
+ if (rec.getSid() != HeaderFooterRecord.sid) {
+ throw new RecordFormatException("Unexpected header-footer record sid: 0x" + Integer.toHexString(rec.getSid()));
+ }
+ _headerFooter = rec;
+ }
+
+ /**
+ * This method reads PageSettingsBlock records from the supplied RecordStream until the first
+ * non-PageSettingsBlock record is encountered. As each record is read, it is incorporated
+ * into this PageSettingsBlock.
+ * <p/>
+ * The latest Excel version seems to write the PageSettingsBlock uninterrupted. However there
+ * are several examples (that Excel reads OK) where these records are not written together:
+ * <ul>
+ * <li><b>HEADER_FOOTER(0x089C) after WINDOW2</b> - This record is new in 2007. Some apps
+ * seem to have scattered this record long after the PageSettingsBlock where it belongs
+ * test samples: SharedFormulaTest.xls, ex44921-21902.xls, ex42570-20305.xls</li>
+ * <li><b>PLS, WSBOOL, PageSettingsBlock</b> - WSBOOL is not a PSB record.
+ * This happens in the test sample file "NoGutsRecords.xls" and "WORKBOOK_in_capitals.xls"</li>
+ * <li><b>Margins after DIMENSION</b> - All of PSB should be before DIMENSION. (Bug-47199)</li>
+ * </ul>
+ * These were probably written by other applications (or earlier versions of Excel). It was
+ * decided to not write specific code for detecting each of these cases. POI now tolerates
+ * PageSettingsBlock records scattered all over the sheet record stream, and in any order, but
+ * does not allow duplicates of any of those records.
+ *
+ * <p/>
+ * <b>Note</b> - when POI writes out this PageSettingsBlock, the records will always be written
+ * in one consolidated block (in the standard ordering) regardless of how scattered the records
+ * were when they were originally read.
+ *
+ * @throws RecordFormatException if any PSB record encountered has the same type (sid) as
+ * a record that is already part of this PageSettingsBlock
+ */
+ public void addLateRecords(RecordStream rs) {
+ while(true) {
+ if (!readARecord(rs)) {
+ break;
+ }
+ }
+ }
/**
* Some apps can define multiple HeaderFooterRecord records for a sheet.
@@ -652,26 +654,31 @@ public final class PageSettingsBlock ext
// Take a copy to loop over, so we can update the real one
// without concurrency issues
List<HeaderFooterRecord> hfRecordsToIterate = new ArrayList<HeaderFooterRecord>(_sviewHeaderFooters);
-
+
+ final Map<String, HeaderFooterRecord> hfGuidMap = new HashMap<String, HeaderFooterRecord>();
+
+ for(final HeaderFooterRecord hf : hfRecordsToIterate) {
+ hfGuidMap.put(HexDump.toHex(hf.getGuid()), hf);
+ }
+
// loop through HeaderFooterRecord records having not-empty GUID and match them with
// CustomViewSettingsRecordAggregate blocks having UserSViewBegin with the same GUID
- for(final HeaderFooterRecord hf : hfRecordsToIterate) {
- for (RecordBase rb : sheetRecords) {
- if (rb instanceof CustomViewSettingsRecordAggregate) {
- final CustomViewSettingsRecordAggregate cv = (CustomViewSettingsRecordAggregate) rb;
- cv.visitContainedRecords(new RecordVisitor() {
- public void visitRecord(Record r) {
- if (r.getSid() == UserSViewBegin.sid) {
- byte[] guid1 = ((UserSViewBegin) r).getGuid();
- byte[] guid2 = hf.getGuid();
- if (Arrays.equals(guid1, guid2)) {
- cv.append(hf);
- _sviewHeaderFooters.remove(hf);
- }
+ for (RecordBase rb : sheetRecords) {
+ if (rb instanceof CustomViewSettingsRecordAggregate) {
+ final CustomViewSettingsRecordAggregate cv = (CustomViewSettingsRecordAggregate) rb;
+ cv.visitContainedRecords(new RecordVisitor() {
+ public void visitRecord(Record r) {
+ if (r.getSid() == UserSViewBegin.sid) {
+ String guid = HexDump.toHex(((UserSViewBegin) r).getGuid());
+ HeaderFooterRecord hf = hfGuidMap.get(guid);
+
+ if (hf != null) {
+ cv.append(hf);
+ _sviewHeaderFooters.remove(hf);
}
}
- });
- }
+ }
+ });
}
}
}
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AreaFormatRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/AreaFormatRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AreaRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/AreaRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AxisLineFormatRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/AxisLineFormatRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AxisOptionsRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/AxisOptionsRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AxisParentRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/AxisParentRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AxisRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/AxisRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/AxisUsedRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/AxisUsedRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/BarRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/BarRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/BeginRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/BeginRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/CategorySeriesAxisRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/CategorySeriesAxisRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/ChartFormatRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/ChartFormatRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/ChartRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/ChartRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/ChartTitleFormatRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/ChartTitleFormatRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/DatRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/DatRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/DataFormatRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/DataFormatRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/DefaultDataLabelTextPropertiesRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/DefaultDataLabelTextPropertiesRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/EndRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/EndRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/FontBasisRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/FontBasisRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/FontIndexRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/FontIndexRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/FrameRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/FrameRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/LegendRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/LegendRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/LineFormatRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/LineFormatRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/LinkedDataRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/LinkedDataRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/NumberFormatIndexRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/NumberFormatIndexRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/ObjectLinkRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/ObjectLinkRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/PlotAreaRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/PlotAreaRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/PlotGrowthRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/PlotGrowthRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesChartGroupIndexRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesChartGroupIndexRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesIndexRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesIndexRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesLabelsRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesLabelsRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesListRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesListRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesTextRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesTextRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SeriesToChartGroupRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesToChartGroupRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/SheetPropertiesRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/SheetPropertiesRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/TextRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/TextRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/TickRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/TickRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/UnitsRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/UnitsRecord.java:r1342604-1369290
Propchange: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/record/chart/ValueRangeRecord.java
------------------------------------------------------------------------------
Merged /poi/trunk/src/java/org/apache/poi/hssf/record/chart/ValueRangeRecord.java:r1342604-1369290
Modified: poi/branches/gsoc2012/src/java/org/apache/poi/hssf/usermodel/HSSFName.java
URL: http://svn.apache.org/viewvc/poi/branches/gsoc2012/src/java/org/apache/poi/hssf/usermodel/HSSFName.java?rev=1369572&r1=1369571&r2=1369572&view=diff
==============================================================================
--- poi/branches/gsoc2012/src/java/org/apache/poi/hssf/usermodel/HSSFName.java (original)
+++ poi/branches/gsoc2012/src/java/org/apache/poi/hssf/usermodel/HSSFName.java Sun Aug 5 13:05:44 2012
@@ -200,6 +200,18 @@ public final class HSSFName implements N
return HSSFFormulaParser.toFormulaString(_book, ptgs);
}
+
+ /**
+ * Sets the NameParsedFormula structure that specifies the formula for the
+ * defined name.
+ *
+ * @param ptgs the sequence of {@link Ptg}s for the formula.
+ */
+ void setNameDefinition(Ptg[] ptgs) {
+ _definedNameRec.setNameDefinition(ptgs);
+ }
+
+
public boolean isDeleted(){
Ptg[] ptgs = _definedNameRec.getNameDefinition();
return Ptg.doesFormulaReferToDeletedCell(ptgs);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org