[Libreoffice-bugs] [Bug 34635] New: framework::DropdownToolbarController: dispatch does not get selected item text

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 23 19:55:06 CET 2011


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

           Summary: framework::DropdownToolbarController: dispatch does
                    not get selected item text
           Product: LibreOffice
           Version: LibO 3.3.1 RC1
          Platform: x86-64 (AMD64)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Libreoffice
        AssignedTo: libreoffice-bugs at lists.freedesktop.org
        ReportedBy: dhiller1 at gmx.de


see bug inherited from OOo:
http://www.openoffice.org/issues/show_bug.cgi?id=104788 . 

It is about 1.5 years old and inhibits extension developers (like me) from
using the Dropdownbox in the toolbar.

There is only ONE line that has to be changed according to the api mailing list
and that bug report is below:

Index: framework/source/uielement/dropdownboxtoolbarcontroller.cxx 
===================================================================
--- framework/source/uielement/dropdownboxtoolbarcontroller.cxx    (revision
274324)
+++ framework/source/uielement/dropdownboxtoolbarcontroller.cxx    (working
copy)
@@ -222,7 +222,7 @@
             xDispatch = getDispatchFromCommand( m_aCommandURL );
             aCommandURL = m_aCommandURL;
             aTargetURL = getInitializedURL();
-            aSelectedText = m_pListBoxControl->GetText();
+            aSelectedText = m_pListBoxControl->GetSelectEntry();
         }
     }

Background info:
In an extension one can design an own toolbar, that might contain this
dropdownbox.
When this value is changed the extension gets notified via a dispatch through
the above procedure.
The "aSelectedText" should contain the text content of the newly selected
dropdownbox item, but due to this bug just returns an empty string.
So the extension does not know which item was selected.
My current work around: using ToggleDropdownButton (not as nice in this
circumstance)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Libreoffice-bugs mailing list