summaryrefslogtreecommitdiff
path: root/sc/qa/unit/ucalc_copypaste.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/unit/ucalc_copypaste.cxx')
-rw-r--r--sc/qa/unit/ucalc_copypaste.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_copypaste.cxx b/sc/qa/unit/ucalc_copypaste.cxx
index bad57d8646a7..575cfb90f9f7 100644
--- a/sc/qa/unit/ucalc_copypaste.cxx
+++ b/sc/qa/unit/ucalc_copypaste.cxx
@@ -10752,6 +10752,23 @@ CPPUNIT_TEST_FIXTURE(TestCopyPaste, testUndoBackgroundColor)
m_pDoc->DeleteTab(0);
}
+CPPUNIT_TEST_FIXTURE(TestCopyPaste, testMergedHyperlink)
+{
+ m_pDoc->InsertTab(0, "Table1");
+ m_pDoc->InitDrawLayer(m_xDocShell.get());
+
+ ScFieldEditEngine& pEE = m_pDoc->GetEditEngine();
+ pEE.SetTextCurrentDefaults("https://libreoffice.org/");
+ m_pDoc->SetEditText(ScAddress(1, 0, 0), pEE.CreateTextObject()); // B1
+
+ m_pDoc->DoMergeContents(0, 0, 1, 0, 0); // A1:B1
+
+ CPPUNIT_ASSERT_EQUAL(CELLTYPE_EDIT, m_pDoc->GetCellType(ScAddress(0, 0, 0))); // A1
+ const EditTextObject* pEditObj = m_pDoc->GetEditText(ScAddress(0, 0, 0)); // A1
+ CPPUNIT_ASSERT(pEditObj);
+ CPPUNIT_ASSERT_EQUAL(OUString("https://libreoffice.org/"), pEditObj->GetText(0));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */