summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfun4.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/viewfun4.cxx')
-rw-r--r--sc/source/ui/view/viewfun4.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index cf1cd4656ed4..0778c2b5a710 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -142,7 +142,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
rDoc.CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, InsertDeleteFlags::ALL|InsertDeleteFlags::NOCAPTIONS, false, *pRedoDoc );
ScRange aMarkRange(nStartCol, nStartRow, nTab, nStartCol, nEndRow, nTab);
- ScMarkData aDestMark;
+ ScMarkData aDestMark(rDoc.MaxRow(), rDoc.MaxCol());
aDestMark.SetMarkArea( aMarkRange );
pDocSh->GetUndoManager()->AddUndoAction(
std::make_unique<ScUndoPaste>( pDocSh, aMarkRange, aDestMark,