[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Mar 18 01:05:17 PDT 2015
sw/source/uibase/docvw/edtwin.cxx | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
New commits:
commit 5f5b8c14d62aeedbf59d5758d4b78aafac63c134
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Mar 18 09:03:48 2015 +0100
sw tiled rendering: let single click start shape text editing
This affects only the text area of the shape, single click on the border
still just selects the shape.
Change-Id: Ia3564e6a95213773512e4c904843ff42aeb3a9ba
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 7e74b90..f6b4ffe 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4887,6 +4887,23 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if (bCallBase)
Window::MouseButtonUp(rMEvt);
+
+ if (pSdrView && rMEvt.GetClicks() == 1 && rSh.isTiledRendering())
+ {
+ // When tiled rendering, single click on a shape text starts editing already.
+ SdrViewEvent aViewEvent;
+ SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONUP, aViewEvent);
+ const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
+ if (eHit == SDRHIT_TEXTEDITOBJ && rMarkList.GetMarkCount() == 1)
+ {
+ if (SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj())
+ {
+ EnterDrawTextMode(pObj->GetLogicRect().Center());
+ if (m_rView.GetCurShell()->ISA(SwDrawTextShell))
+ static_cast<SwDrawTextShell*>(m_rView.GetCurShell())->Init();
+ }
+ }
+ }
}
/**
More information about the Libreoffice-commits
mailing list