summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/impex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/impex.cxx')
-rw-r--r--sc/source/ui/docshell/impex.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 0619425319be..1f3e733809cd 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -258,7 +258,7 @@ void ScImportExport::EndPaste(bool bAutoRowHeight)
ScDocumentUniquePtr pRedoDoc(new ScDocument( SCDOCMODE_UNDO ));
pRedoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() );
pDoc->CopyToDocument(aRange, InsertDeleteFlags::ALL | InsertDeleteFlags::NOCAPTIONS, false, *pRedoDoc);
- ScMarkData aDestMark;
+ ScMarkData aDestMark(pRedoDoc->MaxRow(), pRedoDoc->MaxCol());
aDestMark.SetMarkArea(aRange);
pDocSh->GetUndoManager()->AddUndoAction(
std::make_unique<ScUndoPaste>(pDocSh, aRange, aDestMark, std::move(pUndoDoc), std::move(pRedoDoc), InsertDeleteFlags::ALL, nullptr));
@@ -1935,7 +1935,7 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm )
pDoc->CheckLinkFormulaNeedingCheck(*xCode);
if ( ch == 'M' )
{
- ScMarkData aMark;
+ ScMarkData aMark(pDoc->MaxRow(), pDoc->MaxCol());
aMark.SelectTable( aPos.Tab(), true );
pDoc->InsertMatrixFormula( nCol, nRow, nRefCol,
nRefRow, aMark, EMPTY_OUSTRING, xCode.get() );