Kaydet (Commit) 93011580 authored tarafından Miklos Vajna's avatar Miklos Vajna

SwView::EnterDrawTextMode: refuse to edit editeng text if texbox is attached

Change-Id: If1b3e9807414e90341199eabfa937376084c097d
üst 74a07821
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <sfx2/viewfrm.hxx> #include <sfx2/viewfrm.hxx>
#include <doc.hxx> #include <doc.hxx>
#include <IDocumentDeviceAccess.hxx> #include <IDocumentDeviceAccess.hxx>
#include <textboxhelper.hxx>
#include <editeng/langitem.hxx> #include <editeng/langitem.hxx>
#include <linguistic/lngprops.hxx> #include <linguistic/lngprops.hxx>
#include <editeng/unolingu.hxx> #include <editeng/unolingu.hxx>
...@@ -459,6 +460,16 @@ void SwView::NoRotate() ...@@ -459,6 +460,16 @@ void SwView::NoRotate()
// Enable DrawTextEditMode // Enable DrawTextEditMode
static bool lcl_isTextBox(SdrObject* pObject)
{
if (SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(pObject->GetUserCall()))
{
if (SwFrmFmt* pFmt = pDrawContact->GetFmt())
return SwTextBoxHelper::findTextBox(pFmt);
}
return false;
}
bool SwView::EnterDrawTextMode(const Point& aDocPos) bool SwView::EnterDrawTextMode(const Point& aDocPos)
{ {
SdrObject* pObj; SdrObject* pObj;
...@@ -483,7 +494,9 @@ bool SwView::EnterDrawTextMode(const Point& aDocPos) ...@@ -483,7 +494,9 @@ bool SwView::EnterDrawTextMode(const Point& aDocPos)
!m_pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT)) !m_pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT))
{ {
bReturn = BeginTextEdit( pObj, pPV, m_pEditWin, false ); // Refuse to edit editeng text of the shape if it has textbox attached.
if (!lcl_isTextBox(pObj))
bReturn = BeginTextEdit( pObj, pPV, m_pEditWin, false );
} }
pSdrView->SetHitTolerancePixel( nOld ); pSdrView->SetHitTolerancePixel( nOld );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment