sw/source/core/crsr/callnk.cxx | 2 +- sw/source/core/crsr/crsrsh.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit dc61ebdc93a777f4f41c1ae837bdb6098ecffcce Author: Ivan Timofeev <timofeev....@gmail.com> Date: Thu Dec 8 22:55:27 2011 +0400 fdo#42147: fix crash it is not valid to use (type & ND_TEXTNODE) before casting to SwTxtNode, type of SwCntntNode has the ND_TEXTNODE bit as well, but SwCntntNode is not derived from SwTxtNode. diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index 66e7f45..a6373da 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -70,7 +70,7 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh ) nNdTyp = rNd.GetNodeType(); bHasSelection = ( *pCrsr->GetPoint() != *pCrsr->GetMark() ); - if( ND_TEXTNODE & nNdTyp ) + if( rNd.IsTxtNode() ) nLeftFrmPos = SwCallLink::getLayoutFrm( rShell.GetLayout(), (SwTxtNode&)rNd, nCntnt, !rShell.ActionPend() ); else diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index ca32947..5617665 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -223,7 +223,7 @@ void SwCrsrShell::StartAction() nAktCntnt = pCurCrsr->GetPoint()->nContent.GetIndex(); nAktNdTyp = rNd.GetNodeType(); bAktSelection = *pCurCrsr->GetPoint() != *pCurCrsr->GetMark(); - if( ND_TEXTNODE & nAktNdTyp ) + if( rNd.IsTxtNode() ) nLeftFrmPos = SwCallLink::getLayoutFrm( GetLayout(), (SwTxtNode&)rNd, nAktCntnt, sal_True ); else nLeftFrmPos = 0; _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits