summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/atrfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/atrfrm.cxx')
-rw-r--r--sw/source/core/layout/atrfrm.cxx40
1 files changed, 35 insertions, 5 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index a1ad57fad5..3118e73c14 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2727,10 +2727,23 @@ void SwFlyFrmFmt::MakeFrms()
//die Suche vom StartNode zum FrameFormat sein.
SwNodeIndex aIdx( aAnchorAttr.GetCntntAnchor()->nNode );
SwCntntNode *pCNd = GetDoc()->GetNodes().GoNext( &aIdx );
- SwClientIter aIter( *pCNd );
- if ( aIter.First( TYPE(SwFrm) ) )
- pModify = pCNd;
- else
+ // --> OD 2009-12-28 #i105535#
+ if ( pCNd == 0 )
+ {
+ pCNd = aAnchorAttr.GetCntntAnchor()->nNode.GetNode().GetCntntNode();
+ }
+ if ( pCNd )
+ // <--
+ {
+ SwClientIter aIter( *pCNd );
+ if ( aIter.First( TYPE(SwFrm) ) )
+ {
+ pModify = pCNd;
+ }
+ }
+ // --> OD 2009-12-28 #i105535#
+ if ( pModify == 0 )
+ // <--
{
const SwNodeIndex &rIdx = aAnchorAttr.GetCntntAnchor()->nNode;
SwSpzFrmFmts& rFmts = *GetDoc()->GetSpzFrmFmts();
@@ -2802,7 +2815,24 @@ void SwFlyFrmFmt::MakeFrms()
!((SwCntntFrm*)pFrm)->IsFollow();
if ( FLY_AT_FLY == aAnchorAttr.GetAnchorId() && !pFrm->IsFlyFrm() )
- pFrm = pFrm->FindFlyFrm();
+ {
+ // --> OD 2009-12-28 #i105535#
+ // fallback to anchor type at-paragraph, if no fly frame is found.
+// pFrm = pFrm->FindFlyFrm();
+ SwFrm* pFlyFrm = pFrm->FindFlyFrm();
+ if ( pFlyFrm )
+ {
+ pFrm = pFlyFrm;
+ }
+ else
+ {
+ aAnchorAttr.SetType( FLY_AT_PARA );
+ SetFmtAttr( aAnchorAttr );
+ MakeFrms();
+ return;
+ }
+ // <--
+ }
if( pFrm->GetDrawObjs() )
{