Author: nick Date: Sun Mar 19 06:52:23 2006 New Revision: 386975 URL: http://svn.apache.org/viewcvs?rev=386975&view=rev Log: Create empty StyleTextPropAtoms correctly
Modified: jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java Modified: jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java URL: http://svn.apache.org/viewcvs/jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java?rev=386975&r1=386974&r2=386975&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 Sun Mar 19 06:52:23 2006 @@ -293,8 +293,8 @@ return; } - // Create a new one - _styleAtom = new StyleTextPropAtom(0); + // Create a new one at the right size + _styleAtom = new StyleTextPropAtom(getRawText().length()); // Use the TextHeader atom to get at the parent RecordContainer runAtomsParent = _headerAtom.getParentRecord(); Modified: jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java URL: http://svn.apache.org/viewcvs/jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java?rev=386975&r1=386974&r2=386975&view=diff ============================================================================== --- jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java (original) +++ jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java Sun Mar 19 06:52:23 2006 @@ -173,7 +173,7 @@ paragraphStyles = new LinkedList(); charStyles = new LinkedList(); - TextPropCollection defaultParagraphTextProps = new TextPropCollection(parentTextSize); + TextPropCollection defaultParagraphTextProps = new TextPropCollection(parentTextSize, (short)0); paragraphStyles.add(defaultParagraphTextProps); TextPropCollection defaultCharacterTextProps = new TextPropCollection(parentTextSize); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/