From 55628d6b258f77eac8a34a1a8f6bbcbf09fd97cc Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Thu, 13 Oct 2022 17:22:52 -0400 Subject: [PATCH] sw vba: add WordBasic.MsgBox The unit test just consists of adding a "WordBasic.MsgBox()" to the vba code in testVBA.docm. make CppunitTest_sw_macros_test or just open the file manually for an easy-to-run experience. Change-Id: I38edfee42649fcc85f0f535a2c9861c45038fa0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141347 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Miklos Vajna --- include/vbahelper/vbahelper.hxx | 4 ++++ oovbaapi/ooo/vba/word/XWordBasic.idl | 1 + sw/qa/core/data/docm/testVBA.docm | Bin 24779 -> 24218 bytes sw/source/ui/vba/vbawordbasic.cxx | 13 +++++++++++++ sw/source/ui/vba/vbawordbasic.hxx | 1 + vbahelper/source/vbahelper/vbahelper.cxx | 21 +++++++++++++++++++++ 6 files changed, 40 insertions(+) diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx index 533d5e3698b6..9be2b900a019 100644 --- a/include/vbahelper/vbahelper.hxx +++ b/include/vbahelper/vbahelper.hxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -131,6 +132,9 @@ namespace ooo::vba VBAHELPER_DLLPUBLIC bool setPropertyValue( css::uno::Sequence< css::beans::PropertyValue >& aProp, const OUString& aName, const css::uno::Any& aValue ); VBAHELPER_DLLPUBLIC void setOrAppendPropertyValue( css::uno::Sequence< css::beans::PropertyValue >& aProp, const OUString& aName, const css::uno::Any& aValue ); + VBAHELPER_DLLPUBLIC bool executeRunTimeLibrary(const std::u16string_view& rSbRtl_command, + SbxArray* pParameters); + class VBAHELPER_DLLPUBLIC Millimeter { //Factor to translate between points and hundredths of millimeters: diff --git a/oovbaapi/ooo/vba/word/XWordBasic.idl b/oovbaapi/ooo/vba/word/XWordBasic.idl index 66c867f09364..7cc1efe8bd56 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 MsgBox( [in] string Prompt ); void ScreenUpdating( [in] /*optional*/ any On ); }; diff --git a/sw/qa/core/data/docm/testVBA.docm b/sw/qa/core/data/docm/testVBA.docm index c02e353c3c3e98175246252c50f349efa3790128..a2609feb6cd0b6673c68ceeed54a36efb1e5cb2c 100644 GIT binary patch delta 10126 zcmZ8{WmKI(kR?3a-Q9z`ySuv++}-U%f=dVwcb7nL5Atw#3liLe1q%e*%*^i2?ADL! zKHYV?{`Bpt)AvsHL+A8BHwYr5qp0`cQNuz(c_BkVVL^d^8{>eDkTHSaI5MAn-c;uW zC{|)x*1v>v)HYtMsZ5GbP3GG~S{a8zxtGHjO+0ymUPnwlL4CS(hA6+v=CyMQ7}5~) zN!ac!mEQl}UOG#~-Ku!$5wli!GmwS=_xl)Ed_?>K-#$ISQnpO;>57#rU)9vEdOc}< zIGRbH`sPt_ecY)js*MY95%eTAcCV^0&~ECk91I9v`wiaZ2(Ck_wRyCW(0Y-r@NO?R zf5@tHe*ap-Em5D9>1C+Y2XlU4iD6aI(kA4DnBV$ojyB;_PG3)yXxtuN-~3J6xWx63 z<`P(Rx$ot*=pTcbi9dC0Y8&<84H=~e^{A$!tG~2T0g7m@tQ!&lBYGHvdp&KWJdN&% zh(!p7?kl@xPB)&4Hr6M5!C<5)tHL1qc*UOs!N!hV<56*s1#i9W6?H~J=`Ug}2tAIC z?i_s)hMrjT^&~mZOkv>p5VIyFjgp)5kHtwgx7dU(3sn8dW%>;)N6}Z;ebl+A8E8Px z0__tAVOc5X&jeRMw*PElfBeD};JUn0Cl@Y3wAB-Mnk_KISV@fpF*#L0eoyvv+CIfU zbaheixbY5#qgCR63e^wSb)7JB;5mbq6&Y&Ia0<*!c7>l+g0ey{d(R)L!qX z6+_YWl~j(H6wtqB)i#x2^3~<>+6O9G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`7vFp0Kl z7NYe$<9S|j`*rFnCpDF^A=O@6UBc}p_5fEPO?mU z%+w!Y7KdbEy^K{{tl3B7wrx*+b<{-OrnF-H$&Uy^@zo$rmZ_g?bqP2Iml2rb(Kse- z%_-IK8JJw|z5@#svc1Q}a&h_kENsPEh_+qfD1F-?4?>mFshT<%M5u$o{r>+!Oht>w+J z8Oa6gXhU*)zKRF`Mk3C=`1j+Uxa=Ji2L9L=8jB}GIWHECmrfvWt+PK_-hl|d!u^Y~ z6;DoHYudN%lOdXU7*6_dd>0;nt&cOLrR&!844M%&_Mv!J@kIDeFO1!@P7M-&dN{4H zByQ7<)$0^2gG82c-5t-aYjuEsl%LmEFi1-k4xSx^4?+T=z%~sg{~u0at)UiN9PGtV z9L^IaW+Vx3g9~%R#e*dpvB2rWx{XxfbqHWk0wNfdF*e!%BoqA${(po6reget{J-!k z90d)99sICZV@C4-#%CZ9&j05?CkXpuEDnz<2E#NFgMSf+shP;blS{&2 zCZh1e3b1(-E%+Hl7_BKA`G0lEe@Q67|1$=>7R6A&5*^dBzNe+#GHzeL0^StuU)|1J>_2;(1q#QtxOf2V1Em^+jf3C{RG*8c@? C!w2C2 diff --git a/sw/source/ui/vba/vbawordbasic.cxx b/sw/source/ui/vba/vbawordbasic.cxx index ae59cf245f55..f08ed4e0daa8 100644 --- a/sw/source/ui/vba/vbawordbasic.cxx +++ b/sw/source/ui/vba/vbawordbasic.cxx @@ -22,6 +22,8 @@ #include "vbamailmerge.hxx" #include "vbawordbasic.hxx" +#include +#include #include #include #include @@ -242,6 +244,17 @@ css::uno::Any SAL_CALL SwWordBasic::AppCount() return css::uno::Any(sal_Int32(2)); } +void SAL_CALL SwWordBasic::MsgBox(const OUString& sPrompt) +{ + SbxArrayRef pArgs = new SbxArray; + SbxVariable* pVar = new SbxVariable(); + pVar->PutString(sPrompt); + pArgs->Put(pVar, 1); + + if (!executeRunTimeLibrary(u"MsgBox", pArgs.get())) + SAL_WARN("sw.vba", "failed to execute runtime library function MsgBox (" << sPrompt << ")"); +} + void SAL_CALL SwWordBasic::ScreenUpdating(const uno::Any& On) { sal_Int32 nOn; diff --git a/sw/source/ui/vba/vbawordbasic.hxx b/sw/source/ui/vba/vbawordbasic.hxx index 75f8a05a3210..05589f0c58c5 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 MsgBox(const OUString& sPrompt) override; virtual void SAL_CALL ScreenUpdating(const css::uno::Any& On) override; }; diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index 4e71cb582565..2722f627e9ba 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -746,6 +746,27 @@ void setOrAppendPropertyValue( uno::Sequence< beans::PropertyValue >& aProp, con pProp[ nLength ].Value = aValue; } +bool executeRunTimeLibrary(const std::u16string_view& rSbRtl_command, SbxArray* pParameters) +{ + StarBASIC* pBasic = dynamic_cast< StarBASIC* >(StarBASIC::GetActiveModule()->GetParent()); + if (!pBasic) + return false; + + SbxObject* pRunTimeLibrary = pBasic->GetRtl(); + if (!pRunTimeLibrary) + return false; + + SbxVariable* pFound = pRunTimeLibrary->Find(OUString(rSbRtl_command), SbxClassType::Method); + SbxMethod* pMethod = dynamic_cast(pFound); + if (!pMethod) + return false; + + pMethod->SetParameters(pParameters); + // Believe it or not, this actually runs the command + pMethod->Broadcast(SfxHintId::BasicDataWanted); + return true; +} + // ====UserFormGeomentryHelper==== UserFormGeometryHelper::UserFormGeometryHelper(