diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-17 16:35:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-17 20:22:51 +0200 |
commit | dab606b93fee4a3aac895e4f3b4a5bc375140885 (patch) | |
tree | f14d5eada809db8a321ee6853e8433820b1ed5b2 | |
parent | 9ffd3ee80f28d9c7e6f1cbf48055095764249ed6 (diff) |
crashtesting: export of ooo24533-1.sxw to docx
a problem (I assume) since...
commit d7d5fa52b03fe058759f90f489a5071a39883ed7
Date: Tue May 22 10:49:36 2018 +0200
sw_redlinehide: trivial conversions in reffld.cxx
Change-Id: I4a9ec367e8a280cb56c3e0e47558da959fc14b38
Reviewed-on: https://gerrit.libreoffice.org/55956
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/fields/reffld.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 63974c017a95..97ac139d53cf 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -97,6 +97,9 @@ bool IsFrameBehind( const SwTextNode& rMyNd, sal_Int32 nMySttPos, const SwTextFrame *pMyFrame = static_cast<SwTextFrame*>(rMyNd.getLayoutFrame( rMyNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false) ), *pFrame = static_cast<SwTextFrame*>(rBehindNd.getLayoutFrame( rBehindNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false) ); + if( !pFrame || !pMyFrame) + return false; + TextFrameIndex const nMySttPosIndex(pMyFrame->MapModelToView(&rMyNd, nMySttPos)); TextFrameIndex const nSttPosIndex(pFrame->MapModelToView(&rBehindNd, nSttPos)); while (pFrame && !pFrame->IsInside(nSttPosIndex)) @@ -567,9 +570,12 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr ) { const SwTextFrame* pFrame = static_cast<SwTextFrame*>(pTextNd->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, false)), *pSave = pFrame; - TextFrameIndex const nNumStartIndex(pFrame->MapModelToView(pTextNd, nNumStart)); - while (pFrame && !pFrame->IsInside(nNumStartIndex)) - pFrame = pFrame->GetFollow(); + if (pFrame) + { + TextFrameIndex const nNumStartIndex(pFrame->MapModelToView(pTextNd, nNumStart)); + while (pFrame && !pFrame->IsInside(nNumStartIndex)) + pFrame = pFrame->GetFollow(); + } if( pFrame || nullptr != ( pFrame = pSave )) { |