summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-04-22 14:10:57 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-04-22 16:28:17 +0200
commit54f7c32beca5a9c99d7316dc38818edad55f7415 (patch)
tree7c0f532206739f856ca81fba8db7d5352eb03783 /sd
parent7d4506f89eba5c6b4edf1590c87e90d478fd179b (diff)
tdf#132472: do not set text color when table style is 'Themed-Style-2'
and it has no Accent Regression from 2c3f7d4ee0a0b2bf6efc41670645bd361f1b76ef < tdf#107604 Handle predefined table styles. > Change-Id: Id9ab5b20825e2eaf8cc138c108608fe446f33db4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114477 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf132472.pptxbin0 -> 33439 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx31
2 files changed, 31 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf132472.pptx b/sd/qa/unit/data/pptx/tdf132472.pptx
new file mode 100644
index 000000000000..e7873dcd5090
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf132472.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 64b44c559b6c..d3ec0063f9d2 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -97,6 +97,7 @@ public:
void testTdf123090();
void testTdf126324();
void testTdf119187();
+ void testTdf132472();
void testTdf80224();
void testExportTransitionsPPTX();
void testPresetShapesExport();
@@ -224,6 +225,7 @@ public:
CPPUNIT_TEST(testTdf123090);
CPPUNIT_TEST(testTdf126324);
CPPUNIT_TEST(testTdf119187);
+ CPPUNIT_TEST(testTdf132472);
CPPUNIT_TEST(testTdf80224);
CPPUNIT_TEST(testExportTransitionsPPTX);
CPPUNIT_TEST(testPresetShapesExport);
@@ -648,6 +650,35 @@ void SdOOXMLExportTest2::testTdf119187()
}
}
+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(u"/sd/qa/unit/data/odp/tdf80224.odp"), ODP);