summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/filter/eppt/eppt.cxx40
-rw-r--r--sd/source/filter/eppt/eppt.hxx2
-rw-r--r--sd/source/filter/eppt/escherex.hxx2
-rw-r--r--sd/source/filter/eppt/pptexanimations.hxx2
-rw-r--r--sd/source/filter/ppt/pptatom.hxx1
-rw-r--r--sd/source/filter/ppt/pptin.cxx2
-rw-r--r--sd/source/filter/ppt/pptin.hxx4
-rw-r--r--sd/source/filter/ppt/pptinanimations.hxx4
-rw-r--r--sd/source/filter/sdpptwrp.cxx38
-rw-r--r--sd/source/ui/docshell/docshel4.cxx2
10 files changed, 57 insertions, 40 deletions
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index cb31e99aec63..197a977c78a8 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 c4a55b5c4369..b4d6fdf79559 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 1ebebe8a5504..577531d9f534 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 78dbb731ef0b..effbe3381cea 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 9ccd845d14e6..14a7f81b4e98 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 ae347eeaba12..37277a17c97b 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 59d59eece151..0549f8fa85c0 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 114f471a3cef..e53a2c406f36 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 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 );
}
}
}
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 3d2ea5ace652..ce2c38f20afd 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>