summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-07-31 09:07:25 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-07-31 09:08:10 -0400
commitc5bbfb3935c86d862acd3b5cd0643a474206ed1d (patch)
treebac92beb7190622395b420bc7cc46c60db6a8ea2
parent27182231acd3a0c9898a8dba78b76dc8a827b4c0 (diff)
fdo#78555: Oopsy.
Change-Id: I969973b2d8165d7ff7a46e6b7e60ad07e58bfdee
-rw-r--r--sc/source/ui/docshell/docfunc.cxx28
1 files changed, 4 insertions, 24 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index ff276352f019..6e8dcf532f1f 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2664,8 +2664,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
// ausfuehren
ScDocument* pUndoDoc = NULL;
- ScDocument* pRefUndoDoc = NULL;
- ScRefUndoData* pUndoData = NULL;
+
if (bRecord)
{
bool bWholeCols = ( nStartRow == 0 && nEndRow == MAXROW );
@@ -2679,8 +2678,6 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
{
rDoc.CopyToDocument( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab,
nUndoFlags, false, pUndoDoc );
-// pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO );
-// pRefUndoDoc->InitUndo( &rDoc, 0, nTabCount-1, false, false );
}
if ( nDestTab != nStartTab )
@@ -2688,9 +2685,6 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
rDoc.CopyToDocument( nDestCol, nDestRow, nDestTab,
nDestEndCol, nDestEndRow, nDestEndTab,
nUndoFlags, false, pUndoDoc );
-
-// pUndoData = new ScRefUndoData( &rDoc );
-
rDoc.BeginDrawUndo();
}
@@ -2712,7 +2706,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
nUndoEndCol,nUndoEndRow,nDestEndTab,
HASATTR_MERGED | HASATTR_OVERLAPPED ))
{
- rDoc.CopyFromClip( rSource, aSourceMark, IDF_ALL, pRefUndoDoc, pClipDoc );
+ rDoc.CopyFromClip( rSource, aSourceMark, IDF_ALL, NULL, pClipDoc );
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
{
SCCOL nTmpEndCol = nEndCol;
@@ -2725,8 +2719,6 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
rDocShell.ErrorMessage(STR_MSSG_MOVEBLOCKTO_0);
delete pUndoDoc;
- delete pRefUndoDoc;
- delete pUndoData;
delete pClipDoc;
return false;
}
@@ -2762,28 +2754,16 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
clipdoc does not contain a drawing layer.*/
if ( pClipDoc->GetDrawLayer() )
rDoc.CopyFromClip( aPasteDest, aDestMark, IDF_OBJECTS,
- pRefUndoDoc, pClipDoc, true, false, bIncludeFiltered );
+ NULL, pClipDoc, true, false, bIncludeFiltered );
if (bRecord)
{
- if (pRefUndoDoc)
- {
- // alle Tabellen anlegen, damit Formeln kopiert werden koennen:
- pUndoDoc->AddUndoTab( 0, nTabCount-1, false, false );
-
- pRefUndoDoc->DeleteArea( nDestCol, nDestRow, nDestEndCol, nDestEndRow, aSourceMark, IDF_ALL );
- // kopieren mit bColRowFlags=sal_False (#54194#)
- pRefUndoDoc->CopyToDocument( 0, 0, 0, MAXCOL, MAXROW, MAXTAB,
- IDF_FORMULA, false, pUndoDoc, NULL, false );
- delete pRefUndoDoc;
- }
-
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoDragDrop( &rDocShell, ScRange(
nStartCol, nStartRow, nStartTab,
nOldEndCol, nOldEndRow, nEndTab ),
ScAddress( nDestCol, nDestRow, nDestTab ),
- bCut, pUndoDoc, pUndoData, bScenariosAdded ) );
+ bCut, pUndoDoc, NULL, bScenariosAdded ) );
}
SCCOL nDestPaintEndCol = nDestEndCol;