summaryrefslogtreecommitdiff
path: root/sd/source/filter/sdpptwrp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/filter/sdpptwrp.cxx')
-rw-r--r--sd/source/filter/sdpptwrp.cxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index 01e38996d2c2..8c1674dbf789 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -40,7 +40,7 @@
#include <svtools/fltrcfg.hxx>
#include "sdpptwrp.hxx"
-#include "pptin.hxx"
+#include "ppt/pptin.hxx"
#include "drawdoc.hxx"
#include <tools/urlobj.hxx>
#include <svx/msfiltertracer.hxx>
@@ -60,6 +60,9 @@ typedef BOOL ( __LOADONCALLAPI *ExportPPT )( SvStorageRef&,
Reference< XStatusIndicator > &,
SvMemoryStream*, sal_uInt32 nCnvrtFlags );
+typedef sal_Bool ( SAL_CALL *ImportPPT )( const ::rtl::OUString&, Sequence< PropertyValue >*,
+ SdDrawDocument*, SvStream&, SvStorage&, SfxMedium& );
+
// ---------------
// - SdPPTFilter -
// ---------------
@@ -111,16 +114,18 @@ sal_Bool SdPPTFilter::Import()
mrMedium.SetError( ERRCODE_SVX_READ_FILTER_PPOINT, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
else
{
- MSFilterTracer aTracer( aTraceConfigPath, &aConfigData );
- aTracer.StartTracing();
-
- SdPPTImport* pImport = new SdPPTImport( &mrDocument, *pDocStream, *pStorage, mrMedium, &aTracer );
- if ( ( bRet = pImport->Import() ) == sal_False )
- mrMedium.SetError( SVSTREAM_WRONGVERSION, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ ::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() );
+ if ( pLibrary )
+ {
+ ImportPPT PPTImport = reinterpret_cast< ImportPPT >( pLibrary->getFunctionSymbol( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ImportPPT" ) ) ) );
+ if ( PPTImport )
+ bRet = PPTImport( aTraceConfigPath, &aConfigData, &mrDocument, *pDocStream, *pStorage, mrMedium );
- aTracer.EndTracing();
- delete pImport;
+ if ( !bRet )
+ mrMedium.SetError( SVSTREAM_WRONGVERSION, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ }
}
+
delete pDocStream;
}
}