summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2018-07-12 21:01:35 +0100
committerMichael Meeks <michael.meeks@collabora.com>2018-07-13 10:28:12 +0200
commitfdef3ecc1ddef7adcf51df465048613b7b3e4ae6 (patch)
tree894b4fc80ba897718506108fc855899d8b35a753
parentd3387b38fe0eea3fb7ac630c026f02986e8dafc4 (diff)
tdf#118620 - unit test.
Change-Id: Iae7d2f5cc1ed5b37d6b7ced983951a64e2114c2b Reviewed-on: https://gerrit.libreoffice.org/57369 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--sc/qa/unit/ucalc.cxx18
-rw-r--r--sc/qa/unit/ucalc.hxx2
2 files changed, 20 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 826f846279f2..9605b9094cff 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -441,6 +442,23 @@ void Test::testInput()
m_pDoc->DeleteTab(0);
}
+void Test::testColumnIterator() // tdf#118620
+{
+ CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
+ m_pDoc->InsertTab (0, "foo"));
+
+ m_pDoc->SetString(0, 0, 0, "'10.5");
+ m_pDoc->SetString(0, MAXROW-5, 0, "42.0");
+ std::unique_ptr<sc::ColumnIterator> it = m_pDoc->GetColumnIterator(0, 0, MAXROW - 10, MAXROW);
+ while (it->hasCell())
+ {
+ it->getCell();
+ it->next();
+ }
+
+ m_pDoc->DeleteTab(0);
+}
+
void Test::testDocStatistics()
{
SCTAB nStartTabs = m_pDoc->GetTableCount();
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 03305a8ad74e..a81a452c494c 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -117,6 +117,7 @@ public:
void testRangeList();
void testMarkData();
void testInput();
+ void testColumnIterator();
void testDocStatistics();
void testRowForHeight();
@@ -557,6 +558,7 @@ public:
CPPUNIT_TEST(testRangeList);
CPPUNIT_TEST(testMarkData);
CPPUNIT_TEST(testInput);
+ CPPUNIT_TEST(testColumnIterator);
CPPUNIT_TEST(testDocStatistics);
CPPUNIT_TEST(testRowForHeight);
CPPUNIT_TEST(testDataEntries);