diff options
author | Antonio Fernandez <antonio.fernandez@aentos.es> | 2012-08-13 20:21:11 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2012-11-14 13:52:41 +0100 |
commit | 2b91cea7a2887d53a742c2f52dbcebd79fc0bd3c (patch) | |
tree | 0fb00209efadf76e34f8a27b55d008b74a2cb77a /vcl/source | |
parent | f847064bd9b82ab4feb9d914679fcec9fce3231c (diff) |
Menu is displayed correctly in additional instancesm but not in the main one.
Change-Id: Id7d79e47efd73ddc2eeac285c28179a5aa9ecc37
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/menu.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index d33f4c4a52f6..1dd0743f2eb5 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -6067,6 +6067,7 @@ void printMenu( AbstractMenu* pMenu ) { if (itemData->pSubMenu) { cout << ">> SUBMENU <<" << endl; + //FIXME: This callback would introduce some noise in accessibility software. itemData->pSubMenu->Activate(); printMenu( itemData->pSubMenu ); } @@ -6075,9 +6076,26 @@ void printMenu( AbstractMenu* pMenu ) { } } +void generateMenuHierarchy( AbstractMenu* pMenu ) { + if ( pMenu ) { + sal_uInt16 itemCount = pMenu->GetItemCount(); + MenuItemList *items = ((Menu*)pMenu)->GetItemList(); + + for (int i=0; i < itemCount; i++) { + MenuItemData *itemData = items->GetDataFromPos(i); + + if (itemData->pSubMenu) { + itemData->pSubMenu->Activate(); + generateMenuHierarchy( itemData->pSubMenu ); + } + } + } +} + void Menu::Freeze() { - printMenu( this ); - cout << "============================================================" << endl; +// printMenu( this ); + generateMenuHierarchy( this ); +// cout << "============================================================" << endl; SalMenu *pSalMenu = ImplGetSalMenu(); |