summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/laycache.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/laycache.cxx')
-rw-r--r--sw/source/core/layout/laycache.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 1753d8544e50..ebd9e722aa2e 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -843,8 +843,9 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
}
else
{
- SwTxtFrm *pNew = new SwTxtFrm( ((SwTxtFrm*)rpFrm)->
- GetTxtNode(), rpFrm );
+ SwTxtFrm *const pNew = static_cast<SwTxtFrm*>(
+ static_cast<SwTxtFrm*>(rpFrm)
+ ->GetTxtNode()->MakeFrm(rpFrm));
pNew->ManipOfst( nOfst );
pNew->SetFollow( ((SwTxtFrm*)rpFrm)->GetFollow() );
((SwTxtFrm*)rpFrm)->SetFollow( pNew );