summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authornd101 <Fong@nd.com.cn>2019-09-02 10:29:12 +0800
committerXisco FaulĂ­ <xiscofauli@libreoffice.org>2019-12-06 22:41:35 +0100
commit6e873fd94a192f503fd1aff205bdfb5ad465c7ef (patch)
tree76faea5f4cce4be680f9591af3c8c847d63158c1 /sd
parentf74e51bff52a29bea359243bcb741ed32149282c (diff)
tdf#127237 fix table background color in Impress import
When the background color is set at the table level in PPTX, instead of at cell level, the background color fails to show up in Impress. Change-Id: I2838e5b56e4a2414494ee99c0f8975b7256ac6dc Reviewed-on: https://gerrit.libreoffice.org/78377 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 4c2254cbebca53c34fa48a1dd90cebe434f24274) Reviewed-on: https://gerrit.libreoffice.org/84644 Reviewed-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf127237.pptxbin0 -> 34180 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx22
2 files changed, 22 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf127237.pptx b/sd/qa/unit/data/pptx/tdf127237.pptx
new file mode 100644
index 000000000000..f63423cd47e8
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf127237.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 79b18b7cb914..769bf6e52456 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -55,6 +55,7 @@ class SdOOXMLExportTest1 : public SdModelTestBaseXML
{
public:
void testFdo90607();
+ void testTdf127237();
void testBnc870233_1();
void testBnc870233_2();
void testN828390_4();
@@ -93,6 +94,7 @@ public:
CPPUNIT_TEST_SUITE(SdOOXMLExportTest1);
CPPUNIT_TEST(testFdo90607);
+ CPPUNIT_TEST(testTdf127237);
CPPUNIT_TEST(testBnc870233_1);
CPPUNIT_TEST(testBnc870233_2);
CPPUNIT_TEST(testN828390_4);
@@ -180,6 +182,26 @@ void checkFontAttributes( const SdrTextObj* pObj, ItemValue nVal)
}
+void SdOOXMLExportTest1::testTdf127237()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf127237.pptx"), PPTX );
+ xDocShRef = saveAndReload(xDocShRef.get(), ODP);
+
+ const SdrPage* pPage = GetPage(1, xDocShRef);
+ CPPUNIT_ASSERT(pPage != nullptr);
+
+ sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
+ CPPUNIT_ASSERT(pTableObj != nullptr);
+ uno::Reference< table::XCellRange > xTable(pTableObj->getTable(), uno::UNO_QUERY_THROW);
+
+ sal_Int32 nFillColor = 0;
+ uno::Reference< beans::XPropertySet > xCell(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
+ xCell->getPropertyValue("FillColor") >>= nFillColor;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0x0070C0), nFillColor);
+
+ xDocShRef->DoClose();
+}
+
void SdOOXMLExportTest1::testBnc870233_1()
{
::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc870233_1.pptx"), PPTX);