summaryrefslogtreecommitdiff
path: root/sw/source/core/frmedt/feshview.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/frmedt/feshview.cxx')
-rw-r--r--sw/source/core/frmedt/feshview.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index e1655e84112d..6ff58cc8c322 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -40,6 +40,7 @@
#include <DocumentSettingManager.hxx>
#include <cmdid.h>
#include <drawdoc.hxx>
+#include <textboxhelper.hxx>
#include <poolfmt.hrc>
#include <frmfmt.hxx>
#include <frmatr.hxx>
@@ -220,6 +221,22 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj )
}
}
+ // If the fly frame is a textbox of a shape, then select the shape instead.
+ std::map<SwFrmFmt*, SwFrmFmt*> aTextBoxShapes = SwTextBoxHelper::findShapes(mpDoc);
+ for (sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i)
+ {
+ SdrObject* pObject = rMrkList.GetMark(i)->GetMarkedSdrObj();
+ SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(GetUserCall(pObject));
+ SwFrmFmt* pFmt = pDrawContact->GetFmt();
+ if (aTextBoxShapes.find(pFmt) != aTextBoxShapes.end())
+ {
+ SdrObject* pShape = aTextBoxShapes[pFmt]->FindSdrObject();
+ pDView->UnmarkAll();
+ pDView->MarkObj(pShape, Imp()->GetPageView(), bAddSelect, bEnterGroup);
+ break;
+ }
+ }
+
if ( bRet )
{
::lcl_GrabCursor(this, pOldSelFly);