summaryrefslogtreecommitdiff
path: root/sd/source/filter/sdpptwrp.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-10-31 00:29:04 +0100
committerMathias Bauer <mba@openoffice.org>2009-10-31 00:29:04 +0100
commit43cef38dfeea51d2058dcc5e18cfab8c05329c9d (patch)
tree8afd4795d154e021b56ec96ca8a373b977479ac7 /sd/source/filter/sdpptwrp.cxx
parent2598fbf8a9fe2c3d9825842c9369d836dd7f77e7 (diff)
#i106421#: move msfilter to filter
Diffstat (limited to 'sd/source/filter/sdpptwrp.cxx')
-rw-r--r--sd/source/filter/sdpptwrp.cxx38
1 files changed, 10 insertions, 28 deletions
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index bc4a63012caa..8dea30f1659a 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 );
}
}
}