diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-06-02 18:29:27 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-13 18:07:14 -0400 |
commit | 5c6ee09126631342939ae8766fe36083d8c011e3 (patch) | |
tree | 48081d36ae5000542adb49cc037267992f59ec66 /sc/source/ui/undo/undodat.cxx | |
parent | b5bb15013617c6b9f1cdd089acae0bfb7104fa3a (diff) |
fdo#81309: Adjust references during sort.
Change-Id: I2b98610f6b774400ecfaffe2905201c27fcab33f
Diffstat (limited to 'sc/source/ui/undo/undodat.cxx')
-rw-r--r-- | sc/source/ui/undo/undodat.cxx | 18 |
1 files changed, 2 insertions, 16 deletions
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, |