diff options
author | Nick Burch <nick@apache.org> | 2006-06-12 14:45:07 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2006-06-12 14:45:07 +0000 |
commit | 6dc28b4e1ba20b4782bda443d40db56d664523eb (patch) | |
tree | 16e5c60ee950b2c15d0ed6831c2c89037c4850f5 /src/scratchpad | |
parent | 9375067b39c36d4739665041f3a4de53bcfcd7ac (diff) | |
download | poi-6dc28b4e1ba20b4782bda443d40db56d664523eb.tar.gz poi-6dc28b4e1ba20b4782bda443d40db56d664523eb.zip |
Add some comments to the code, to help understand why an extra +1 is added (based on discussions in bug #39177)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@413671 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad')
-rw-r--r-- | src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java b/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java index d8b40b0855..afc0e9924a 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java +++ b/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java @@ -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); |