From 0549f250aac361075287d8acae9b7ee73c66256d Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 19 May 2015 17:18:19 +0200 Subject: Add SwView::EnterShapeDrawTextMode() Change-Id: Ic19519ee727bd4b6c18d14dc3eb21b2eeb4395c9 --- sw/source/uibase/inc/view.hxx | 2 ++ sw/source/uibase/uiview/viewdraw.cxx | 7 +++++++ 2 files changed, 9 insertions(+) (limited to 'sw') 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, -- cgit