diff options
author | Noel Power <noel.power@novell.com> | 2011-07-12 10:07:52 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-07-12 10:07:52 +0100 |
commit | 3e8a6a3a391ae656bd5ab6dcb182a4944c91fda0 (patch) | |
tree | 97c367813edb69b93efda208f9ea1edf755d6ee4 | |
parent | 56a0e8ae7d5ad8b7bc22739264500f71efd34b21 (diff) |
use oox filter for *all* control import
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 16 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.hxx | 4 |
2 files changed, 19 insertions, 1 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 6ce7c23382d1..c2a7ea4d4006 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -100,9 +100,17 @@ #include <com/sun/star/document/XDocumentProperties.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> +#include <comphelper/processfactory.hxx> +#include <comphelper/componentcontext.hxx> using namespace ::com::sun::star; +uno::Reference< uno::XComponentContext > +lcl_getUnoCtx() +{ + comphelper::ComponentContext aCtx( ::comphelper::getProcessServiceFactory() ); + return aCtx.getUNOContext(); +} SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SvStorage& rStorage, SfxMedium& rMedium, MSFilterTracer* pTracer ) { @@ -2699,6 +2707,14 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi return pObj; } + +bool +ImplSdPPTImport::ReadFormControl( uno::Reference< io::XInputStream >& xIs, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const +{ + ::oox::ole::OleFormCtrlImportHelper maFormCtrlHelper( xIs, lcl_getUnoCtx(), mpDoc->GetDocSh()->GetModel() ); + return maFormCtrlHelper.importFormControlFromObjStorage( rFormComp ); +} + // --------------------- // - exported function - // --------------------- diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx index 78f09d7bf89d..babc2a3ae538 100644 --- a/sd/source/filter/ppt/pptin.hxx +++ b/sd/source/filter/ppt/pptin.hxx @@ -36,6 +36,7 @@ #include <filter/msfilter/msfiltertracer.hxx> #include <com/sun/star/uno/Any.h> #include <boost/shared_ptr.hpp> +#include <oox/ole/olehelper.hxx> class SdDrawDocument; class SfxMedium; @@ -70,7 +71,7 @@ class ImplSdPPTImport : public SdrPowerPointImport SdrLayerID mnBackgroundObjectsLayerID; tAnimationMap maAnimations; - +// ::oox::ole::OleFormCtrlImportHelper maFormCtrlHelper; void SetHeaderFooterPageSettings( SdPage* pPage, const PptSlidePersistEntry* pMasterPersist ); void ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimationsUsed ); @@ -89,6 +90,7 @@ public: ~ImplSdPPTImport(); sal_Bool Import(); + virtual bool ReadFormControl( com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& xIs, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const; }; class SdPPTImport |