summaryrefslogtreecommitdiff
path: root/sw/source/ui/app
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/app')
-rw-r--r--sw/source/ui/app/apphdl.cxx8
-rw-r--r--sw/source/ui/app/docsh.cxx6
-rw-r--r--sw/source/ui/app/docsh2.cxx23
-rw-r--r--sw/source/ui/app/docst.cxx18
-rw-r--r--sw/source/ui/app/docstyle.cxx21
5 files changed, 38 insertions, 38 deletions
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 653208aaf250..84fe6705212a 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -27,6 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <tools/urlobj.hxx>
@@ -71,9 +72,7 @@
#include <srcview.hxx>
#include <wrtsh.hxx>
#include <docsh.hxx>
-#ifndef _CMDID_H
#include <cmdid.h> // Funktion-Ids
-#endif
#include <initui.hxx>
#include <uitool.hxx>
#include <swmodule.hxx>
@@ -83,13 +82,12 @@
#include <gloslst.hxx> // SwGlossaryList
#include <glosdoc.hxx> // SwGlossaryList
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <cfgitems.hxx>
#include <prtopt.hxx>
#include <modcfg.hxx>
#include <globals.h> // globale Konstanten z.B.
-#ifndef _APP_HRC
#include <app.hrc>
-#endif
#include <fontcfg.hxx>
#include <barcfg.hxx>
#include <uinums.hxx>
@@ -813,7 +811,7 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
SwDocShell* pDocShell = (SwDocShell*)SfxObjectShell::GetFirst(&aType);
while( pDocShell )
{
- pDocShell->GetDoc()->DoUndo( bUndo );
+ pDocShell->GetDoc()->GetIDocumentUndoRedo().DoUndo(bUndo);
pDocShell = (SwDocShell*)SfxObjectShell::GetNext(*pDocShell, &aType);
}
}
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 9508c4c17864..be28c23064fc 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -81,6 +81,7 @@
#include <shellio.hxx> // I/O
#include <docstyle.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docstat.hxx>
#include <pagedesc.hxx>
#include <pview.hxx>
@@ -508,7 +509,8 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
// Modified-Flag merken und erhalten ohne den Link zu Callen
// (fuer OLE; nach Anweisung von MM)
BOOL bIsModified = pDoc->IsModified();
- SwUndoNoModifiedPosition aOldPos = pDoc->getUndoNoModifiedPosition();
+ SwUndoNoModifiedPosition const aOldPos =
+ pDoc->GetIDocumentUndoRedo().getUndoNoModifiedPosition();
Link aOldOLELnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
@@ -535,7 +537,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
if( bIsModified )
{
pDoc->SetModified();
- pDoc->setUndoNoModifiedPosition( aOldPos );
+ pDoc->GetIDocumentUndoRedo().setUndoNoModifiedPosition(aOldPos);
}
pDoc->SetOle2Link( aOldOLELnk );
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 5bbc29aab2ee..c386ccaf552e 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -44,9 +44,7 @@
#include <svl/zformat.hxx>
#include <unotools/pathoptions.hxx>
#include <svtools/transfer.hxx>
-#ifndef _SFXSIDS_HRC //autogen
#include <sfx2/dialogs.hrc>
-#endif
#include <sfx2/dinfdlg.hxx>
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
@@ -57,9 +55,7 @@
#include <svtools/sfxecode.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
#include <svx/drawitem.hxx>
#include <editeng/svxacorr.hxx>
#include <editeng/langitem.hxx>
@@ -86,6 +82,7 @@
#include <redlndlg.hxx>
#include <docstyle.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pagedesc.hxx>
#include <shellio.hxx>
#include <pview.hxx>
@@ -103,15 +100,9 @@
#include <cmdid.h>
#include <globals.h>
#include <helpid.h>
-#ifndef _APP_HRC
#include <app.hrc>
-#endif
-#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
@@ -342,8 +333,8 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// --> OD 2005-05-10 #i48949# - actions aren't undoable. Thus, allow no undo
// actions
// Note: The undo action stack is cleared at the end of this method.
- bool bDoesUndo( GetDoc()->DoesUndo() );
- GetDoc()->DoUndo( sal_False );
+ bool const bDoesUndo( GetDoc()->GetIDocumentUndoRedo().DoesUndo() );
+ GetDoc()->GetIDocumentUndoRedo().DoUndo(false);
// <--
BOOL bRet = FALSE;
@@ -544,9 +535,9 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// the document node array. Thus, clear the undo action stack.
if ( bDoesUndo )
{
- GetDoc()->DelAllUndoObj();
+ GetDoc()->GetIDocumentUndoRedo().DelAllUndoObj();
}
- GetDoc()->DoUndo( bDoesUndo );
+ GetDoc()->GetIDocumentUndoRedo().DoUndo(bDoesUndo);
// <--
return bRet;
@@ -1637,7 +1628,9 @@ void SwDocShell::SetModified( BOOL bSet )
BOOL bOld = pDoc->IsModified();
pDoc->SetModified();
if( !bOld )
- pDoc->SetUndoNoResetModified();
+ {
+ pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+ }
}
else
pDoc->ResetModified();
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index d06ab31b7478..0871be898729 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -27,6 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -62,7 +63,8 @@
#include "cmdid.h"
#include "globals.hrc"
#include "viewopt.hxx"
-#include "doc.hxx"
+#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include "swstyle.h"
#include "frmfmt.hxx"
#include "charfmt.hxx"
@@ -751,7 +753,9 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
pDoc->SetModified();
if( !bModified ) // Bug 57028
- pDoc->SetUndoNoResetModified();
+ {
+ pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+ }
GetWrtShell()->EndAllAction();
}
@@ -762,7 +766,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
// #116530#
//pBasePool->Erase( &aTmp );
GetWrtShell()->Undo(UNDO_EMPTY, 1);
- pDoc->ClearRedo();
+ pDoc->GetIDocumentUndoRedo().ClearRedo();
}
if( !bModified )
@@ -814,7 +818,9 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
pDoc->SetModified();
if( !bModified ) // Bug 57028
- pDoc->SetUndoNoResetModified();
+ {
+ pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+ }
GetWrtShell()->EndAllAction();
}
@@ -1200,7 +1206,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
rDest.SetPoolHlpFileId( nHFId );
// werden Kopf-/Fusszeilen angelegt, so gibt es kein Undo mehr!
- pCurrWrtShell->GetDoc()->DelAllUndoObj();
+ pCurrWrtShell->GetDoc()->GetIDocumentUndoRedo().DelAllUndoObj();
pCurrWrtShell->EndAllAction();
}
@@ -1274,7 +1280,7 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocu
{
// die View wird spaeter angelegt, ueberschreibt aber das
// Modify-Flag. Per Undo ist sowieso nichts mehr zu machen
- pDoc->SetUndoNoResetModified();
+ pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
}
}
}
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index b0b81c5df6e4..1ae3e2c3518c 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -54,6 +54,7 @@
#include <docary.hxx>
#include <ccoll.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <cmdid.h>
#include <swstyle.h>
#include <app.hrc>
@@ -844,11 +845,11 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
String aOldName(aPageDesc.GetName());
aPageDesc.SetName( rStr );
- BOOL bDoesUndo = rDoc.DoesUndo();
+ bool const bDoesUndo = rDoc.GetIDocumentUndoRedo().DoesUndo();
- rDoc.DoUndo(aOldName.Len() > 0);
+ rDoc.GetIDocumentUndoRedo().DoUndo(aOldName.Len() > 0);
rDoc.ChgPageDesc(aOldName, aPageDesc);
- rDoc.DoUndo(bDoesUndo);
+ rDoc.GetIDocumentUndoRedo().DoUndo(bDoesUndo);
// <- #116530#
rDoc.SetModified();
@@ -1140,11 +1141,11 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
ASSERT( &rSet != &aCoreSet, "SetItemSet mit eigenem Set ist nicht erlaubt" );
// --> OD 2008-02-12 #newlistlevelattrs#
- if ( rDoc.DoesUndo() )
+ if (rDoc.GetIDocumentUndoRedo().DoesUndo())
{
SwRewriter aRewriter;
aRewriter.AddRule( UNDO_ARG1, GetName() );
- rDoc.StartUndo( UNDO_INSFMTATTR, &aRewriter );
+ rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_INSFMTATTR, &aRewriter );
}
// <--
@@ -1310,10 +1311,10 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
pNewDsc = new SwPageDesc( *pDesc );
// --> OD 2005-05-09 #i48949# - no undo actions for the
// copy of the page style
- const sal_Bool bDoesUndo( rDoc.DoesUndo() );
- rDoc.DoUndo( sal_False );
+ bool const bUndo(rDoc.GetIDocumentUndoRedo().DoesUndo());
+ rDoc.GetIDocumentUndoRedo().DoUndo(false);
rDoc.CopyPageDesc(*pDesc, *pNewDsc); // #i7983#
- rDoc.DoUndo( bDoesUndo );
+ rDoc.GetIDocumentUndoRedo().DoUndo(bUndo);
// <--
pFmt = &pNewDsc->GetMaster();
@@ -1409,9 +1410,9 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
}
// --> OD 2008-02-12 #newlistlevelattrs#
- if ( rDoc.DoesUndo() )
+ if (rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- rDoc.EndUndo( UNDO_INSFMTATTR, NULL );
+ rDoc.GetIDocumentUndoRedo().EndUndo( UNDO_INSFMTATTR, NULL );
}
// <--
}