[Libreoffice-commits] .: sd/source

Noel Power noelp at kemper.freedesktop.org
Tue Jul 12 02:46:34 PDT 2011


 sd/source/filter/ppt/pptin.cxx |   16 ++++++++++++++++
 sd/source/filter/ppt/pptin.hxx |    4 +++-
 2 files changed, 19 insertions(+), 1 deletion(-)

New commits:
commit 631c1b8aaeadd749e3044cb031f9c1ff66c47a15
Author: Noel Power <noel.power at novell.com>
Date:   Tue Jul 12 10:07:52 2011 +0100

    use oox filter for *all* control import

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index eaa0a0c..37017f4 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 2947c5c..662ed27 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


More information about the Libreoffice-commits mailing list