Issue 104788 - framework::DropdownToolbarController: dispatch does not get selected item text
Summary: framework::DropdownToolbarController: dispatch does not get selected item text
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: Ariel Constenla-Haile
QA Contact: issues@framework
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-04 11:55 UTC by Ariel Constenla-Haile
Modified: 2017-05-20 10:30 UTC (History)
2 users (show)

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


Attachments
dropdownboxtoolbarcontroller.cxx fix (616 bytes, patch)
2009-09-04 12:02 UTC, Ariel Constenla-Haile
no flags Details | Diff
Updated patch (752 bytes, patch)
2011-10-22 17:30 UTC, Ariel Constenla-Haile
no flags Details | Diff
Complex Toolbar Controls Extension from the SDK (50.79 KB, patch)
2011-10-22 17:37 UTC, Ariel Constenla-Haile
no flags Details | Diff
Complex Toolbar Controls Extension from the SDK (51.25 KB, patch)
2011-10-25 22:47 UTC, Ariel Constenla-Haile
no flags Details | Diff
Complex Toolbar Controls Extension from the SDK (51.25 KB, patch)
2011-10-28 05:20 UTC, Ariel Constenla-Haile
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2009-09-04 11:55:04 UTC
As reported by Krzysztof RÄ…czkiewicz at dev@api.openoffice.org  
http://api.openoffice.org/servlets/BrowseList?list=dev&by=thread&from=2275837
framework::DropdownToolbarController does not send the selected text to the
dispatch object.

Root cause is the method used to retrieve the text from the ListBox
http://svn.services.openoffice.org/opengrok/xref/DEV300_m56/framework/source/ui
it should be ListBox::GetSelectEntry()
Comment 1 Ariel Constenla-Haile 2009-09-04 12:02:04 UTC
Created attachment 64545 [details]
dropdownboxtoolbarcontroller.cxx fix
Comment 2 Ariel Constenla-Haile 2011-10-22 14:12:13 UTC
These bug is two years old. Really a shame.
Taking ownership.
Started.
Comment 3 Ariel Constenla-Haile 2011-10-22 17:30:23 UTC
Created attachment 76921 [details]
Updated patch
Comment 4 Ariel Constenla-Haile 2011-10-22 17:37:34 UTC
Created attachment 76922 [details]
Complex Toolbar Controls Extension from the SDK

Among other small clean up, the patch adds code to get the selected item text.

* Build the extension with DEBUG=yes.
* Try the extension without applying the patch in the framework module
* The terminal output should look like:

Trace 13674/1: "Dropdownbox control - selected entry text : "
Trace 13674/1: "Dropdownbox control - selected entry text : "
Trace 13674/1: "Dropdownbox control - selected entry text : "
Trace 13674/1: "Dropdownbox control - selected entry text : "

The dispatch does not get the selected text.


* Apply the patch in the framework module and try the extension
* The output should display the selected entry text:

Trace 13815/1: "Dropdownbox control - selected entry text : Blue"
Trace 13815/1: "Dropdownbox control - selected entry text : Orange"
Trace 13815/1: "Dropdownbox control - selected entry text : Black"
Trace 13815/1: "Dropdownbox control - selected entry text : Pink"
Comment 5 Ariel Constenla-Haile 2011-10-25 22:47:23 UTC
Created attachment 76929 [details]
Complex Toolbar Controls Extension from the SDK
Comment 6 Pedro Giffuni 2011-10-27 01:32:27 UTC
I committed the first patch as revision 1189574.

The second patch appears to be malformed:

Patching file odk/examples/cpp/complextoolbarcontrols/MyListener.cxx using Plan A...
patch: **** malformed patch at line 354: @@ -57,12 +50,12 @@ css::uno::Any SAL_CALL MyListener::execute(const css::uno::Sequence< css::beans:
[
Comment 7 Ariel Constenla-Haile 2011-10-28 05:20:55 UTC
Created attachment 76935 [details]
Complex Toolbar Controls Extension from the SDK
Comment 8 Ariel Constenla-Haile 2011-10-28 05:22:21 UTC
(In reply to comment #6)
> I committed the first patch as revision 1189574.
> 
> The second patch appears to be malformed:
> 
> Patching file odk/examples/cpp/complextoolbarcontrols/MyListener.cxx using Plan
> A...
> patch: **** malformed patch at line 354: @@ -57,12 +50,12 @@ css::uno::Any
> SAL_CALL MyListener::execute(const css::uno::Sequence< css::beans:
> [

please try the new version (though I'm not sure what the error can be, I run diff between v2 and v3 of the patch, and they are the same, no diffence at all).
Comment 9 Pedro Giffuni 2011-10-28 15:39:05 UTC
I think the problem was GNU diff/patch.
svn commit -m "i104788 - Complex Toolbar Controls Extension from the SDK"
Sending        odk/examples/cpp/complextoolbarcontrols/Addons.xcu
Sending        odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h
Sending        odk/examples/cpp/complextoolbarcontrols/Makefile
Sending        odk/examples/cpp/complextoolbarcontrols/MyJob.cxx
Sending        odk/examples/cpp/complextoolbarcontrols/MyJob.h
Sending        odk/examples/cpp/complextoolbarcontrols/MyListener.cxx
Sending        odk/examples/cpp/complextoolbarcontrols/MyListener.h
Sending        odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
Sending        odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.h
Sending        odk/examples/cpp/complextoolbarcontrols/exports.cxx
Transmitting file data ..........
Committed revision 1190390.

Thanks!