summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2011-07-12 10:07:52 +0100
committerNoel Power <noel.power@novell.com>2011-07-12 10:07:52 +0100
commit631c1b8aaeadd749e3044cb031f9c1ff66c47a15 (patch)
treea47779429c72d498f64b61f881bf8cc0d073d410
parentf210fb4d4ca2ad270f0da4f08fcfb9e16eaf946d (diff)
use oox filter for *all* control import
-rw-r--r--sd/source/filter/ppt/pptin.cxx16
-rw-r--r--sd/source/filter/ppt/pptin.hxx4
2 files changed, 19 insertions, 1 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index eaa0a0cce..37017f4d7 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 2947c5c9f..662ed2754 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