[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/source
Caolán McNamara
caolanm at redhat.com
Mon Jun 18 09:56:39 UTC 2018
sw/source/core/fields/reffld.cxx | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
New commits:
commit 0c75367ae5ac257310541ca3c1972b5c9977f452
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 17 16:35:52 2018 +0100
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/55957
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 8143aff1c470..9f6ec1998185 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -98,6 +98,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))
@@ -568,9 +571,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 ))
{
More information about the Libreoffice-commits
mailing list