Carsten Driesner 写道: > ShiZhoubo wrote: > >> Hi Carsten, >> I have finished the patch regarding controller "SupportVisiblity" >> property. >> I have tested it ,but the patch cant resolve toolbar refresh problem. >> >> Could you give me some advices? >> > Hi ShiZhoubo, > > Please debug your code and the toolbar controller parts which add the > listener to the dispatch object. The toolbar controller must be called > by a statusChanged() callback where the new state is provided. > > See svtools\source\uno\toolboxcontroller.cxx, ToolboxController::update() > See framework\source\uielement\generictoolbarcontroller.cxx, > GenericToolbarController::statusChanged() > > Regards, > Carsten > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@framework.openoffice.org > For additional commands, e-mail: dev-h...@framework.openoffice.org > > >
Hi Carsten, Following is stack information about how call "ToolboxController::update()", if current button is "ParaLeftToRight" or "ParaRightToLeft", the "GenericToolbarController::statusChanged()" cant be called. because that button's rListener.aURL.Complete != m_aCommandURL, so the xStatusListener->statusChanged( aFeatureStateEvent ) cant be excuted. as the button's m_CommandURL is ".uno:ParaRightToLeft", but its TargetURL.Complete is ".uno:CTLFontState". > svtmi.dll!svt::ToolboxController::bindListener() 行579 C++ svtmi.dll!svt::ToolboxController::update() 行259 C++ fwkmi.dll!framework::ToolBarManager::UpdateController(com::sun::star::uno::Reference<com::sun::star::frame::XToolbarController> xController={...}) 行506 + 0x12 字节 C++ fwkmi.dll!framework::ToolBarManager::CreateControllers() 行1177 C++ fwkmi.dll!framework::ToolBarManager::FillToolbar(const com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> & rItemContainer={...}) 行1460 C++ fwkmi.dll!framework::ToolBarWrapper::updateSettings() + 0xa9 字节 C++ fwkmi.dll!framework::LayoutManager::elementReplaced() + 0x147 字节 C++ fwkmi.dll!framework::ModuleUIConfigurationManager::implts_notifyContainerListener() + 0x65 字节 C++ fwkmi.dll!framework::ModuleUIConfigurationManager::replaceSettings() + 0x1e6 字节 C++ fwkmi.dll!framework::ToolBarWrapper::setSettings() + 0x117 字节 C++ fwkmi.dll!framework::ToolBarManager::MenuSelect(Menu * pMenu=0x0af20560) 行2027 + 0x81 字节 C++ fwkmi.dll!framework::ToolBarManager::LinkStubMenuSelect(void * pThis=0x0b205628, void * pCaller=0x0af20560) 行1885 + 0xf 字节 C++ BestRegards. Shizhobo.