diff options
author | Carsten Driesner <cd@openoffice.org> | 2011-02-07 13:06:08 +0100 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2011-02-07 13:06:08 +0100 |
commit | a27e4b8ca5d84790c04a7351c4ea5ef004a0bbea (patch) | |
tree | e400e267e96a54f7c37896e7cdccca345b2616f0 /sw/source/core/doc/docdraw.cxx | |
parent | 4f65368101fde95f5bf97f114290b494a80ef051 (diff) | |
parent | 5b7dc4c9b5c1190edce19e568676270f315c31e6 (diff) |
removetooltypes01: Rebase to DEV300m99
Diffstat (limited to 'sw/source/core/doc/docdraw.cxx')
-rw-r--r-- | sw/source/core/doc/docdraw.cxx | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index e40e2a74b48b..051efd2b0948 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -27,6 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <hintids.hxx> #include <rtl/logfile.hxx> #include <vcl/outdev.hxx> @@ -49,12 +50,13 @@ #include <viewimp.hxx> #include <swhints.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <docsh.hxx> #include <rootfrm.hxx> //Damit der RootDtor gerufen wird. #include <poolfmt.hxx> #include <viewsh.hxx> // fuer MakeDrawView #include <drawdoc.hxx> -#include <undobj.hxx> +#include <UndoDraw.hxx> #include <swundo.hxx> // fuer die UndoIds #include <dcontact.hxx> #include <dview.hxx> @@ -227,7 +229,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView ) SwDrawContact *pMyContact = (SwDrawContact*)GetUserCall(pObj); const SwFmtAnchor aAnch( pMyContact->GetFmt()->GetAnchor() ); - SwUndoDrawGroup* pUndo = !DoesUndo() + SwUndoDrawGroup *const pUndo = (!GetIDocumentUndoRedo().DoesUndo()) ? 0 : new SwUndoDrawGroup( (sal_uInt16)rMrkList.GetMarkCount() ); @@ -303,14 +305,15 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView ) if( pUndo ) { pUndo->SetGroupFmt( pFmt ); - ClearRedo(); - AppendUndo( pUndo ); + GetIDocumentUndoRedo().AppendUndo( pUndo ); } } else { - if ( DoesUndo() ) - ClearRedo(); + if (GetIDocumentUndoRedo().DoesUndo()) + { + GetIDocumentUndoRedo().ClearRedo(); + } rDrawView.GroupMarked(); ASSERT( rMrkList.GetMarkCount() == 1, "GroupMarked more or none groups." ); @@ -322,9 +325,11 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView ) void SwDoc::UnGroupSelection( SdrView& rDrawView ) { - const int bUndo = DoesUndo(); + bool const bUndo = GetIDocumentUndoRedo().DoesUndo(); if( bUndo ) - ClearRedo(); + { + GetIDocumentUndoRedo().ClearRedo(); + } // OD 30.06.2003 #108784# - replace marked 'virtual' drawing objects by // the corresponding 'master' drawing objects. @@ -358,7 +363,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView ) if( bUndo ) { pUndo = new SwUndoDrawUnGroup( (SdrObjGroup*)pObj ); - AppendUndo( pUndo ); + GetIDocumentUndoRedo().AppendUndo(pUndo); } for ( sal_uInt16 i2 = 0; i2 < pLst->GetObjCount(); ++i2 ) @@ -403,7 +408,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView ) if( bUndo ) { pUndo = new SwUndoDrawUnGroupConnectToLayout(); - AppendUndo( pUndo ); + GetIDocumentUndoRedo().AppendUndo(pUndo); } while ( pFmtsAndObjs[i].size() > 0 ) @@ -442,7 +447,7 @@ sal_Bool SwDoc::DeleteSelection( SwDrawView& rDrawView ) const SdrMarkList &rMrkList = rDrawView.GetMarkedObjectList(); if( rMrkList.GetMarkCount() ) { - StartUndo(UNDO_EMPTY, NULL); + GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL); sal_uInt16 i; sal_Bool bDelMarked = sal_True; @@ -483,7 +488,9 @@ sal_Bool SwDoc::DeleteSelection( SwDrawView& rDrawView ) SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj(); if( !pObj->GetUpGroup() ) { - SwUndoDrawDelete* pUndo = !DoesUndo() ? 0 + SwUndoDrawDelete *const pUndo = + (!GetIDocumentUndoRedo().DoesUndo()) + ? 0 : new SwUndoDrawDelete( (sal_uInt16)rMrkList.GetMarkCount() ); //ContactObjekte vernichten, Formate sicherstellen. @@ -516,13 +523,15 @@ sal_Bool SwDoc::DeleteSelection( SwDrawView& rDrawView ) } if( pUndo ) - AppendUndo( pUndo ); + { + GetIDocumentUndoRedo().AppendUndo( pUndo ); + } } bCallBase = sal_True; } SetModified(); - EndUndo(UNDO_EMPTY, NULL); + GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL); } return bCallBase; @@ -625,7 +634,7 @@ void SwDoc::InitDrawModel() //Seite. pDrawModel = new SwDrawDocument( this ); - pDrawModel->EnableUndo( DoesUndo() ); + pDrawModel->EnableUndo( GetIDocumentUndoRedo().DoesUndo() ); String sLayerNm; sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("Hell" )); |