• Maxim Monastirsky's avatar
    chart2: Fix using the last shape · 209eea54
    Maxim Monastirsky yazdı
    Clicking a shape button works only for the default shape,
    not for the last used one.
    
    Steps to reproduce:
    1) Click on the drop-down arrow of one of the shape buttons,
       and select a shape. Notice that the button icon updates
       with the last selected shape.
    2) Click on another button.
    3) Click on the first button, and try to draw something.
       The button doesn't work anymore. Only opening the sub
       toolbar and selecting the shape there will work.
    
    The problem is in ToolboxController::execute that requires
    the command to be in the listener map, but we didn't
    register sub commands (like .uno:SymbolShapes.sun).
    Instead of doing that, we'll try some generic solution.
    (Note that calling the corresponding method from
    SvxTbxCtlCustomShapes like we do in other methods here
    won't work, because ChartController::queryDispatch checks
    for the "_self" target, but SfxToolBoxControl::Dispatch
    doesn't provide it.)
    
    Change-Id: I5be3dfd3ee3ca9ab9d8080929173dbe5984f61a0
    209eea54
ShapeToolbarController.cxx 10.6 KB