Create empty StyleTextPropAtoms correctly

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@386975 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2006-03-19 14:52:23 +00:00
parent 8b1721c749
commit 40dc76c0cf
2 changed files with 3 additions and 3 deletions

View File

@ -293,8 +293,8 @@ public class TextRun
return; return;
} }
// Create a new one // Create a new one at the right size
_styleAtom = new StyleTextPropAtom(0); _styleAtom = new StyleTextPropAtom(getRawText().length());
// Use the TextHeader atom to get at the parent // Use the TextHeader atom to get at the parent
RecordContainer runAtomsParent = _headerAtom.getParentRecord(); RecordContainer runAtomsParent = _headerAtom.getParentRecord();

View File

@ -173,7 +173,7 @@ public class StyleTextPropAtom extends RecordAtom
paragraphStyles = new LinkedList(); paragraphStyles = new LinkedList();
charStyles = new LinkedList(); charStyles = new LinkedList();
TextPropCollection defaultParagraphTextProps = new TextPropCollection(parentTextSize); TextPropCollection defaultParagraphTextProps = new TextPropCollection(parentTextSize, (short)0);
paragraphStyles.add(defaultParagraphTextProps); paragraphStyles.add(defaultParagraphTextProps);
TextPropCollection defaultCharacterTextProps = new TextPropCollection(parentTextSize); TextPropCollection defaultCharacterTextProps = new TextPropCollection(parentTextSize);