[Libreoffice-commits] core.git: 2 commits - sc/source sd/source svx/source sw/source
merttumer (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 20 02:32:50 UTC 2021
sc/source/ui/view/tabvwsh2.cxx | 2 ++
sd/source/ui/view/drviewse.cxx | 4 ++++
svx/source/svdraw/svddrgv.cxx | 13 +++++++++----
sw/source/uibase/uiview/viewdraw.cxx | 3 +++
4 files changed, 18 insertions(+), 4 deletions(-)
New commits:
commit 2a91d96591001c83cac56e924fc6748c7900f7e5
Author: merttumer <mert.tumer at collabora.com>
AuthorDate: Wed Mar 24 12:06:08 2021 +0300
Commit: Mert Tumer <mert.tumer at collabora.com>
CommitDate: Tue Apr 20 04:32:22 2021 +0200
LOK: Fix Moving drag handles calculates wrong offset
When dragging the shape handles for resizing,
the handle's grid offset must be the shapes grid
offset. In small numbered row&column orders, it is
not visible much since the difference is very little
but as the number gets greater, the difference becomes more visible.
Change-Id: I44d03cc67a239c8b7758206930def331ed8e5e42
Signed-off-by: merttumer <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113028
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114026
Tested-by: Jenkins
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 9807a53bd99e..6cbba5494070 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -36,6 +36,7 @@
#include <svx/sdr/overlay/overlaymanager.hxx>
#include <svx/sdrpagewindow.hxx>
#include <osl/diagnose.h>
+#include <comphelper/lok.hxx>
using namespace sdr;
@@ -206,10 +207,12 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
// Coordinate maybe affected by GridOffset, so we may need to
// adapt to Model-coordinates here
- if(getPossibleGridOffsetForPosition(
+ if((comphelper::LibreOfficeKit::isActive() && mpMarkedObj
+ && getPossibleGridOffsetForSdrObject(aGridOffset, GetMarkedObjectByIndex(0), GetSdrPageView()))
+ || (getPossibleGridOffsetForPosition(
aGridOffset,
basegfx::B2DPoint(aPnt.X(), aPnt.Y()),
- GetSdrPageView()))
+ GetSdrPageView())))
{
aPnt.AdjustX(basegfx::fround(-aGridOffset.getX()));
aPnt.AdjustY(basegfx::fround(-aGridOffset.getY()));
@@ -508,10 +511,12 @@ void SdrDragView::MovDragObj(const Point& rPnt)
// Coordinate maybe affected by GridOffset, so we may need to
// adapt to Model-coordinates here
- if(getPossibleGridOffsetForPosition(
+ if((comphelper::LibreOfficeKit::isActive() && mpMarkedObj
+ && getPossibleGridOffsetForSdrObject(aGridOffset, GetMarkedObjectByIndex(0), GetSdrPageView()))
+ || (getPossibleGridOffsetForPosition(
aGridOffset,
basegfx::B2DPoint(aPnt.X(), aPnt.Y()),
- GetSdrPageView()))
+ GetSdrPageView())))
{
aPnt.AdjustX(basegfx::fround(-aGridOffset.getX()));
aPnt.AdjustY(basegfx::fround(-aGridOffset.getY()));
commit c853d446a7cd8a8436cb5f43bbf81a723bd86c99
Author: merttumer <mert.tumer at collabora.com>
AuthorDate: Fri Mar 19 12:31:42 2021 +0300
Commit: Mert Tumer <mert.tumer at collabora.com>
CommitDate: Tue Apr 20 04:32:00 2021 +0200
Fix Line and Connectors enable interactive drawing
We add them directly for LOK case and have no functionality
for interactive drawing.
Noticed that in Writer we didnt even add them directly
I also implemented that as well.
Change-Id: If90bfc8d2cdf84f200bc7963ae4126ef789524ff
Signed-off-by: merttumer <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112703
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114025
Tested-by: Jenkins
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index f213c5b822ef..652482ec5d6f 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -231,6 +231,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SID_DRAW_ELLIPSE:
case SID_DRAW_MEASURELINE:
pTabView->SetDrawFuncPtr(new FuConstRectangle(*this, pWin, pView, pDoc, aNewReq));
+ bCreateDirectly = comphelper::LibreOfficeKit::isActive();
break;
case SID_DRAW_CAPTION:
@@ -332,6 +333,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
}
else
{
+ GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
ScViewData& rViewData = GetViewData();
aInsertPos = rViewData.getLOKVisibleArea().Center();
if (comphelper::LibreOfficeKit::isCompatFlagSet(
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index b833b1d3b719..2247294cfaba 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -605,6 +605,10 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
if(!(HasCurrentFunction() && ((rReq.GetModifier() & KEY_MOD1) || bCreateDirectly)))
return;
+ // disable interactive drawing for LOK
+ if (bCreateDirectly)
+ GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
+
// get SdOptions
SdOptions* pOptions = SD_MOD()->GetSdOptions(GetDoc()->GetDocumentType());
sal_uInt32 nDefaultObjectSizeWidth(pOptions->GetDefaultObjectSizeWidth());
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 80024ccf6ac4..b676999f6448 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -260,6 +260,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
case SID_DRAW_CAPTION:
case SID_DRAW_CAPTION_VERTICAL:
pFuncPtr.reset( new ConstRectangle(m_pWrtShell.get(), m_pEditWin, this) );
+ bCreateDirectly = comphelper::LibreOfficeKit::isActive();
m_nDrawSfxId = nSlotId;
m_sDrawCustom.clear();
break;
@@ -341,6 +342,8 @@ void SwView::ExecDraw(SfxRequest& rReq)
NoRotate();
if(rReq.GetModifier() == KEY_MOD1 || bCreateDirectly)
{
+ if (bCreateDirectly)
+ GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
if(SID_OBJECT_SELECT == m_nDrawSfxId )
{
m_pWrtShell->GotoObj(true);
More information about the Libreoffice-commits
mailing list