summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/inc/view.hxx2
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx7
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,