31#include <com/sun/star/awt/XWindow.hpp>
32#include <com/sun/star/beans/XPropertySet.hpp>
33#include <com/sun/star/lang/NoSupportException.hpp>
34#include <com/sun/star/inspection/PropertyControlType.hpp>
35#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
36#include <com/sun/star/lang/XSingleComponentFactory.hpp>
37#include <com/sun/star/lang/XSingleServiceFactory.hpp>
38#include <com/sun/star/util/VetoException.hpp>
45#include <osl/mutex.hxx>
72 ,m_bContainerFocusListening( false )
73 ,m_bSuspendingPropertyHandlers( false )
74 ,m_bConstructed( false )
75 ,m_bBindingIntrospectee( false )
88 Any SAL_CALL OPropertyBrowserController::queryInterface(
const Type& _rType )
90 Any aReturn = OPropertyBrowserController_Base::queryInterface( _rType );
91 if ( !aReturn.hasValue() )
92 aReturn = ::cppu::queryInterface(
94 static_cast< XObjectInspectorUI*
>(
this )
107 Reference< XWindow > xContainerWindow =
m_xFrame->getContainerWindow();
108 if (xContainerWindow.is())
110 xContainerWindow->addFocusListener(
this);
126 Reference< XWindow > xContainerWindow =
m_xFrame->getContainerWindow();
127 if (xContainerWindow.is())
129 xContainerWindow->removeFocusListener(
this);
146 OSL_PRECOND(
haveView(),
"OPropertyBrowserController::impl_initializeView_nothrow: not to be called when we have no view!" );
178 Reference< XPropertySet > xModelProperties(
m_xModel, UNO_QUERY );
179 if ( !xModelProperties.is() )
184 void (SAL_CALL
XPropertySet::*pListenerOperation)(
const OUString&,
const Reference< XPropertyChangeListener >& )
185 = _bDoListen ? &XPropertySet::addPropertyChangeListener : &XPropertySet::removePropertyChangeListener;
187 (xModelProperties.get()->*pListenerOperation)(
188 OUString(
"IsReadOnly" ),
217 ::osl::MutexGuard aGuard(
m_aMutex );
236 ::osl::MutexGuard aGuard(
m_aMutex );
242 throw VetoException();
245 throw VetoException();
257 return Reference< XDispatch >();
263 Sequence< Reference< XDispatch > > aReturn;
264 sal_Int32 nLen = Requests.getLength();
265 aReturn.realloc( nLen );
267 Reference< XDispatch >* pReturn = aReturn.getArray();
268 const Reference< XDispatch >* pReturnEnd = aReturn.getArray() + nLen;
269 const DispatchDescriptor* pDescripts = Requests.getConstArray();
271 for ( ; pReturn != pReturnEnd; ++ pReturn, ++pDescripts )
272 *pReturn =
queryDispatch( pDescripts->FeatureURL, pDescripts->FrameName, pDescripts->SearchFlags );
281 throw AlreadyInitializedException();
284 if ( arguments.
empty() )
290 Reference< XObjectInspectorModel >
xModel;
291 if ( arguments.
size() == 1 )
293 if ( !( arguments[0] >>=
xModel ) )
294 throw IllegalArgumentException( OUString(), *
this, 0 );
299 throw IllegalArgumentException( OUString(), *
this, 0 );
318 ::osl::MutexGuard aGuard(
m_aMutex );
336 Reference<XWindow> xContainerWindow =
m_xFrame->getContainerWindow();
338 OUString sUIFile(
"modules/spropctrlr/ui/formproperties.ui");
339 std::unique_ptr<weld::Builder> xBuilder;
349 throw RuntimeException(
"The frame is invalid. Unable to extract the container window.",*
this);
353 Construct(xContainerWindow, std::move(xBuilder));
362 Reference< XObjectInspectorModel >
xModel( _rxModel, UNO_QUERY );
383 return !bHandlerVeto;
392 if ( std::find( aAllHandlers.begin(), aAllHandlers.end(), propertyHandler.second ) != aAllHandlers.end() )
396 aAllHandlers.push_back(propertyHandler.second);
399 for (
auto const& handler : aAllHandlers)
403 if ( !handler->suspend( _bSuspend ) )
410 TOOLS_WARN_EXCEPTION(
"extensions.propctrlr",
"OPropertyBrowserController::suspendPropertyHandlers_nothrow" );
419 ::osl::MutexGuard aGuard(
m_aMutex );
420 OSL_ENSURE(
haveView(),
"OPropertyBrowserController::suspend: don't have a view anymore!" );
452 OUString sPageSelection;
453 if ( (
Data >>= sPageSelection ) && !sPageSelection.isEmpty() )
463 return Reference< XModel >();
479 css::lang::EventObject aEvt;
488 m_xView->removeEventListener(
static_cast< XPropertyChangeListener*
>(
this ) );
507 return "org.openoffice.comp.extensions.ObjectInspector";
518 return {
"com.sun.star.inspection.ObjectInspector" };
524 Reference< XWindow > xSourceWindow(_rSource.Source, UNO_QUERY);
525 Reference< XWindow > xContainerWindow;
527 xContainerWindow =
m_xFrame->getContainerWindow();
529 if ( xContainerWindow.get() == xSourceWindow.get() )
553 [&_rSource](
const InterfaceArray::value_type& rxObj) { return rxObj == _rSource.Source; });
561 updateViewDataFromActivePage();
573 const sal_uInt16 nCurrentPage =
m_xPropView->getActivePage();
574 if ( sal_uInt16(-1) != nCurrentPage )
578 if ( nCurrentPage == pageId.second )
588 else if ( !sOldSelection.isEmpty() )
595 sal_uInt16
nPageId = sal_uInt16(-1);
596 HashString2Int16::const_iterator pagePos =
m_aPageIds.find( _rCategoryName );
606 if (
haveView() && ( nNewPage != sal_uInt16(-1) ) )
615 DBG_ASSERT(!
haveView(),
"OPropertyBrowserController::Construct: already have a view!");
616 assert(xBuilder &&
"OPropertyBrowserController::Construct: invalid parent window!");
628 m_xView->addEventListener(
static_cast< XPropertyChangeListener*
>(
this ) );
639 if ( _rEvent.PropertyName ==
"IsReadOnly" )
656 Any aNewValue( _rEvent.NewValue );
666 PropertyState ePropertyState( xHandler->getPropertyState( _rEvent.PropertyName ) );
667 bool bAmbiguousValue = ( PropertyState_AMBIGUOUS_VALUE == ePropertyState );
680 ::osl::MutexGuard aGuard(
m_aMutex );
682 Reference< XPropertyControl > xControl;
689 case PropertyControlType::MultiLineTextField:
690 case PropertyControlType::StringListField:
692 bool bMultiLineTextField =
ControlType == PropertyControlType::MultiLineTextField;
694 auto pContainer = xBuilder->weld_container(
"multiline");
697 pControl->SetModifyHandler();
702 case PropertyControlType::ListBox:
705 auto pComboBox = xBuilder->weld_combo_box(
"listbox");
707 pControl->SetModifyHandler();
712 case PropertyControlType::ComboBox:
715 auto pComboBox = xBuilder->weld_combo_box(
"combobox");
717 pControl->SetModifyHandler();
722 case PropertyControlType::TextField:
723 case PropertyControlType::CharacterField:
725 bool bCharacterField =
ControlType == PropertyControlType::CharacterField;
727 auto pEntry = xBuilder->weld_entry(
"textfield");
729 pControl->SetModifyHandler();
734 case PropertyControlType::NumericField:
737 auto pSpinButton = xBuilder->weld_metric_spin_button(
"numericfield", FieldUnit::NONE);
739 pControl->SetModifyHandler();
744 case PropertyControlType::DateTimeField:
747 auto pContainer = xBuilder->weld_container(
"datetimefield");
749 pControl->SetModifyHandler();
754 case PropertyControlType::DateField:
757 auto pContainer = xBuilder->weld_container(
"datefield");
759 pControl->SetModifyHandler();
764 case PropertyControlType::TimeField:
767 auto pTimeSpinButton = xBuilder->weld_formatted_spin_button(
"timefield");
769 pControl->SetModifyHandler();
774 case PropertyControlType::ColorListBox:
778 auto pMenuButton = xBuilder->weld_menu_button(
"colorlistbox");
780 pControl->SetModifyHandler();
785 case PropertyControlType::HyperlinkField:
788 auto pContainer = xBuilder->weld_container(
"hyperlinkfield");
790 pControl->SetModifyHandler();
796 throw IllegalArgumentException( OUString(), *
this, 1 );
809 Reference< XComponent > xComp( inspectedObject, UNO_QUERY );
813 xComp->addEventListener(
static_cast< XPropertyChangeListener*
>(
this ) );
815 xComp->removeEventListener(
static_cast< XPropertyChangeListener*
>(
this ) );
830 if ( _bCommitModified )
863 if ( std::find( aAllHandlers.begin(), aAllHandlers.end(), propertyHandler.second ) == aAllHandlers.end() )
864 aAllHandlers.push_back( propertyHandler.second );
866 for (
auto const& handler : aAllHandlers)
870 handler->removePropertyChangeListener(
this );
873 catch(
const DisposedException& )
889 PropertyHandlerRepository::const_iterator handlerPos =
m_aPropertyHandlers.find( _rPropertyName );
896 PropertyHandlerRepository::const_iterator handlerPos =
m_aPropertyHandlers.find( _rPropertyName );
899 return handlerPos->second;
906 return handler->getPropertyValue( _rPropertyName );
943 PropertyHandlerArray::iterator aHandler( aPropertyHandlers.begin() );
944 while ( aHandler != aPropertyHandlers.end() )
946 DBG_ASSERT( aHandler->get(),
"OPropertyBrowserController::doInspection: invalid handler!" );
950 if ( aThisHandlersProperties.
empty() )
953 (*aHandler)->dispose();
954 aHandler = aPropertyHandlers.erase( aHandler );
960 for (
const auto & aThisHandlersProperty : aThisHandlersProperties)
962 auto noPrevious = std::none_of(
981 std::pair< PropertyHandlerMultiRepository::iterator, PropertyHandlerMultiRepository::iterator >
988 for (
const auto & superseded : aSupersededByThisHandler)
990 std::vector< Property >::iterator existent = std::find_if(
1002 (*aHandler)->addPropertyChangeListener(
this );
1006 for (
const auto & aThisHandlersProperty : aThisHandlersProperties)
1015 for (
const auto & aInterestingActuation : aInterestingActuations)
1030 sal_Int32 nRelativePropertyOrder =
nPos;
1032 nRelativePropertyOrder =
m_xModel->getPropertyOrderIndex( sourceProps.Name );
1049 css::awt::Size aSize;
1066 awt::Size aAdjustedSize( _rNewSize );
1067 if ( aAdjustedSize.Width < aMinSize.Width )
1068 aAdjustedSize.Width = aMinSize.Width;
1069 if ( aAdjustedSize.Height < aMinSize.Height )
1070 aAdjustedSize.Height = aMinSize.Height;
1071 return aAdjustedSize;
1079 PropertyHandlerRepository::const_iterator handler =
m_aPropertyHandlers.find( _rProperty.Name );
1083 _rDescriptor.
assignFrom( handler->second->describePropertyLine( _rProperty.Name,
this ) );
1087 _rDescriptor.
sName = _rProperty.Name;
1090 if ( _rDescriptor.DisplayName.isEmpty() )
1093 SAL_WARN(
"extensions.propctrlr",
"OPropertyBrowserController::describePropertyLine: handler did not provide a display name for '"
1094 <<_rProperty.Name <<
"'!" );
1096 _rDescriptor.DisplayName = _rProperty.Name;
1099 PropertyState ePropertyState( _rDescriptor.
xPropertyHandler->getPropertyState( _rProperty.Name ) );
1100 if ( PropertyState_AMBIGUOUS_VALUE == ePropertyState )
1103 _rDescriptor.
aValue.clear();
1109 auto xWindow = _rDescriptor.Control->getControlWindow();
1113 if (m_pControlWindow)
1120 TOOLS_WARN_EXCEPTION(
"extensions.propctrlr",
"OPropertyBrowserController::describePropertyLine" );
1127 OSL_PRECOND(
m_aPageIds.empty(),
"OPropertyBrowserController::impl_buildCategories_throw: duplicate call!" );
1133 for (
auto const& category : aCategories)
1136 "OPropertyBrowserController::impl_buildCategories_throw: duplicate programmatic name!" );
1155 std::set< sal_uInt16 > aUsedPages;
1159 std::vector< OUString > aActuatingProperties;
1160 std::vector< Any > aActuatingPropertyValues;
1171 SAL_WARN_IF( aDescriptor.Category.isEmpty(),
"extensions.propctrlr",
1172 "OPropertyBrowserController::UpdateUI: empty category provided for property '"
1176 if ( nTargetPageId == sal_uInt16(-1) )
1186 aUsedPages.insert( nTargetPageId );
1189 if ( bIsActuatingProperty )
1191 aActuatingProperties.push_back(
property.second.Name );
1198 std::vector< Any >::const_iterator aPropertyValue = aActuatingPropertyValues.begin();
1199 for (
auto const& actuatingProperty : aActuatingProperties)
1210 if ( aUsedPages.find( pageId.second ) == aUsedPages.end() )
1213 aSurvivingPageIds.insert(pageId);
1222 Sequence< PropertyCategoryDescriptor > aCategories(
m_xModel->describeCategories() );
1223 if ( aCategories.hasElements() )
1257 InteractiveSelectionResult eResult =
1258 handler->second->onInteractivePropertySelection( _rName, _bPrimary,
aData,
1263 case InteractiveSelectionResult_Cancelled:
1264 case InteractiveSelectionResult_Success:
1267 case InteractiveSelectionResult_ObtainedValue:
1268 handler->second->setPropertyValue( _rName,
aData );
1270 case InteractiveSelectionResult_Pending:
1274 OSL_FAIL(
"OPropertyBrowserController::Clicked: unknown result value!" );
1289 if (
property.second.Name == _rName )
1299 OUString sPlcHolder =
PcrRes(RID_EMBED_IMAGE_PLACEHOLDER);
1300 bool bIsPlaceHolderValue =
false;
1308 if ( sVal == sPlcHolder )
1309 bIsPlaceHolderValue =
true;
1316 if ( bIsActuatingProperty )
1324 if ( !bIsPlaceHolderValue )
1325 handler->setPropertyValue( rName, _rValue );
1329 Any aNormalizedValue = handler->getPropertyValue( rName );
1332 if ( bIsActuatingProperty )
1338 catch(
const PropertyVetoException& eVetoException)
1341 VclMessageType::Info, VclButtonsType::Ok,
1342 eVetoException.Message));
1345 Any aNormalizedValue = handler->getPropertyValue( rName );
1371 Reference< XPropertyHandler > lcl_createHandler(
const Reference<XComponentContext>& _rContext,
const Any& _rFactoryDescriptor )
1373 Reference< XPropertyHandler > xHandler;
1377 Reference< XSingleComponentFactory > xComponentFac;
1379 if ( _rFactoryDescriptor >>= sServiceName )
1380 xHandler.set( _rContext->getServiceManager()->createInstanceWithContext( sServiceName, _rContext ), UNO_QUERY );
1381 else if ( _rFactoryDescriptor >>= xServiceFac )
1382 xHandler.set(xServiceFac->createInstance(), css::uno::UNO_QUERY);
1383 else if ( _rFactoryDescriptor >>= xComponentFac )
1384 xHandler.set(xComponentFac->createInstanceWithContext( _rContext ), css::uno::UNO_QUERY);
1385 OSL_ENSURE(xHandler.is(),
"lcl_createHandler: Can not create handler");
1393 _rHandlers.resize( 0 );
1394 if ( _rObjects.empty() )
1397 Sequence< Any > aHandlerFactories;
1399 aHandlerFactories =
m_xModel->getHandlerFactories();
1401 for (
auto const & handlerFactory : std::as_const(aHandlerFactories) )
1403 if ( _rObjects.size() == 1 )
1405 Reference< XPropertyHandler > xHandler( lcl_createHandler(
m_xContext, handlerFactory ) );
1406 if ( xHandler.is() )
1408 xHandler->inspect( _rObjects[0] );
1409 _rHandlers.push_back( xHandler );
1415 std::vector< Reference< XPropertyHandler > > aSingleHandlers( _rObjects.size() );
1416 std::vector< Reference< XPropertyHandler > >::iterator pHandler = aSingleHandlers.begin();
1418 for (
auto const& elem : _rObjects)
1420 *pHandler = lcl_createHandler(
m_xContext, handlerFactory );
1421 if ( pHandler->is() )
1423 (*pHandler)->inspect(elem);
1427 aSingleHandlers.resize( pHandler - aSingleHandlers.begin() );
1430 if ( !aSingleHandlers.empty() )
1431 _rHandlers.push_back(
new PropertyComposer( std::move(aSingleHandlers) ) );
1443 [&_rName](
const OrderedPropertyMap::value_type& rEntry) { return rEntry.second.Name == _rName; });
1445 *_pProperty = search;
1452 ::osl::MutexGuard aGuard(
m_aMutex );
1456 OrderedPropertyMap::const_iterator propertyPos;
1467 TOOLS_WARN_EXCEPTION(
"extensions.propctrlr",
"OPropertyBrowserController::rebuildPropertyUI" );
1476 ::osl::MutexGuard aGuard(
m_aMutex );
1489 ::osl::MutexGuard aGuard(
m_aMutex );
1502 ::osl::MutexGuard aGuard(
m_aMutex );
1507 OrderedPropertyMap::const_iterator propertyPos;
1552 ::osl::MutexGuard aGuard(
m_aMutex );
1565 ::osl::MutexGuard aGuard(
m_aMutex );
1570 OSL_ENSURE(
nPageId != sal_uInt16(-1),
"OPropertyBrowserController::showCategory: invalid category!" );
1578 ::osl::MutexGuard aGuard(
m_aMutex );
1582 Reference< XPropertyControl > xControl(
getPropertyBox().GetPropertyControl( _rPropertyName ) );
1602 ::osl::MutexGuard aGuard(
m_aMutex );
1605 throw DisposedException();
1608 throw NoSupportException();
1617 std::pair< PropertyHandlerMultiRepository::const_iterator, PropertyHandlerMultiRepository::const_iterator > aInterestedHandlers =
1619 if ( aInterestedHandlers.first == aInterestedHandlers.second )
1627 PropertyHandlerMultiRepository::const_iterator handler = aInterestedHandlers.first;
1628 while ( handler != aInterestedHandlers.second )
1630 handler->second->actuatingPropertyChanged( _rPropertyName, _rNewValue, _rOldValue,
1645extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
1647 css::uno::XComponentContext* context , css::uno::Sequence<css::uno::Any>
const&)
PropertiesInfo aProperties
constexpr OUStringLiteral sServiceName
static std::unique_ptr< weld::Builder > CreateInterimBuilder(vcl::Window *pParent, const OUString &rUIFile, bool bAllowCycleFocusOut, sal_uInt64 nLOKWindowId=0)
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
void notifyEach(void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event)
void disposeAndClear(const css::lang::EventObject &rEvt)
sal_Int32 removeInterface(const css::uno::Reference< css::uno::XInterface > &rxIFace)
sal_Int32 addInterface(const css::uno::Reference< css::uno::XInterface > &rxIFace)
helper class composing requests to a ->XObjectInspectorUI interface, coming from multiple sources
static OUString getHelpId(std::u16string_view _rHelpURL)
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
virtual ~OPropertyBrowserController() override
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
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
OPropertyBrowserController(const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
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
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
void EnablePropertyControls(const OUString &_rEntryName, sal_Int16 _nControls, bool _bEnable)
void RemoveEntry(const OUString &_rName)
void SetControlObserver(IPropertyControlObserver *)
sal_uInt16 GetPropertyPos(const OUString &rEntryName) const
void RemovePage(sal_uInt16 nID)
void ChangeEntry(const OLineDescriptor &)
void SetHelpText(const OUString &_rHelpText)
void ShowPropertyPage(sal_uInt16 _nPageId, bool _bShow)
void EnableHelpSection(bool _bEnable)
void SetPropertyValue(const OUString &_rEntryName, const css::uno::Any &_rValue, bool _bUnknownValue)
void SetLineListener(IPropertyLineListener *)
sal_uInt16 AppendPage(const OUString &r, const OUString &_rHelpId)
void InsertEntry(const OLineDescriptor &, sal_uInt16 _nPageId, sal_uInt16 nPos=EDITOR_LIST_APPEND)
void EnablePropertyLine(const OUString &_rEntryName, bool _bEnable)
implements an <type>XPropertyHandler</type> which composes its information from a set of other proper...
static weld::Window * getDialogParentFrame(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
gets the window of the ObjectInspector in which a property handler lives
static std::unique_ptr< weld::Builder > makeBuilder(const OUString &rUIFile, const css::uno::Reference< css::uno::XComponentContext > &rContext)
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
Reference< XComponentContext > m_xContext
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
constexpr OUStringLiteral aData
class SAL_NO_VTABLE XPropertySet
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
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
OUString PcrRes(TranslateId aId)
void clearContainer(CONTAINER &_rContainer)
IMPL_LINK_NOARG(OBrowserLine, OnButtonFocus, weld::Widget &, void)
#define EDITOR_LIST_ENTRY_NOTFOUND
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * extensions_propctrlr_OPropertyBrowserController_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
css::uno::Reference< css::inspection::XPropertyHandler > xPropertyHandler
void assignFrom(const css::inspection::LineDescriptor &_rhs)
Reference< XModel > xModel
#define IMPLEMENT_FORWARD_REFCOUNT(classname, refcountbase)