]> source.dussan.org Git - poi.git/commitdiff
Add some comments to the code, to help understand why an extra +1 is added (based...
authorNick Burch <nick@apache.org>
Mon, 12 Jun 2006 14:45:07 +0000 (14:45 +0000)
committerNick Burch <nick@apache.org>
Mon, 12 Jun 2006 14:45:07 +0000 (14:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@413671 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java

index d8b40b0855228b47429366dfbbdf1d774f64e41e..afc0e9924aca8f6ec38776f4e8d9f6dda9e1cfbf 100644 (file)
@@ -220,6 +220,8 @@ public class TextRun
                //  we need to tell the Character TextPropCollections a size 1 bigger 
                //  than it really is
                // (The Paragraph one will keep the extra 1 length from before)
+               // This extra style length is used to indicate that new text in
+               //  the paragraph should go into this set of styling
                if(runID == _rtRuns.length-1) {
                        cCol.updateTextSize( cCol.getCharactersCovered() + 1 );
                }
@@ -281,6 +283,8 @@ public class TextRun
                        
                        // Note - TextPropCollection's idea of the text length must
                        //         be one larger than it actually is!
+                       // (This indicates that new text added to the end should
+                       //   get the same styling as the current text)
                        TextPropCollection pCol = (TextPropCollection)pStyles.getFirst();
                        TextPropCollection cCol = (TextPropCollection)cStyles.getFirst();
                        pCol.updateTextSize(s.length()+1);