https://bugs.freedesktop.org/show_bug.cgi?id=36475

--- Comment #12 from Jan Holesovsky <[email protected]> 2012-03-30 05:17:09 PDT ---
In order this to be a proper Easy Hack, we need some code pointers ;-)

So, the (some toolbar) -> Close toolbar functionality seems to be
"MENUITEM_TOOLBAR_CLOSE", implemented here:

http://opengrok.libreoffice.org/xref/core/framework/source/uielement/toolbarmanager.cxx#1969

It calls ToolBarManager's ExecuteHdl_Impl() method with information about the
toolbar, which ends up here:

http://opengrok.libreoffice.org/xref/core/framework/source/uielement/toolbarmanager.cxx#2165

The Esc handler of Findbar on the contrary does this:

http://opengrok.libreoffice.org/xref/core/svx/source/tbxctrls/tbunosearchcontrollers.cxx#139

It turns out the ExecuteHdl_Impl() [toolbarmanager.cxx#2165] already has the
xLayoutManager, so instead of the dynamic cast & calling Close, I'd try if we
can do xLayoutManager->hideElement(pExecuteInfo->aToolbarResName) followed by
xLayoutManager->destroyElement(pExecuteInfo->aToolbarResName) as in the
findbar.

If this gets more complicated, please ping me :-)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to