Kaydet (Commit) 12a1e53d authored tarafından Michael Stahl's avatar Michael Stahl

fix crash in CheckFields test from previous commit

std::vector::vector(size_type n) creates a vector containing n default
initialized elements, while boost::ptr_vector or SvArray constructors
create a vector containing 0 elements and allocate space for n.
üst 0097f9fe
......@@ -1579,7 +1579,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
// wird in sich selbst kopiert, dann kann beim Einfuegen ein
// Attribut geloescht werden. Darum erst ins Tmp-Array kopieren und
// dann erst ins eigene uebertragen.
SwpHts aArr( 5 );
SwpHts aArr;
// Del-Array fuer alle RefMarks ohne Ausdehnung
SwpHts aRefMrkArr;
......@@ -1879,7 +1879,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// dann suche mal alle Attribute zusammen, die im verschobenen
// Bereich liegen. Diese werden in das extra Array verschoben,
// damit sich die Indizies beim Updaten nicht veraendern !!!
SwpHts aArr( 5 );
SwpHts aArr;
// 2. Attribute verschieben
// durch das Attribute-Array, bis der Anfang des Geltungsbereiches
......@@ -2119,7 +2119,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// "uebergeplaettet". (Bug: 6977)
if( m_pSwpHints && nAttrCnt < m_pSwpHints->Count() )
{
SwpHts aArr( 5 );
SwpHts aArr;
while ( nAttrCnt < m_pSwpHints->Count() )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment