OLEControlSite and complete menubar loss [message #530798] |
Sat, 01 May 2010 05:01 |
|
We're using an OLEControlSite to embed MS Word in our RCP app as an
editor and becuase it's in an SWT package I assume this to be the best
place to post on a problem with it. Sorry for the length but it is
interesting so please bear with me :)
A while ago we upgraded to eclipse 3.5.1 and today a bug was discovered.
I'm wondering if it's a known bug and if it's been fixed in 3.5.2 or if
there's a workaround.
At times the RCP window's menubar gets removed - resizing or moving the
window I think triggers a redraw and the entire menubar is omitted. The
titlebar and toolbar render fine but there's no sign of the menubar.
Rather than work with the rather large editor, I created a simple
generic, no-function editor in which I can create an error condition to
duplicate the problem. If the EditorInput passed to the editor returns
null for #getName or #getToolTipText, the editor causes an Assertion
error (I think it's actually some workbench part that validates the
editor when opening it) that results in the menubar loss. This
vulnerability is not seen unless the #createPartControl instantiates an
OLEControl for MS Word, i.e. the Assertion error does not result in
menubar loss for an editor using other widgets. When using the
OLEControlSite, I see that somehow Word's menubar replaces the RCP one
while the OLEControlSite is active. I'm guessing that when the Assertion
error occurs, the RCP menubar has already been removed but the Word
menubar is unavailable for some reason and so nothing is drawn. The RCP
app has to be restarted to bring the menubar back.
To further complicate things, the real editor seems to always return
valid Strings for those methods so I don't know what exactly the problem
is with it - I just have to assume it is related as the result is the
same. I'm hoping if I get this one under control the real editor will
work.
I ran my EditorTest plugin in eclipse 3.4.x and the Assertion error
occurred but the RCP menubar remains. This leads me to believe this
vulnerability was introduced in 3.5.0 or 3.5.1. We do not have 3.5.2 on
our intranet yet to test if it has the flaw as well.
I'm not sure if it's pertinent but we're using MS Office 2003 SP3.
Has anyone else seen this behaviour? Do you agree it's an SWT
vulnerability or could we just not be using the OLEControlSite properly
(sorry I don't have code to attach right now)?
Interesting right? Any comments would be greatly appreciated because I'm
at a loss.
Craig
|
|
|
|
Powered by
FUDForum. Page generated in 0.03773 seconds