[Libreoffice-commits] core.git: sc/qa
Markus Mohrhard
markus.mohrhard at googlemail.com
Sat Mar 12 13:43:03 UTC 2016
sc/qa/unit/ucalc.cxx | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit baa938b44d1067f81a9dad772e1d15eb48fd12e6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Mar 11 09:46:19 2016 +0100
fix memory leak in ucalc
Change-Id: Iad38472638438eb52e9e46be0a284adbb8ccb689
Reviewed-on: https://gerrit.libreoffice.org/23169
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 4e02165..d97e92f 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -3441,15 +3441,14 @@ void Test::testCopyPasteTranspose()
ScDocument aNewClipDoc(SCDOCMODE_CLIP);
copyToClip(m_pDoc, aSrcRange, &aNewClipDoc);
- ::std::unique_ptr<ScDocument> pTransClip;
- pTransClip.reset(new ScDocument(SCDOCMODE_CLIP));
+ ::std::unique_ptr<ScDocument> pTransClip(new ScDocument(SCDOCMODE_CLIP));
aNewClipDoc.TransposeClip(pTransClip.get(), InsertDeleteFlags::ALL, false);
- ScDocument* pTransposedClip = pTransClip.release();
ScRange aDestRange = ScRange(3,1,1,3,3,1);//target: Sheet2.D2:D4
ScMarkData aMark;
aMark.SetMarkArea(aDestRange);
- m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::ALL, nullptr, pTransposedClip);
+ m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::ALL, nullptr, pTransClip.get());
+ pTransClip.reset();
//check cell content after transposed copy/paste
OUString aString = m_pDoc->GetString(3, 3, 1);
More information about the Libreoffice-commits
mailing list