summaryrefslogtreecommitdiff
path: root/sw/source/core/layout
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout')
-rw-r--r--sw/source/core/layout/atrfrm.cxx13
-rw-r--r--sw/source/core/layout/flycnt.cxx8
-rw-r--r--sw/source/core/layout/laycache.cxx3
-rw-r--r--sw/source/core/layout/trvlfrm.cxx7
4 files changed, 13 insertions, 18 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 9a1a2906866b..e56c34c4bff1 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -78,6 +78,7 @@
#include <tgrditem.hxx>
#include <hfspacingitem.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pagefrm.hxx>
#include <rootfrm.hxx>
#include <cntfrm.hxx>
@@ -106,9 +107,7 @@
#include <cmdid.h>
#include <unomid.h>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <svx/svdundo.hxx> // #111827#
// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
@@ -218,7 +217,7 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt )
// <--
//Wenn in einem der Nodes noch ein Crsr angemeldet ist, muss das
//ParkCrsr einer (beliebigen) Shell gerufen werden.
- pNode = pDoc->GetNodes()[ aIdx ];
+ pNode = & aIdx.GetNode();
sal_uInt32 nEnd = pNode->EndOfSectionIndex();
while ( aIdx < nEnd )
{
@@ -237,21 +236,17 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt )
} while ( aIter++ );
}
aIdx++;
- pNode = pDoc->GetNodes()[ aIdx ];
+ pNode = & aIdx.GetNode();
}
}
rCnt.SetNewCntntIdx( (const SwNodeIndex*)0 );
// beim Loeschen von Header/Footer-Formaten IMMER das Undo
// abschalten! (Bug 31069)
- sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( sal_False );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
ASSERT( pNode, "Ein grosses Problem." );
pDoc->DeleteSection( pNode );
-
- if( bDoesUndo )
- pDoc->DoUndo( sal_True );
}
delete pFmt;
}
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 6a2621beaaa9..aa0661f126b3 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -27,13 +27,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <tools/bigint.hxx>
#include "pagefrm.hxx"
#include "rootfrm.hxx"
#include "cntfrm.hxx"
#include "flyfrm.hxx"
#include "txtfrm.hxx"
-#include "doc.hxx"
+#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include "viewsh.hxx"
#include "viewimp.hxx"
#include "pam.hxx"
@@ -1370,7 +1372,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
nX = rNew.X() - pFrm->Frm().Left() - nBaseOfstForFly;
}
}
- GetFmt()->GetDoc()->StartUndo( UNDO_START, NULL );
+ GetFmt()->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
if( pCnt != GetAnchorFrm() || ( IsAutoPos() && pCnt->IsTxtFrm() &&
GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE)) )
@@ -1421,7 +1423,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
const Point aRelPos = bVert ? Point( -nY, nX ) : Point( nX, nY );
ChgRelPos( aRelPos );
- GetFmt()->GetDoc()->EndUndo( UNDO_END, NULL );
+ GetFmt()->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
if ( pOldPage != FindPageFrm() )
::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE,
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index c8a6a5b3d5ef..bab2154bc7a9 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -491,8 +491,7 @@ SwActualSection::SwActualSection( SwActualSection *pUp,
if ( !pSectNode )
{
const SwNodeIndex *pIndex = pSect->GetFmt()->GetCntnt().GetCntntIdx();
- pSectNode = pSect->GetFmt()->GetDoc()->GetNodes()[*pIndex]->
- FindSectionNode();
+ pSectNode = pIndex->GetNode().FindSectionNode();
}
}
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 4606d1de5b14..c295e6d4542c 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -892,7 +892,7 @@ sal_Bool SwCntntFrm::UnitDown( SwPaM* pPam, const SwTwips, sal_Bool bInReadOnly
sal_uInt16 SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
{
ASSERT( pActualCrsr, "Welche Seite soll's denn sein?" );
- const SwFrm *pActFrm = GetFmt()->GetDoc()->GetNodes()[pActualCrsr->GetPoint()->nNode]->
+ SwFrm const*const pActFrm = pActualCrsr->GetPoint()->nNode.GetNode().
GetCntntNode()->GetFrm( 0,
pActualCrsr->GetPoint(),
sal_False );
@@ -2011,7 +2011,6 @@ inline void Sub( SwRegionRects& rRegion, const SwRect& rRect )
void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
{
- const SwNodes &rNds = GetFmt()->GetDoc()->GetNodes();
SwPosition *pStartPos = rCrsr.Start(),
*pEndPos = rCrsr.GetPoint() == pStartPos ?
rCrsr.GetMark() : rCrsr.GetPoint();
@@ -2047,10 +2046,10 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
//Erstmal die CntntFrms zum Start und End besorgen, die brauch ich auf
//jedenfall.
- const SwCntntFrm *pStartFrm = rNds[ pStartPos->nNode ]->
+ SwCntntFrm const* pStartFrm = pStartPos->nNode.GetNode().
GetCntntNode()->GetFrm( &rCrsr.GetSttPos(), pStartPos );
- const SwCntntFrm *pEndFrm = rNds[ pEndPos->nNode ]->
+ SwCntntFrm const* pEndFrm = pEndPos->nNode.GetNode().
GetCntntNode()->GetFrm( &rCrsr.GetEndPos(), pEndPos );
ASSERT( (pStartFrm && pEndFrm), "Keine CntntFrms gefunden." );