diff options
author | Justin Luth <justin.luth@collabora.com> | 2022-09-30 10:33:00 -0400 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-10-01 08:56:13 +0200 |
commit | acc71c3e502f23daaf2489d102dda3b00a45960a (patch) | |
tree | c7196a69e9b101270cb2211294b3b240dcf839c9 /sw/util | |
parent | dc3a6485b67ca0996803e3799faa76a11cddb46a (diff) |
tdf#148806 sw vba: fix GetVbaEventProcessor
I've decided this is not an API change because there exists
offapi/com/sun/star/script/vba/VBATextEventProcessor.idl
This patch allows New, Open, and Close events to be
sent to VBA macro event handlers.
I tested with DOCUMENT_OPEN.
Amazing - all this stuff is here in place,
but isn't properly wired up. How can so much
ground-work be done without it ever being functional?
I don't think this has ever worked,
and the same problem/code is seen in OpenOffice.
The service names were already mismatched in the initial patch:
commit fc135411fa926f4d89e98378d113f597af79e2a2
Author: Daniel Rentz on Tue Jul 6 19:34:53 2010 +0200
mib17: #i112634# add VBA sheet event handling,
based on a patch from Noel Power
https://bz.apache.org/ooo/show_bug.cgi?id=112634
says "Additionally I added the hooks for vba for word
( but they are compiled out for now )"
Enabling this will open up the doors to a lot of
untested code I think.
I had to move initialization of mxVbaEvents
because it was being set without a VBA project,
but it didn't work to put it in VbaGlobals like Calc does.
Change-Id: I08cc0e33444dc7dfaac82cf6cebb1a89dbb69faa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140801
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/util')
-rw-r--r-- | sw/util/vbaswobj.component | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/util/vbaswobj.component b/sw/util/vbaswobj.component index 99ea11407d74..ea6f15ef721f 100644 --- a/sw/util/vbaswobj.component +++ b/sw/util/vbaswobj.component @@ -23,7 +23,7 @@ <service name="ooo.vba.word.Document"/> </implementation> <implementation name="SwVbaEventsHelper" constructor="Writer_SwVbaEventsHelper_get_implementation"> - <service name="com.sun.star.document.vba.VBATextEventProcessor"/> + <service name="com.sun.star.script.vba.VBATextEventProcessor"/> </implementation> <implementation name="SwVbaGlobals" constructor="Writer_SwVbaGlobals_get_implementation"> <service name="ooo.vba.word.Globals"/> |