diff options
-rw-r--r-- | oovbaapi/ooo/vba/word/XGlobals.idl | 1 | ||||
-rw-r--r-- | sw/source/ui/vba/vbaglobals.cxx | 9 | ||||
-rw-r--r-- | sw/source/ui/vba/vbaglobals.hxx | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/oovbaapi/ooo/vba/word/XGlobals.idl b/oovbaapi/ooo/vba/word/XGlobals.idl index 8d2ee3900fcc..0e16bcb08d4e 100644 --- a/oovbaapi/ooo/vba/word/XGlobals.idl +++ b/oovbaapi/ooo/vba/word/XGlobals.idl @@ -31,6 +31,7 @@ interface XGlobals : com::sun::star::uno::XInterface [attribute, readonly] ooo::vba::word::XSystem System; [attribute, readonly] ooo::vba::word::XOptions Options; [attribute, readonly] ooo::vba::word::XSelection Selection; + [attribute, readonly] ooo::vba::word::XWordBasic WordBasic; any CommandBars( [in] any Index ); any Documents( [in] any Index ); any Addins( [in] any Index ); diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx index f1c948c6cb5f..a319a4aea13d 100644 --- a/sw/source/ui/vba/vbaglobals.cxx +++ b/sw/source/ui/vba/vbaglobals.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbaglobals.hxx" +#include "vbawordbasic.hxx" #include <sal/log.hxx> #include <com/sun/star/beans/PropertyValue.hpp> @@ -126,6 +127,14 @@ SwVbaGlobals::getSelection() return getApplication()->getSelection(); } +uno::Reference<word::XWordBasic> SAL_CALL SwVbaGlobals::getWordBasic() +{ + assert(dynamic_cast<SwVbaApplication*>(getApplication().get())); + SwVbaApplication* pVbaApp = static_cast<SwVbaApplication*>(getApplication().get()); + uno::Reference<word::XWordBasic> xWB(new SwWordBasic(pVbaApp)); + return xWB; +} + float SAL_CALL SwVbaGlobals::CentimetersToPoints( float Centimeters ) { return getApplication()->CentimetersToPoints( Centimeters ); diff --git a/sw/source/ui/vba/vbaglobals.hxx b/sw/source/ui/vba/vbaglobals.hxx index af26f1b6256d..72f4ca07829c 100644 --- a/sw/source/ui/vba/vbaglobals.hxx +++ b/sw/source/ui/vba/vbaglobals.hxx @@ -50,6 +50,7 @@ public: virtual css::uno::Reference<ov::word::XWindow> SAL_CALL getActiveWindow() override; virtual css::uno::Reference<ooo::vba::word::XOptions> SAL_CALL getOptions() override; virtual css::uno::Reference<ooo::vba::word::XSelection> SAL_CALL getSelection() override; + virtual css::uno::Reference<ooo::vba::word::XWordBasic> SAL_CALL getWordBasic() override; virtual css::uno::Any SAL_CALL CommandBars(const css::uno::Any& aIndex) override; virtual css::uno::Any SAL_CALL Documents(const css::uno::Any& aIndex) override; virtual css::uno::Any SAL_CALL Addins(const css::uno::Any& aIndex) override; |