diff options
author | Justin Luth <justin.luth@collabora.com> | 2022-10-12 13:08:59 -0400 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-10-14 09:40:30 +0200 |
commit | a8209c52d6daeb00ed85d5c705ec84c9603e2f3e (patch) | |
tree | 1d52434de2c744fe62082df35dc38970ca7aaab2 | |
parent | 8717a700e847330897b44aa40d1787c65dfa64be (diff) |
sw vba: add WordBasic.ScreenUpdating
Change-Id: I3d074c224b77eff9f4ab1ea6bade6d66828fc88c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141273
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | oovbaapi/ooo/vba/word/XWordBasic.idl | 1 | ||||
-rw-r--r-- | sw/qa/core/data/docm/testVBA.docm | bin | 0 -> 24779 bytes | |||
-rw-r--r-- | sw/qa/core/macros-test.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/vba/vbawordbasic.cxx | 7 | ||||
-rw-r--r-- | sw/source/ui/vba/vbawordbasic.hxx | 1 |
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 Binary files differnew file mode 100644 index 000000000000..c02e353c3c3e --- /dev/null +++ b/sw/qa/core/data/docm/testVBA.docm 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 |