]> source.dussan.org Git - poi.git/commitdiff
Few documentation updates for recent new code
authorNick Burch <nick@apache.org>
Tue, 12 Aug 2008 18:55:47 +0000 (18:55 +0000)
committerNick Burch <nick@apache.org>
Tue, 12 Aug 2008 18:55:47 +0000 (18:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@685263 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/hpsf/how-to.xml
src/documentation/content/xdocs/hwpf/quick-guide.xml

index 0073126c95bb788dfa59e21625f0e7d433fa293e..aadf753a44f3678c0b61408e24351c519a9c1a29 100644 (file)
      properties. Chances are that you will find here what you need and don't
      have to read the other sections.</note>
 
+    <p>If all you are interested in is getting the textual content of
+     all the document properties, such as for full text indexing, then
+     take a look at 
+     <code>org.apache.poi.hpsf.extractor.HPFSPropertiesExtractor</code>. However,
+     if you want full access to the properties, please read on!</p>
+
     <p>The first thing you should understand is that a Microsoft Office file is
      not one large bunch of bytes but has an internal filesystem structure with
      files and directories. You can access these files and directories using
index bf046258e7f65192e1e14857e28796e00ef761c1..d717b0ef094f540480ee2436b912544092150846 100644 (file)
@@ -55,13 +55,25 @@ can then get text and other properties.
                </p>
                </section>
                
+               <section><title>Headers and Footers</title>
+               <p>To get at the headers and footers of a word document, first create a
+<code>org.apache.poi.hwpf.HWPFDocument</code>. Next, you need to create a
+<code>org.apache.poi.hwpf.usermodel.HeaderStores</code>, passing it your
+HWPFDocument. Finally, the HeaderStores gives you access to the headers and
+footers, including first / even / odd page ones if defined in your
+document. Additionally, HeaderStores provides a method for removing
+any macros in the text, which is helpful as many headers and footers
+do end up with macros in them.</p>
+               </section>
+               
                <section><title>Changing Text</title>
                <p>It is possible to change the text via 
                <code>insertBefore()</code> and <code>insertAfter()</code>
                on a <code>Range</code> object (either a <code>Range</code>,
                <code>Paragraph</code> or <code>CharacterRun</code>).
-               It is also possible to delete a <code>Range</code>, but this
-               code is know to have bugs in it.
+               It is also possible to delete a <code>Range</code>.
+               This code will work in many, but not all cases, and patches to
+        improve it are gratefully received!
                </p>
                </section>