summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2011-03-11 11:47:34 +0100
committerMichael Stahl <mst@openoffice.org>2011-03-11 11:47:34 +0100
commitae3459b3f63764cc586f1b7e004ff343e3928e3f (patch)
tree5ad2447a41ab9c5340cf60f1f6bd2ae35bafe651 /sw/source
parent39df59386962ffda33abc4613910aacb3ade9633 (diff)
sw34bf04: #i51277#: SwFltStackEntry::MakeRegion:
prevent lots of HintsCheck assertions when importing bugdoc from the issue.
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww1/fltshell.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index c6e093c11935..ded870591e9b 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -137,13 +137,14 @@ void SwFltStackEntry::SetEndPos(const SwPosition& rEndPos)
sal_Bool SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, sal_Bool bCheck )
{
- // wird ueberhaupt ein Bereich umspannt ??
- // - ist kein Bereich, dann nicht returnen wenn am Anfang vom Absatz
- // - Felder aussortieren, koennen keinen Bereich haben !!
- if (
- nMkNode.GetIndex() == nPtNode.GetIndex() && nMkCntnt == nPtCntnt &&
- nPtCntnt && RES_TXTATR_FIELD != pAttr->Which()
- )
+ // does this range actually contain something?
+ // empty range is allowed if at start of empty paragraph
+ // fields are special: never have range, so leave them
+ SwCntntNode *const pCntntNode(
+ SwNodeIndex(nMkNode, +1).GetNode().GetCntntNode());
+ if ((nMkNode.GetIndex() == nPtNode.GetIndex()) && (nMkCntnt == nPtCntnt)
+ && ((0 != nPtCntnt) || (pCntntNode && (0 != pCntntNode->Len())))
+ && (RES_TXTATR_FIELD != pAttr->Which()))
{
return sal_False;
}