View | Details | Raw Unified | Return to bug 45776
Collapse All | Expand All

(-)src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java (+14 lines)
Lines 484-490 Link Here
484
			
484
			
485
			LinkedList cStyles = _styleAtom.getCharacterStyles();
485
			LinkedList cStyles = _styleAtom.getCharacterStyles();
486
			while(cStyles.size() > 1) { cStyles.removeLast(); }
486
			while(cStyles.size() > 1) { cStyles.removeLast(); }
487
488
			// [djb 09/07/2008] reset any style data now so that subsequent call to
489
			// changeTextInRichTextRun will have the correct style info
490
			// update the lengths +1 for since these will be the only runs
491
			if (pStyles.size() ==1) {
492
				TextPropCollection prPara = (TextPropCollection)pStyles.getFirst();
493
				prPara.updateTextSize( s.length() +1 );
494
			}
487
			
495
			
496
			if (cStyles.size() ==1) {
497
				TextPropCollection prChar = (TextPropCollection)cStyles.getFirst();
498
				prChar.updateTextSize( s.length() +1 );
499
			}
500
			// [djb 09/07/2008]
501
			
488
			_rtRuns[0].setText(s);
502
			_rtRuns[0].setText(s);
489
		} else {
503
		} else {
490
			// Recreate rich text run with no styling
504
			// Recreate rich text run with no styling

Return to bug 45776