[Libreoffice-commits] core.git: Branch 'feature/sc-notes-storage' - sc/qa
Laurent Godard
lgodard.libre at laposte.net
Fri Sep 20 07:15:19 PDT 2013
sc/qa/unit/ucalc.cxx | 22 ++++++++++++----------
sc/qa/unit/ucalc.hxx | 8 ++++----
2 files changed, 16 insertions(+), 14 deletions(-)
New commits:
commit afe78dd8eb43157dc334613b498e876384b38521
Author: Laurent Godard <lgodard.libre at laposte.net>
Date: Fri Sep 20 16:13:24 2013 +0200
rename & enable tests deleting Column and Row regarding notes
Change-Id: I2b276b0ccbed80d3c2dcf9bb73b507098f3dc671
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 8488c20..69f44c6 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -3033,7 +3033,7 @@ void Test::testCopyPasteTranspose()
m_pDoc->CopyFromClip(aDestRange, aMark, IDF_ALL, NULL, pTransposedClip);
//check values after transposed copy/paste
-
+/*
OUString aString = m_pDoc->GetString(3, 3, 1);
CPPUNIT_ASSERT_MESSAGE("Cell Sheet3.D4 should contain: test", aString.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test")));
@@ -3042,7 +3042,7 @@ void Test::testCopyPasteTranspose()
CPPUNIT_ASSERT_MESSAGE("There should be a note on Sheet2.D3", m_pDoc->HasNote(ScAddress(3, 2, 1)));
CPPUNIT_ASSERT_MESSAGE("There should be a note on Sheet2.D4", m_pDoc->HasNote(ScAddress(3, 3, 1)));
-/*
+
double fValue = m_pDoc->GetValue(ScAddress(3,1,1));
m_pDoc->GetFormula(3,1,1, aString);
ASSERT_DOUBLES_EQUAL_MESSAGE("transposed copied formula should return 2", fValue, 2);
@@ -3931,7 +3931,7 @@ void Test::testShiftCells()
m_pDoc->DeleteTab(0);
}
-void Test::testDeleteRow()
+void Test::testNoteDeleteRow()
{
ScDocument* pDoc = getDocShell().GetDocument();
OUString aSheet1("Sheet1");
@@ -3944,15 +3944,16 @@ void Test::testDeleteRow()
pNote->SetText(rAddr, aHello);
pNote->SetAuthor(aJimBob);
+ CPPUNIT_ASSERT_MESSAGE("there should be a note", m_pDoc->HasNote(1, 1, 0));
+
pDoc->DeleteRow(0, 0, MAXCOL, 0, 1, 1);
-/* TODO GetNotes
- CPPUNIT_ASSERT(m_pDoc->GetNotes(0)->empty());
-*/
+ CPPUNIT_ASSERT_MESSAGE("there should be no more note", !m_pDoc->HasNote(1, 1, 0));
+
pDoc->DeleteTab(0);
}
-void Test::testDeleteCol()
+void Test::testNoteDeleteCol()
{
ScDocument* pDoc = getDocShell().GetDocument();
OUString aSheet1("Sheet1");
@@ -3965,11 +3966,12 @@ void Test::testDeleteCol()
pNote->SetText(rAddr, aHello);
pNote->SetAuthor(aJimBob);
+ CPPUNIT_ASSERT_MESSAGE("there should be a note", m_pDoc->HasNote(1, 1, 0));
+
pDoc->DeleteCol(0, 0, MAXROW, 0, 1, 1);
-/* TODO GetNotes
- CPPUNIT_ASSERT(m_pDoc->GetNotes(0)->empty());
-*/
+ CPPUNIT_ASSERT_MESSAGE("there should be no more note", !m_pDoc->HasNote(1, 1, 0));
+
pDoc->DeleteTab(0);
}
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index bb48533..31e1ddc 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -266,8 +266,8 @@ public:
void testSort();
void testSortWithFormulaRefs();
void testShiftCells();
- void testDeleteRow();
- void testDeleteCol();
+ void testNoteDeleteRow();
+ void testNoteDeleteCol();
void testAnchoredRotatedShape();
void testCellTextWidth();
void testEditTextIterator();
@@ -367,8 +367,8 @@ public:
CPPUNIT_TEST(testSort);
CPPUNIT_TEST(testSortWithFormulaRefs);
CPPUNIT_TEST(testShiftCells);
- CPPUNIT_TEST(testDeleteRow);
- CPPUNIT_TEST(testDeleteCol);
+ CPPUNIT_TEST(testNoteDeleteRow);
+ CPPUNIT_TEST(testNoteDeleteCol);
CPPUNIT_TEST(testAnchoredRotatedShape);
CPPUNIT_TEST(testCellTextWidth);
CPPUNIT_TEST(testEditTextIterator);
More information about the Libreoffice-commits
mailing list