summaryrefslogtreecommitdiff
path: root/sw/source/core/frmedt/tblsel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/frmedt/tblsel.cxx')
-rw-r--r--sw/source/core/frmedt/tblsel.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index f971be8d79e4..a61f27e864b4 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -30,6 +30,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <svx/boxitem.hxx>
#include <svx/protitem.hxx>
@@ -984,11 +985,11 @@ BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
for( USHORT n = 0; n < rFmts.Count(); ++n )
{
- const SwPosition* pAPos;
const SwFmtAnchor& rAnchor = rFmts[n]->GetAnchor();
- if( ( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) &&
- 0 != ( pAPos = rAnchor.GetCntntAnchor() ) &&
+ const SwPosition* pAPos = rAnchor.GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
nSttIdx <= ( nIdx = pAPos->nNode.GetIndex() ) &&
nIdx < nEndIdx )
{