diff options
author | Michael Stahl <mst@openoffice.org> | 2010-11-25 14:31:08 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-11-25 14:31:08 +0100 |
commit | 3145216b7e60ac552669266e89acc92c09ce059f (patch) | |
tree | 209f2393c7b0216fcd9f29c8c75207cb5b86c3db /sw/source/ui/uiview/view2.cxx | |
parent | 89071dd67bb173a489a5286da21b7623dad8c6e5 (diff) |
unodapi: #i115383#: SwDoc:
remove the forwarding implementation of IDocumentUndoRedo from SwDoc.
instead call the UndoManager directly, via SwDoc::GetIDocumentUndoRedo().
Diffstat (limited to 'sw/source/ui/uiview/view2.cxx')
-rw-r--r-- | sw/source/ui/uiview/view2.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
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(); |