diff options
-rw-r--r-- | sw/source/core/frmedt/fews.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 58d0c904f837..c3ba3a6bd6ee 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -123,12 +123,15 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, case RECT_FLY_PRT_EMBEDDED: bFrame = false; SAL_FALLTHROUGH; - case RECT_FLY_EMBEDDED: pFrame = xObj.is() ? FindFlyFrame( xObj ) + case RECT_FLY_EMBEDDED: + { + const SwFrame *pFlyFrame = xObj.is() ? FindFlyFrame(xObj) : nullptr; + pFrame = pFlyFrame ? pFlyFrame : pFrame->IsFlyFrame() ? pFrame : pFrame->FindFlyFrame(); break; - + } case RECT_OUTTABSECTION_PRT: case RECT_OUTTABSECTION : if( pFrame->IsInTab() ) pFrame = pFrame->FindTabFrame(); |