From 04c272eb8396e58376d2b61baee01c4a95f993b4 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Thu, 26 Aug 2010 18:37:44 +0200 Subject: dr77: #i114128# import legacy drawing controls --- oox/source/ppt/pptimport.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'oox/source/ppt/pptimport.cxx') diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index d60629b4481b..b3cd99ad6166 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; @@ -180,6 +181,11 @@ GraphicHelper* PowerPointImport::implCreateGraphicHelper() const return new PptGraphicHelper( *this ); } +::oox::ole::VbaProject* PowerPointImport::implCreateVbaProject() const +{ + return new ::oox::ole::VbaProject( getGlobalFactory(), getModel(), CREATE_OUSTRING( "Impress" ) ); +} + OUString PowerPointImport::implGetImplementationName() const { return PowerPointImport_getImplementationName(); -- cgit From c29c922edb2ae9454e86e9f99d55ba005132194e Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Mon, 30 Aug 2010 16:10:01 +0200 Subject: dr77: change all exported services in oox module from MultiServiceFactory to ComponentContext --- oox/source/ppt/pptimport.cxx | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'oox/source/ppt/pptimport.cxx') diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index b3cd99ad6166..249db6c09426 100644 --- a/oox/source/ppt/pptimport.cxx +++ b/oox/source/ppt/pptimport.cxx @@ -42,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 ) { } @@ -164,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 ) { } @@ -183,7 +184,7 @@ GraphicHelper* PowerPointImport::implCreateGraphicHelper() const ::oox::ole::VbaProject* PowerPointImport::implCreateVbaProject() const { - return new ::oox::ole::VbaProject( getGlobalFactory(), getModel(), CREATE_OUSTRING( "Impress" ) ); + return new ::oox::ole::VbaProject( getComponentContext(), getModel(), CREATE_OUSTRING( "Impress" ) ); } OUString PowerPointImport::implGetImplementationName() const -- cgit From 6cafb68322fa85a54a6fa1ca47239af459f519ce Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Mon, 8 Nov 2010 13:47:01 +0100 Subject: dr77: optimizations in generation of XML tokens, XML namespaces, property names; code cleanup --- oox/source/ppt/pptimport.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'oox/source/ppt/pptimport.cxx') diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index 249db6c09426..625e4e662e3c 100644 --- a/oox/source/ppt/pptimport.cxx +++ b/oox/source/ppt/pptimport.cxx @@ -75,9 +75,9 @@ bool PowerPointImport::importDocument() throw() file:////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 ); -- cgit