summaryrefslogtreecommitdiff
path: root/oox/source/ppt/pptimport.cxx
diff options
context:
space:
mode:
authorKatarina Machalkova <kmachalkova@suse.cz>2010-10-19 16:18:17 +0200
committerKatarina Machalkova <kmachalkova@suse.cz>2010-10-19 16:18:17 +0200
commite0a35af701c68a41fd06b496a23b62e535a9aab3 (patch)
treeb1c6ac48dbbfaa97f6417ef44c946c033edf4909 /oox/source/ppt/pptimport.cxx
parent42b0ace3fa39a2f672d2222ea57482258058d249 (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.cxx26
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;