]> source.dussan.org Git - poi.git/commitdiff
Create empty StyleTextPropAtoms correctly
authorNick Burch <nick@apache.org>
Sun, 19 Mar 2006 14:52:23 +0000 (14:52 +0000)
committerNick Burch <nick@apache.org>
Sun, 19 Mar 2006 14:52:23 +0000 (14:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@386975 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java
src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java

index 8e392d831000de2af376a1910e8e238d6a209e02..7ebb2803478a6a0eac205793c91ec5ab020a6987 100644 (file)
@@ -293,8 +293,8 @@ public class TextRun
                        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();
index b7d2230b55139c1a2886bc44b7af0f88e87fcfaa..148227136dd132226980c9e220b321dd05cd5567 100644 (file)
@@ -173,7 +173,7 @@ public class StyleTextPropAtom extends RecordAtom
                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);