diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2011-12-08 22:55:27 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2011-12-08 23:05:30 +0400 |
commit | dc61ebdc93a777f4f41c1ae837bdb6098ecffcce (patch) | |
tree | ee0482bbff65df442924b3f93a98591db321286c /sw | |
parent | 0c60677c961814f2786f99b8ba0d8c9aec0605e4 (diff) |
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.
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/crsr/callnk.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index 66e7f45890ae..a6373da9cdcc 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 ca32947207e1..561766564eca 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; |