summaryrefslogtreecommitdiff
path: root/oox/source/ppt/pptimport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/ppt/pptimport.cxx')
-rw-r--r--oox/source/ppt/pptimport.cxx29
1 files changed, 18 insertions, 11 deletions
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index d60629b4481b..625e4e662e3c 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -30,6 +30,7 @@
#include "oox/dump/pptxdumper.hxx"
#include "oox/drawingml/table/tablestylelistfragmenthandler.hxx"
#include "oox/helper/graphichelper.hxx"
+#include "oox/ole/vbaproject.hxx"
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -41,24 +42,25 @@ namespace oox { namespace ppt {
OUString SAL_CALL PowerPointImport_getImplementationName() throw()
{
- return CREATE_OUSTRING( "com.sun.star.comp.Impress.oox.PowerPointImport" );
+ return CREATE_OUSTRING( "com.sun.star.comp.oox.ppt.PowerPointImport" );
}
uno::Sequence< OUString > SAL_CALL PowerPointImport_getSupportedServiceNames() throw()
{
- const OUString aServiceName = CREATE_OUSTRING( "com.sun.star.comp.ooxpptx" );
- const Sequence< OUString > aSeq( &aServiceName, 1 );
+ Sequence< OUString > aSeq( 2 );
+ aSeq[ 0 ] = CREATE_OUSTRING( "com.sun.star.document.ImportFilter" );
+ aSeq[ 1 ] = CREATE_OUSTRING( "com.sun.star.document.ExportFilter" );
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL PowerPointImport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL PowerPointImport_createInstance( const Reference< XComponentContext >& rxContext ) throw( Exception )
{
- return (cppu::OWeakObject*)new PowerPointImport( rSMgr );
+ return static_cast< ::cppu::OWeakObject* >( new PowerPointImport( rxContext ) );
}
-PowerPointImport::PowerPointImport( const uno::Reference< lang::XMultiServiceFactory > & rSMgr )
- : XmlFilterBase( rSMgr )
- , mxChartConv( new ::oox::drawingml::chart::ChartConverter )
+PowerPointImport::PowerPointImport( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) :
+ XmlFilterBase( rxContext ),
+ mxChartConv( new ::oox::drawingml::chart::ChartConverter )
{
}
@@ -73,9 +75,9 @@ bool PowerPointImport::importDocument() throw()
file:///<path-to-oox-module>/source/dump/pptxdumper.ini. */
OOX_DUMP_FILE( ::oox::dump::pptx::Dumper );
- OUString aFragmentPath = getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATIONSTYPE( "officeDocument" ) );
+ OUString aFragmentPath = getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATION_TYPE( "officeDocument" ) );
FragmentHandlerRef xPresentationFragmentHandler( new PresentationFragmentHandler( *this, aFragmentPath ) );
- maTableStyleListPath = xPresentationFragmentHandler->getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATIONSTYPE( "tableStyles" ) );
+ maTableStyleListPath = xPresentationFragmentHandler->getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATION_TYPE( "tableStyles" ) );
return importFragment( xPresentationFragmentHandler );
@@ -163,7 +165,7 @@ private:
};
PptGraphicHelper::PptGraphicHelper( const PowerPointImport& rFilter ) :
- GraphicHelper( rFilter.getGlobalFactory(), rFilter.getTargetFrame(), rFilter.getStorage() ),
+ GraphicHelper( rFilter.getComponentContext(), rFilter.getTargetFrame(), rFilter.getStorage() ),
mrFilter( rFilter )
{
}
@@ -180,6 +182,11 @@ GraphicHelper* PowerPointImport::implCreateGraphicHelper() const
return new PptGraphicHelper( *this );
}
+::oox::ole::VbaProject* PowerPointImport::implCreateVbaProject() const
+{
+ return new ::oox::ole::VbaProject( getComponentContext(), getModel(), CREATE_OUSTRING( "Impress" ) );
+}
+
OUString PowerPointImport::implGetImplementationName() const
{
return PowerPointImport_getImplementationName();