diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2021-12-14 14:44:15 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2022-01-03 13:41:41 +0100 |
commit | 4574a1ea408c2ac30042dca32d02207ec7add4da (patch) | |
tree | 968c3acb4ae910a8a4b82804c2d656922775876f /sd/qa/unit/import-tests.cxx | |
parent | 87db920b141fe9846cbd1b37fff3a9806a9b5c2d (diff) |
tdf#146223 PPTX import: fix master objects visible property
Master objects were always visible after the import, which
could change the background of the slides.
Change-Id: Idc5260718f2916e207f751286044e9a7fabdee89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126833
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd/qa/unit/import-tests.cxx')
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 92b08ef32094..303ab76bed7b 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -123,6 +123,7 @@ public: virtual void setUp() override; void testDocumentLayout(); + void testTdf146223(); void testTdf144918(); void testTdf144917(); void testHyperlinkOnImage(); @@ -190,6 +191,7 @@ public: CPPUNIT_TEST_SUITE(SdImportTest); CPPUNIT_TEST(testDocumentLayout); + CPPUNIT_TEST(testTdf146223); CPPUNIT_TEST(testTdf144918); CPPUNIT_TEST(testTdf144917); CPPUNIT_TEST(testHyperlinkOnImage); @@ -335,6 +337,24 @@ void SdImportTest::testDocumentLayout() } } +void SdImportTest::testTdf146223() +{ + sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf146223.pptx"), PPTX); + + uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(), + uno::UNO_QUERY_THROW); + + uno::Reference<drawing::XDrawPage> xPage1(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xSet(xPage1, uno::UNO_QUERY_THROW); + + bool bBackgroundObjectsVisible; + xSet->getPropertyValue("IsBackgroundObjectsVisible") >>= bBackgroundObjectsVisible; + CPPUNIT_ASSERT_EQUAL(false, bBackgroundObjectsVisible); + + xDocShRef->DoClose(); +} + void SdImportTest::testTdf144918() { sd::DrawDocShellRef xDocShRef |