[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 28 21:14:15 UTC 2018


 sw/source/core/frmedt/feshview.cxx |   17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

New commits:
commit 30a07561c19da050c7ca0a7a67868a6f6229a449
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Nov 28 15:47:12 2018 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Nov 28 22:13:46 2018 +0100

    Revert "Resolves: tdf#112696 survive missing SwDrawContact"
    
    This reverts commit 2cb9c55e4da18fbfb2f578c46d094e6ca0d56fa1.
    
    Change-Id: I2d276d0171103d45be2cd66990fb5cf8d2fb4161
    Reviewed-on: https://gerrit.libreoffice.org/64178
    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 4abc8f16aea1..b05698242f55 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2241,11 +2241,6 @@ 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;
@@ -2350,13 +2345,11 @@ bool SwFEShell::IsGroupSelected()
             SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
             // consider 'virtual' drawing objects.
             // Thus, use corresponding method instead of checking type.
-            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())
+            if ( pObj->IsGroupObject() &&
+                 // --> #i38505# No ungroup allowed for 3d objects
+                 !pObj->Is3DObj() &&
+                 RndStdIds::FLY_AS_CHAR != static_cast<SwDrawContact*>(GetUserCall(pObj))->
+                                      GetFormat()->GetAnchor().GetAnchorId() )
             {
                 return true;
             }


More information about the Libreoffice-commits mailing list