summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@collabora.com>2020-02-12 05:49:11 +0300
committerAndras Timar <andras.timar@collabora.com>2020-02-14 16:12:13 +0100
commit75500a4161c86bba644d212f2f2eef78dfeb9dea (patch)
tree4778bbd99ad7acd90df4ac7514e0b1eca0b9cf79 /sc/source/ui
parent2f9b7f4d7d35d0e2d85132792f8c74c54f05d6c1 (diff)
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@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx8
1 files changed, 1 insertions, 7 deletions
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));