diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-19 17:18:19 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-19 17:35:02 +0200 |
commit | 0549f250aac361075287d8acae9b7ee73c66256d (patch) | |
tree | 02f982ab1f2213e66daa71221f043052cf69169c /sw/source/uibase | |
parent | 1349491d48a2f8a130f1b8b840383d31e7927252 (diff) |
Add SwView::EnterShapeDrawTextMode()
Change-Id: Ic19519ee727bd4b6c18d14dc3eb21b2eeb4395c9
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/inc/view.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewdraw.cxx | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/uibase/inc/view.hxx b/sw/source/uibase/inc/view.hxx index c89d3306c52b..9d6a9b21e23c 100644 --- a/sw/source/uibase/inc/view.hxx +++ b/sw/source/uibase/inc/view.hxx @@ -556,6 +556,8 @@ public: inline void FlipDrawSelMode() { m_bDrawSelMode = !m_bDrawSelMode; } void NoRotate(); // turn off rotate mode bool EnterDrawTextMode(const Point& aDocPos); + /// Same as EnterDrawTextMode(), but takes an SdrObject instead of guessing it by document position. + bool EnterShapeDrawTextMode(SdrObject* pObject); void LeaveDrawCreate() { m_nDrawSfxId = m_nFormSfxId = USHRT_MAX; m_sDrawCustom.clear();} bool IsDrawMode() { return (m_nDrawSfxId != USHRT_MAX || m_nFormSfxId != USHRT_MAX); } bool IsFormMode() const; diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index 51e037600da4..38c405f6d083 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -504,6 +504,13 @@ bool SwView::EnterDrawTextMode(const Point& aDocPos) return bReturn; } +bool SwView::EnterShapeDrawTextMode(SdrObject* pObject) +{ + SdrView* pSdrView = GetWrtShell().GetDrawView(); + SdrPageView* pPageView = pSdrView->GetSdrPageView(); + return BeginTextEdit(pObject, pPageView, m_pEditWin); +} + // Enable DrawTextEditMode bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin, |