27#include <com/sun/star/awt/XFocusListener.hpp>
28#include <com/sun/star/beans/XPropertyChangeListener.hpp>
29#include <com/sun/star/uno/XComponentContext.hpp>
30#include <com/sun/star/uno/Sequence.hxx>
31#include <com/sun/star/lang/XServiceInfo.hpp>
32#include <com/sun/star/lang/XEventListener.hpp>
33#include <com/sun/star/awt/XLayoutConstrains.hpp>
34#include <com/sun/star/inspection/XPropertyControlFactory.hpp>
35#include <com/sun/star/inspection/XObjectInspector.hpp>
36#include <com/sun/star/inspection/XObjectInspectorUI.hpp>
37#include <com/sun/star/inspection/XPropertyHandler.hpp>
38#include <com/sun/star/lang/XInitialization.hpp>
47#include <unordered_map>
52 class OPropertyEditor;
53 struct OLineDescriptor;
55 typedef ::cppu::WeakImplHelper < css::lang::XServiceInfo
56 , css::awt::XFocusListener
57 , css::awt::XLayoutConstrains
58 , css::beans::XPropertyChangeListener
59 , css::inspection::XPropertyControlFactory
60 , css::inspection::XObjectInspector
61 , css::lang::XInitialization
67 ,
public css::inspection::XObjectInspectorUI
76 typedef std::vector< css::uno::Reference< css::uno::XInterface > >
79 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
80 css::uno::Reference< css::frame::XFrame >
m_xFrame;
81 css::uno::Reference< css::awt::XWindow >
m_xView;
92 typedef css::uno::Reference< css::inspection::XPropertyHandler >
95 typedef std::unordered_map< OUString, PropertyHandlerRef >
97 typedef std::unordered_multimap< OUString, PropertyHandlerRef >
106 css::uno::Reference< css::inspection::XObjectInspectorModel >
132 virtual
void SAL_CALL
attachFrame( const css::uno::Reference< css::
frame::XFrame >& xFrame ) override;
135 virtual css::uno::Any SAL_CALL
getViewData( ) override;
136 virtual
void SAL_CALL
restoreViewData( const css::uno::Any& Data ) override;
137 virtual css::uno::Reference< css::
frame::XModel > SAL_CALL
getModel( ) override;
138 virtual css::uno::Reference< css::
frame::XFrame > SAL_CALL
getFrame( ) override;
141 virtual
void SAL_CALL
dispose( ) override;
142 virtual
void SAL_CALL
addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override;
143 virtual
void SAL_CALL
removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override;
146 virtual
void SAL_CALL
focusGained( const css::awt::FocusEvent& _rSource ) override;
147 virtual
void SAL_CALL
focusLost( const css::awt::FocusEvent& _rSource ) override;
150 virtual
void SAL_CALL
disposing( const css::lang::EventObject& Source ) override;
158 virtual
void SAL_CALL
propertyChange( const css::
beans::PropertyChangeEvent& _rEvent ) override;
166 const css::uno::Reference< css::uno::XComponentContext >& _rxContext);
172 virtual
void Clicked( const OUString& _rName,
bool _bPrimary ) override;
173 virtual
void Commit( const OUString& _rName, const css::uno::Any& _rVal ) override;
176 virtual
void focusGained( const css::uno::Reference< css::inspection::XPropertyControl >&
Control ) override;
177 virtual
void valueChanged( const css::uno::Reference< css::inspection::XPropertyControl >&
Control ) override;
185 virtual
void SAL_CALL
rebuildPropertyUI( const OUString& _rPropertyName ) override;
186 virtual
void SAL_CALL
showPropertyUI( const OUString& _rPropertyName ) override;
187 virtual
void SAL_CALL
hidePropertyUI( const OUString& _rPropertyName ) override;
189 virtual css::uno::Reference< css::inspection::XPropertyControl > SAL_CALL
getPropertyControl( const OUString& _rPropertyName ) override;
190 virtual
void SAL_CALL
registerControlObserver( const css::uno::Reference< css::inspection::XPropertyControlObserver >& Observer ) override;
191 virtual
void SAL_CALL
revokeControlObserver( const css::uno::Reference< css::inspection::XPropertyControlObserver >& Observer ) override;
195 virtual css::uno::Reference< css::inspection::XObjectInspectorModel > SAL_CALL
getInspectorModel() override;
196 virtual
void SAL_CALL
setInspectorModel( const css::uno::Reference< css::inspection::XObjectInspectorModel >& _inspectormodel ) override;
197 virtual css::uno::Reference< css::inspection::XObjectInspectorUI > SAL_CALL
getInspectorUI() override;
198 virtual
void SAL_CALL
inspect( const css::uno::Sequence< css::uno::Reference< css::uno::
XInterface > >& Objects ) override;
201 virtual css::uno::Reference< css::
frame::XDispatch > SAL_CALL
queryDispatch( const css::
util::URL& URL, const OUString& TargetFrameName, ::sal_Int32 SearchFlags ) override;
202 virtual css::uno::Sequence< css::uno::Reference< css::
frame::XDispatch > > SAL_CALL
queryDispatches( const css::uno::Sequence< css::
frame::DispatchDescriptor >& Requests ) override;
205 virtual
void SAL_CALL
initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
282 void Construct(
const css::uno::Reference<css::awt::XWindow>& rContainerWindow, std::unique_ptr<weld::Builder> xBuilder);
358 void createWithModel(
const css::uno::Reference< css::inspection::XObjectInspectorModel >& _rxModel );
non-UNO version of the XPropertyControlObserver
callback for a ComposedPropertyUIUpdate checking a given property for existence
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &_rEvent) override
virtual void SAL_CALL registerControlObserver(const css::uno::Reference< css::inspection::XPropertyControlObserver > &Observer) override
virtual void Clicked(const OUString &_rName, bool _bPrimary) override
virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL &URL, const OUString &TargetFrameName, ::sal_Int32 SearchFlags) override
bool m_bBindingIntrospectee
virtual void SAL_CALL enablePropertyUI(const OUString &_rPropertyName, sal_Bool _bEnable) override
virtual void SAL_CALL setHelpSectionText(const OUString &HelpText) override
void impl_buildCategories_throw()
builds up m_aPageIds from InspectorModel::describeCategories, and insert all the respective tab pages...
OUString m_sPageSelection
::comphelper::OInterfaceContainerHelper2 m_aDisposeListeners
bool impl_isReadOnlyModel_throw() const
determines whether the view should be readonly.
::comphelper::OInterfaceContainerHelper2 m_aControlObservers
virtual void SAL_CALL focusLost(const css::awt::FocusEvent &_rSource) override
void stopContainerWindowListening()
void impl_toggleInspecteeListening_nothrow(bool _bOn)
adds or removes ourself as XEventListener to/from all our inspectees
virtual void SAL_CALL setInspectorModel(const css::uno::Reference< css::inspection::XObjectInspectorModel > &_inspectormodel) override
css::uno::Reference< css::inspection::XObjectInspectorModel > m_xModel
our InspectorModel
DECL_LINK(OnPageActivation, LinkParamNone *, void)
std::multimap< sal_Int32, css::beans::Property > OrderedPropertyMap
virtual css::uno::Reference< css::inspection::XPropertyControl > SAL_CALL getPropertyControl(const OUString &_rPropertyName) override
std::vector< PropertyHandlerRef > PropertyHandlerArray
void impl_initializeView_nothrow()
initializes our view, as indicated by the model's view-relevant properties
PropertyHandlerMultiRepository m_aDependencyHandlers
css::uno::Reference< css::uno::XComponentContext > m_xContext
OUString m_sCommittingProperty
the property we're just committing
std::unordered_map< OUString, PropertyHandlerRef > PropertyHandlerRepository
sal_uInt16 impl_getPageIdForCategory_nothrow(const OUString &_rCategoryName) const
retrieves the id of the tab page which represents a given category.
void Construct(const css::uno::Reference< css::awt::XWindow > &rContainerWindow, std::unique_ptr< weld::Builder > xBuilder)
bool m_bContainerFocusListening
void stopInspection(bool _bCommitModified)
void impl_rebindToInspectee_nothrow(InterfaceArray &&_rObjects)
bool suspendPropertyHandlers_nothrow(bool _bSuspend)
calls XPropertyHandler::suspend for all our property handlers
bool suspendAll_nothrow()
suspends the complete inspector
virtual sal_Bool SAL_CALL attachModel(const css::uno::Reference< css::frame::XModel > &xModel) override
std::unique_ptr< ComposedPropertyUIUpdate > m_pUIRequestComposer
virtual void SAL_CALL revokeControlObserver(const css::uno::Reference< css::inspection::XPropertyControlObserver > &Observer) override
HashString2Int16 m_aPageIds
PropertyHandlerRef m_xInteractiveHandler
virtual css::awt::Size SAL_CALL getPreferredSize() override
virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) override
virtual void SAL_CALL dispose() override
bool impl_hasPropertyHandlerFor_nothrow(const OUString &_rPropertyName) const
determines whether we have a handler for the given property
bool m_bSuspendingPropertyHandlers
virtual void SAL_CALL focusGained(const css::awt::FocusEvent &_rSource) override
void getPropertyHandlers(const InterfaceArray &_rObjects, PropertyHandlerArray &_rHandlers)
retrieves special property handlers for our introspectee
void impl_bindToNewModel_nothrow(const css::uno::Reference< css::inspection::XObjectInspectorModel > &_rxInspectorModel)
binds the instance to a new model
virtual css::uno::Any SAL_CALL getViewData() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getImplementationName() override
std::unique_ptr< OPropertyBrowserView > m_xPropView
virtual void Commit(const OUString &_rName, const css::uno::Any &_rVal) override
virtual void SAL_CALL restoreViewData(const css::uno::Any &Data) override
virtual void SAL_CALL hidePropertyUI(const OUString &_rPropertyName) override
std::unordered_multimap< OUString, PropertyHandlerRef > PropertyHandlerMultiRepository
InterfaceArray m_aInspectedObjects
the object(s) we're currently inspecting
std::unique_ptr< weld::Builder > m_xBuilder
virtual css::awt::Size SAL_CALL getMinimumSize() override
void createWithModel(const css::uno::Reference< css::inspection::XObjectInspectorModel > &_rxModel)
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
void describePropertyLine(const css::beans::Property &_rPropertyName, OLineDescriptor &_rDescriptor)
describes the UI for the given property
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
css::uno::Any impl_getPropertyValue_throw(const OUString &_rPropertyName)
retrieves the value of the given property, by asking the appropriate XPropertyHandler
OPropertyEditor & getPropertyBox()
void selectPageFromViewData()
selects a page according to our current view data
virtual void SAL_CALL attachFrame(const css::uno::Reference< css::frame::XFrame > &xFrame) override
PropertyHandlerRepository m_aPropertyHandlers
void startContainerWindowListening()
virtual void SAL_CALL showCategory(const OUString &_rCategory, sal_Bool _bShow) override
virtual bool hasPropertyByName(const OUString &_rName) override
virtual void valueChanged(const css::uno::Reference< css::inspection::XPropertyControl > &Control) override
std::vector< css::uno::Reference< css::uno::XInterface > > InterfaceArray
virtual css::uno::Reference< css::frame::XModel > SAL_CALL getModel() override
virtual css::uno::Reference< css::inspection::XObjectInspectorUI > SAL_CALL getInspectorUI() override
virtual void SAL_CALL showPropertyUI(const OUString &_rPropertyName) override
virtual css::uno::Reference< css::inspection::XObjectInspectorModel > SAL_CALL getInspectorModel() override
virtual void SAL_CALL inspect(const css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > &Objects) override
virtual void SAL_CALL rebuildPropertyUI(const OUString &_rPropertyName) override
virtual css::uno::Reference< css::inspection::XPropertyControl > SAL_CALL createPropertyControl(::sal_Int16 ControlType, sal_Bool CreateReadOnly) override
XPropertyControlFactory.
OrderedPropertyMap m_aProperties
the properties of the currently inspected object(s)
void impl_startOrStopModelListening_nothrow(bool _bDoListen) const
starts or stops listening at the model
void updateViewDataFromActivePage()
updates our view data from the currently active page
virtual css::uno::Reference< css::frame::XFrame > SAL_CALL getFrame() override
css::uno::Reference< css::inspection::XPropertyHandler > PropertyHandlerRef
PropertyHandlerRef const & impl_getHandlerForProperty_throw(const OUString &_rPropertyName) const
retrieves the property handler for a given property name
virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor > &Requests) override
void impl_broadcastPropertyChange_nothrow(const OUString &_rPropertyName, const css::uno::Any &_rNewValue, const css::uno::Any &_rOldValue, bool _bFirstTimeInit) const
called when a property changed, to broadcast any handlers which might have registered for this proper...
OUString m_sLastValidPageSelection
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 css::awt::Size SAL_CALL calcAdjustedSize(const css::awt::Size &rNewSize) override
bool impl_isActuatingProperty_nothrow(const OUString &_rPropertyName) const
determines whether the given property is an actuating property, that is, at least one handler express...
std::unordered_map< OUString, sal_uInt16 > HashString2Int16
css::uno::Reference< css::frame::XFrame > m_xFrame
virtual void SAL_CALL enablePropertyUIElements(const OUString &_rPropertyName, ::sal_Int16 _nElements, sal_Bool _bEnable) override
bool impl_findObjectProperty_nothrow(const OUString &_rName, OrderedPropertyMap::const_iterator *_pProperty=nullptr)
retrieves the position of the property given by name in m_aProperties
css::uno::Reference< css::awt::XWindow > m_xView
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
std::vector< css::uno::Reference< css::uno::XInterface > > InterfaceArray
a property handler for any virtual string properties
::cppu::WeakImplHelper< css::lang::XServiceInfo, css::awt::XFocusListener, css::awt::XLayoutConstrains, css::beans::XPropertyChangeListener, css::inspection::XPropertyControlFactory, css::inspection::XObjectInspector, css::lang::XInitialization > OPropertyBrowserController_Base
#define DECLARE_XINTERFACE()