sd/inc/sdfilter.hxx            |    4 +++-
 sd/source/filter/ppt/pptin.cxx |    2 +-
 sd/source/filter/sdfilter.cxx  |    5 -----
 sd/source/filter/sdpptwrp.cxx  |   14 +-------------
 sd/source/ui/app/sddll.cxx     |    1 -
 5 files changed, 5 insertions(+), 21 deletions(-)

New commits:
commit 572c2ee4c4f4b8e53f2fa4398a5600f1468f3a38
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Sep 14 12:56:39 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Sep 14 20:31:29 2022 +0200

    no need to load ImportPPT symbol at runtime
    
    Change-Id: I4b50822183d9752d6a413b0308e1d661785fb10e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139937
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sd/inc/sdfilter.hxx b/sd/inc/sdfilter.hxx
index 707679642dee..928a1c0575d4 100644
--- a/sd/inc/sdfilter.hxx
+++ b/sd/inc/sdfilter.hxx
@@ -45,7 +45,6 @@ public:
     virtual bool            Export() = 0;
 
 #ifndef DISABLE_DYNLOADING
-    static void Preload();
     /// Open library @rLibraryName and lookup symbol @rFnSymbol
     static oslGenericFunction GetLibrarySymbol( const OUString& rLibraryName, 
const OUString &rFnSymbol );
 #endif
@@ -73,5 +72,8 @@ SD_DLLPUBLIC bool ExportPPT( const std::vector< 
css::beans::PropertyValue >& rMe
                     SvMemoryStream* pVBA,
                     sal_uInt32 nCnvrtFlags );
 
+// exported function
+SD_DLLPUBLIC bool ImportPPT(
+        SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, 
SfxMedium& rMedium );
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 7fd3a903dcd4..c2673ef4ce44 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2766,7 +2766,7 @@ ImplSdPPTImport::ReadFormControl( 
tools::SvRef<SotStorage>& rSrc1, css::uno::Ref
 }
 
 // exported function
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool ImportPPT(
+SAL_DLLPUBLIC_EXPORT bool ImportPPT(
         SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, 
SfxMedium& rMedium )
 {
     std::unique_ptr<SdPPTImport> pImport( new SdPPTImport( pDocument, 
rDocStream, rStorage, rMedium ));
diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx
index 24aa42a7ec9d..af001e611883 100644
--- a/sd/source/filter/sdfilter.cxx
+++ b/sd/source/filter/sdfilter.cxx
@@ -86,11 +86,6 @@ oslGenericFunction SdFilter::GetLibrarySymbol( const 
OUString& rLibraryName, con
         return pMod->getFunctionSymbol(rFnSymbol);
 }
 
-void SdFilter::Preload()
-{
-    (void)GetLibrarySymbol("sd", "ImportPPT");
-}
-
 #endif
 
 void SdFilter::CreateStatusIndicator()
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index 6dd1964b2b73..0f9e2f4a38fc 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -40,14 +40,10 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::task;
 using namespace ::com::sun::star::frame;
 
-typedef sal_Bool ( *ImportPPTPointer )( SdDrawDocument*, SvStream&, 
SotStorage&, SfxMedium& );
-
 typedef sal_Bool ( *SaveVBAPointer )( SfxObjectShell&, SvMemoryStream*& );
 
 #ifdef DISABLE_DYNLOADING
 
-extern "C" sal_Bool ImportPPT( SdDrawDocument*, SvStream&, SotStorage&, 
SfxMedium& );
-
 extern "C" sal_Bool SaveVBA( SfxObjectShell&, SvMemoryStream*& );
 
 #endif
@@ -186,15 +182,7 @@ bool SdPPTFilter::Import()
                 mrMedium.SetError(ERRCODE_SVX_READ_FILTER_PPOINT);
             else
             {
-#ifdef DISABLE_DYNLOADING
-                ImportPPTPointer pPPTImport = ImportPPT;
-#else
-                ImportPPTPointer pPPTImport = reinterpret_cast< 
ImportPPTPointer >(
-                    
SdFilter::GetLibrarySymbol(mrMedium.GetFilter()->GetUserData(), "ImportPPT"));
-#endif
-
-                if ( pPPTImport )
-                    bRet = pPPTImport( &mrDocument, *pDocStream, *pStorage, 
mrMedium );
+                bRet = ImportPPT( &mrDocument, *pDocStream, *pStorage, 
mrMedium );
 
                 if ( !bRet )
                     mrMedium.SetError(SVSTREAM_WRONGVERSION);
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index 4e20d0997fb8..c195869b790e 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -260,7 +260,6 @@ void SdDLL::Init()
 extern "C" SAL_DLLPUBLIC_EXPORT
 void lok_preload_hook()
 {
-    SdFilter::Preload();
     SdAbstractDialogFactory::Create();
 }
 

Reply via email to