Commit Graph

91 Commits

Author SHA1 Message Date
Nick Burch 58a6793fdd Backport the latest POIFS/NPOIFS code from trunk, along with Util to power it, and HPSF to use it. Also makes a few tweaks to let existing code compile against these new versions
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/NIO_32_BRANCH@1053791 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 02:35:06 +00:00
Nick Burch d60c98c37b Fix a typo in the file name, and add a generic method to POITextExtractor to get the appropriate metadata text extractor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@685267 13f79535-47bb-0310-9956-ffa450edef68
2008-08-12 19:02:41 +00:00
Nick Burch 0f5af26377 New HPSF based TextExtractor for document metadata, org.apache.poi.hpsf.extractor.HPFSPropertiesExtractor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@685260 13f79535-47bb-0310-9956-ffa450edef68
2008-08-12 18:44:50 +00:00
Rainer Klute 5c7ca6b786 44694 - HPSF: Support for property sets without sections
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@643670 13f79535-47bb-0310-9956-ffa450edef68
2008-04-02 00:50:45 +00:00
Rainer Klute c3340f823b - Fixed bug 44375 - HPSF now copes with a broken dictionary in Document Summary Information stream. RuntimeExceptions that occured when trying to read bogus data are now caught. Dictionary entries up to but not including the bogus one are preserved, the rest is ignored.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@619848 13f79535-47bb-0310-9956-ffa450edef68
2008-02-08 11:55:43 +00:00
Rainer Klute cd3e480727 Restored the cast: JDK 1.4 needs it. :-(
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@550886 13f79535-47bb-0310-9956-ffa450edef68
2007-06-26 17:58:28 +00:00
Rainer Klute 0191b2e01b Removed unnecessary cast.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@550566 13f79535-47bb-0310-9956-ffa450edef68
2007-06-25 17:58:28 +00:00
Rainer Klute 05347bb63d Consistency check added when reading property set stream. An IllegalPropertyDataException is thrown if the property set stream is larger than it claims to be.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@550021 13f79535-47bb-0310-9956-ffa450edef68
2007-06-23 07:44:47 +00:00
Mark Emlyn David Thomas 7b3258a456 Add standard licence header for src/java directory
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@496526 13f79535-47bb-0310-9956-ffa450edef68
2007-01-15 22:46:35 +00:00
Rainer Klute 834dcb151d License comment fixed.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@496419 13f79535-47bb-0310-9956-ffa450edef68
2007-01-15 17:56:52 +00:00
Henri Yandell fca4623791 Applying the copy2license.pl script (with tiny modification to allow for more whitespace than it expects in the POI header) to all files. ant jar succeeds, and the svn diff has been verified by eye. Still more files to do, this is the first pass.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@489730 13f79535-47bb-0310-9956-ffa450edef68
2006-12-22 19:18:16 +00:00
Rainer Klute ad025884e4 Forgot to check in my nit-picking grammatical changes in comments.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@400278 13f79535-47bb-0310-9956-ffa450edef68
2006-05-06 09:56:19 +00:00
Rainer Klute b495e0f3c4 Support for many, many character encodings added. Thanks to Trejkaz
<trejkaz @at@ trypticon.org> for the patch!


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@400277 13f79535-47bb-0310-9956-ffa450edef68
2006-05-06 09:52:19 +00:00
Rainer Klute bb7ebd3492 * Writing support added to the SummaryInformation and DocumentSummaryInformation classes. These classes now have methods for setting and removing properties. Coherent extensions are:
** Documentation section about writing standard properties added to the HPSF HOW-TO.
** Example application added showing how to modify the document summary information.
** Testcases added for testing modifying summary information and document summary information.
** PropertySetFactory extended to create SummaryInformation and DocumentSummaryInformation instances.

* Added MutablePropertySet.write(DirectoryEntry, String) to ease writing a property set to a POI filesystem document.

* Improved codepage handling.

* Bug fixed: Integral values were read and written as unsigned instead of signed.

* Reworked the mapping between variant types and Java types: Variant.VT_I4 is mapped to Integer now and Variant.VT_I8 to Long. This might cause incompatibilities if you are doing low-level HPSF programming. 

* Changed SectionIDMap.DOCUMENT_SUMMARY_INFORMATION_ID from a byte[] to a byte[][] in order to contain the format ID of the first and the second section. This is an incompatible change!

* Added PropertySet.getFirstSection(). This method is similar to getSingleSection() won't choke if the property set has more than one section.

* Support for low-level reading and writing of Variant.VT_I8 type properties added.

* Unnecessary casts removed.

* Poibrowser's display format changed slightly.



git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@382887 13f79535-47bb-0310-9956-ffa450edef68
2006-03-03 16:57:55 +00:00
Rainer Klute 7cd8cd011c - Added support for the Korean character set MS949. Thanks again to Ralf Terdic <ralf.t@gmx.net>!
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353659 13f79535-47bb-0310-9956-ffa450edef68
2005-04-29 16:58:55 +00:00
Rainer Klute ba11bd33fc - Added a couple of Macintosh codepage numbers to Java encoding names.
Thanks to Ralf Terdic <ralf.t@gmx.net> for providing them! However, please
  note that neither Ralf nor I were able to test all those mappings. So please post
  a bug if you encounter any problems!


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353650 13f79535-47bb-0310-9956-ffa450edef68
2005-04-23 14:17:07 +00:00
Rainer Klute 43271e0c5e - Support for variant type VT_R8 added.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353637 13f79535-47bb-0310-9956-ffa450edef68
2005-04-13 16:33:22 +00:00
Rainer Klute d25395a486 Bug 34247 fixed. Dictionaries are read with the specified codepage now.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353636 13f79535-47bb-0310-9956-ffa450edef68
2005-04-01 16:58:00 +00:00
Rainer Klute 108dc44ab3 - Added support for the MacRoman codepage (10000). Thanks to Mikael Puittinen for the patch!
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353630 13f79535-47bb-0310-9956-ffa450edef68
2005-02-13 18:35:09 +00:00
Glen Stampoultzis 96fe7f273b Fixed bugzilla references
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353620 13f79535-47bb-0310-9956-ffa450edef68
2005-01-01 07:06:45 +00:00
Rainer Klute 14c88d9531 - Links to outdated information deleted.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353614 13f79535-47bb-0310-9956-ffa450edef68
2004-12-29 21:14:39 +00:00
Rainer Klute c101e83461 - Outdated links to Microsoft documentation removed.
- Link to Microsoft's MSDN library added.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353612 13f79535-47bb-0310-9956-ffa450edef68
2004-12-28 20:20:23 +00:00
Rainer Klute 7a9dab45a1 - A section's size is a multiple of 4 now. The Windows explorer seems to be constrained to this requirement in order to display custom properties.
- Custom properties may be written in character encodings different from Unicode.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353596 13f79535-47bb-0310-9956-ffa450edef68
2004-08-31 20:47:09 +00:00
Rainer Klute 18f04f5b5c - Adjusting the variant type moved to Property.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353595 13f79535-47bb-0310-9956-ffa450edef68
2004-08-31 20:46:41 +00:00
Rainer Klute 4827806018 - Two properties are regarded as equal now if one of them is a Variant.VT_LPWSTR and the other is a Variant.VT_LPSTR but their values are equal.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353594 13f79535-47bb-0310-9956-ffa450edef68
2004-08-31 20:45:00 +00:00
Rainer Klute 740965126b - Bug 30954 fixed.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353593 13f79535-47bb-0310-9956-ffa450edef68
2004-08-31 20:42:12 +00:00
Rainer Klute 14a93bb98a - Bug 30953 fixed: Method toString() now delivers all sections instead of the first one multiple times.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353592 13f79535-47bb-0310-9956-ffa450edef68
2004-08-31 17:59:49 +00:00
Rainer Klute f94bad29e3 Some code and documentation cleanup.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353584 13f79535-47bb-0310-9956-ffa450edef68
2004-08-15 15:20:08 +00:00
Rainer Klute fcc01e6a14 Fixed a bug where the logical comparison of two sections returned false only because one of them had property 1 (codepage) and the other had not. Now two sections are equal if their property values are equal disregarding property 1.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353583 13f79535-47bb-0310-9956-ffa450edef68
2004-08-15 13:43:35 +00:00
Rainer Klute b46136d63b Fixed a bug where a mutable section's format ID was written in the wrong byte order. Thanks to Bernd Freigang for pointing this out!
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353581 13f79535-47bb-0310-9956-ffa450edef68
2004-08-13 22:38:52 +00:00
Rainer Klute 3073474f48 - Fix: HPSF now ensures that string properties are always written with the type Variant.VT_LPWSTR instead of Variant.VT_LPSTR if the codepage is 1200 (Unicode).
- Code cleanup (propertyCount in MutableSection removed).
- Codepage numbers aggregated in the new class org.apache.poi.hpsf.Constants.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353561 13f79535-47bb-0310-9956-ffa450edef68
2004-06-22 16:11:39 +00:00
Rainer Klute 7b38e0ceb0 - Write properties sorted by property ID now. This hopefully fixes M$ Word compatibility.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353558 13f79535-47bb-0310-9956-ffa450edef68
2004-06-09 17:51:51 +00:00
Rainer Klute f1e024a6fc - Support for SJIS encoding added.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353554 13f79535-47bb-0310-9956-ffa450edef68
2004-06-02 19:37:27 +00:00
Glen Stampoultzis a4047ad573 New licence changes.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353545 13f79535-47bb-0310-9956-ffa450edef68
2004-04-09 13:05:39 +00:00
Rainer Klute 38d3097672 Buf fix plus testcasde: Reading property values failed with a StringIndexOutOfBoundsException on empty strings.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353485 13f79535-47bb-0310-9956-ffa450edef68
2004-01-08 14:25:35 +00:00
Rainer Klute a914cfc17c HPSF: new testcase to check the new codepage support - plus a fix to correct a bug detected by the testcase. Hey, that's what testcases are good for!
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353461 13f79535-47bb-0310-9956-ffa450edef68
2003-12-03 20:00:14 +00:00
Rainer Klute 131bb9d0bd HPSF: codepage support added
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353460 13f79535-47bb-0310-9956-ffa450edef68
2003-12-02 17:46:01 +00:00
Rainer Klute 6385296f3f Superfluous import statements removed
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353459 13f79535-47bb-0310-9956-ffa450edef68
2003-11-24 22:31:36 +00:00
Rainer Klute 71b808249b *** empty log message ***
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353439 13f79535-47bb-0310-9956-ffa450edef68
2003-11-07 19:24:29 +00:00
Avik Sengupta f52aea647a bug 22195 ClassID support, by Michael Zalewski, sync from branch, pls verify
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353429 13f79535-47bb-0310-9956-ffa450edef68
2003-10-31 16:39:05 +00:00
Rainer Klute e237bc3edd - Added Robert Flaherty's method getCustomProperties() (refactored)
- Got rid of the PropertySet instance variable sectionCount. Use getSectionCount() instead!
- Minor fixes


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353409 13f79535-47bb-0310-9956-ffa450edef68
2003-10-23 20:44:24 +00:00
Rainer Klute 8bd4b39387 - Comparing sections refined: For the dictionary (property 0) only the value (Map) is relevant. The dictionary's codepage (property 1) is disregarded.
- New sample application CopyCompare. I'll turn that into a testcase later.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353362 13f79535-47bb-0310-9956-ffa450edef68
2003-09-20 15:43:08 +00:00
Rainer Klute 61f780dba8 These changes introduce the following HPSF enhancements and fixes:
- Section dictionaries (aka custom properties) can be written now.
- Constructor MutableProperty(PropertySet) sets the class ID correctly now.
- Possible invalid section count fixed
- More testcases
- Cosmetics


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353360 13f79535-47bb-0310-9956-ffa450edef68
2003-09-18 18:56:35 +00:00
Rainer Klute 9d22984e3d *** empty log message ***
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353354 13f79535-47bb-0310-9956-ffa450edef68
2003-09-16 15:59:06 +00:00
Rainer Klute 17da836e85 - PropertySetFactory.create(InputStream) no longer throws an UnexpectedPropertySetTypeException.
- HPSFRuntimeException is thrown when the application tries to read a non-integer property with Section.getPropertyIntValue(long).
- Package description updated.
- ClassIDhashCode() implemented.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353349 13f79535-47bb-0310-9956-ffa450edef68
2003-09-13 12:31:28 +00:00
Rainer Klute 69581f5f0d Writing: API enhanced, bugs fixed, performance improvements, code simplifications, two new testcases, more int to long promotions.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353341 13f79535-47bb-0310-9956-ffa450edef68
2003-09-04 20:15:24 +00:00
Rainer Klute 495dfa3eb7 *** empty log message ***
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353340 13f79535-47bb-0310-9956-ffa450edef68
2003-09-04 20:10:52 +00:00
Rainer Klute fe4ce38e62 *** empty log message ***
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353333 13f79535-47bb-0310-9956-ffa450edef68
2003-09-01 18:54:23 +00:00
Rainer Klute 3aabec7f22 Property ID handling fixed (long vs. int).
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353332 13f79535-47bb-0310-9956-ffa450edef68
2003-09-01 18:53:28 +00:00
Rainer Klute 0f1a7a40b6 New method toInputStream() added.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353331 13f79535-47bb-0310-9956-ffa450edef68
2003-09-01 18:51:08 +00:00