From 5c6ee09126631342939ae8766fe36083d8c011e3 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 2 Jun 2014 18:29:27 -0400 Subject: fdo#81309: Adjust references during sort. Change-Id: I2b98610f6b774400ecfaffe2905201c27fcab33f --- sc/source/ui/undo/undodat.cxx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'sc/source/ui/undo/undodat.cxx') diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx index b6bc5d614a33..d0a7c809faa8 100644 --- a/sc/source/ui/undo/undodat.cxx +++ b/sc/source/ui/undo/undodat.cxx @@ -739,21 +739,14 @@ bool ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const ScUndoSort::ScUndoSort( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScSortParam& rParam, - ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB, - const ScRange* pDest ) : + ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB ) : ScDBFuncUndo( pNewDocShell, ScRange( rParam.nCol1, rParam.nRow1, nNewTab, rParam.nCol2, rParam.nRow2, nNewTab ) ), nTab( nNewTab ), aSortParam( rParam ), pUndoDoc( pNewUndoDoc ), - pUndoDB( pNewUndoDB ), - bDestArea( false ) + pUndoDB( pNewUndoDB ) { - if ( pDest ) - { - bDestArea = true; - aDestRange = *pDest; - } } ScUndoSort::~ScUndoSort() @@ -796,13 +789,6 @@ void ScUndoSort::Undo() pUndoDoc->CopyToDocument( nStartCol, nStartRow, nSortTab, nEndCol, nEndRow, nSortTab, IDF_ALL|IDF_NOCAPTIONS, false, &rDoc ); - if (bDestArea) - { - // do not delete/copy note captions, they are handled in drawing undo (ScDBFuncUndo::mpDrawUndo) - rDoc.DeleteAreaTab( aDestRange, IDF_ALL|IDF_NOCAPTIONS ); - pUndoDoc->CopyToDocument( aDestRange, IDF_ALL|IDF_NOCAPTIONS, false, &rDoc ); - } - // Row heights always (due to automatic adjustment) // TODO change to use ScBlockUndo pUndoDoc->CopyToDocument( 0, nStartRow, nSortTab, MAXCOL, nEndRow, nSortTab, -- cgit v1.2.1