summaryrefslogtreecommitdiff
path: root/sc/qa/unit/ucalc.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-03-11 09:07:30 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-03-12 13:03:57 +0000
commitbfbb89a77e50d12f9b8cbab063804b023bdcf9fa (patch)
tree3f4114ef02c22e46e37d45b28589e06e76cd95d9 /sc/qa/unit/ucalc.cxx
parent0b2b3369fcc0c06fdb0a384518a4a799c4aed4f8 (diff)
fix memory leak in ucalc test
Change-Id: I5b0f12020eed953b73f1f1b2f867b33172073487 Reviewed-on: https://gerrit.libreoffice.org/23166 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/qa/unit/ucalc.cxx')
-rw-r--r--sc/qa/unit/ucalc.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index c78f321878c0..4e021653091b 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4701,14 +4701,14 @@ void Test::testCopyPasteFormulasExternalDoc()
ScClipParam aClipParam(aRange, false);
ScMarkData aMark;
aMark.SetMarkArea(aRange);
- ScDocument* pClipDoc = new ScDocument(SCDOCMODE_CLIP);
- m_pDoc->CopyToClip(aClipParam, pClipDoc, &aMark);
+ ScDocument aClipDoc(SCDOCMODE_CLIP);
+ m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark);
InsertDeleteFlags nFlags = InsertDeleteFlags::ALL;
aRange = ScRange(1,1,1,1,6,1);
ScMarkData aMarkData2;
aMarkData2.SetMarkArea(aRange);
- rExtDoc.CopyFromClip(aRange, aMarkData2, nFlags, nullptr, pClipDoc);
+ rExtDoc.CopyFromClip(aRange, aMarkData2, nFlags, nullptr, &aClipDoc);
OUString aFormula;
rExtDoc.GetFormula(1,1,1, aFormula);