diff options
Diffstat (limited to 'sd/qa/unit/export-tests-ooxml2.cxx')
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index c6d2f48aedde..553262385796 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -92,6 +92,7 @@ public: void testTdf119015(); void testTdf123090(); void testTdf126324(); + void testTdf132472(); void testTdf80224(); void testExportTransitionsPPTX(); void testPresetShapesExport(); @@ -208,6 +209,7 @@ public: CPPUNIT_TEST(testTdf119015); CPPUNIT_TEST(testTdf123090); CPPUNIT_TEST(testTdf126324); + CPPUNIT_TEST(testTdf132472); CPPUNIT_TEST(testTdf80224); CPPUNIT_TEST(testExportTransitionsPPTX); CPPUNIT_TEST(testPresetShapesExport); @@ -570,6 +572,35 @@ void SdOOXMLExportTest2::testTdf126324() xDocShRef->DoClose(); } +void SdOOXMLExportTest2::testTdf132472() +{ + sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf132472.pptx"), PPTX ); + const SdrPage *pPage = GetPage( 1, xDocShRef ); + + sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0)); + CPPUNIT_ASSERT( pTableObj ); + + uno::Reference< table::XCellRange > xTable(pTableObj->getTable(), uno::UNO_QUERY_THROW); + uno::Reference< beans::XPropertySet > xCell; + Color nColor; + + xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW); + xCell->getPropertyValue("FillColor") >>= nColor; + CPPUNIT_ASSERT_EQUAL(Color(0x729fcf), nColor); + + uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, xCell)); + uno::Reference<text::XTextRange> xRun(getRunFromParagraph(0, xParagraph)); + uno::Reference<beans::XPropertySet> xPropSet(xRun, uno::UNO_QUERY); + xPropSet->getPropertyValue("CharColor") >>= nColor; + + // Without the fix in place, this test would have failed with + // - Expected: Color: R:0 G:0 B:0 A:0 + // - Actual : Color: R:255 G:255 B:255 A:0 + CPPUNIT_ASSERT_EQUAL(COL_BLACK, nColor); + + xDocShRef->DoClose(); +} + void SdOOXMLExportTest2::testTdf80224() { ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf80224.odp"), ODP); |