summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/atrftn.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/txtnode/atrftn.cxx')
-rw-r--r--sw/source/core/txtnode/atrftn.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx
index 5a4888da552e..1135936b8d34 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -47,15 +47,12 @@
#include <ndindex.hxx>
#include <fmtftntx.hxx>
#include <section.hxx>
+#include <switerator.hxx>
/*************************************************************************
|*
|* class SwFmtFtn
|*
-|* Beschreibung
-|* Ersterstellung JP 09.08.94
-|* Letzte Aenderung JP 08.08.94
-|*
*************************************************************************/
@@ -92,7 +89,7 @@ void SwFmtFtn::SetEndNote( bool b )
{
if ( GetTxtFtn() )
{
- GetTxtFtn()->DelFrms();
+ GetTxtFtn()->DelFrms(0);
}
m_bEndNote = b;
}
@@ -238,7 +235,7 @@ void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, sal_Bool bDelNode )
// Werden die Nodes nicht geloescht mussen sie bei den Seiten
// abmeldet (Frms loeschen) werden, denn sonst bleiben sie
// stehen (Undo loescht sie nicht!)
- DelFrms();
+ DelFrms( 0 );
}
DELETEZ( m_pStartNode );
@@ -272,7 +269,7 @@ void SwTxtFtn::SetNumber( const sal_uInt16 nNewNum, const XubString* pStr )
ASSERT( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
SwNodes &rNodes = m_pTxtNode->GetDoc()->GetNodes();
- m_pTxtNode->Modify( 0, &rFtn );
+ m_pTxtNode->ModifyNotification( 0, &rFtn );
if ( m_pStartNode )
{
// must iterate over all TxtNodes because of footnotes on other pages
@@ -283,7 +280,7 @@ void SwTxtFtn::SetNumber( const sal_uInt16 nNewNum, const XubString* pStr )
{
// Es koennen ja auch Grafiken in der Fussnote stehen ...
if( ( pNd = rNodes[ nSttIdx ] )->IsTxtNode() )
- ((SwTxtNode*)pNd)->Modify( 0, &rFtn );
+ ((SwTxtNode*)pNd)->ModifyNotification( 0, &rFtn );
}
}
}
@@ -362,19 +359,21 @@ void SwTxtFtn::MakeNewTextSection( SwNodes& rNodes )
}
-void SwTxtFtn::DelFrms()
+void SwTxtFtn::DelFrms( const SwFrm* pSib )
{
// delete the FtnFrames from the pages
ASSERT( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
if ( !m_pTxtNode )
return;
+ const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : 0;
sal_Bool bFrmFnd = sal_False;
{
- SwClientIter aIter( *m_pTxtNode );
- for( SwCntntFrm* pFnd = (SwCntntFrm*)aIter.First( TYPE( SwCntntFrm ));
- pFnd; pFnd = (SwCntntFrm*)aIter.Next() )
+ SwIterator<SwCntntFrm,SwTxtNode> aIter( *m_pTxtNode );
+ for( SwCntntFrm* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() )
{
+ if( pRoot != pFnd->getRootFrm() && pRoot )
+ continue;
SwPageFrm* pPage = pFnd->FindPageFrm();
if( pPage )
{
@@ -391,10 +390,11 @@ void SwTxtFtn::DelFrms()
SwCntntNode* pCNd = m_pTxtNode->GetNodes().GoNext( &aIdx );
if( pCNd )
{
- SwClientIter aIter( *pCNd );
- for( SwCntntFrm* pFnd = (SwCntntFrm*)aIter.First( TYPE( SwCntntFrm ));
- pFnd; pFnd = (SwCntntFrm*)aIter.Next() )
+ SwIterator<SwCntntFrm,SwCntntNode> aIter( *pCNd );
+ for( SwCntntFrm* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() )
{
+ if( pRoot != pFnd->getRootFrm() && pRoot )
+ continue;
SwPageFrm* pPage = pFnd->FindPageFrm();
SwFrm *pFrm = pFnd->GetUpper();