From 177f01b9fe7ef0d4ea08b5c6fb8afa82a51c8d1d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Jun 2013 17:11:33 +0200 Subject: fdo#46808, Convert form::inspection::FormComponentPropertyHandler .. to new style service Change-Id: Iee4681f94dc9874271dc8a1d5d74e161d7691a29 --- extensions/source/propctrlr/buttonnavigationhandler.cxx | 5 ++--- offapi/UnoApi_offapi.mk | 2 +- .../com/sun/star/form/inspection/FormComponentPropertyHandler.idl | 5 +---- reportdesign/source/ui/inspection/DataProviderHandler.cxx | 5 +++-- reportdesign/source/ui/inspection/GeometryHandler.cxx | 6 +++--- reportdesign/source/ui/inspection/ReportComponentHandler.cxx | 3 ++- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/extensions/source/propctrlr/buttonnavigationhandler.cxx b/extensions/source/propctrlr/buttonnavigationhandler.cxx index 382451a04dc3..b0bfc6237ec9 100644 --- a/extensions/source/propctrlr/buttonnavigationhandler.cxx +++ b/extensions/source/propctrlr/buttonnavigationhandler.cxx @@ -22,6 +22,7 @@ #include "formmetadata.hxx" #include "pushbuttonnavigation.hxx" +#include #include //------------------------------------------------------------------------ @@ -52,9 +53,7 @@ namespace pcr { DBG_CTOR( ButtonNavigationHandler, NULL ); - m_xSlaveHandler.set( m_xContext->getServiceManager()->createInstanceWithContext( - OUString( "com.sun.star.form.inspection.FormComponentPropertyHandler" ), m_xContext ), - UNO_QUERY_THROW); + m_xSlaveHandler = css::form::inspection::FormComponentPropertyHandler::create( m_xContext ); } //-------------------------------------------------------------------- diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 5835d63d0acc..929fe9ff9fcd 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -181,6 +181,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/form/contr )) $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/form/inspection,\ DefaultFormComponentInspectorModel \ + FormComponentPropertyHandler \ )) $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/form/runtime,\ FormController \ @@ -924,7 +925,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/form/in CellBindingPropertyHandler \ EditPropertyHandler \ EventHandler \ - FormComponentPropertyHandler \ SubmissionPropertyHandler \ XMLFormsPropertyHandler \ XSDValidationPropertyHandler \ diff --git a/offapi/com/sun/star/form/inspection/FormComponentPropertyHandler.idl b/offapi/com/sun/star/form/inspection/FormComponentPropertyHandler.idl index 4fbe59dfb9f9..1208373e5421 100644 --- a/offapi/com/sun/star/form/inspection/FormComponentPropertyHandler.idl +++ b/offapi/com/sun/star/form/inspection/FormComponentPropertyHandler.idl @@ -31,10 +31,7 @@ module com { module sun { module star { module form { module inspection { @see com::sun::star::inspection::XPropertyHandler @see com::sun::star::form::FormComponents */ -service FormComponentPropertyHandler -{ - interface com::sun::star::inspection::XPropertyHandler; -}; +service FormComponentPropertyHandler : com::sun::star::inspection::XPropertyHandler; }; }; }; }; }; diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx index 72842e752278..261c6b573e7a 100644 --- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx +++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx @@ -25,6 +25,7 @@ #include "uistrings.hrc" #include #include +#include #include #include #include @@ -63,8 +64,8 @@ DataProviderHandler::DataProviderHandler(uno::Reference< uno::XComponentContext { try { - m_xFormComponentHandler.set(m_xContext->getServiceManager()->createInstanceWithContext(OUString("com.sun.star.form.inspection.FormComponentPropertyHandler"),m_xContext),uno::UNO_QUERY_THROW); - m_xTypeConverter.set(script::Converter::create(m_xContext)); + m_xFormComponentHandler = form::inspection::FormComponentPropertyHandler::create(m_xContext); + m_xTypeConverter = script::Converter::create(m_xContext); }catch(const uno::Exception &) { diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index ece222b96789..3c9339bc61e1 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -34,6 +34,7 @@ #include #include #include +#include "com/sun/star/form/inspection/FormComponentPropertyHandler.hpp" #include "com/sun/star/inspection/StringRepresentation.hpp" #include #include @@ -238,9 +239,8 @@ GeometryHandler::GeometryHandler(uno::Reference< uno::XComponentContext > const DBG_CTOR(rpt_GeometryHandler,NULL); try { - const uno::Reference< lang::XMultiComponentFactory > xFac = m_xContext->getServiceManager(); - m_xFormComponentHandler.set(xFac->createInstanceWithContext(OUString("com.sun.star.form.inspection.FormComponentPropertyHandler"),m_xContext),uno::UNO_QUERY_THROW); - m_xTypeConverter.set(script::Converter::create(context)); + m_xFormComponentHandler = form::inspection::FormComponentPropertyHandler::create(m_xContext); + m_xTypeConverter = script::Converter::create(context); loadDefaultFunctions(); } catch(const uno::Exception&) diff --git a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx index df01a77b1118..2aa83e75a77a 100644 --- a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx +++ b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,7 @@ ReportComponentHandler::ReportComponentHandler(uno::Reference< uno::XComponentCo { try { - m_xFormComponentHandler.set(m_xContext->getServiceManager()->createInstanceWithContext(OUString("com.sun.star.form.inspection.FormComponentPropertyHandler"),m_xContext),uno::UNO_QUERY_THROW); + m_xFormComponentHandler = form::inspection::FormComponentPropertyHandler::create(m_xContext); }catch(const uno::Exception &) { -- cgit v1.2.3