[Libreoffice-commits] core.git: sc/source
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 15 11:43:44 UTC 2019
sc/source/core/data/document.cxx | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
New commits:
commit f28b5586a7af4456bc087318961c46ad727af324
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Mon May 13 18:20:01 2019 +0530
Commit: Dennis Francis <dennis.francis at collabora.com>
CommitDate: Wed May 15 13:42:22 2019 +0200
tdf#114245 : Let both ScDocument::CopyToDocument()...
methods use delayed-grouping introduced in commit
169a1b542165f3444791fd6e672d56d3fe48bd66
avoid possible expensive repetitive formula group changes (tdf#102364)
The drag-drop move takes around 6-7 seconds now.
Change-Id: I0916719ffca2072b7cf86b4f99518316cfdd99fa
Reviewed-on: https://gerrit.libreoffice.org/72338
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
Tested-by: Jenkins
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index b2843303a2ad..4e74fc8dbf56 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2063,25 +2063,10 @@ void ScDocument::CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
InsertDeleteFlags nFlags, bool bOnlyMarked, ScDocument& rDestDoc,
const ScMarkData* pMarks, bool bColRowFlags )
{
- PutInOrder( nCol1, nCol2 );
- PutInOrder( nRow1, nRow2 );
- PutInOrder( nTab1, nTab2 );
- if (rDestDoc.aDocName.isEmpty())
- rDestDoc.aDocName = aDocName;
if (ValidTab(nTab1) && ValidTab(nTab2))
{
- sc::CopyToDocContext aCxt(rDestDoc);
- bool bOldAutoCalc = rDestDoc.GetAutoCalc();
- rDestDoc.SetAutoCalc( false ); // avoid multiple calculations
- SCTAB nMinSizeBothTabs = static_cast<SCTAB>(std::min(maTabs.size(), rDestDoc.maTabs.size()));
- for (SCTAB i = nTab1; i <= nTab2 && i < nMinSizeBothTabs; i++)
- {
- if (maTabs[i] && rDestDoc.maTabs[i])
- maTabs[i]->CopyToTable(aCxt, nCol1, nRow1, nCol2, nRow2, nFlags,
- bOnlyMarked, rDestDoc.maTabs[i].get(), pMarks,
- false, bColRowFlags, /*bGlobalNamesToLocal*/false, /*bCopyCaptions*/true );
- }
- rDestDoc.SetAutoCalc(bOldAutoCalc);
+ ScRange aThisRange(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
+ CopyToDocument(aThisRange, nFlags, bOnlyMarked, rDestDoc, pMarks, bColRowFlags);
}
}
More information about the Libreoffice-commits
mailing list