From 29a5692bcf22f27a87959b87065e6c65b59ae886 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sat, 10 Jan 2015 13:38:01 +0100 Subject: add test for fdo#88200 Change-Id: Icb6d782a4a3aa91e05c6466edb3d84c5dfc08f08 --- sc/qa/unit/ucalc.cxx | 17 +++++++++++++++++ sc/qa/unit/ucalc.hxx | 2 ++ 2 files changed, 19 insertions(+) (limited to 'sc') diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 093ec5304b73..e5cb0508a546 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -6241,6 +6241,23 @@ void Test::testMixData() m_pDoc->DeleteTab(0); } +void Test::testSetStringAndNote() +{ + m_pDoc->InsertTab(0, "Test"); + + //note on A1 + ScAddress aAdrA1 (0, 0, 0); + ScPostIt* pNote = m_pDoc->GetOrCreateNote(aAdrA1); + pNote->SetText(aAdrA1, "Hello world in A1"); + + m_pDoc->SetString(0, 0, 0, ""); + + pNote = m_pDoc->GetNote(aAdrA1); + CPPUNIT_ASSERT(pNote); + + m_pDoc->DeleteTab(0); +} + ScDocShell* Test::findLoadedDocShellByName(const OUString& rName) { TypeId aType(TYPE(ScDocShell)); diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx index 013ac2691882..6f6af6b729cb 100644 --- a/sc/qa/unit/ucalc.hxx +++ b/sc/qa/unit/ucalc.hxx @@ -420,6 +420,7 @@ public: void testFormulaToValue2(); void testColumnFindEditCells(); + void testSetStringAndNote(); CPPUNIT_TEST_SUITE(Test); #if CALC_TEST_PERF @@ -621,6 +622,7 @@ public: CPPUNIT_TEST(testFormulaToValue); CPPUNIT_TEST(testFormulaToValue2); CPPUNIT_TEST(testColumnFindEditCells); + CPPUNIT_TEST(testSetStringAndNote); CPPUNIT_TEST_SUITE_END(); private: -- cgit