https://bugs.documentfoundation.org/show_bug.cgi?id=96896
--- Comment #17 from Maxim Monastirsky <[email protected]> --- (In reply to akash96j from comment #15) > The main problem is this: > The data related to the controller is stored in a XTitle reference. But > Xtitle has only two functions to set or get title. Now when a controller is > disposing, I am able to get its data in a XTitle reference but am not able > to call a dispose function. Should I extend the XTitle class just for this > one case? No, but you can make sure that the object that implements XTitle also implements css::lang::XComponent, and then you can do something like this: css::uno::Reference< css::lang::XComponent > xComponent( xTitleHelper, css::uno::UNO_QUERY ); if ( xComponent.is() ) xComponent->dispose(); Or take a different approach: (In reply to akash96j from comment #14) > 4. There is another method which I explored. When a frame disposes it sends > a event to its listeners. The titleHelper is one of this listener and hence > recieves this event and disposes the frames lease number. Similarly when a > controller disposes it also generates a event. But I was unable to find and > function which would register to controller Events. Well, SfxBaseController seems to implement css::lang::XComponent, so you can use XComponent::addEventListener for that. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
