summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/flypos.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/flypos.cxx')
-rw-r--r--sw/source/core/layout/flypos.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx
index 8d3b517c2efc..83712d597a51 100644
--- a/sw/source/core/layout/flypos.cxx
+++ b/sw/source/core/layout/flypos.cxx
@@ -28,13 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "doc.hxx"
#include "node.hxx"
#include <docary.hxx>
-
-
#include <fmtanchr.hxx>
#include "flypos.hxx"
#include "frmfmt.hxx"
@@ -43,8 +39,7 @@
#include "flyfrm.hxx"
#include "dflyobj.hxx"
#include "ndindex.hxx"
-
-
+#include "switerator.hxx"
SV_IMPL_OP_PTRARR_SORT( SwPosFlyFrms, SwPosFlyFrmPtr )
@@ -52,28 +47,33 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrmFmt* pFmt,
sal_uInt16 nArrPos )
: pFrmFmt( pFmt ), pNdIdx( (SwNodeIndex*) &rIdx )
{
- sal_Bool bFnd = sal_False;
+ bool bFnd = false;
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
if (FLY_AT_PAGE == rAnchor.GetAnchorId())
{
pNdIdx = new SwNodeIndex( rIdx );
}
- else if( pFmt->GetDoc()->GetRootFrm() )
+ else if( pFmt->GetDoc()->GetCurrentViewShell() ) //swmod 071108//swmod 071225
{
- SwClientIter aIter( (SwFmt&)*pFmt );
if( RES_FLYFRMFMT == pFmt->Which() )
{
// Schauen, ob es ein SdrObject dafuer gibt
- if( aIter.First( TYPE( SwFlyFrm) ) )
- nOrdNum = ((SwFlyFrm*)aIter())->GetVirtDrawObj()->GetOrdNum(),
- bFnd = sal_True;
+ SwFlyFrm* pFly = SwIterator<SwFlyFrm,SwFmt>::FirstElement(*pFmt);
+ if( pFly )
+ {
+ nOrdNum = pFly->GetVirtDrawObj()->GetOrdNum();
+ bFnd = true;
+ }
}
else if( RES_DRAWFRMFMT == pFmt->Which() )
{
// Schauen, ob es ein SdrObject dafuer gibt
- if( aIter.First( TYPE(SwDrawContact) ) )
- nOrdNum = ((SwDrawContact*)aIter())->GetMaster()->GetOrdNum(),
- bFnd = sal_True;
+ SwDrawContact* pContact = SwIterator<SwDrawContact,SwFmt>::FirstElement(*pFmt);
+ if( pContact )
+ {
+ nOrdNum = pContact->GetMaster()->GetOrdNum();
+ bFnd = true;
+ }
}
}