23#include <com/sun/star/awt/KeyFunction.hpp>
32 using ::com::sun::star::uno::Reference;
33 using ::com::sun::star::uno::UNO_SET_THROW;
34 using ::com::sun::star::uno::Exception;
35 using ::com::sun::star::uno::Any;
36 using ::com::sun::star::awt::KeyEvent;
37 using ::com::sun::star::inspection::XPropertyControl;
38 using ::com::sun::star::lang::EventObject;
39 using ::com::sun::star::inspection::XPropertyControlContext;
41 namespace KeyFunction = ::com::sun::star::awt::KeyFunction;
51 mxControl.set( _rxObservedControl, UNO_SET_THROW );
69 OSL_ENSURE( _event.Source ==
mxControlWindow,
"PropertyControlExtender::keyPressed: where does this come from?" );
70 if ( ( _event.KeyFunc != KeyFunction::DELETE )
71 || ( _event.Modifiers != 0 )
77 Reference< XPropertyControl > xControl(
mxControl, UNO_SET_THROW );
80 xControl->setValue(
Any() );
86 Reference< XPropertyControlContext > xControlContext( xControl->getControlContext(), UNO_SET_THROW );
87 xControlContext->valueChanged( xControl );
104 OSL_ENSURE(
Source.Source ==
mxControlWindow,
"PropertyControlExtender::disposing: where does this come from?" );
css::uno::Reference< css::awt::XWindow > mxControlWindow
virtual ~PropertyControlExtender() override
css::uno::Reference< css::inspection::XPropertyControl > mxControl
virtual void SAL_CALL keyPressed(const css::awt::KeyEvent &e) override
PropertyControlExtender(const css::uno::Reference< css::inspection::XPropertyControl > &_rxObservedControl)
virtual void SAL_CALL keyReleased(const css::awt::KeyEvent &e) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
#define DBG_UNHANDLED_EXCEPTION(...)
a property handler for any virtual string properties