summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-11-23 21:32:01 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2011-11-23 21:32:39 -0500
commitc4a3e29626126658cfb9e8755e9f98cfc4500abd (patch)
tree62e43375d404ead20f6e04e0642608e95d7bda60 /sc/source/ui/undo
parent71fc346874fb5482a355a9beed691187cea86a1f (diff)
Reducing header dependency on markdata.hxx.
Diffstat (limited to 'sc/source/ui/undo')
-rw-r--r--sc/source/ui/undo/undodat.cxx9
-rw-r--r--sc/source/ui/undo/undotab.cxx7
-rw-r--r--sc/source/ui/undo/undoutil.cxx1
3 files changed, 10 insertions, 7 deletions
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 2f3edf7e927c..da3617b623e5 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -56,6 +56,7 @@
#include "sc.hrc"
#include "chgtrack.hxx" // Amelia Wang
#include "refundo.hxx" // Amelia Wang
+#include "markdata.hxx"
// -----------------------------------------------------------------------
@@ -2030,7 +2031,7 @@ ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell,
void* /*pFill1*/, void* /*pFill2*/, void* /*pFill3*/,
sal_Bool bRedoIsFilled ) :
ScBlockUndo( pNewDocShell, ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), SC_UNDO_SIMPLE ),
- aMarkData( rMark ),
+ mpMarkData(new ScMarkData(rMark)),
pUndoDoc( pNewUndoDoc ),
pRedoDoc( pNewRedoDoc ),
nFlags( nNewFlags ),
@@ -2042,8 +2043,8 @@ ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell,
// don't have to be changed and branched for 641.
// They can be removed later.
- if ( !aMarkData.IsMarked() ) // no cell marked:
- aMarkData.SetMarkArea( aBlockRange ); // mark paste block
+ if (!mpMarkData->IsMarked()) // no cell marked:
+ mpMarkData->SetMarkArea(aBlockRange); // mark paste block
if ( pRefUndoData )
pRefUndoData->DeleteUnchanged( pDocShell->GetDocument() );
@@ -2136,7 +2137,7 @@ void ScUndoDataForm::DoChange( const sal_Bool bUndo )
sal_Bool bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
- pRedoDoc->InitUndoSelected( pDoc, aMarkData, bColInfo, bRowInfo );
+ pRedoDoc->InitUndoSelected( pDoc, *mpMarkData, bColInfo, bRowInfo );
}
// read "redo" data from the document in the first undo
// all sheets - CopyToDocument skips those that don't exist in pRedoDoc
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 0dc6c48d1d18..ae60b01e118f 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -50,6 +50,7 @@
#include "tabprotection.hxx"
#include "viewdata.hxx"
#include "progress.hxx"
+#include "markdata.hxx"
// for ScUndoRenameObject - might me moved to another file later
#include <svx/svditer.hxx>
@@ -857,13 +858,13 @@ ScUndoMakeScenario::ScUndoMakeScenario( ScDocShell* pNewDocShell,
const Color& rCol, sal_uInt16 nF,
const ScMarkData& rMark ) :
ScSimpleUndo( pNewDocShell ),
+ mpMarkData(new ScMarkData(rMark)),
nSrcTab( nSrc ),
nDestTab( nDest ),
aName( rN ),
aComment( rC ),
aColor( rCol ),
nFlags( nF ),
- aMarkData( rMark ),
pDrawUndo( NULL )
{
pDrawUndo = GetSdrUndoAction( pDocShell->GetDocument() );
@@ -906,14 +907,14 @@ void ScUndoMakeScenario::Undo()
void ScUndoMakeScenario::Redo()
{
- SetViewMarkData( aMarkData );
+ SetViewMarkData(*mpMarkData);
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
pDocShell->SetInUndo( sal_True );
bDrawIsInUndo = sal_True;
- pDocShell->MakeScenario( nSrcTab, aName, aComment, aColor, nFlags, aMarkData, false );
+ pDocShell->MakeScenario( nSrcTab, aName, aComment, aColor, nFlags, *mpMarkData, false );
bDrawIsInUndo = false;
pDocShell->SetInUndo( false );
diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx
index e453c0ab9b67..a1fcc23b8cde 100644
--- a/sc/source/ui/undo/undoutil.cxx
+++ b/sc/source/ui/undo/undoutil.cxx
@@ -44,6 +44,7 @@
#include "globstr.hrc"
#include "globalnames.hxx"
#include "global.hxx"
+#include "markdata.hxx"
void ScUndoUtil::MarkSimpleBlock( ScDocShell* pDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,