summaryrefslogtreecommitdiff
path: root/oox/source/ppt/pptimport.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2010-11-01 14:13:53 +0200
committerTor Lillqvist <tml@hemulen.(none)>2010-11-13 12:24:04 +0200
commitba0ab700b4cebd88e07ebe0662f560b2b9dfb918 (patch)
tree32b71bb58d8b7f0aa7c6900963fb1562ee899a6c /oox/source/ppt/pptimport.cxx
parent89579fd0db5dcc728f756f94eb68de1b9df3efe1 (diff)
From hg changeset 2b3eef7bad494312ee9c8c13c1b1014b22ba0451 in ooxml11
ooxml11: merge with DEV300 m76 (I hope), plus intermediate commit of own changes
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;