Issue 68893 - VBA: support excel sheet control events
Summary: VBA: support excel sheet control events
Status: CLOSED DUPLICATE of issue 102261
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: 680m180
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: daniel.rentz
QA Contact: issues@sc
URL:
Keywords:
Depends on: 68883
Blocks:
  Show dependency tree
 
Reported: 2006-08-23 15:40 UTC by noel.power
Modified: 2013-08-07 15:12 UTC (History)
5 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
set of patches to call vba-like macro event handlers for imported controls (15.81 KB, application/octet-stream)
2006-08-23 15:41 UTC, noel.power
no flags Details
new versions of patches (15.41 KB, application/octet-stream)
2007-06-22 17:03 UTC, noel.power
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description noel.power 2006-08-23 15:40:17 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. )
Comment 1 noel.power 2006-08-23 15:41:16 UTC
Created attachment 38727 [details]
set of patches to call vba-like macro event handlers for imported controls
Comment 2 noel.power 2006-08-23 17:17:25 UTC
change summary
Comment 3 noel.power 2006-08-23 17:32:21 UTC
change ownership, DR, I think I remember you claiming responsibility for all
things macro/control/import for calc, so here you are 
Comment 4 daniel.rentz 2006-10-16 15:28:33 UTC
target/started
Comment 5 Mathias_Bauer 2007-04-10 10:28:01 UTC
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?
Comment 6 Mathias_Bauer 2007-05-15 14:04:22 UTC
wrong component
Comment 7 daniel.rentz 2007-06-18 12:07:36 UTC
Is this patch still valid? As I see it makes use of the ENABLE_VBA define which
was told me to be obsolete...
Comment 8 noel.power 2007-06-21 10:09:30 UTC
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 )
Comment 9 noel.power 2007-06-22 17:03:32 UTC
Created attachment 46191 [details]
new versions of patches
Comment 10 noel.power 2007-06-22 17:12:28 UTC
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 )

Comment 11 utomo99 2007-07-04 05:23:13 UTC
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. 
Comment 12 ab 2009-08-11 14:13:02 UTC
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 ***
Comment 13 ab 2009-08-11 14:18:29 UTC
CLOSED