summaryrefslogtreecommitdiff
path: root/sd/source/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-09-13 14:33:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-09-14 08:33:26 +0200
commit5cc45f148dac2080d5cdc2d69db539d55b1ff816 (patch)
tree42239b50849dea5e824eb294d651a33e6bc999e5 /sd/source/filter
parentc70ee4a6b9071468255e5d4fdb893e9c9bdf4fad (diff)
no need to dynamically ImportCGM symbol
we are preloading this library anyway, so whatever benefit this might have provided is long gone Change-Id: I36ca42de5f802c73b2e2da3b52a996657298211f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139865 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/filter')
-rw-r--r--sd/source/filter/cgm/sdcgmfilter.cxx38
-rw-r--r--sd/source/filter/sdfilter.cxx1
2 files changed, 4 insertions, 35 deletions
diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx
index 80b11519d45a..a605baec8d06 100644
--- a/sd/source/filter/cgm/sdcgmfilter.cxx
+++ b/sd/source/filter/cgm/sdcgmfilter.cxx
@@ -18,6 +18,7 @@
*/
#include <memory>
+#include <filter/importcgm.hxx>
#include <tools/urlobj.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <sfx2/docfile.hxx>
@@ -36,14 +37,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::task;
using namespace ::com::sun::star::frame;
-typedef sal_uInt32 ( *ImportCGMPointer )(SvStream&, Reference< XModel > const &, Reference< XStatusIndicator > const &);
-
-#ifdef DISABLE_DYNLOADING
-
-extern "C" sal_uInt32 ImportCGM(SvStream&, Reference< XModel > const &, Reference< XStatusIndicator > const &);
-
-#endif
-
SdCGMFilter::SdCGMFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell ) :
SdFilter( rMedium, rDocShell )
{
@@ -53,32 +46,11 @@ SdCGMFilter::~SdCGMFilter()
{
}
-namespace
-{
- class CGMPointer
- {
- ImportCGMPointer m_pPointer;
- public:
- CGMPointer()
- {
-#ifdef DISABLE_DYNLOADING
- m_pPointer = ImportCGM;
-#else
- m_pPointer = reinterpret_cast<ImportCGMPointer>(
- SdFilter::GetLibrarySymbol("icg", "ImportCGM"));
-#endif
- }
- ImportCGMPointer get() { return m_pPointer; }
- };
-}
-
bool SdCGMFilter::Import()
{
bool bRet = false;
- CGMPointer aPointer;
- ImportCGMPointer FncImportCGM = aPointer.get();
- if (FncImportCGM && mxModel.is())
+ if (mxModel.is())
{
OUString aFileURL( mrMedium.GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
sal_uInt32 nRetValue;
@@ -88,7 +60,7 @@ bool SdCGMFilter::Import()
CreateStatusIndicator();
std::unique_ptr<SvStream> xIn(::utl::UcbStreamHelper::CreateStream(aFileURL, StreamMode::READ));
- nRetValue = xIn ? FncImportCGM(*xIn, mxModel, mxStatusIndicator) : 0;
+ nRetValue = xIn ? ImportCGM(*xIn, mxModel, mxStatusIndicator) : 0;
if( nRetValue )
{
@@ -124,10 +96,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportCGM(SvStream &rStream)
::sd::DrawDocShellRef xDocShRef = new ::sd::DrawDocShell(SfxObjectCreateMode::EMBEDDED, false, DocumentType::Impress);
- CGMPointer aPointer;
-
xDocShRef->GetDoc()->EnableUndo(false);
- bool bRet = aPointer.get()(rStream, xDocShRef->GetModel(), css::uno::Reference<css::task::XStatusIndicator>()) == 0;
+ bool bRet = ImportCGM(rStream, xDocShRef->GetModel(), css::uno::Reference<css::task::XStatusIndicator>()) == 0;
xDocShRef->DoClose();
diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx
index 11ad11d7617a..3df3edb233c9 100644
--- a/sd/source/filter/sdfilter.cxx
+++ b/sd/source/filter/sdfilter.cxx
@@ -89,7 +89,6 @@ oslGenericFunction SdFilter::GetLibrarySymbol( const OUString& rLibraryName, con
void SdFilter::Preload()
{
(void)GetLibrarySymbol("sdfilt", "ImportPPT");
- (void)GetLibrarySymbol("icg", "ImportCGM");
}
#endif