summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oovbaapi/ooo/vba/word/XWordBasic.idl1
-rw-r--r--sw/qa/core/data/docm/testVBA.docmbin0 -> 24779 bytes
-rw-r--r--sw/qa/core/macros-test.cxx4
-rw-r--r--sw/source/ui/vba/vbawordbasic.cxx7
-rw-r--r--sw/source/ui/vba/vbawordbasic.hxx1
5 files changed, 13 insertions, 0 deletions
diff --git a/oovbaapi/ooo/vba/word/XWordBasic.idl b/oovbaapi/ooo/vba/word/XWordBasic.idl
index 7c694703a843..66c867f09364 100644
--- a/oovbaapi/ooo/vba/word/XWordBasic.idl
+++ b/oovbaapi/ooo/vba/word/XWordBasic.idl
@@ -42,6 +42,7 @@ interface XWordBasic
any DocMaximize( [in] any State );
void AppShow( [in] any WindowName );
any AppCount();
+ void ScreenUpdating( [in] /*optional*/ any On );
};
}; }; };
diff --git a/sw/qa/core/data/docm/testVBA.docm b/sw/qa/core/data/docm/testVBA.docm
new file mode 100644
index 000000000000..c02e353c3c3e
--- /dev/null
+++ b/sw/qa/core/data/docm/testVBA.docm
Binary files differ
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index f02bd34d91be..23a489517b11 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -107,6 +107,10 @@ void SwMacrosTest::testVba()
{
TestMacroInfo testInfo[] = {
{
+ OUString("testVBA.docm"),
+ OUString("vnd.sun.Star.script:Project.ThisDocument.testAll?language=Basic&location=document")
+ },
+ {
OUString("testFind.docm"),
OUString("vnd.sun.Star.script:Project.Module1.testAll?language=Basic&location=document")
},
diff --git a/sw/source/ui/vba/vbawordbasic.cxx b/sw/source/ui/vba/vbawordbasic.cxx
index c5fe14289832..ae59cf245f55 100644
--- a/sw/source/ui/vba/vbawordbasic.cxx
+++ b/sw/source/ui/vba/vbawordbasic.cxx
@@ -242,4 +242,11 @@ css::uno::Any SAL_CALL SwWordBasic::AppCount()
return css::uno::Any(sal_Int32(2));
}
+void SAL_CALL SwWordBasic::ScreenUpdating(const uno::Any& On)
+{
+ sal_Int32 nOn;
+ if (On >>= nOn)
+ mpApp->setScreenUpdating(nOn != 0);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbawordbasic.hxx b/sw/source/ui/vba/vbawordbasic.hxx
index eb9ce5d500c2..75f8a05a3210 100644
--- a/sw/source/ui/vba/vbawordbasic.hxx
+++ b/sw/source/ui/vba/vbawordbasic.hxx
@@ -86,6 +86,7 @@ public:
virtual css::uno::Any SAL_CALL DocMaximize(const css::uno::Any& State) override;
virtual void SAL_CALL AppShow(const css::uno::Any& WindowName) override;
virtual css::uno::Any SAL_CALL AppCount() override;
+ virtual void SAL_CALL ScreenUpdating(const css::uno::Any& On) override;
};
#endif // INCLUDED_SW_SOURCE_UI_VBA_VBAWORDBASIC_HXX