20#include <com/sun/star/beans/XPropertySet.hpp>
21#include <com/sun/star/lang/NullPointerException.hpp>
24#include <com/sun/star/form/inspection/FormComponentPropertyHandler.hpp>
25#include <com/sun/star/container/XNameContainer.hpp>
41 m_xFormComponentHandler = form::inspection::FormComponentPropertyHandler::create(m_xContext);
43 }
catch(
const uno::Exception &)
48OUString SAL_CALL ReportComponentHandler::getImplementationName( )
50 return "com.sun.star.comp.report.ReportComponentHandler";
53sal_Bool SAL_CALL ReportComponentHandler::supportsService(
const OUString& ServiceName )
58uno::Sequence< OUString > SAL_CALL ReportComponentHandler::getSupportedServiceNames( )
60 return {
"com.sun.star.report.inspection.ReportComponentHandler" };
67void SAL_CALL ReportComponentHandler::disposing()
69 ::comphelper::disposeComponent(m_xFormComponentHandler);
71void SAL_CALL ReportComponentHandler::addEventListener(
const uno::Reference< lang::XEventListener > & xListener)
73 m_xFormComponentHandler->addEventListener(xListener);
76void SAL_CALL ReportComponentHandler::removeEventListener(
const uno::Reference< lang::XEventListener > & aListener)
78 m_xFormComponentHandler->removeEventListener(aListener);
84void SAL_CALL ReportComponentHandler::inspect(
const uno::Reference< uno::XInterface > &
Component)
88 uno::Reference< container::XNameContainer > xNameCont(
Component,uno::UNO_QUERY);
89 static constexpr OUStringLiteral sFormComponent(
u"FormComponent");
90 if ( xNameCont->hasByName(sFormComponent) )
91 xNameCont->getByName(sFormComponent) >>= m_xFormComponent;
92 static constexpr OUStringLiteral sRowSet(
u"RowSet");
93 if ( xNameCont->hasByName(sRowSet) )
95 uno::Reference<beans::XPropertySet> xProp(m_xFormComponentHandler,uno::UNO_QUERY);
96 xProp->setPropertyValue(sRowSet,xNameCont->getByName(sRowSet));
99 catch(
const uno::Exception &)
101 throw lang::NullPointerException();
103 if ( m_xFormComponent.is() )
105 m_xFormComponentHandler->inspect(m_xFormComponent);
109uno::Any SAL_CALL ReportComponentHandler::getPropertyValue(
const OUString & PropertyName)
111 return m_xFormComponentHandler->getPropertyValue(PropertyName);
114void SAL_CALL ReportComponentHandler::setPropertyValue(
const OUString & PropertyName,
const uno::Any & Value)
116 m_xFormComponentHandler->setPropertyValue(PropertyName,
Value);
119beans::PropertyState SAL_CALL ReportComponentHandler::getPropertyState(
const OUString & PropertyName)
121 return m_xFormComponentHandler->getPropertyState(PropertyName);
124inspection::LineDescriptor SAL_CALL ReportComponentHandler::describePropertyLine(
const OUString & PropertyName,
const uno::Reference< inspection::XPropertyControlFactory > & ControlFactory)
126 return m_xFormComponentHandler->describePropertyLine(PropertyName, ControlFactory);
129uno::Any SAL_CALL ReportComponentHandler::convertToPropertyValue(
const OUString & PropertyName,
const uno::Any & ControlValue)
131 return m_xFormComponentHandler->convertToPropertyValue(PropertyName, ControlValue);
134uno::Any SAL_CALL ReportComponentHandler::convertToControlValue(
const OUString & PropertyName,
const uno::Any & PropertyValue,
const uno::Type & ControlValueType)
136 return m_xFormComponentHandler->convertToControlValue(PropertyName, PropertyValue, ControlValueType);
139void SAL_CALL ReportComponentHandler::addPropertyChangeListener(
const uno::Reference< beans::XPropertyChangeListener > & Listener)
141 m_xFormComponentHandler->addPropertyChangeListener(Listener);
144void SAL_CALL ReportComponentHandler::removePropertyChangeListener(
const uno::Reference< beans::XPropertyChangeListener > & _rxListener)
146 m_xFormComponentHandler->removePropertyChangeListener(_rxListener);
149uno::Sequence< beans::Property > SAL_CALL ReportComponentHandler::getSupportedProperties()
151 ::std::vector< beans::Property > aNewProps;
154 return uno::Sequence< beans::Property >(aNewProps.data(), aNewProps.size());
157uno::Sequence< OUString > SAL_CALL ReportComponentHandler::getSupersededProperties()
159 uno::Sequence< OUString > aRet;
163uno::Sequence< OUString > SAL_CALL ReportComponentHandler::getActuatingProperties()
165 return m_xFormComponentHandler->getActuatingProperties();
168sal_Bool SAL_CALL ReportComponentHandler::isComposable(
const OUString& _rPropertyName )
170 return OPropertyInfoService::isComposable( _rPropertyName, m_xFormComponentHandler );
173inspection::InteractiveSelectionResult SAL_CALL ReportComponentHandler::onInteractivePropertySelection(
const OUString & PropertyName,
sal_Bool Primary,
uno::Any & out_Data,
const uno::Reference< inspection::XObjectInspectorUI > & InspectorUI)
175 return m_xFormComponentHandler->onInteractivePropertySelection(PropertyName, Primary, out_Data, InspectorUI);
178void SAL_CALL ReportComponentHandler::actuatingPropertyChanged(
const OUString & ActuatingPropertyName,
const uno::Any & NewValue,
const uno::Any & OldValue,
const uno::Reference< inspection::XObjectInspectorUI > & InspectorUI,
sal_Bool FirstTimeInit)
180 m_xFormComponentHandler->actuatingPropertyChanged(ActuatingPropertyName, NewValue, OldValue, InspectorUI, FirstTimeInit);
185 return m_xFormComponentHandler->suspend(Suspend);
192extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
194 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const&)
Reference< XComponentContext > m_xContext
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * reportdesign_ReportComponentHandler_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
static void getExcludeProperties(::std::vector< css::beans::Property > &_rExcludeProperties, const css::uno::Reference< css::inspection::XPropertyHandler > &_xFormComponentHandler)
ReportComponentHandler(css::uno::Reference< css::uno::XComponentContext > context)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
::cppu::WeakComponentImplHelper< css::inspection::XPropertyHandler, css::lang::XServiceInfo > ReportComponentHandler_Base
::std::pair< MetaAction *, int > Component