summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-05-24 09:30:01 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-05-24 10:57:41 +0200
commit27192c82ab143287327367d6165737086613021f (patch)
tree8bb9cd4beb55fe902f14b3c45174bf11e6dd1dc3 /sc
parent5ef0461b647dbb01a037459b39b47240abb85fca (diff)
tdf#134675: sc_uicalc: Add unittest
Change-Id: Ie76152ca1b1b80d60fcd891548c5eb4f32bcb40c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116033 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/uicalc/uicalc.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index e86bfbfa62a7..aa5d8b5fcd02 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -1566,6 +1566,36 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf123202)
CPPUNIT_ASSERT(pDoc->RowHidden(2, 0));
}
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf134675)
+{
+ mxComponent = loadFromDesktop("private:factory/scalc");
+ ScModelObj* pModelObj = dynamic_cast<ScModelObj*>(mxComponent.get());
+ CPPUNIT_ASSERT(pModelObj);
+ ScDocument* pDoc = pModelObj->GetDocument();
+ CPPUNIT_ASSERT(pDoc);
+ insertStringToCell(*pModelObj, "A1", "A");
+
+ // Select column A
+ goToCell("A:A");
+
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Select column B to Z
+ goToCell("B:Z");
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ for (size_t i = 1; i < 24; ++i)
+ {
+ // Without the fix in place, this test would have failed here with
+ // - Expected: A
+ // - Actual :
+ CPPUNIT_ASSERT_EQUAL(OUString("A"), pDoc->GetString(ScAddress(i, 0, 0)));
+ }
+}
+
CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf116215)
{
mxComponent = loadFromDesktop("private:factory/scalc");