summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-01 12:17:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-06 12:16:33 +0100
commit969941f996385fa48f405f51f97a39454ef2b79a (patch)
treee72ac26743f8ebe7054f17e531779f607be5e88d
parent195674627cb887b1e0d92d756a285ad48ef1d362 (diff)
Related: fdo#58277 if the SwFrm is not IsValid so are its portions
i.e. they don't necessarily match the SwTxtNode anymore, e.g. content deleted from node, SwFrm is invalid, old portions refer to old offsets not new ones yet Change-Id: I755051cd647aa7bb203a6e1f815193fb6ec39191
-rw-r--r--sw/source/core/text/txtfrm.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 389127d565f2..720f888c4435 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -2512,9 +2512,9 @@ void SwTxtFrm::RecalcAllLines()
void SwTxtFrm::VisitPortions( SwPortionHandler& rPH ) const
{
- const SwParaPortion* pPara = GetPara();
+ const SwParaPortion* pPara = IsValid() ? GetPara() : NULL;
- if( pPara )
+ if (pPara)
{
if ( IsFollow() )
rPH.Skip( GetOfst() );