diff options
Diffstat (limited to 'sw/source/core/edit/edatmisc.cxx')
-rw-r--r-- | sw/source/core/edit/edatmisc.cxx | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx index 6fda3a164c32..386814eda008 100644 --- a/sw/source/core/edit/edatmisc.cxx +++ b/sw/source/core/edit/edatmisc.cxx @@ -28,9 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <editsh.hxx> #include <doc.hxx> // fuer aNodes +#include <IDocumentUndoRedo.hxx> #include <pam.hxx> // fuer SwPaM #include <edimp.hxx> // fuer MACROS #include <swundo.hxx> // fuer die UndoIds @@ -47,9 +47,11 @@ void SwEditShell::ResetAttr( const SvUShortsSort* pAttrs ) { SET_CURR_SHELL( this ); StartAllAction(); - BOOL bUndoGroup = GetCrsr()->GetNext() != GetCrsr(); + sal_Bool bUndoGroup = GetCrsr()->GetNext() != GetCrsr(); if( bUndoGroup ) - GetDoc()->StartUndo(UNDO_RESETATTR, NULL); + { + GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_RESETATTR, NULL); + } FOREACHPAM_START(this) // if ( PCURCRSR->HasMark() ) @@ -57,7 +59,9 @@ void SwEditShell::ResetAttr( const SvUShortsSort* pAttrs ) FOREACHPAM_END() if( bUndoGroup ) - GetDoc()->EndUndo(UNDO_RESETATTR, NULL); + { + GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_RESETATTR, NULL); + } CallChgLnk(); EndAllAction(); } @@ -71,12 +75,14 @@ void SwEditShell::GCAttr() // Sonst Probleme im MouseBut.DownHdl - Bug 35562 // StartAllAction(); FOREACHPAM_START(this) - SwTxtNode *pTxtNode; if ( !PCURCRSR->HasMark() ) { - if( 0 != (pTxtNode = GetDoc()->GetNodes()[ - PCURCRSR->GetPoint()->nNode]->GetTxtNode())) + SwTxtNode *const pTxtNode = + PCURCRSR->GetPoint()->nNode.GetNode().GetTxtNode(); + if (pTxtNode) + { pTxtNode->GCAttr(); + } } else { @@ -118,22 +124,22 @@ void SwEditShell::SetDefault( const SfxItemSet& rSet ) // Erfrage das Default Attribut in diesem Dokument. -const SfxPoolItem& SwEditShell::GetDefault( USHORT nFmtHint ) const +const SfxPoolItem& SwEditShell::GetDefault( sal_uInt16 nFmtHint ) const { return GetDoc()->GetDefault( nFmtHint ); } -void SwEditShell::SetAttr( const SfxPoolItem& rHint, USHORT nFlags ) +void SwEditShell::SetAttr( const SfxPoolItem& rHint, sal_uInt16 nFlags ) { SET_CURR_SHELL( this ); StartAllAction(); SwPaM* pCrsr = GetCrsr(); if( pCrsr->GetNext() != pCrsr ) // Ring von Cursorn { - BOOL bIsTblMode = IsTableMode(); - GetDoc()->StartUndo(UNDO_INSATTR, NULL); + sal_Bool bIsTblMode = IsTableMode(); + GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL); FOREACHPAM_START(this) if( PCURCRSR->HasMark() && ( bIsTblMode || @@ -143,7 +149,7 @@ void SwEditShell::SetAttr( const SfxPoolItem& rHint, USHORT nFlags ) } FOREACHPAM_END() - GetDoc()->EndUndo(UNDO_INSATTR, NULL); + GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, NULL); } else { @@ -155,15 +161,15 @@ void SwEditShell::SetAttr( const SfxPoolItem& rHint, USHORT nFlags ) } -void SwEditShell::SetAttr( const SfxItemSet& rSet, USHORT nFlags ) +void SwEditShell::SetAttr( const SfxItemSet& rSet, sal_uInt16 nFlags ) { SET_CURR_SHELL( this ); StartAllAction(); SwPaM* pCrsr = GetCrsr(); if( pCrsr->GetNext() != pCrsr ) // Ring von Cursorn { - BOOL bIsTblMode = IsTableMode(); - GetDoc()->StartUndo(UNDO_INSATTR, NULL); + sal_Bool bIsTblMode = IsTableMode(); + GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL); FOREACHPAM_START(this) if( PCURCRSR->HasMark() && ( bIsTblMode || @@ -173,7 +179,7 @@ void SwEditShell::SetAttr( const SfxItemSet& rSet, USHORT nFlags ) } FOREACHPAM_END() - GetDoc()->EndUndo(UNDO_INSATTR, NULL); + GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, NULL); } else { |