[Libreoffice-commits] core.git: sc/source
Muhammet Kara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 14 15:12:47 UTC 2020
sc/source/ui/view/tabvwsh2.cxx | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
New commits:
commit 75500a4161c86bba644d212f2f2eef78dfeb9dea
Author: Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Wed Feb 12 05:49:11 2020 +0300
Commit: Andras Timar <andras.timar at 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.kara at collabora.com>
Reviewed-by: Andras Timar <andras.timar at 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));
More information about the Libreoffice-commits
mailing list