diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-09-17 09:53:50 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-09-17 09:59:49 +0200 |
commit | 3f1749f4958d3c167e6134703e0f5e41e6bde0d6 (patch) | |
tree | 10779fa4655622f9aeab63aca71fa881fce75dca /oox | |
parent | 25fb9471552c3b17eb7e9ae622b3ac89e7e997d0 (diff) |
bnc#584721: Do not add extra title and outliner blocks to master slide
There are master slides / layouts imported from PPTX in which
there is no title or body layout block, but so far Impress
added these by default to the master slides if they were
missing.
Now they are skipped by the importer code.
Change-Id: I256a4e78639ea39d0f87a94e6676422c7dbcde4a
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/ppt/presentationfragmenthandler.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx index bef84de51bd6..811550ea561f 100644 --- a/oox/source/ppt/presentationfragmenthandler.cxx +++ b/oox/source/ppt/presentationfragmenthandler.cxx @@ -465,9 +465,20 @@ bool PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlide SlidePersistPtr pMasterPersistPtr( pSlidePersistPtr->getMasterPersist() ); if ( pMasterPersistPtr.get() ) { + // Setting "Layout" property adds extra title and outliner preset shapes to the master slide + Reference< drawing::XDrawPage > xMasterSlide(pMasterPersistPtr->getPage()); + const int nCount = xMasterSlide->getCount(); + const OUString sLayout = "Layout"; uno::Reference< beans::XPropertySet > xSet( xSlide, uno::UNO_QUERY_THROW ); xSet->setPropertyValue( sLayout, Any( pMasterPersistPtr->getLayoutFromValueToken() ) ); + + while( nCount < xMasterSlide->getCount()) + { + Reference< drawing::XShape > xShape; + xMasterSlide->getByIndex(xMasterSlide->getCount()-1) >>= xShape; + xMasterSlide->remove(xShape); + } } while( xSlide->getCount() ) { |