diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-04-22 11:22:05 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-04-22 15:52:11 +0200 |
commit | 310f2ec225582df8701422e7c69ee40e1af50660 (patch) | |
tree | ded7afa081be1aa05fd75b22c895834faf30a286 /sc | |
parent | 384f946b12a5c19719f527ff9a20e7125bcf7b22 (diff) |
tdf#141816: sc_uicalc: Add unittest
Change-Id: Ieef4cc320067dae96b11610e544f9eb7260f8f5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114471
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rwxr-xr-x | sc/qa/unit/uicalc/uicalc.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx index 9ada6b120354..c756a75065a5 100755 --- a/sc/qa/unit/uicalc/uicalc.cxx +++ b/sc/qa/unit/uicalc/uicalc.cxx @@ -18,6 +18,7 @@ #include <comphelper/propertysequence.hxx> #include <com/sun/star/awt/Key.hpp> #include <com/sun/star/frame/Desktop.hpp> +#include <com/sun/star/text/XTextRange.hpp> #include <conditio.hxx> #include <dbfunc.hxx> #include <document.hxx> @@ -742,6 +743,13 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf119793) // - Actual : 5084 CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4984), xShape->getPosition().X); CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1381), xShape->getPosition().Y); + + // tdf#141816: Without the fix in place, this test would have failed with + // - Expected: + // - Actual : x + uno::Reference<text::XText> xText + = uno::Reference<text::XTextRange>(xShape, uno::UNO_QUERY_THROW)->getText(); + CPPUNIT_ASSERT_EQUAL(OUString(""), xText->getString()); } CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf131455) |