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

New commits:
commit 75500a4161c86bba644d212f2f2eef78dfeb9dea
Author:     Muhammet Kara <muhammet.k...@collabora.com>
AuthorDate: Wed Feb 12 05:49:11 2020 +0300
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 14 16:12:13 2020 +0100

    lok: Center shape on insert also for Desktop view
    
    Change-Id: I85c3fe3d0166eb42f46f2aa65d0319e582b851af
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88489
    Reviewed-by: Muhammet Kara <muhammet.k...@collabora.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Tested-by: Jenkins

diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index da77a4278655..ea2fa4cdf34b 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/whiter.hxx>
 #include <unotools/moduleoptions.hxx>
@@ -321,7 +320,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)
         {
@@ -330,7 +328,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();
 
@@ -340,10 +338,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));
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to