diff options
author | Jan Holesovsky <kendy@suse.cz> | 2010-11-16 09:26:34 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-11-16 09:26:34 +0100 |
commit | f792799abf4c8c6b9f967685aec070b066644f07 (patch) | |
tree | 9501d9a607c459c6704ca7763d3e0e6d4b05a215 /oox/source/ppt/pptimport.cxx | |
parent | 4d5e5289c0df595fad33ba4c0f7306f84bed70b6 (diff) | |
parent | cad14443dee2ebe544d5b6b39b3715e44071cb66 (diff) |
Merge remote branch 'origin/libreoffice-3-3'
Diffstat (limited to 'oox/source/ppt/pptimport.cxx')
-rw-r--r-- | oox/source/ppt/pptimport.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index 91a5a91dbc59..67c4ba1aff22 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() @@ -138,6 +141,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; |