diff options
Diffstat (limited to 'sw/source/ui/uiview')
-rw-r--r-- | sw/source/ui/uiview/view.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/uiview/view2.cxx | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index b1fd76c63aff..1b3858fbda2d 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -75,12 +75,12 @@ #include <beziersh.hxx> #include <globdoc.hxx> #include <scroll.hxx> -#include <globdoc.hxx> #include <navipi.hxx> #include <gloshdl.hxx> #include <usrpref.hxx> #include <srcview.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <drawdoc.hxx> #include <wdocsh.hxx> #include <wview.hxx> @@ -1021,7 +1021,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) // so setze das Modified NICHT zurueck. // --> OD 2005-02-11 #i38810# - no reset of modified state, if document // was already modified. - if ( !pWrtShell->GetDoc()->IsUndoNoResetModified() && + if (!pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() && ( !pFirst || pFirst == pVFrame ) && !bIsDocModified ) // <-- diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index eeab95b5bccd..7ef9d587af48 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -86,6 +86,7 @@ #include <uivwimp.hxx> #include <docsh.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <wrtsh.hxx> #include <viewopt.hxx> #include <basesh.hxx> @@ -2105,10 +2106,11 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion ) } else { - sal_Bool bUndo = pDoc->DoesUndo(); - pDoc->DoUndo( sal_False ); + bool const bUndo = + pDoc->GetIDocumentUndoRedo().DoesUndo(); + pDoc->GetIDocumentUndoRedo().DoUndo(false); nErrno = pDocSh->InsertFrom( *pMedium ) ? 0 : ERR_SWG_READ_ERROR; - pDoc->DoUndo( bUndo ); + pDoc->GetIDocumentUndoRedo().DoUndo(bUndo); } } @@ -2125,7 +2127,9 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion ) { // Disable Undo for .sdw (136991) or // if the number of page styles with header/footer has changed (#i67305) if( !pRead || nUndoCheck != lcl_PageDescWithHeader( *pDoc ) ) - pDoc->DelAllUndoObj(); + { + pDoc->GetIDocumentUndoRedo().DelAllUndoObj(); + } } pWrtShell->EndAllAction(); |