[Libreoffice-commits] core.git: sc/qa
Markus Mohrhard
markus.mohrhard at googlemail.com
Sat Mar 12 13:04:24 UTC 2016
sc/qa/unit/ucalc.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit bfbb89a77e50d12f9b8cbab063804b023bdcf9fa
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Mar 11 09:07:30 2016 +0100
fix memory leak in ucalc test
Change-Id: I5b0f12020eed953b73f1f1b2f867b33172073487
Reviewed-on: https://gerrit.libreoffice.org/23166
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index c78f321..4e02165 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);
More information about the Libreoffice-commits
mailing list