[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Nov 19 21:05:55 UTC 2018
sw/source/core/frmedt/feshview.cxx | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
New commits:
commit 2cb9c55e4da18fbfb2f578c46d094e6ca0d56fa1
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 19 14:44:21 2018 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Nov 19 22:05:33 2018 +0100
Resolves: tdf#112696 survive missing SwDrawContact
its removed when the object was removed from the page to be reinserted
as as a group member
Change-Id: I8edeb89ae07b73572b65413817212a79ef8957b3
Reviewed-on: https://gerrit.libreoffice.org/63578
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 787db5fbecf7..1d00cd578e29 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2241,6 +2241,11 @@ RndStdIds SwFEShell::GetAnchorId() const
break;
}
SwDrawContact *pContact = static_cast<SwDrawContact*>(GetUserCall(pObj));
+ if (!pContact)
+ {
+ nRet = RndStdIds::UNKNOWN;
+ break;
+ }
RndStdIds nId = pContact->GetFormat()->GetAnchor().GetAnchorId();
if ( nRet == RndStdIds(SHRT_MAX) )
nRet = nId;
@@ -2345,11 +2350,13 @@ bool SwFEShell::IsGroupSelected()
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
// consider 'virtual' drawing objects.
// Thus, use corresponding method instead of checking type.
- if ( pObj->IsGroupObject() &&
- // --> #i38505# No ungroup allowed for 3d objects
- !pObj->Is3DObj() &&
- RndStdIds::FLY_AS_CHAR != static_cast<SwDrawContact*>(GetUserCall(pObj))->
- GetFormat()->GetAnchor().GetAnchorId() )
+ if (!pObj->IsGroupObject())
+ continue;
+ // --> #i38505# No ungroup allowed for 3d objects
+ if (pObj->Is3DObj())
+ continue;
+ SwDrawContact *pContact = static_cast<SwDrawContact*>(GetUserCall(pObj));
+ if (!pContact || RndStdIds::FLY_AS_CHAR != pContact->GetFormat()->GetAnchor().GetAnchorId())
{
return true;
}
More information about the Libreoffice-commits
mailing list