https://issues.apache.org/ooo/show_bug.cgi?id=121960

--- Comment #16 from Andre <[email protected]> ---
I have checked in my changes without using svt::ToolboxController.  I have
extended sfx2::sidebar::ControllerItem to check whether a command is disabled
when the ControllerItem constructor is provided with the command name and an
XFrame object.  ControllerItem makes use of new class CommandInfoProvider to
determine the label plus keyboard accelerator.  Now the lables of buttons for
subscript and superscript of the TextPropertyPanel show proper shortcuts.

Reasons for not using svt::ToolboxController:
- ToolboxController is UNO only.  Using it would require a complete refactoring
for each panel.
- Its header is poorly documented.
- It is almost 900 lines long and does not provide much beside state updates.
Especially no labels.


Btw, I was wrong earlier.  queryDispatch really does return an empty reference
for a command that is disabled.  But that also means that when a command
becomes enabled then this state change is not broadcast.  This is the reason
why the text toolbar will show eg the bold button only after a restart while
the modified TextPropertyPanel updates the state immediately.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to