diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-10-31 00:29:04 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-10-31 00:29:04 +0100 |
commit | 64885925777dfc81ed6a5280040a6520fcb33247 (patch) | |
tree | 6f70b75660404135f9b2b0a43f205a9b398b7a0c /sd | |
parent | 9ff299c0cb20588e07e831ddaa21d6f1006e135b (diff) |
#i106421#: move msfilter to filter
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/eppt/eppt.cxx | 40 | ||||
-rw-r--r-- | sd/source/filter/eppt/eppt.hxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/escherex.hxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptexanimations.hxx | 2 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptatom.hxx | 1 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.hxx | 4 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptinanimations.hxx | 4 | ||||
-rw-r--r-- | sd/source/filter/sdpptwrp.cxx | 38 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 2 | ||||
-rw-r--r-- | sd/util/makefile.mk | 2 | ||||
-rw-r--r-- | sd/util/sdfilt.map | 2 |
12 files changed, 59 insertions, 42 deletions
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 4f29f503b..9ecbf52c4 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -58,10 +58,11 @@ #include <tools/zcodec.hxx> #include <svx/svxenum.hxx> #include <sot/storinfo.hxx> -#include <svx/msoleexp.hxx> +#include <filter/msfilter/msoleexp.hxx> #include <vcl/virdev.hxx> #include <svtools/wmf.hxx> -#include <svx/msdffimp.hxx> +#include <filter/msfilter/msdffimp.hxx> +#include <filter/msfilter/svxmsbas.hxx> #include <svx/flditem.hxx> #include <sfx2/docinf.hxx> @@ -2580,3 +2581,38 @@ extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI ExportPPT( SvStorageRef& rS return bStatus; } +extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas ) +{ + SvStorageRef xDest( new SvStorage( new SvMemoryStream(), TRUE ) ); + SvxImportMSVBasic aMSVBas( rDocShell, *xDest, FALSE, FALSE ); + aMSVBas.SaveOrDelMSVBAStorage( TRUE, String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); + + SvStorageRef xOverhead = xDest->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); + if ( xOverhead.Is() && ( xOverhead->GetError() == SVSTREAM_OK ) ) + { + SvStorageRef xOverhead2 = xOverhead->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); + if ( xOverhead2.Is() && ( xOverhead2->GetError() == SVSTREAM_OK ) ) + { + SvStorageStreamRef xTemp = xOverhead2->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead2") ) ); + if ( xTemp.Is() && ( xTemp->GetError() == SVSTREAM_OK ) ) + { + UINT32 nLen = xTemp->GetSize(); + if ( nLen ) + { + char* pTemp = new char[ nLen ]; + if ( pTemp ) + { + xTemp->Seek( STREAM_SEEK_TO_BEGIN ); + xTemp->Read( pTemp, nLen ); + pBas = new SvMemoryStream( pTemp, nLen, STREAM_READ ); + pBas->ObjectOwnsMemory( TRUE ); + return TRUE; + } + } + } + } + } + + return FALSE; +} + diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx index 21a1c3365..f9beb767c 100644 --- a/sd/source/filter/eppt/eppt.hxx +++ b/sd/source/filter/eppt/eppt.hxx @@ -85,7 +85,7 @@ #include <com/sun/star/container/XIndexContainer.hpp> #include <com/sun/star/awt/XControlModel.hpp> #include <com/sun/star/style/TabStop.hpp> -#include <svx/msocximex.hxx> +#include <filter/msfilter/msocximex.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/beans/XPropertySetInfo.hpp> diff --git a/sd/source/filter/eppt/escherex.hxx b/sd/source/filter/eppt/escherex.hxx index c466b915b..66b50b882 100644 --- a/sd/source/filter/eppt/escherex.hxx +++ b/sd/source/filter/eppt/escherex.hxx @@ -30,7 +30,7 @@ #ifndef _PptEscherEX_HXX #define _PptEscherEX_HXX -#include <svx/escherex.hxx> +#include <filter/msfilter/escherex.hxx> // --------------------------------------------------------------------------------------------- // Werte fuer den ULONG im PPT_PST_TextHeaderAtom diff --git a/sd/source/filter/eppt/pptexanimations.hxx b/sd/source/filter/eppt/pptexanimations.hxx index 726d148a8..216aadc8d 100644 --- a/sd/source/filter/eppt/pptexanimations.hxx +++ b/sd/source/filter/eppt/pptexanimations.hxx @@ -38,7 +38,7 @@ #include "../ppt/pptanimations.hxx" #endif #include <pptexsoundcollection.hxx> -#include <svx/escherex.hxx> +#include <filter/msfilter/escherex.hxx> #ifdef DBG_ANIM_LOG #include <stdio.h> diff --git a/sd/source/filter/ppt/pptatom.hxx b/sd/source/filter/ppt/pptatom.hxx index 81cb7870c..eca7a0e19 100644 --- a/sd/source/filter/ppt/pptatom.hxx +++ b/sd/source/filter/ppt/pptatom.hxx @@ -32,6 +32,7 @@ #define _PPTATOM_HXX_ #include <svx/msdffdef.hxx> +#include <filter/msfilter/msdffimp.hxx> class SvStream; diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 3f2cb401a..a073196ae 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -37,7 +37,7 @@ #include <vcl/wrkwin.hxx> #include <svl/urihelper.hxx> #include <svx/svxids.hrc> -#include <svx/svdfppt.hxx> +#include <filter/msfilter/svdfppt.hxx> #include <svx/svditer.hxx> #include <sfx2/docfile.hxx> #include <sfx2/app.hxx> diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx index fd851c394..58aecf103 100644 --- a/sd/source/filter/ppt/pptin.hxx +++ b/sd/source/filter/ppt/pptin.hxx @@ -31,11 +31,11 @@ #ifndef _SD_PPTIN_HXX #define _SD_PPTIN_HXX -#include <svx/svdfppt.hxx> +#include <filter/msfilter/svdfppt.hxx> #include <svx/msdffdef.hxx> #include <diadef.h> #include <svx/svdtypes.hxx> -#include <svx/msfiltertracer.hxx> +#include <filter/msfilter/msfiltertracer.hxx> #include <com/sun/star/uno/Any.h> #include <boost/shared_ptr.hpp> diff --git a/sd/source/filter/ppt/pptinanimations.hxx b/sd/source/filter/ppt/pptinanimations.hxx index ef319c41b..1440f6df2 100644 --- a/sd/source/filter/ppt/pptinanimations.hxx +++ b/sd/source/filter/ppt/pptinanimations.hxx @@ -34,15 +34,13 @@ #include <com/sun/star/animations/XTimeContainer.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> -#ifndef _SD_PPTANIMATIONS_HXX #include "pptanimations.hxx" -#endif #include <animations.hxx> #ifdef DBG_ANIM_LOG #include <stdio.h> #endif -#include <svx/svdfppt.hxx> +#include <filter/msfilter/svdfppt.hxx> #include <list> diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index 7674b14e1..cb4c2cbe5 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -34,8 +34,8 @@ #include <sfx2/docfile.hxx> #include <sfx2/docfilt.hxx> #include <osl/module.hxx> -#include <svx/msoleexp.hxx> -#include <svx/svxmsbas.hxx> +#include <filter/msfilter/msoleexp.hxx> +#include <filter/msfilter/svxmsbas.hxx> #include <svx/svxerr.hxx> #include <unotools/fltrcfg.hxx> @@ -43,7 +43,7 @@ #include "ppt/pptin.hxx" #include "drawdoc.hxx" #include <tools/urlobj.hxx> -#include <svx/msfiltertracer.hxx> +#include <filter/msfilter/msfiltertracer.hxx> // -------------- // - Namespaces - @@ -54,7 +54,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::task; using namespace ::com::sun::star::frame; - typedef BOOL ( __LOADONCALLAPI *ExportPPT )( SvStorageRef&, Reference< XModel > &, Reference< XStatusIndicator > &, @@ -63,6 +62,8 @@ typedef BOOL ( __LOADONCALLAPI *ExportPPT )( SvStorageRef&, typedef sal_Bool ( SAL_CALL *ImportPPT )( const ::rtl::OUString&, Sequence< PropertyValue >*, SdDrawDocument*, SvStream&, SvStorage&, SfxMedium& ); +typedef BOOL ( __LOADONCALLAPI *SaveVBA )( SfxObjectShell&, SvMemoryStream*& ); + // --------------- // - SdPPTFilter - // --------------- @@ -188,32 +189,13 @@ void SdPPTFilter::PreSaveBasic() SvtFilterOptions* pFilterOptions = SvtFilterOptions::Get(); if( pFilterOptions && pFilterOptions->IsLoadPPointBasicStorage() ) { - SvStorageRef xDest( new SvStorage( new SvMemoryStream(), TRUE ) ); - SvxImportMSVBasic aMSVBas( (SfxObjectShell&) mrDocShell, *xDest, FALSE, FALSE ); - aMSVBas.SaveOrDelMSVBAStorage( TRUE, String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); - - SvStorageRef xOverhead = xDest->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); - if ( xOverhead.Is() && ( xOverhead->GetError() == SVSTREAM_OK ) ) + ::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() ); + if( pLibrary ) { - SvStorageRef xOverhead2 = xOverhead->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); - if ( xOverhead2.Is() && ( xOverhead2->GetError() == SVSTREAM_OK ) ) + SaveVBA pSaveVBA= reinterpret_cast<SaveVBA>(pLibrary->getFunctionSymbol( ::rtl::OUString::createFromAscii("SaveVBA") )); + if( pSaveVBA ) { - SvStorageStreamRef xTemp = xOverhead2->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead2") ) ); - if ( xTemp.Is() && ( xTemp->GetError() == SVSTREAM_OK ) ) - { - UINT32 nLen = xTemp->GetSize(); - if ( nLen ) - { - char* pTemp = new char[ nLen ]; - if ( pTemp ) - { - xTemp->Seek( STREAM_SEEK_TO_BEGIN ); - xTemp->Read( pTemp, nLen ); - pBas = new SvMemoryStream( pTemp, nLen, STREAM_READ ); - pBas->ObjectOwnsMemory( TRUE ); - } - } - } + pSaveVBA( (SfxObjectShell&) mrDocShell, pBas ); } } } diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 1c4c3ea23..058a1f4ae 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -66,7 +66,7 @@ #include <unotools/fltrcfg.hxx> #include <sfx2/frame.hxx> #include <sfx2/viewfrm.hxx> -#include <svx/svxmsbas.hxx> +//#include <svx/svxmsbas.hxx> #include <unotools/saveopt.hxx> #include <com/sun/star/drawing/XDrawPage.hpp> #include <com/sun/star/drawing/XDrawView.hpp> diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk index e530511ee..6b1e6ebf1 100644 --- a/sd/util/makefile.mk +++ b/sd/util/makefile.mk @@ -250,7 +250,7 @@ DEF5NAME=$(SHL5TARGET) SHL5STDLIBS = $(ISDLIB) \ $(SVXCORELIB) \ - $(SVXMSFILTERLIB) \ + $(MSFILTERLIB) \ $(SFX2LIB) \ $(SVTOOLLIB) \ $(SOTLIB) \ diff --git a/sd/util/sdfilt.map b/sd/util/sdfilt.map index ac6b782f3..622133934 100644 --- a/sd/util/sdfilt.map +++ b/sd/util/sdfilt.map @@ -2,7 +2,7 @@ PPTEXPORTER_1_0 { global: ExportPPT; ImportPPT; - + SaveVBA; local: *; }; |