[Libreoffice-commits] .: sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 8 01:56:44 PDT 2012
sd/source/filter/cgm/sdcgmfilter.cxx | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
New commits:
commit 72f348746c67632aa8e53d78e79a889e76063fea
Author: Tor Lillqvist <tml at iki.fi>
Date: Mon Oct 8 11:40:45 2012 +0300
There is no ExportCGM
Change-Id: I1251c25e14636fea96aba08f90dfe3d16978a270
diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx
index c5d1ccf..0f6a0d9 100644
--- a/sd/source/filter/cgm/sdcgmfilter.cxx
+++ b/sd/source/filter/cgm/sdcgmfilter.cxx
@@ -73,7 +73,6 @@ typedef sal_Bool ( __LOADONCALLAPI *ExportCGMPointer )( ::rtl::OUString&, Refere
#ifdef DISABLE_DYNLOADING
extern "C" sal_uInt32 ImportCGM( ::rtl::OUString&, Reference< XModel >&, sal_uInt32, Reference< XStatusIndicator >& );
-extern "C" sal_Bool ExportCGM( ::rtl::OUString&, Reference< XModel >&, Reference< XStatusIndicator >&, void* );
#endif
@@ -150,22 +149,16 @@ sal_Bool SdCGMFilter::Import()
sal_Bool SdCGMFilter::Export()
{
-#ifndef DISABLE_DYNLOADING
+#ifdef DISABLE_DYNLOADING
+ // No ExportCGM function exists(!)
+ return sal_False;
+#else
::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() );
-#endif
sal_Bool bRet = sal_False;
- if(
-#ifndef DISABLE_DYNLOADING
- pLibrary &&
-#endif
- mxModel.is() )
+ if( pLibrary && mxModel.is() )
{
-#ifndef DISABLE_DYNLOADING
ExportCGMPointer FncCGMExport = reinterpret_cast< ExportCGMPointer >( pLibrary->getFunctionSymbol( "ExportCGM" ) );
-#else
- ExportCGMPointer FncCGMExport = ExportCGM;
-#endif
if( FncCGMExport )
{
@@ -176,10 +169,9 @@ sal_Bool SdCGMFilter::Export()
}
}
-#ifndef DISABLE_DYNLOADING
delete pLibrary;
-#endif
return bRet;
+#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list