Kaydet (Commit) dc61ebdc authored tarafından Ivan Timofeev's avatar Ivan Timofeev

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.
üst 0c60677c
......@@ -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
......
......@@ -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;
......
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