15#include <com/sun/star/frame/XController.hpp>
16#include <com/sun/star/view/XSelectionSupplier.hpp>
41 css::uno::Reference<css::view::XSelectionSupplier> xSupplier(
mxController,
43 xSupplier->addSelectionChangeListener(
this);
50 css::uno::Reference<css::view::XSelectionSupplier> xSupplier(
mxController,
54 css::uno::Any aAny = xSupplier->getSelection();
55 auto xInterface = aAny.get<css::uno::Reference<css::uno::XInterface>>();
62 css::uno::Reference<css::view::XSelectionSupplier> xSupplier(
mxController,
64 xSupplier->removeSelectionChangeListener(
this);
67 virtual void SAL_CALL
disposing(
const css::lang::EventObject& )
override {}
comphelper::WeakComponentImplHelper< css::view::XSelectionChangeListener > SelectionChangeHandlerInterfaceBase
Selection change handler to listen to document selection changes.
SelectionChangeHandler(const SelectionChangeHandler &)=delete
virtual void SAL_CALL disposing(const css::lang::EventObject &) override
virtual void SAL_CALL selectionChanged(const css::lang::EventObject &) override
VclPtr< DevelopmentToolDockingWindow > mpDockingWindow
~SelectionChangeHandler()
css::uno::Reference< css::frame::XController > mxController
SelectionChangeHandler(css::uno::Reference< css::frame::XController > xController, DevelopmentToolDockingWindow *pDockingWindow)
SelectionChangeHandler & operator=(const SelectionChangeHandler &)=delete
virtual void disposing(std::unique_lock< std::mutex > &)
Reference< XController > xController