[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/source

Muhammet Kara (via logerrit) logerrit at kemper.freedesktop.org
Wed Feb 12 08:14:33 UTC 2020


 sc/source/ui/view/tabvwsh2.cxx |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit c72da1dca660f2bd8b15f1d97f44302de3a5f03b
Author:     Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Wed Feb 12 05:49:11 2020 +0300
Commit:     Muhammet Kara <muhammet.kara at collabora.com>
CommitDate: Wed Feb 12 09:13:59 2020 +0100

    lok: Center shape on insert also for Desktop view
    
    Change-Id: I85c3fe3d0166eb42f46f2aa65d0319e582b851af
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88508
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Muhammet Kara <muhammet.kara at collabora.com>

diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 8bc3bbfe1d1e..04b44768da17 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -19,7 +19,6 @@
 
 #include <comphelper/lok.hxx>
 #include <sfx2/bindings.hxx>
-#include <sfx2/lokhelper.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <svl/aeitem.hxx>
 #include <svl/whiter.hxx>
@@ -326,7 +325,6 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
 
         // calc position and size
         bool bLOKIsActive = comphelper::LibreOfficeKit::isActive();
-        bool bIsMobile = comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView());
         Point aInsertPos;
         if(!bLOKIsActive)
         {
@@ -335,7 +333,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
             aInsertPos.AdjustX( -sal_Int32(nDefaultObjectSizeWidth / 2) );
             aInsertPos.AdjustY( -sal_Int32(nDefaultObjectSizeHeight / 2) );
         }
-        else if (bIsMobile)
+        else
         {
             aInsertPos = GetViewData().getLOKVisibleArea().Center();
 
@@ -345,10 +343,6 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
             aInsertPos.AdjustX( -sal_Int32(nDefaultObjectSizeWidth / 2) );
             aInsertPos.AdjustY( -sal_Int32(nDefaultObjectSizeHeight / 2) );
         }
-        else
-        {
-            aInsertPos = GetInsertPos();
-        }
 
         tools::Rectangle aNewObjectRectangle(aInsertPos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight));
 


More information about the Libreoffice-commits mailing list