[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sd/qa
GülÅah Köse (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 1 16:03:11 UTC 2020
sd/qa/unit/data/pptx/multicol.pptx |binary
sd/qa/unit/import-tests.cxx | 29 +++++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
New commits:
commit 6b6fc688ba334c4f08996b9a258018ef3912ae50
Author: Gülşah Köse <gulsah.kose at collabora.com>
AuthorDate: Tue Aug 11 00:43:49 2020 +0300
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Sep 1 18:02:37 2020 +0200
tdf#133015 Add test for multicolumn textboxes.
Change-Id: I92d6af17313fb5a4a27fc8768b8f3fbe64db1816
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100452
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose at collabora.com>
Signed-off-by: Xisco Fauli <xiscofauli at libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101751
diff --git a/sd/qa/unit/data/pptx/multicol.pptx b/sd/qa/unit/data/pptx/multicol.pptx
new file mode 100644
index 000000000000..3590d84c1a6b
Binary files /dev/null and b/sd/qa/unit/data/pptx/multicol.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 632872f40084..b285b490894b 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -145,6 +145,7 @@ public:
void testPredefinedTableStyle();
void testBnc591147();
void testCreationDate();
+ void testMultiColTexts();
void testBnc584721_1();
void testBnc584721_2();
void testBnc584721_4();
@@ -254,6 +255,7 @@ public:
CPPUNIT_TEST(testPredefinedTableStyle);
CPPUNIT_TEST(testBnc591147);
CPPUNIT_TEST(testCreationDate);
+ CPPUNIT_TEST(testMultiColTexts);
CPPUNIT_TEST(testBnc584721_1);
CPPUNIT_TEST(testBnc584721_2);
CPPUNIT_TEST(testBnc584721_4);
@@ -931,6 +933,33 @@ void SdImportTest::testCreationDate()
xDocShRef->DoClose();
}
+void SdImportTest::testMultiColTexts()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/multicol.pptx"), PPTX );
+ const SdrPage *pPage = GetPage( 1, xDocShRef );
+
+ sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
+ CPPUNIT_ASSERT( pTableObj );
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pTableObj->getRowCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pTableObj->getColumnCount());
+
+ sdr::table::SdrTableObj *pMasterTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->TRG_GetMasterPage().GetObj(0));
+ CPPUNIT_ASSERT( pMasterTableObj );
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMasterTableObj->getRowCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMasterTableObj->getColumnCount());
+
+ uno::Reference< table::XCellRange > xTable(pMasterTableObj->getTable(), uno::UNO_QUERY_THROW);
+ uno::Reference< beans::XPropertySet > xCell;
+ xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
+ uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, xCell));
+ uno::Reference<text::XTextRange> xRun( getRunFromParagraph (0, xParagraph ) );
+ OUString sText = xRun->getString();
+
+ CPPUNIT_ASSERT_EQUAL(OUString(""), sText); //We don't import master table text for multicolumn case.
+}
+
void SdImportTest::testPredefinedTableStyle()
{
// 073A0DAA-6AF3-43AB-8588-CEC1D06C72B9 (Medium Style 2)
More information about the Libreoffice-commits
mailing list