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 | |
parent | 42b0ace3fa39a2f672d2222ea57482258058d249 (diff) |
Merged pptx-snapshot-at-ooxml03-creation.diff from ooo-build
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/oox/ppt/pptimport.hxx | 3 | ||||
-rw-r--r-- | oox/source/ppt/pptimport.cxx | 26 |
2 files changed, 29 insertions, 0 deletions
diff --git a/oox/inc/oox/ppt/pptimport.hxx b/oox/inc/oox/ppt/pptimport.hxx index c4ee29447c64..8b38b9b3088e 100644 --- a/oox/inc/oox/ppt/pptimport.hxx +++ b/oox/inc/oox/ppt/pptimport.hxx @@ -66,6 +66,9 @@ public: sal_Int32 getSchemeColor( sal_Int32 nToken ) const; + virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rDescriptor ) + throw( ::com::sun::star::uno::RuntimeException ); + private: virtual GraphicHelper* implCreateGraphicHelper() const; virtual ::rtl::OUString implGetImplementationName() const; 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; |