29#include <com/sun/star/util/URLTransformer.hpp>
30#include <com/sun/star/util/XURLTransformer.hpp>
31#include <com/sun/star/lang/XUnoTunnel.hpp>
32#include <com/sun/star/frame/status/ItemStatus.hpp>
33#include <com/sun/star/frame/status/Visibility.hpp>
34#include <com/sun/star/frame/XDispatchProvider.hpp>
42using namespace ::
cppu;
45using namespace ::com::sun::star::frame::status;
51 m_xDispatchProvider( rDispatchProvider )
53 m_aCommand.Complete = rCommand;
54 Reference< XURLTransformer > xTrans( URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
55 xTrans->parseStrict( m_aCommand );
56 if ( rDispatchProvider.is() )
57 m_xDispatch = rDispatchProvider->queryDispatch( m_aCommand, OUString(), 0 );
74 Reference< XStatusListener > aStatusListener(
this);
82 Reference< XStatusListener > aStatusListener(
this);
106 Reference< XStatusListener > aStatusListener(
this);
146 pViewFrame = pDisp->GetDispatcher_Impl()->
GetFrame();
153 std::unique_ptr<SfxPoolItem> pItem;
154 if ( rEvent.IsEnabled )
156 eState = SfxItemState::DEFAULT;
157 css::uno::Type aType = rEvent.State.getValueType();
162 eState = SfxItemState::UNKNOWN;
167 rEvent.State >>= bTemp ;
172 sal_uInt16 nTemp = 0;
173 rEvent.State >>= nTemp ;
178 sal_uInt32 nTemp = 0;
179 rEvent.State >>= nTemp ;
185 rEvent.State >>= sTemp ;
190 ItemStatus aItemStatus;
191 rEvent.State >>= aItemStatus;
198 rEvent.State >>= aVisibilityStatus;
208 pItem->PutValue( rEvent.State, 0 );
css::uno::Reference< css::frame::XDispatch > m_xDispatch
static SfxSlotPool & GetSlotPool(SfxViewFrame *pFrame=nullptr)
const SfxSlot * GetSlot(sal_uInt16 nId) const
const SfxType * GetType() const
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual ~SfxStatusListener() override
css::util::URL m_aCommand
SfxStatusListener(const css::uno::Reference< css::frame::XDispatchProvider > &rDispatchProvider, sal_uInt16 nSlotId, const OUString &aCommand)
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent &Event) override
css::uno::Reference< css::frame::XDispatch > m_xDispatch
css::uno::Reference< css::frame::XDispatchProvider > m_xDispatchProvider
virtual void SAL_CALL dispose() override
virtual void StateChangedAtStatusListener(SfxItemState eState, const SfxPoolItem *pState)
SfxFrame & GetFrame() const
std::unique_ptr< SfxPoolItem > CreateItem() const