Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
42901096
Kaydet (Commit)
42901096
authored
May 20, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make these stack variables & fix one memory leak with the undo object.
Change-Id: I1dd2bf0fc843394502119928c921913131c86f7e
üst
266e71c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
ucalc.cxx
sc/qa/unit/ucalc.cxx
+6
-9
No files found.
sc/qa/unit/ucalc.cxx
Dosyayı görüntüle @
42901096
...
...
@@ -5684,8 +5684,8 @@ void Test::testCopyPaste()
ScClipParam aClipParam(aRange, false);
ScMarkData aMark;
aMark.SetMarkArea(aRange);
ScDocument
* pClipDoc = new ScDocument
(SCDOCMODE_CLIP);
m_pDoc->CopyToClip(aClipParam,
p
ClipDoc, &aMark);
ScDocument
aClipDoc
(SCDOCMODE_CLIP);
m_pDoc->CopyToClip(aClipParam,
&a
ClipDoc, &aMark);
sal_uInt16 nFlags = IDF_ALL;
aRange = ScRange(0,1,1,2,1,1);//target: Sheet2.A2:C2
...
...
@@ -5694,9 +5694,9 @@ void Test::testCopyPaste()
ScMarkData aMarkData2;
aMarkData2.SetMarkArea(aRange);
ScRefUndoData* pRefUndoData= new ScRefUndoData(m_pDoc);
S
fxUndoAction* pUndo = new ScUndoPaste
(
S
cUndoPaste aUndo
(
&m_xDocShRef, ScRange(0, 1, 1, 2, 1, 1), aMarkData2, pUndoDoc, NULL, IDF_ALL, pRefUndoData, false);
m_pDoc->CopyFromClip(aRange, aMarkData2, nFlags, NULL,
p
ClipDoc);
m_pDoc->CopyFromClip(aRange, aMarkData2, nFlags, NULL,
&a
ClipDoc);
//check values after copying
OUString aString;
...
...
@@ -5718,13 +5718,13 @@ void Test::testCopyPaste()
//check undo and redo
pUndo->
Undo();
aUndo.
Undo();
m_pDoc->GetValue(1,1,1, aValue);
ASSERT_DOUBLES_EQUAL_MESSAGE("after undo formula should return nothing", aValue, 0);
aString = m_pDoc->GetString(2, 1, 1);
CPPUNIT_ASSERT_MESSAGE("after undo string should be removed", aString.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("")));
pUndo->
Redo();
aUndo.
Redo();
m_pDoc->GetValue(1,1,1, aValue);
ASSERT_DOUBLES_EQUAL_MESSAGE("formula should return 2 after redo", aValue, 2);
aString = m_pDoc->GetString(2, 1, 1);
...
...
@@ -5732,9 +5732,6 @@ void Test::testCopyPaste()
m_pDoc->GetFormula(1,1,1, aString);
CPPUNIT_ASSERT_MESSAGE("Formula should be correct again", aString == aFormulaString);
//clear all variables
delete pClipDoc;
delete pUndoDoc;
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment