Hi Carsten,

>> 2)Implement a DispatchProvider for command .uno:SearchText, here are
>> the ideas how to implement this:
>> - add a new unocommandsdispatcher.hxx/cxx in
>> framework/source/dispatch/, implement a new UNO component
>> UnoCommandsDispatcher, which implements interfaces XDispatchProvider
>> and XDispatch. In the dispatch call we can set the cursor to the
>> EditControl of the findbar by such way:
>> getLayoutManager(m_xFrame)->getElement("private:resource/toolbar/findbar")->GetWindow()->GetItemWindow(nId)->GrabFocus().
> I am sorry, but I don't like this idea either. This is clearly a hack as
> we add special code in a generic implementation. Best way would be to
> implement a ProtocolHandler in svx for the find bar. That's something we
> can extend as we like and we don't need to change generic code. You can
> find more information about ProtocolHandler in the Developer's Guide.
> It's also possible to use the skeleton-maker from the OpenOfficr.org SDK.
>
Yes, it's the best way to implement a ProtocolHandler for findbar. And
such a ProtocolHandler, which can handle command URLs as
"vnd.sun.star.findbar:*", has been implemented, and the shortcut key
Ctrl+G can set focus to the EditControl of findbar. The code changes
will be committed to the cws findbar today. Later could you please
review them and make some tests?  Thanks a lot for your help.


Regards,
Yan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@framework.openoffice.org
For additional commands, e-mail: dev-h...@framework.openoffice.org

Reply via email to