You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by ni...@apache.org on 2006/06/12 16:45:08 UTC

svn commit: r413671 - /jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java

Author: nick
Date: Mon Jun 12 07:45:07 2006
New Revision: 413671

URL: http://svn.apache.org/viewvc?rev=413671&view=rev
Log:
Add some comments to the code, to help understand why an extra +1 is added (based on discussions in bug #39177)

Modified:
    jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java

Modified: jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java
URL: http://svn.apache.org/viewvc/jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java?rev=413671&r1=413670&r2=413671&view=diff
==============================================================================
--- jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java (original)
+++ jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java Mon Jun 12 07:45:07 2006
@@ -220,6 +220,8 @@
 		//  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 @@
 			
 			// 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);



---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/