Apache OpenOffice (AOO) Bugzilla – Issue 68893
VBA: support excel sheet control events
Last modified: 2013-08-07 15:12:27 UTC
vba controls ( the ones from the tool-box not the form controls ) can have events associated with them, e.g. A button named commandbutton1 when clicked will try and invoke a macro called commandbutton1_click located in the associated sheet module. Similarly each control ( from the toolbox ) has a set of supported events. Additionally not all of the vba events routines have an equivalent OpenOffice.org event. This set of patches "Tries" to do its best and does 2 things 1) when importing a control from excel it creates a binding if it finds a macro event handler associated with the control e.g. a "private Sub object_Click(...)" or whatever. If one of these event handlers is defined ( located in the sheet module the control is located on ) a "special" script binding is attached to the imported control for best fit openoffice.org event. "special" - means its get special treatment and is not handled the same as a normal script binding 2) when an OpenOffice.org event is fired by the imported XL control that has the "special" binding, instead of calling the macro script directlyy the event is forwarded to code that attempts to call the equivelant VBA event macro handler (but first it uses information about the event and the handler to determine the correct parameters to pass etc. )
Created attachment 38727 [details] set of patches to call vba-like macro event handlers for imported controls
change summary
change ownership, DR, I think I remember you claiming responsibility for all things macro/control/import for calc, so here you are
target/started
Is this patch still valid? If not: relabel as "Enhancement" If yes: can we please come to an agreement whether it can be integrated before we reach its first anniversary?
wrong component
Is this patch still valid? As I see it makes use of the ENABLE_VBA define which was told me to be obsolete...
yes, the work is still valid, the patch maybe out of date ( I'm pretty sure it is :-( ), let me check and I will get back. Probably we could discuss this patch further, I'd be happy for more ideas... but I also want the bones of this to be useable also with imported userform controls which have the same issue. the enable_vba is just a trhowback to earlier times when we had vba support configured in/out of the build ( not sure if it still exists in our current patches )
Created attachment 46191 [details] new versions of patches
latest versions with ENABLE_VBA bits removed. The patches are slightly different from ooo-build ( only in ENABLE_VBA ) which I keep in ooo-build for the moment. * this patch depends on idl present in the oovbaapi project * we can discuss whether this is the right place for the interface once you start looking at this patch in more detail and get more familiar with the whole thing * the location ( e.g. of the interface/service ) will affect some needed makefile magic, e.g. if we locate the new service/interface definintion in offapi/ridl then we get the generated headers without needed to generate them. If they remain in oovbaapi then sc will need some tweaking to generate the headers ( and oovbapi will need to be built unconditionally, currently it is configurable in the build ) * perhaps we can work on this together in a single cws? ( if you like )
I hope we can consider this for OOo 2.X or 2.3 (better) otherwise something will become obsolete again before it is used. Thanks add CC.
Covered now by #i102261. Setting this one to duplicate, as the new issue has the current patches. *** This issue has been marked as a duplicate of 102261 ***
CLOSED