summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-03-09 22:38:57 +0100
committerHenry Castro <hcastro@collabora.com>2017-05-03 13:37:05 -0400
commitab2d5675fa5e40d15de597024b5dbb771ef9b24f (patch)
tree41d9ea8c0c27983d9506784550f6c6e35cbeb432
parentaacb7e3029dd7a1f4baed2234388f66b41001018 (diff)
it's raining drawing layersprivate/hcvcastro/undo-row-comment
Change-Id: Ieee5cb5792535185ef09c3775072ed739fb0e4b0
-rw-r--r--sc/qa/unit/ucalc.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index df6061d15f99..6d4eb3e86603 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -724,6 +724,9 @@ void Test::testCopyToDocument()
{
CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet", m_pDoc->InsertTab (0, "src"));
+ // We need a drawing layer in order to create caption objects.
+ m_pDoc->InitDrawLayer(&getDocShell());
+
m_pDoc->SetString(0, 0, 0, "Header");
m_pDoc->SetString(0, 1, 0, "1");
m_pDoc->SetString(0, 2, 0, "2");
@@ -1934,6 +1937,9 @@ void Test::testSheetCopy()
CPPUNIT_ASSERT_EQUAL_MESSAGE("document should have one sheet to begin with.",
static_cast<SCTAB>(1), m_pDoc->GetTableCount());
+ // We need a drawing layer in order to create caption objects.
+ m_pDoc->InitDrawLayer(&getDocShell());
+
// Insert text in A1.
m_pDoc->SetString(ScAddress(0,0,0), "copy me");
@@ -5062,6 +5068,9 @@ void Test::testNoteDeleteCol()
ScDocument& rDoc = getDocShell().GetDocument();
rDoc.InsertTab(0, "Sheet1");
+ // We need a drawing layer in order to create caption objects.
+ m_pDoc->InitDrawLayer(&getDocShell());
+
ScAddress rAddr(1, 1, 0);
ScPostIt* pNote = m_pDoc->GetOrCreateNote(rAddr);
pNote->SetText(rAddr, "Hello");
@@ -5286,6 +5295,9 @@ void Test::testAreasWithNotes()
ScDocument& rDoc = getDocShell().GetDocument();
rDoc.InsertTab(0, "Sheet1");
+ // We need a drawing layer in order to create caption objects.
+ m_pDoc->InitDrawLayer(&getDocShell());
+
ScAddress rAddr(1, 5, 0);
ScPostIt* pNote = m_pDoc->GetOrCreateNote(rAddr);
pNote->SetText(rAddr, "Hello");
@@ -6085,6 +6097,9 @@ void Test::testSetStringAndNote()
{
m_pDoc->InsertTab(0, "Test");
+ // We need a drawing layer in order to create caption objects.
+ m_pDoc->InitDrawLayer(&getDocShell());
+
//note on A1
ScAddress aAdrA1 (0, 0, 0);
ScPostIt* pNote = m_pDoc->GetOrCreateNote(aAdrA1);