summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authornpower Developer <npower@openoffice.org>2010-02-26 18:29:25 +0000
committernpower Developer <npower@openoffice.org>2010-02-26 18:29:25 +0000
commit1c87beca79bc52e9d3aa97bf05f409c5906723cc (patch)
treeea28e9b8f3aca8f179851bc7ed93d03956e42700 /vbahelper
parent06a855ff63da3f91d954264181182f5ffff5e385 (diff)
npower14miscfixes: #i109644# don't load vba stuff for odf document ( untill you go into vbamode in basic )
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/inc/vbahelper/vbahelper.hxx12
-rw-r--r--vbahelper/prj/d.lst1
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx16
3 files changed, 8 insertions, 21 deletions
diff --git a/vbahelper/inc/vbahelper/vbahelper.hxx b/vbahelper/inc/vbahelper/vbahelper.hxx
index 315ddb19b7ca..aa7ff9b292a7 100644
--- a/vbahelper/inc/vbahelper/vbahelper.hxx
+++ b/vbahelper/inc/vbahelper/vbahelper.hxx
@@ -35,17 +35,19 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XDevice.hpp>
+#include <basic/basmgr.hxx>
#include <basic/sberrors.hxx>
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/frame/XModel.hpp>
#include <sfx2/dispatch.hxx>
-//#include <ooo/vba/msforms/XShape.hpp>
+#include <sfx2/objsh.hxx>
+#include <sfx2/docfilt.hxx>
+#include <sfx2/docfile.hxx>
#include <vcl/pointr.hxx>
-#define VBAHELPER_DLLIMPLEMENTATION
-#include <vbahelper/vbadllapi.h>
#include <memory>
-namespace css = ::com::sun::star;
+#include "vbaaccesshelper.hxx"
+namespace css = ::com::sun::star;
namespace ooo
{
namespace vba
@@ -62,7 +64,7 @@ namespace ooo
}
VBAHELPER_DLLPUBLIC SfxObjectShell* getSfxObjShell( const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::uno::RuntimeException);
VBAHELPER_DLLPUBLIC css::uno::Reference< css::uno::XInterface > createVBAUnoAPIService( SfxObjectShell* pShell, const sal_Char* _pAsciiName ) throw (css::uno::RuntimeException);
- VBAHELPER_DLLPUBLIC css::uno::Reference< css::uno::XInterface > createVBAUnoAPIServiceWithArgs( SfxObjectShell* pShell, const sal_Char* _pAsciiName, const css::uno::Sequence< css::uno::Any >& aArgs ) throw (css::uno::RuntimeException);
+
css::uno::Reference< css::frame::XModel > getCurrentDoc( const rtl::OUString& sKey ) throw (css::uno::RuntimeException);
VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getCurrentExcelDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException);
VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getCurrentWordDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException);
diff --git a/vbahelper/prj/d.lst b/vbahelper/prj/d.lst
index d7b61d1e5a61..d683e97c8b90 100644
--- a/vbahelper/prj/d.lst
+++ b/vbahelper/prj/d.lst
@@ -8,6 +8,7 @@
mkdir: %_DEST%\inc%_EXT%\basic
..\inc\vbahelper\vbacollectionimpl.hxx %_DEST%\inc%_EXT%\vbahelper\vbacollectionimpl.hxx
..\inc\vbahelper\vbahelper.hxx %_DEST%\inc%_EXT%\vbahelper\vbahelper.hxx
+..\inc\vbahelper\vbaaccesshelper.hxx %_DEST%\inc%_EXT%\vbahelper\vbaaccesshelper.hxx
..\inc\vbahelper\helperdecl.hxx %_DEST%\inc%_EXT%\vbahelper\helperdecl.hxx
..\inc\vbahelper\vbahelperinterface.hxx %_DEST%\inc%_EXT%\vbahelper\vbahelperinterface.hxx
..\inc\vbahelper\vbaapplicationbase.hxx %_DEST%\inc%_EXT%\vbahelper\vbaapplicationbase.hxx
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 83bd677dd7de..954ef826e529 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -98,15 +98,6 @@ namespace ooo
namespace vba
{
-uno::Reference< lang::XMultiServiceFactory > getVBAServiceFactory( SfxObjectShell* pShell )
-{
- uno::Any aUnoVar;
- if ( !pShell || ! pShell->GetBasicManager()->GetGlobalUNOConstant( "VBAGlobals", aUnoVar ) )
- throw lang::IllegalArgumentException();
- uno::Reference< lang::XMultiServiceFactory > xVBAFactory( aUnoVar, uno::UNO_QUERY_THROW );
- return xVBAFactory;
-}
-
css::uno::Reference< css::uno::XInterface > createVBAUnoAPIService( SfxObjectShell* pShell, const sal_Char* _pAsciiName ) throw (css::uno::RuntimeException)
{
OSL_PRECOND( pShell, "createVBAUnoAPIService: no shell!" );
@@ -114,13 +105,6 @@ css::uno::Reference< css::uno::XInterface > createVBAUnoAPIService( SfxObjectShe
return getVBAServiceFactory( pShell )->createInstance( sVarName );
}
-css::uno::Reference< css::uno::XInterface > createVBAUnoAPIServiceWithArgs( SfxObjectShell* pShell, const sal_Char* _pAsciiName, const uno::Sequence< uno::Any >& aArgs ) throw ( css::uno::RuntimeException )
-{
- OSL_PRECOND( pShell, "createVBAUnoAPIService: no shell!" );
- ::rtl::OUString sVarName( ::rtl::OUString::createFromAscii( _pAsciiName ) );
- uno::Reference< uno::XInterface > xIf = getVBAServiceFactory( pShell )->createInstanceWithArguments( sVarName, aArgs );
- return xIf;
-}
// helper method to determine if the view ( calc ) is in print-preview mode
bool isInPrintPreview( SfxViewFrame* pView )
{