diff options
author | Mert Tumer <mert.tumer@collabora.com> | 2022-01-19 14:23:52 +0300 |
---|---|---|
committer | Mert Tumer <mert.tumer@collabora.com> | 2022-01-20 09:55:44 +0100 |
commit | 9ca4bb1e7392347b03887486cad597c0fb7ce774 (patch) | |
tree | ab10e694178e464085053558805fa564fe031ca1 /svx | |
parent | f168cfc7a3a374fba2175eb8682a69b924928ccb (diff) |
lok: Set pasted text rect pos to 0, 0
Rect size change according to the length of the text
however, this can make the text inserted in the negative coordinates
and half of it becomes invisible.
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ibd4e6164c21088205efecf024c1888c55ac33f0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128603
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdxcgv.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 21d0451e7f3c..e53444e9c87c 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -48,6 +48,7 @@ #include <svx/sdr/contact/displayinfo.hxx> #include <svx/svdotable.hxx> #include <sal/log.hxx> +#include <comphelper/lok.hxx> using namespace com::sun::star; @@ -404,7 +405,9 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po nSizY /= aDstFr.GetNumerator(); tools::Long xs=nSizX; tools::Long ys=nSizY; - Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2); + // set the pos to 0, 0 for online case + bool isLOK = comphelper::LibreOfficeKit::isActive(); + Point aPos(isLOK ? 0 : rCenter.X()-xs/2, isLOK ? 0 : rCenter.Y()-ys/2); tools::Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys); pObj->SetLogicRect(aR); rLst.InsertObject(pObj, SAL_MAX_SIZE); |