summaryrefslogtreecommitdiff
path: root/sc/source/ui/dataprovider/dataprovider.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/dataprovider/dataprovider.cxx')
-rw-r--r--sc/source/ui/dataprovider/dataprovider.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/dataprovider/dataprovider.cxx b/sc/source/ui/dataprovider/dataprovider.cxx
index 34b4631c8614..e75fb326a64c 100644
--- a/sc/source/ui/dataprovider/dataprovider.cxx
+++ b/sc/source/ui/dataprovider/dataprovider.cxx
@@ -237,7 +237,7 @@ void ScDBDataManager::WriteToDoc(ScDocument& rDoc)
SCROW nRowSize = std::min<SCROW>(aDestRange.aEnd.Row() - aDestRange.aStart.Row(), nEndRow);
aDestRange.aEnd.SetRow(aDestRange.aStart.Row() + nRowSize);
- ScMarkData aMark;
+ ScMarkData aMark(mpDoc->MaxRow(), mpDoc->MaxCol());
aMark.SelectTable(0, true);
mpDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::CONTENTS, nullptr, &rDoc);
ScDocShell* pDocShell = static_cast<ScDocShell*>(mpDoc->GetDocumentShell());