diff options
author | Katarina Machalkova <kmachalkova@suse.cz> | 2010-10-19 16:18:17 +0200 |
---|---|---|
committer | Katarina Machalkova <kmachalkova@suse.cz> | 2010-10-19 16:18:17 +0200 |
commit | e0a35af701c68a41fd06b496a23b62e535a9aab3 (patch) | |
tree | b1c6ac48dbbfaa97f6417ef44c946c033edf4909 /oox/source/ppt/pptimport.cxx | |
parent | 42b0ace3fa39a2f672d2222ea57482258058d249 (diff) |
Merged pptx-snapshot-at-ooxml03-creation.diff from ooo-build
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 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; |