From ba0ab700b4cebd88e07ebe0662f560b2b9dfb918 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 1 Nov 2010 14:13:53 +0200 Subject: From hg changeset 2b3eef7bad494312ee9c8c13c1b1014b22ba0451 in ooxml11 ooxml11: merge with DEV300 m76 (I hope), plus intermediate commit of own changes --- oox/source/ppt/pptimport.cxx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'oox/source/ppt') diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index cc458d0f5cc2..a48977ae1f31 100644 --- a/oox/source/ppt/pptimport.cxx +++ b/oox/source/ppt/pptimport.cxx @@ -38,6 +38,9 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; using namespace oox::core; +using ::com::sun::star::beans::PropertyValue; +using ::com::sun::star::lang::XComponent; + namespace oox { namespace ppt { OUString SAL_CALL PowerPointImport_getImplementationName() throw() @@ -131,6 +134,29 @@ const ::oox::drawingml::Theme* PowerPointImport::getCurrentTheme() const return mpActualSlidePersist ? mpActualSlidePersist->getTheme().get() : 0; } +sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDescriptor ) throw( RuntimeException ) +{ + if( XmlFilterBase::filter( rDescriptor ) ) + return true; + + if( isExportFilter() ) { + Reference< XExporter > xExporter( getGlobalFactory()->createInstance( CREATE_OUSTRING( "com.sun.star.comp.Impress.oox.PowerPointExport" ) ), UNO_QUERY ); + + if( xExporter.is() ) { + Reference< XComponent > xDocument( getModel(), UNO_QUERY ); + Reference< XFilter > xFilter( xExporter, UNO_QUERY ); + + if( xFilter.is() ) { + xExporter->setSourceDocument( xDocument ); + if( xFilter->filter( rDescriptor ) ) + return true; + } + } + } + + return false; +} + ::oox::vml::Drawing* PowerPointImport::getVmlDrawing() { return mpActualSlidePersist ? mpActualSlidePersist->getDrawing() : 0; -- cgit