Issue 95180 - Context menu should be extensible by regular means
Summary: Context menu should be extensible by regular means
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: programming (show other issues)
Version: OOO300m3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-20 09:35 UTC by thomas.lange
Modified: 2017-05-20 11:15 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description thomas.lange 2008-10-20 09:35:59 UTC
Because context menus can not be extended by 'normal means' the spell check
context menu in olmenu.cxx had always to do this hardwired. That turned out
especially bad when that context menu was to extended by an extension.

It should be possible to properly extend (context) menus by adding a new slot
with the specific text to be displayed. E.g. to add proposals for misspelled
words it should be possible to add slots like
  - ".uno.Spellcheck?word=abcd"
  - ".uno.Spellcheck?word=xyz"
to provide the corrections.
Comment 1 thomas.lange 2008-10-20 09:36:22 UTC
.
Comment 2 max.odendahl 2008-10-20 13:08:58 UTC
Not sure if that helps, but when asking for a context menu from the dispatcher,
it was directly shwon and could not be manipulated.

This was changed by myself, so you can get the returned context menu from the
dispatcher, change it in any way and then show it.

E.g.

SfxPopupMenuManager* aMgr =
mpMarginWin->DocView()->GetViewFrame()->GetDispatcher()->Popup(0,
this,&rCEvt.GetMousePosPixel());
((PopupMenu*)aMgr->GetSVMenu())->SetItemText(FN_DELETE_NOTE_AUTHOR,aText);
((PopupMenu*)aMgr->GetSVMenu())->Execute(this,rCEvt.GetMousePosPixel());
			

Comment 3 Martin Hollmichel 2008-12-10 11:17:35 UTC
move target to 3.2.
Comment 4 Marcus 2017-05-20 11:15:45 UTC
Reset assigne to the default "issues@openoffice.apache.org".