summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-11-17 17:05:35 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-11-17 19:39:40 +0100
commit432f94c9453c21d888556eec96f9904efe142f90 (patch)
treeb078cea7a299215a71fd3f0b82c466ffdfd131d3 /sc
parent0aa61812a87ac466bea4b35cba75a4e986be8c7f (diff)
CppunitTest_sc_parallelism: remove duplicated code
those methods are already in ScSimpleBootstrapFixture Change-Id: I06f3c9f8a45d8d801759cba2812e96b34065065b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142895 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/parallelism.cxx44
1 files changed, 0 insertions, 44 deletions
diff --git a/sc/qa/unit/parallelism.cxx b/sc/qa/unit/parallelism.cxx
index eea2afa4b70a..ee148f822410 100644
--- a/sc/qa/unit/parallelism.cxx
+++ b/sc/qa/unit/parallelism.cxx
@@ -72,9 +72,6 @@ private:
bool getThreadingFlag() const;
void setThreadingFlag(bool bSet);
- static ScUndoCut* cutToClip(ScDocShell& rDocSh, const ScRange& rRange, ScDocument* pClipDoc, bool bCreateUndo);
- static void pasteFromClip(ScDocument* pDestDoc, const ScRange& rDestRange, ScDocument* pClipDoc);
-
bool m_bThreadingFlagCfg;
};
@@ -90,47 +87,6 @@ void ScParallelismTest::setThreadingFlag( bool bSet )
xBatch->commit();
}
-ScUndoCut* ScParallelismTest::cutToClip(ScDocShell& rDocSh, const ScRange& rRange, ScDocument* pClipDoc, bool bCreateUndo)
-{
- ScDocument* pSrcDoc = &rDocSh.GetDocument();
-
- ScClipParam aClipParam(rRange, true);
- ScMarkData aMark(pSrcDoc->GetSheetLimits());
- aMark.SetMarkArea(rRange);
- pSrcDoc->CopyToClip(aClipParam, pClipDoc, &aMark, false, false);
-
- // Taken from ScViewFunc::CutToClip()
- ScDocumentUniquePtr pUndoDoc;
- if (bCreateUndo)
- {
- pUndoDoc.reset(new ScDocument( SCDOCMODE_UNDO ));
- pUndoDoc->InitUndoSelected( *pSrcDoc, aMark );
- // all sheets - CopyToDocument skips those that don't exist in pUndoDoc
- ScRange aCopyRange = rRange;
- aCopyRange.aStart.SetTab(0);
- aCopyRange.aEnd.SetTab(pSrcDoc->GetTableCount()-1);
- pSrcDoc->CopyToDocument( aCopyRange,
- (InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS) | InsertDeleteFlags::NOCAPTIONS,
- false, *pUndoDoc );
- }
-
- aMark.MarkToMulti();
- pSrcDoc->DeleteSelection( InsertDeleteFlags::ALL, aMark );
- aMark.MarkToSimple();
-
- if (pUndoDoc)
- return new ScUndoCut( &rDocSh, rRange, rRange.aEnd, aMark, std::move(pUndoDoc) );
-
- return nullptr;
-}
-
-void ScParallelismTest::pasteFromClip(ScDocument* pDestDoc, const ScRange& rDestRange, ScDocument* pClipDoc)
-{
- ScMarkData aMark(pDestDoc->GetSheetLimits());
- aMark.SetMarkArea(rDestRange);
- pDestDoc->CopyFromClip(rDestRange, aMark, InsertDeleteFlags::ALL, nullptr, pClipDoc);
-}
-
void ScParallelismTest::setUp()
{
ScSimpleBootstrapFixture::setUp();